def test_register_configs_pre_install(self, _isdir): _isdir.return_value = False self.os_release.return_value = 'havana' configs = horizon_utils.register_configs() confs = [ horizon_utils.LOCAL_SETTINGS, horizon_utils.HAPROXY_CONF, horizon_utils.PORTS_CONF, horizon_utils.APACHE_24_DEFAULT, horizon_utils.APACHE_24_CONF, horizon_utils.APACHE_24_SSL ] calls = [] for conf in confs: calls.append( call(conf, horizon_utils.CONFIG_FILES[conf]['hook_contexts'])) configs.register.assert_has_calls(calls)
def resolve_CONFIGS(force_update=False): """lazy function to resolve the CONFIGS so that it doesn't have to evaluate at module load time. Note that it also returns the CONFIGS so that it can be used in other, module loadtime, functions. :param force_update: Force a refresh of CONFIGS :type force_update: bool :returns: CONFIGS variable :rtype: `:class:templating.OSConfigRenderer` """ global CONFIGS if CONFIGS is None or force_update: CONFIGS = register_configs() return CONFIGS
HAPROXY_CONF, enable_ssl, do_openstack_upgrade, setup_ipv6, INSTALL_DIR, restart_on_change, assess_status, db_migration, check_custom_theme, pause_unit_helper, resume_unit_helper, remove_old_packages, ) hooks = Hooks() CONFIGS = register_configs() @hooks.hook('install.real') @harden() def install(): execd_preinstall() configure_installation_source(config('openstack-origin')) apt_update(fatal=True) packages = determine_packages() _os_release = os_release('openstack-dashboard') if CompareOpenStackReleases(_os_release) < 'icehouse': packages += ['nodejs', 'node-less'] if lsb_release()['DISTRIB_CODENAME'] == 'precise': # Explicitly upgrade python-six Bug#1420708
def resume(args): """Resume the Ceilometer services. :raises: Exception should the service fail to start.""" resume_unit_helper(register_configs())
def pause(args): """Pause the Ceilometer services. :raises: Exception should the service fail to stop. """ pause_unit_helper(register_configs())
LOCAL_SETTINGS, HAPROXY_CONF, enable_ssl, do_openstack_upgrade, setup_ipv6, INSTALL_DIR, restart_on_change, assess_status, db_migration, check_custom_theme, pause_unit_helper, resume_unit_helper, remove_old_packages, ) hooks = Hooks() CONFIGS = register_configs() @hooks.hook('install.real') @harden() def install(): execd_preinstall() configure_installation_source(config('openstack-origin')) apt_update(fatal=True) packages = determine_packages() _os_release = os_release('openstack-dashboard') if CompareOpenStackReleases(_os_release) < 'icehouse': packages += ['nodejs', 'node-less'] if lsb_release()['DISTRIB_CODENAME'] == 'precise': # Explicitly upgrade python-six Bug#1420708