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 utils.git_install(projects_yaml) self.assertTrue(git_pre.called) git_clone_and_install.assert_called_with(openstack_origin_git, core_project='glance') self.assertTrue(git_post.called)
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')