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)
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)
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')
def install(): install_packages() git_install(config('openstack-origin-git'))