Exemplo n.º 1
0
 def test_nova_config_context(self, local_unit):
     local_unit.return_value = 'nova-cloud-controller/0'
     ctxt = context.NovaConfigContext()()
     self.assertEqual(ctxt['scheduler_default_filters'],
                      self.config('scheduler-default-filters'))
     self.assertEqual(ctxt['cpu_allocation_ratio'],
                      self.config('cpu-allocation-ratio'))
     self.assertEqual(ctxt['ram_allocation_ratio'],
                      self.config('ram-allocation-ratio'))
Exemplo n.º 2
0
 def test_nova_config_context(self, mock_config, local_unit,
                              mock_relation_ids, mock_unit_get):
     local_unit.return_value = 'nova-cloud-controller/0'
     mock_config.side_effect = self.test_config.get
     mock_unit_get.return_value = '127.0.0.1'
     ctxt = context.NovaConfigContext()()
     self.assertEqual(ctxt['scheduler_default_filters'],
                      self.config('scheduler-default-filters'))
     self.assertEqual(ctxt['cpu_allocation_ratio'],
                      self.config('cpu-allocation-ratio'))
     self.assertEqual(ctxt['ram_allocation_ratio'],
                      self.config('ram-allocation-ratio'))
Exemplo n.º 3
0
         context.OSConfigFlagContext(),
         context.SubordinateConfigContext(interface='nova-vmware',
                                          service='nova',
                                          config_file=NOVA_CONF),
         nova_cc_context.NovaCellContext(),
         context.SyslogContext(),
         context.LogLevelContext(),
         nova_cc_context.HAProxyContext(),
         nova_cc_context.IdentityServiceContext(service='nova',
                                                service_user='******'),
         nova_cc_context.VolumeServiceContext(),
         context.ZeroMQContext(),
         context.NotificationDriverContext(),
         nova_cc_context.NovaIPv6Context(),
         nova_cc_context.NeutronCCContext(),
         nova_cc_context.NovaConfigContext(),
         nova_cc_context.InstanceConsoleContext(),
         nova_cc_context.ConsoleSSLContext(),
         nova_cc_context.CloudComputeContext(),
         context.InternalEndpointContext('nova-common'),
         nova_cc_context.NeutronAPIContext(),
         nova_cc_context.SerialConsoleContext(),
         context.MemcacheContext()
     ],
 }),
 (NOVA_API_PASTE, {
     'services': [s for s in resolve_services() if 'api' in s],
     'contexts': [
         nova_cc_context.IdentityServiceContext(),
         nova_cc_context.APIRateLimitingContext()
     ],