L2 gateway service plugin support NSX-V backends

Change-Id: I9c35647376ead3df3a44539bddc21e4aa837ef7a
This commit is contained in:
Zhenmei 2015-08-13 06:49:44 +08:00
parent 87c9b39288
commit 4baddd1925
2 changed files with 5 additions and 5 deletions

View File

@ -78,7 +78,9 @@ base_opts = [
"'source' to perform replication locally. This is useful" "'source' to perform replication locally. This is useful"
" 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 = [
@ -170,8 +172,6 @@ nsx_v3_opts = [
help=_('IP address of the NSX manager')), help=_('IP address of the NSX manager')),
cfg.StrOpt('default_edge_cluster_uuid', cfg.StrOpt('default_edge_cluster_uuid',
help=_("Default edge cluster identifier")), help=_("Default edge cluster identifier")),
cfg.StrOpt('nsx_l2gw_driver',
help=_("Class path for the L2 gateway backend driver")),
cfg.IntOpt('retries', cfg.IntOpt('retries',
default=10, default=10,
help=_('Maximum number of times to retry API request'))] help=_('Maximum number of times to retry API request'))]

View File

@ -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_v3.nsx_l2gw_driver self._nsx_l2gw_driver = cfg.CONF.NSX.nsx_l2gw_driver
if not getattr(self, "_nsx_l2gw_driver"): if not getattr(self, "_nsx_l2gw_driver"):
raise cfg.RequiredOptError("nsx_l2gw_driver", "nsx_v3") raise cfg.RequiredOptError("nsx_l2gw_driver", "NSX")
self._driver = importutils.import_object(self._nsx_l2gw_driver) self._driver = importutils.import_object(self._nsx_l2gw_driver)
@staticmethod @staticmethod