예제 #1
0
 def __init__(self, ctx, config):
     config = config or dict()
     if 'playbook' not in config:
         config['playbook'] = 'cephlab.yml'
     if 'repo' not in config:
         config['repo'] = teuth_config.get_ceph_cm_ansible_git_url()
     super(CephLab, self).__init__(ctx, config)
예제 #2
0
def build_git_url(project, project_owner='ceph'):
    """
    Return the git URL to clone the project
    """
    if project == 'ceph-qa-suite':
        base = config.get_ceph_qa_suite_git_url()
    elif project == 'ceph-cm-ansible':
        base = config.get_ceph_cm_ansible_git_url()
    elif project == 'ceph':
        base = config.get_ceph_git_url()
    else:
        base = 'https://github.com/{project_owner}/{project}'
    url_templ = re.sub('\.git$', '', base)
    return url_templ.format(project_owner=project_owner, project=project)