Makes "segmentation_id" configurable
We should add the segmentation_id as tempest option,
so that it can be changed to match the deployment if needed.
Change-Id: I42bea9217462226e8650e55997449e1cc05f085c
diff --git a/neutron_tempest_plugin/config.py b/neutron_tempest_plugin/config.py
index 4fad1fa..a6d5c09 100644
--- a/neutron_tempest_plugin/config.py
+++ b/neutron_tempest_plugin/config.py
@@ -242,6 +242,17 @@
CONF.register_group(taas_group)
CONF.register_opts(TaasGroup, group="taas")
+# DNS Integration with an External Service
+DnsFeatureGroup = [
+ cfg.IntOpt(
+ 'segmentation_id', default=12345,
+ help="For network types VLAN, GRE, VXLAN or GENEVE, the segmentation"
+ " ID must be outside the ranges assigned to project networks."),
+]
+dns_feature_group = cfg.OptGroup(
+ name='designate_feature_enabled', title='Enabled Designate Features')
+CONF.register_group(dns_feature_group)
+CONF.register_opts(DnsFeatureGroup, group="designate_feature_enabled")
config_opts_translator = {
'project_network_cidr': 'tenant_network_cidr',
diff --git a/neutron_tempest_plugin/scenario/test_dns_integration.py b/neutron_tempest_plugin/scenario/test_dns_integration.py
index be9a477..d520aa2 100644
--- a/neutron_tempest_plugin/scenario/test_dns_integration.py
+++ b/neutron_tempest_plugin/scenario/test_dns_integration.py
@@ -212,11 +212,10 @@
@classmethod
def resource_setup(cls):
super(DNSIntegrationAdminTests, cls).resource_setup()
- # TODO(jh): We should add the segmentation_id as tempest option
- # so that it can be changed to match the deployment if needed
- cls.network2 = cls.create_network(dns_domain=cls.zone['name'],
- provider_network_type='vxlan',
- provider_segmentation_id=12345)
+ segmentation_id = CONF.designate_feature_enabled.segmentation_id
+ cls.network2 = cls.create_network(
+ dns_domain=cls.zone['name'], provider_network_type='vxlan',
+ provider_segmentation_id=segmentation_id)
cls.subnet2 = cls.create_subnet(cls.network2)
def _verify_dns_assignment(self, port):