TVD: configure the list of supported plugins
Instead of always trying to load all 3 plugins (v, t, dvs), the customer can now configure those he wishes to support. This way we will be quicker on neutron restart (and CIs) and avoid the errors in the logs. Change-Id: I9b41dc4002e7bd758dd46810763e70dbfc9202b0
This commit is contained in:
parent
1a7368c13f
commit
3e49ed86b4
@ -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
Block a user