diff --git a/vmware_nsx/common/config.py b/vmware_nsx/common/config.py index 1ef3f654b0..7b46f23869 100644 --- a/vmware_nsx/common/config.py +++ b/vmware_nsx/common/config.py @@ -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 " diff --git a/vmware_nsx/plugins/nsx/plugin.py b/vmware_nsx/plugins/nsx/plugin.py index 68886ca9a4..57291f4421 100644 --- a/vmware_nsx/plugins/nsx/plugin.py +++ b/vmware_nsx/plugins/nsx/plugin.py @@ -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: