From d8a611316ecb3ec3ba132b0be96f66955447138d Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Tue, 26 Jun 2018 08:07:33 +0300 Subject: [PATCH] TVD LBaaS fix for core plugin For the TVD drivers, we need to get the relevant V/V3 core plugin This support was neglected when we refactored the LBaaS drivers recently. Change-Id: I02c96ccdd23d1470c6d8a3945c6e0dea071a20d2 --- vmware_nsx/services/lbaas/lb_helper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vmware_nsx/services/lbaas/lb_helper.py b/vmware_nsx/services/lbaas/lb_helper.py index 169e235875..2343c820a9 100644 --- a/vmware_nsx/services/lbaas/lb_helper.py +++ b/vmware_nsx/services/lbaas/lb_helper.py @@ -19,6 +19,8 @@ from neutron_lib import exceptions as n_exc from neutron_lib.plugins import constants as plugin_const from neutron_lib.plugins import directory +from vmware_nsx.extensions import projectpluginmap + class LBaaSNSXObjectManagerWrapper(object): """Wrapper class to connect the LB api with the NSX-V/V3 implementations @@ -44,7 +46,10 @@ class LBaaSNSXObjectManagerWrapper(object): if not self._core_plugin: self._core_plugin = ( self._get_plugin(plugin_const.CORE)) - + if self._core_plugin.is_tvd_plugin(): + # get the plugin that match this driver + self._core_plugin = self._core_plugin.get_plugin_by_type( + projectpluginmap.NsxPlugins.NSX_T) return self._core_plugin def get_completor_func(self, context, obj, delete=False):