Merge "Render service plugins configurable"
This commit is contained in:
@@ -61,17 +61,13 @@ class NeutronConfigFixture(ConfigFixture):
|
||||
super(NeutronConfigFixture, self).__init__(
|
||||
env_desc, host_desc, temp_dir, base_filename='neutron.conf')
|
||||
|
||||
service_plugins = ['router', 'trunk']
|
||||
if env_desc.qos:
|
||||
service_plugins.append('qos')
|
||||
|
||||
self.config.update({
|
||||
'DEFAULT': {
|
||||
'host': self._generate_host(),
|
||||
'state_path': self._generate_state_path(self.temp_dir),
|
||||
'api_paste_config': self._generate_api_paste(),
|
||||
'core_plugin': 'ml2',
|
||||
'service_plugins': ','.join(service_plugins),
|
||||
'service_plugins': env_desc.service_plugins,
|
||||
'auth_strategy': 'noauth',
|
||||
'debug': 'True',
|
||||
'agent_down_time': env_desc.agent_down_time,
|
||||
|
||||
@@ -34,7 +34,8 @@ class EnvironmentDescription(object):
|
||||
Does the setup, as a whole, support tunneling? How about l2pop?
|
||||
"""
|
||||
def __init__(self, network_type='vxlan', l2_pop=True, qos=False,
|
||||
mech_drivers='openvswitch,linuxbridge', arp_responder=False,
|
||||
mech_drivers='openvswitch,linuxbridge',
|
||||
service_plugins='router,trunk', arp_responder=False,
|
||||
agent_down_time=75):
|
||||
self.network_type = network_type
|
||||
self.l2_pop = l2_pop
|
||||
@@ -44,6 +45,10 @@ class EnvironmentDescription(object):
|
||||
self.arp_responder = arp_responder
|
||||
self.agent_down_time = agent_down_time
|
||||
|
||||
self.service_plugins = service_plugins
|
||||
if self.qos:
|
||||
self.service_plugins += ',qos'
|
||||
|
||||
@property
|
||||
def tunneling_enabled(self):
|
||||
return self.network_type in ('vxlan', 'gre')
|
||||
|
||||
@@ -135,18 +135,24 @@ class NeutronServerFixture(ServiceFixture):
|
||||
NEUTRON_SERVER = "neutron-server"
|
||||
|
||||
def __init__(self, env_desc, host_desc,
|
||||
test_name, neutron_cfg_fixture, plugin_cfg_fixture):
|
||||
test_name, neutron_cfg_fixture, plugin_cfg_fixture,
|
||||
service_cfg_fixtures=None):
|
||||
super(NeutronServerFixture, self).__init__()
|
||||
self.env_desc = env_desc
|
||||
self.host_desc = host_desc
|
||||
self.test_name = test_name
|
||||
self.neutron_cfg_fixture = neutron_cfg_fixture
|
||||
self.plugin_cfg_fixture = plugin_cfg_fixture
|
||||
self.service_cfg_fixtures = service_cfg_fixtures
|
||||
|
||||
def _setUp(self):
|
||||
config_filenames = [self.neutron_cfg_fixture.filename,
|
||||
self.plugin_cfg_fixture.filename]
|
||||
|
||||
if self.service_cfg_fixtures:
|
||||
config_filenames.extend(
|
||||
[scf.filename for scf in self.service_cfg_fixtures])
|
||||
|
||||
self.process_fixture = self.useFixture(ProcessFixture(
|
||||
test_name=self.test_name,
|
||||
process_name=self.NEUTRON_SERVER,
|
||||
|
||||
Reference in New Issue
Block a user