Merge "TVD: configure the list of supported plugins"
This commit is contained in:
commit
b3e9311686
|
@ -868,6 +868,12 @@ nsx_tvd_opts = [
|
|||
choices=projectpluginmap.VALID_TYPES,
|
||||
help=_("The default plugin that will be used for new projects "
|
||||
"that were not added to the projects plugin mapping.")),
|
||||
cfg.ListOpt('enabled_plugins',
|
||||
default=[projectpluginmap.NsxPlugins.NSX_T,
|
||||
projectpluginmap.NsxPlugins.NSX_V,
|
||||
projectpluginmap.NsxPlugins.DVS],
|
||||
help=_("The list of plugins that the TVD core plugin will "
|
||||
"load")),
|
||||
cfg.ListOpt('nsx_v_default_availability_zones',
|
||||
default=[],
|
||||
help=_("The default availability zones that will be used for "
|
||||
|
|
|
@ -126,6 +126,11 @@ class NsxTVDPlugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
|||
return True
|
||||
|
||||
def _init_plugin(self, map_type, plugin_class):
|
||||
if map_type not in cfg.CONF.nsx_tvd.enabled_plugins:
|
||||
# skip this plugin
|
||||
LOG.info("%s plugin was not enabled by the configuration",
|
||||
map_type.upper())
|
||||
return
|
||||
try:
|
||||
self.plugins[map_type] = plugin_class()
|
||||
except Exception as e:
|
||||
|
|
Loading…
Reference in New Issue