示例#1
0
def get_path_for_repo(repo_id):
    """
    Return the URL for the repository.

    :param repo_id: The identifier/name for the repository
    :type repo_id: basestring
    :returns: URL for the repository
    :rtype: basestring
    """
    return get_v2_data()['repos'][repo_id].url
示例#2
0
def get_pulp_repository_name(repo_id):
    """
    Return the name used in pulp for the repository.

    :param repo_id: The identifier/name for the repository
    :type repo_id: basestring
    :returns: the pulp repository name
    :rtype: string
    """
    return get_v2_data()['repos'][repo_id].repository
示例#3
0
def get_manifest_list_amd64_for_repo(repo_id):
    """
    Return the manifest list amd64 tags for the repository.

    :param repo_id: The identifier/name for the repository
    :type repo_id: basestring
    :returns: manifest list amd64 tags for the repo
    :rtype: dict
    """
    repo = get_v2_data()['repos'][repo_id]
    try:
        manifest_list_amd64_tags = repo.manifest_list_amd64_tags
    except AttributeError:
        manifest_list_amd64_tags = {}
    return manifest_list_amd64_tags
示例#4
0
def get_manifest_list_data_for_repo(repo_id):
    """
    Return the manifest list data for the repository.

    :param repo_id: The identifier/name for the repository
    :type repo_id: basestring
    :returns: manifest list data for the repo
    :rtype: list
    """
    repo = get_v2_data()['repos'][repo_id]
    try:
        manifest_list_data = repo.manifest_list_data
    except AttributeError:
        manifest_list_data = []
    return manifest_list_data
示例#5
0
def get_schema2_data_for_repo(repo_id):
    """
    Return the schema2 data for the repository.

    :param repo_id: The identifier/name for the repository
    :type repo_id: basestring
    :returns: schema2 data for the repo
    :rtype: list
    """
    repo = get_v2_data()['repos'][repo_id]
    try:
        schema2_data = repo.schema2_data
    except AttributeError:
        schema2_data = None
    return schema2_data