def git_install(projects_yaml):
    """Perform setup, and install git repos specified in yaml parameter."""
    status_set('maintenance', 'running git install')
    if git_install_requested():
        git_pre_install()
        git_clone_and_install(projects_yaml, core_project='neutron')
        git_post_install(projects_yaml)
def git_install(projects_yaml):
    """Perform setup, and install git repos specified in yaml parameter."""
    if git_install_requested():
        git_pre_install()
        projects_yaml = git_default_repos(projects_yaml)
        git_clone_and_install(projects_yaml, core_project='horizon')
        git_post_install(projects_yaml)
Exemple #3
0
def git_install(projects_yaml):
    """Perform setup, and install git repos specified in yaml parameter."""
    status_set('maintenance', 'running git install')
    if git_install_requested():
        git_pre_install()
        git_clone_and_install(projects_yaml, core_project='neutron')
        git_post_install(projects_yaml)
def git_install(projects_yaml):
    """Perform setup, and install git repos specified in yaml parameter."""
    if git_install_requested():
        git_pre_install()
        projects_yaml = git_default_repos(projects_yaml)
        git_clone_and_install(projects_yaml, core_project='nova')
        git_post_install(projects_yaml)
Exemple #5
0
    def test_git_clone_and_install_errors(self, git_install_single, error_out):
        git_missing_repos = """
          repostories:
             - {name: requirements,
                repository: 'git://git.openstack.org/openstack/requirements',
                branch: stable/juno}
             - {name: keystone,
                repository: 'git://git.openstack.org/openstack/keystone',
                branch: stable/juno}"""
        self._test_key_error(git_missing_repos, 'repositories', error_out)

        git_missing_name = """
          repositories:
             - {name: requirements,
                repository: 'git://git.openstack.org/openstack/requirements',
                branch: stable/juno}
             - {repository: 'git://git.openstack.org/openstack/keystone',
                branch: stable/juno}"""
        self._test_key_error(git_missing_name, 'name', error_out)

        git_missing_repo = """
          repositories:
             - {name: requirements,
                repoistroy: 'git://git.openstack.org/openstack/requirements',
                branch: stable/juno}
             - {name: keystone,
                repository: 'git://git.openstack.org/openstack/keystone',
                branch: stable/juno}"""
        self._test_key_error(git_missing_repo, 'repository', error_out)

        git_missing_branch = """
          repositories:
             - {name: requirements,
                repository: 'git://git.openstack.org/openstack/requirements'}
             - {name: keystone,
                repository: 'git://git.openstack.org/openstack/keystone',
                branch: stable/juno}"""
        self._test_key_error(git_missing_branch, 'branch', error_out)

        git_wrong_order_1 = """
          repositories:
             - {name: keystone,
                repository: 'git://git.openstack.org/openstack/keystone',
                branch: stable/juno}
             - {name: requirements,
                repository: 'git://git.openstack.org/openstack/requirements',
                branch: stable/juno}"""
        openstack.git_clone_and_install(git_wrong_order_1, 'keystone')
        error_out.assert_called_with(
            'keystone git repo must be specified last')

        git_wrong_order_2 = """
          repositories:
             - {name: keystone,
                repository: 'git://git.openstack.org/openstack/keystone',
                branch: stable/juno}"""
        openstack.git_clone_and_install(git_wrong_order_2, 'keystone')
        error_out.assert_called_with(
            'requirements git repo must be specified first')
def git_install(projects_yaml):
    """Perform setup, and install git repos specified in yaml parameter."""
    if git_install_requested():
        status_set('maintenance', 'Git install')
        git_pre_install()
        projects_yaml = git_default_repos(projects_yaml)
        git_clone_and_install(projects_yaml, core_project='nova')
        git_post_install(projects_yaml)
Exemple #7
0
 def _test_key_error(self, os_origin_git, key, error_out):
     try:
         openstack.git_clone_and_install(os_origin_git, 'keystone')
     except KeyError:
         # KeyError expected because _git_ensure_key_exists() doesn't exit
         # when mocked.
         pass
     error_out.assert_called_with(
         'openstack-origin-git key \'%s\' is missing' % key)
Exemple #8
0
    def test_git_clone_and_install_success(self, _git_install_single,
                                           error_out, charm_dir):
        proj = 'keystone'
        charm_dir.return_value = '/var/lib/juju/units/testing-foo-0/charm'
        # the following sets the global requirements_dir
        _git_install_single.return_value = '/mnt/openstack-git/requirements'

        openstack.git_clone_and_install(openstack_origin_git, proj)
        self.assertTrue(_git_install_single.call_count == 2)
        expected = [
            call('git://git.openstack.org/openstack/requirements',
                 'stable/juno',
                 '/mnt/openstack-git',
                 update_requirements=False),
            call('git://git.openstack.org/openstack/keystone',
                 'stable/juno',
                 '/mnt/openstack-git',
                 update_requirements=True)
        ]
        self.assertEquals(expected, _git_install_single.call_args_list)
        assert not error_out.called
Exemple #9
0
def git_install(projects_yaml):
    """Perform setup, and install git repos specified in yaml parameter."""
    if git_install_requested():
        git_pre_install()
        git_clone_and_install(projects_yaml, core_project="neutron")
        git_post_install(projects_yaml)
def git_install(projects_yaml):
    """Perform setup, and install git repos specified in yaml parameter."""
    if git_install_requested():
        git_pre_install()
        git_clone_and_install(projects_yaml, core_project='nova')
        git_post_install(projects_yaml)
Exemple #11
0
def git_install(projects_yaml):
    """Perform setup, and install git repos specified in yaml parameter."""
    if git_install_requested():
        git_clone_and_install(projects_yaml, core_project='astara-neutron')