コード例 #1
0
 def test_git_install(self, git_pre, git_post, git_clone_and_install,
                      git_requested):
     projects_yaml = openstack_origin_git
     git_requested.return_value = True
     nutils.git_install(projects_yaml)
     self.assertTrue(git_pre.called)
     git_clone_and_install.assert_called_with(openstack_origin_git,
                                              core_project='neutron')
     self.assertTrue(git_post.called)
コード例 #2
0
 def test_git_install(self, git_pre, git_post, git_clone_and_install,
                      git_requested):
     projects_yaml = openstack_origin_git
     git_requested.return_value = True
     nutils.git_install(projects_yaml)
     self.assertTrue(git_pre.called)
     git_clone_and_install.assert_called_with(openstack_origin_git,
                                              core_project='neutron')
     self.assertTrue(git_post.called)
コード例 #3
0
def config_changed():
    install_packages()
    if git_install_requested():
        if config_value_changed('openstack-origin-git'):
            git_install(config('openstack-origin-git'))

    configure_ovs()
    CONFIGS.write_all()
    for rid in relation_ids('zeromq-configuration'):
        zeromq_configuration_relation_joined(rid)
    for rid in relation_ids('neutron-plugin'):
        neutron_plugin_joined(relation_id=rid)
コード例 #4
0
def config_changed():
    install_packages()
    if git_install_requested():
        if config_value_changed('openstack-origin-git'):
            git_install(config('openstack-origin-git'))

    configure_ovs()
    CONFIGS.write_all()
    for rid in relation_ids('zeromq-configuration'):
        zeromq_configuration_relation_joined(rid)
    for rid in relation_ids('neutron-plugin'):
        neutron_plugin_joined(relation_id=rid)
コード例 #5
0
ファイル: git_reinstall.py プロジェクト: BillTheBest/hyper-c
def git_reinstall():
    """Reinstall from source and restart services.

    If the openstack-origin-git config option was used to install openstack
    from source git repositories, then this action can be used to reinstall
    from updated git repositories, followed by a restart of services."""
    if not git_install_requested():
        action_fail('openstack-origin-git is not configured')
        return

    try:
        git_install(config('openstack-origin-git'))
        config_changed()
    except:
        action_set({'traceback': traceback.format_exc()})
        action_fail('git-reinstall resulted in an unexpected error')
コード例 #6
0
def git_reinstall():
    """Reinstall from source and restart services.

    If the openstack-origin-git config option was used to install openstack
    from source git repositories, then this action can be used to reinstall
    from updated git repositories, followed by a restart of services."""
    if not git_install_requested():
        action_fail('openstack-origin-git is not configured')
        return

    try:
        git_install(config('openstack-origin-git'))
        config_changed()
    except:
        action_set({'traceback': traceback.format_exc()})
        action_fail('git-reinstall resulted in an unexpected error')
コード例 #7
0
def install():
    install_packages()
    git_install(config('openstack-origin-git'))
コード例 #8
0
def install():
    install_packages()
    git_install(config('openstack-origin-git'))