NSX|P: Reuse the nsxpolicy nsxlib instead of creating a new one

Change-Id: I235a67ba351e49ce51d7547c99c337a77d9b32c7
This commit is contained in:
asarfaty 2020-09-27 08:09:03 +02:00 committed by Adit Sarfaty
parent 237b6c27b4
commit ad6fd2d11b
1 changed files with 1 additions and 9 deletions

View File

@ -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)