Merge "Move nsx_l2gw_driver to DEFAULT section in nsx.ini"
This commit is contained in:
commit
add9aebf9f
@ -103,7 +103,7 @@ function neutron_plugin_configure_service {
|
|||||||
die $LINENO "The VMware NSX plugin needs at least an NSX controller."
|
die $LINENO "The VMware NSX plugin needs at least an NSX controller."
|
||||||
fi
|
fi
|
||||||
if [[ "$NSX_L2GW_DRIVER" != "" ]]; then
|
if [[ "$NSX_L2GW_DRIVER" != "" ]]; then
|
||||||
iniset /$Q_PLUGIN_CONF_FILE nsx nsx_l2gw_driver $NSX_L2GW_DRIVER
|
iniset /$Q_PLUGIN_CONF_FILE DEFAULT nsx_l2gw_driver $NSX_L2GW_DRIVER
|
||||||
fi
|
fi
|
||||||
_nsxv3_ini_set default_tier0_router_uuid $DEFAULT_TIER0_ROUTER_UUID
|
_nsxv3_ini_set default_tier0_router_uuid $DEFAULT_TIER0_ROUTER_UUID
|
||||||
_nsxv3_ini_set nsx_manager $NSX_MANAGER "The VMWare NSX plugin needs a NSX manager."
|
_nsxv3_ini_set nsx_manager $NSX_MANAGER "The VMWare NSX plugin needs a NSX manager."
|
||||||
|
@ -44,6 +44,10 @@
|
|||||||
# Reconnect connection to nsx if not used within this amount of time.
|
# Reconnect connection to nsx if not used within this amount of time.
|
||||||
# conn_idle_timeout = 900
|
# conn_idle_timeout = 900
|
||||||
|
|
||||||
|
# Specify the class path for the Layer 2 gateway backend driver(i.e. NSXv3/NSX-V).
|
||||||
|
# This field will be used when a L2 Gateway service plugin is configured.
|
||||||
|
# nsx_l2gw_driver =
|
||||||
|
|
||||||
[quotas]
|
[quotas]
|
||||||
# number of network gateways allowed per tenant, -1 means unlimited
|
# number of network gateways allowed per tenant, -1 means unlimited
|
||||||
# quota_network_gateway = 5
|
# quota_network_gateway = 5
|
||||||
@ -225,10 +229,6 @@
|
|||||||
# "service".
|
# "service".
|
||||||
# replication_mode = service
|
# replication_mode = service
|
||||||
|
|
||||||
# Specify the class path for the Layer 2 gateway backend driver(i.e. NSXv3/NSX-V).
|
|
||||||
# This field will be used when a L2 Gateway service plugin is configured.
|
|
||||||
# nsx_l2gw_driver = vmware_nsx.services.l2gateway.nsx_v3.driver.NsxV3Driver
|
|
||||||
|
|
||||||
[nsx_sync]
|
[nsx_sync]
|
||||||
# Interval in seconds between runs of the status synchronization task.
|
# Interval in seconds between runs of the status synchronization task.
|
||||||
# The plugin will aim at resynchronizing operational status for all
|
# The plugin will aim at resynchronizing operational status for all
|
||||||
|
@ -79,8 +79,6 @@ base_opts = [
|
|||||||
" if one does not want to deploy a service node(s). "
|
" if one does not want to deploy a service node(s). "
|
||||||
"It must be set to 'service' for leveraging distributed "
|
"It must be set to 'service' for leveraging distributed "
|
||||||
"routers.")),
|
"routers.")),
|
||||||
cfg.StrOpt('nsx_l2gw_driver',
|
|
||||||
help=_("Class path for the L2 gateway backend driver"))
|
|
||||||
]
|
]
|
||||||
|
|
||||||
sync_opts = [
|
sync_opts = [
|
||||||
@ -160,6 +158,11 @@ cluster_opts = [
|
|||||||
"network connection")),
|
"network connection")),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
nsx_common_opts = [
|
||||||
|
cfg.StrOpt('nsx_l2gw_driver',
|
||||||
|
help=_("Class path for the L2 gateway backend driver"))
|
||||||
|
]
|
||||||
|
|
||||||
nsx_v3_opts = [
|
nsx_v3_opts = [
|
||||||
cfg.StrOpt('nsx_user',
|
cfg.StrOpt('nsx_user',
|
||||||
default='admin',
|
default='admin',
|
||||||
@ -327,6 +330,7 @@ nsxv_opts = [
|
|||||||
# Register the configuration options
|
# Register the configuration options
|
||||||
cfg.CONF.register_opts(connection_opts)
|
cfg.CONF.register_opts(connection_opts)
|
||||||
cfg.CONF.register_opts(cluster_opts)
|
cfg.CONF.register_opts(cluster_opts)
|
||||||
|
cfg.CONF.register_opts(nsx_common_opts)
|
||||||
cfg.CONF.register_opts(nsx_v3_opts, group="nsx_v3")
|
cfg.CONF.register_opts(nsx_v3_opts, group="nsx_v3")
|
||||||
cfg.CONF.register_opts(nsxv_opts, group="nsxv")
|
cfg.CONF.register_opts(nsxv_opts, group="nsxv")
|
||||||
cfg.CONF.register_opts(base_opts, group="NSX")
|
cfg.CONF.register_opts(base_opts, group="NSX")
|
||||||
|
@ -44,9 +44,9 @@ class NsxL2GatewayPlugin(l2gateway_db.L2GatewayMixin):
|
|||||||
"""Initialize service plugin and load backend driver."""
|
"""Initialize service plugin and load backend driver."""
|
||||||
super(NsxL2GatewayPlugin, self).__init__()
|
super(NsxL2GatewayPlugin, self).__init__()
|
||||||
LOG.debug("Starting service plugin for NSX L2Gateway")
|
LOG.debug("Starting service plugin for NSX L2Gateway")
|
||||||
self._nsx_l2gw_driver = cfg.CONF.NSX.nsx_l2gw_driver
|
self._nsx_l2gw_driver = cfg.CONF.nsx_l2gw_driver
|
||||||
if not getattr(self, "_nsx_l2gw_driver"):
|
if not getattr(self, "_nsx_l2gw_driver"):
|
||||||
raise cfg.RequiredOptError("nsx_l2gw_driver", "NSX")
|
raise cfg.RequiredOptError("nsx_l2gw_driver")
|
||||||
self._driver = importutils.import_object(self._nsx_l2gw_driver)
|
self._driver = importutils.import_object(self._nsx_l2gw_driver)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -44,7 +44,7 @@ class TestNsxV3L2GatewayDriver(test_l2gw_db.L2GWTestCase,
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestNsxV3L2GatewayDriver, self).setUp()
|
super(TestNsxV3L2GatewayDriver, self).setUp()
|
||||||
cfg.CONF.set_override("nsx_l2gw_driver",
|
cfg.CONF.set_override("nsx_l2gw_driver",
|
||||||
NSX_V3_L2GW_DRIVER_CLASS_PATH, 'NSX')
|
NSX_V3_L2GW_DRIVER_CLASS_PATH)
|
||||||
self.core_plugin = importutils.import_object(NSX_V3_PLUGIN_CLASS)
|
self.core_plugin = importutils.import_object(NSX_V3_PLUGIN_CLASS)
|
||||||
self.l2gw_plugin = l2gw_plugin.NsxL2GatewayPlugin()
|
self.l2gw_plugin = l2gw_plugin.NsxL2GatewayPlugin()
|
||||||
self.driver = nsx_v3_driver.NsxV3Driver()
|
self.driver = nsx_v3_driver.NsxV3Driver()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user