def _get_server_info(metadata=None, created=None):
    """
    Creates a fake server config to be used when testing creating servers
    (either as the config to use when creating, or as the config to return as
    a response).

    :param ``dict`` metadata: metadata to include in the server config
    :param ``created``: this is only used in server responses, but gives an
        extra field to distinguish one server config from another
    """
    config = {
        'name': 'abcd',
        'imageRef': '123',
        'flavorRef': 'xyz',
        'metadata': metadata or {}
    }
    if created is not None:
        config['created'] = created
    return config