Ejemplo n.º 1
0
 def test_HorizonContext_image_formats(self):
     self.maxDiff = 900
     self.test_config.set('image-formats', 'iso qcow2 raw')
     self.assertEqual(
         horizon_contexts.HorizonContext()(), {
             'compress_offline': True,
             'debug': False,
             'customization_module': '',
             'webroot': '/horizon',
             'ubuntu_theme': True,
             'default_theme': None,
             'custom_theme': False,
             'secret': 'secret',
             'support_profile': None,
             "neutron_network_dvr": False,
             "neutron_network_l3ha": False,
             "neutron_network_lb": False,
             "neutron_network_firewall": False,
             "neutron_network_vpn": False,
             "cinder_backup": False,
             "password_retrieve": False,
             "default_domain": None,
             "multi_domain": True,
             "allow_password_autocompletion": False,
             "default_create_volume": True,
             "image_formats": 'iso qcow2 raw',
             "api_result_limit": 1000,
             "enable_fip_topology_check": True,
             "session_timeout": 3600,
             "dropdown_max_items": 30,
             "enable_consistency_groups": False,
             "disable_instance_snapshot": False,
             "disable_password_reveal": False,
         })
 def test_HorizonContext_default_theme_true(self):
     self.test_config.set('ubuntu-theme', 'true')
     self.assertTrue(horizon_contexts.HorizonContext()()['ubuntu_theme'])
Ejemplo n.º 3
0
 def test_HorizonContext_can_set_disable_instance_snapshot(self):
     self.maxDiff = 900
     self.test_config.set('disable-instance-snapshot', True)
     self.assertTrue(
         horizon_contexts.HorizonContext()()['disable_instance_snapshot'])
Ejemplo n.º 4
0
APACHE_SSL = os.path.join(APACHE_CONF_DIR, "sites-available/default-ssl")
APACHE_DEFAULT = os.path.join(APACHE_CONF_DIR, "sites-available/default")
INSTALL_DIR = "/usr/share/openstack-dashboard"
ROUTER_SETTING = os.path.join(DASHBOARD_PKG_DIR, 'enabled/_40_router.py')
KEYSTONEV3_POLICY = os.path.join(DASHBOARD_PKG_DIR,
                                 'conf/keystonev3_policy.json')
CONSISTENCY_GROUP_POLICY = os.path.join(
    DASHBOARD_PKG_DIR, 'conf/cinder_policy.d/consistencygroup.yaml')
TEMPLATES = 'templates'
CUSTOM_THEME_DIR = os.path.join(DASHBOARD_PKG_DIR, "themes/custom")
LOCAL_DIR = os.path.join(DASHBOARD_PKG_DIR, 'local/local_settings.d')

CONFIG_FILES = OrderedDict([
    (LOCAL_SETTINGS, {
        'hook_contexts': [
            horizon_contexts.HorizonContext(),
            horizon_contexts.IdentityServiceContext(),
            context.SyslogContext(),
            horizon_contexts.LocalSettingsContext(),
            horizon_contexts.ApacheSSLContext(),
            horizon_contexts.WebSSOFIDServiceProviderContext(),
            horizon_contexts.PolicydContext(lambda: read_policyd_dirs())
        ],
        'services': ['apache2', 'memcached']
    }),
    (APACHE_CONF, {
        'hook_contexts': [
            horizon_contexts.HorizonContext(),
            context.SyslogContext(),
            context.WSGIWorkerConfigContext()
        ],