commit ad6fd2d11bc969370ec3ca10532a851cb7bcde2c 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 3dfb311..cbed425 100644 --- a/vmware_nsx/plugins/nsx_p/plugin.py +++ b/vmware_nsx/plugins/nsx_p/plugin.py @@ -206,11 +206,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__() @@ -587,10 +583,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)