commit 28fe7884b9de976b5e820f298aec29b4a38c38b9 Author: asarfaty Date: Sun Sep 27 08:09:03 2020 +0200 NSX|P: Reuse the nsxpolicy nsxlib instead of creating a new one Change-Id: I235a67ba351e49ce51d7547c99c337a77d9b32c7 diff --git a/vmware_nsx/plugins/nsx_p/plugin.py b/vmware_nsx/plugins/nsx_p/plugin.py index cddc59c..b139e3a 100644 --- a/vmware_nsx/plugins/nsx_p/plugin.py +++ b/vmware_nsx/plugins/nsx_p/plugin.py @@ -205,11 +205,7 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): self.nsxpolicy = v3_utils.get_nsxpolicy_wrapper() # NOTE: This is needed for passthrough APIs, should be removed when # policy has full support - self.nsxlib = None - if cfg.CONF.nsx_p.allow_passthrough: - self.nsxlib = v3_utils.get_nsxlib_wrapper( - plugin_conf=cfg.CONF.nsx_p, - allow_overwrite_header=True) + self.nsxlib = self.nsxpolicy.get_nsxlib_passthrough() super(NsxPolicyPlugin, self).__init__() @@ -588,10 +584,6 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): self.nsxpolicy.reinitialize_cluster(resource, event, trigger, payload=payload) - if self.nsxlib: - self.nsxlib.reinitialize_cluster(resource, event, trigger, - payload=payload) - # Init the FWaaS support without RPC listeners # for the spawn workers self._init_fwaas(with_rpc=False)