NSX: Rename default_interface_name option
Since this option is configured in the DEFAULT section of nsx.ini, the name of the option clashes with that in the networking_l2gw repo. Proposal is to prefix our option with "nsx_" to avoid such interference. Change-Id: I7c020cc24a858748e9271338e1cd8f82f0d0f4cf Partial-Bug: #1480485
This commit is contained in:
parent
95a81287cf
commit
65acb73b33
|
@ -151,7 +151,8 @@ cluster_opts = [
|
|||
cfg.StrOpt('default_service_cluster_uuid',
|
||||
help=_("Unique identifier of the Service Cluster which will "
|
||||
"be used by logical services like dhcp and metadata")),
|
||||
cfg.StrOpt('default_interface_name', default='breth0',
|
||||
cfg.StrOpt('nsx_default_interface_name', default='breth0',
|
||||
deprecated_name='default_interface_name',
|
||||
help=_("Name of the interface on a L2 Gateway transport node"
|
||||
"which should be used by default when setting up a "
|
||||
"network connection")),
|
||||
|
|
|
@ -2032,7 +2032,8 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||
# Populate default physical network where not specified
|
||||
for device in devices:
|
||||
if not device.get('interface_name'):
|
||||
device['interface_name'] = self.cluster.default_interface_name
|
||||
device['interface_name'] = (self.cluster.
|
||||
nsx_default_interface_name)
|
||||
try:
|
||||
# Replace Neutron device identifiers with NSX identifiers
|
||||
dev_map = dict((dev['id'], dev['interface_name']) for
|
||||
|
|
|
@ -7,7 +7,7 @@ nsx_password = bar
|
|||
default_l3_gw_service_uuid = whatever
|
||||
default_l2_gw_service_uuid = whatever
|
||||
default_service_cluster_uuid = whatever
|
||||
default_interface_name = whatever
|
||||
nsx_default_interface_name = whatever
|
||||
http_timeout = 13
|
||||
redirects = 12
|
||||
retries = 11
|
||||
|
|
|
@ -7,7 +7,7 @@ nsx_password = bar
|
|||
default_l3_gw_service_uuid = whatever
|
||||
default_l2_gw_service_uuid = whatever
|
||||
default_service_cluster_uuid = whatever
|
||||
default_interface_name = whatever
|
||||
nsx_default_interface_name = whatever
|
||||
http_timeout = 13
|
||||
redirects = 12
|
||||
retries = 11
|
||||
|
|
|
@ -6,7 +6,7 @@ nsx_user = foo
|
|||
nsx_password = bar
|
||||
default_l3_gw_service_uuid = whatever
|
||||
default_l2_gw_service_uuid = whatever
|
||||
default_interface_name = whatever
|
||||
nsx_default_interface_name = whatever
|
||||
http_timeout = 13
|
||||
redirects = 12
|
||||
retries = 11
|
||||
|
|
|
@ -6,7 +6,7 @@ nvp_user = foo
|
|||
nvp_password = bar
|
||||
default_l3_gw_service_uuid = whatever
|
||||
default_l2_gw_service_uuid = whatever
|
||||
default_interface_name = whatever
|
||||
nsx_default_interface_name = whatever
|
||||
http_timeout = 3
|
||||
redirects = 2
|
||||
retries = 2
|
||||
|
|
|
@ -49,7 +49,7 @@ class NSXClusterTest(base.BaseTestCase):
|
|||
'http_timeout': 25,
|
||||
'retries': 7,
|
||||
'redirects': 23,
|
||||
'default_interface_name': 'baz',
|
||||
'nsx_default_interface_name': 'baz',
|
||||
'nsx_controllers': ['1.1.1.1:443']}
|
||||
|
||||
def test_create_cluster(self):
|
||||
|
@ -94,7 +94,7 @@ class ConfigurationTest(base.BaseTestCase):
|
|||
self.assertEqual(11, cluster.retries)
|
||||
self.assertEqual('whatever', cluster.default_l2_gw_service_uuid)
|
||||
self.assertEqual('whatever', cluster.default_l3_gw_service_uuid)
|
||||
self.assertEqual('whatever', cluster.default_interface_name)
|
||||
self.assertEqual('whatever', cluster.nsx_default_interface_name)
|
||||
|
||||
def test_load_plugin_with_full_options(self):
|
||||
self.config_parse(args=['--config-file', BASE_CONF_PATH,
|
||||
|
@ -129,7 +129,7 @@ class ConfigurationTest(base.BaseTestCase):
|
|||
self.assertIsNone(cfg.CONF.nsx_controllers)
|
||||
self.assertIsNone(cfg.CONF.default_l3_gw_service_uuid)
|
||||
self.assertIsNone(cfg.CONF.default_l2_gw_service_uuid)
|
||||
self.assertEqual('breth0', cfg.CONF.default_interface_name)
|
||||
self.assertEqual('breth0', cfg.CONF.nsx_default_interface_name)
|
||||
self.assertEqual(900, cfg.CONF.conn_idle_timeout)
|
||||
|
||||
def test_load_api_extensions(self):
|
||||
|
|
|
@ -39,7 +39,7 @@ def override_nsx_ini_full_test():
|
|||
cfg.CONF.set_override("nsx_password", "bar")
|
||||
cfg.CONF.set_override("default_l3_gw_service_uuid", "whatever")
|
||||
cfg.CONF.set_override("default_l2_gw_service_uuid", "whatever")
|
||||
cfg.CONF.set_override("default_interface_name", "whatever")
|
||||
cfg.CONF.set_override("nsx_default_interface_name", "whatever")
|
||||
cfg.CONF.set_override("http_timeout", 13)
|
||||
cfg.CONF.set_override("redirects", 12)
|
||||
cfg.CONF.set_override("retries", "11")
|
||||
|
|
Loading…
Reference in New Issue