NSXV3: invoke get_connected_nsxlib only once per invocation
For the admin utility we only need to do this once. This will ensure that we do not have the following messages on the terminal: "Endpoint '<IP>' changing from state 'INITIALIZED' to 'UP'" Change-Id: I9183ccccc017deac70b7c7e57328867f72e9dfe5
This commit is contained in:
parent
7e97820ed6
commit
59587e8bba
@ -21,13 +21,18 @@ from vmware_nsx.plugins.nsx_v3 import plugin
|
||||
from vmware_nsx.plugins.nsx_v3 import utils as v3_utils
|
||||
from vmware_nsxlib.v3 import nsx_constants
|
||||
|
||||
_NSXLIB = None
|
||||
|
||||
|
||||
def get_nsxv3_client():
|
||||
return get_connected_nsxlib().client
|
||||
|
||||
|
||||
def get_connected_nsxlib():
|
||||
return v3_utils.get_nsxlib_wrapper()
|
||||
global _NSXLIB
|
||||
if _NSXLIB is None:
|
||||
_NSXLIB = v3_utils.get_nsxlib_wrapper()
|
||||
return _NSXLIB
|
||||
|
||||
|
||||
class NeutronDbClient(db_base_plugin_v2.NeutronDbPluginV2):
|
||||
|
Loading…
x
Reference in New Issue
Block a user