passthrough config copy fix
Providers did not implemet specific __deepcopy__ methods so for now use regular copy for those. Change-Id: I68a727a7b774d9c38f7d1cda633a85b9d096af92
This commit is contained in:
parent
3d2561e7a2
commit
af0260bbd2
@ -45,6 +45,13 @@ class NsxPolicyLib(lib.NsxLibBase):
|
||||
config = copy.deepcopy(self.nsxlib_config)
|
||||
# X-Allow-Overwrite must be set for passthrough apis
|
||||
config.allow_overwrite_header = True
|
||||
# Manually copy providers (No deep copy, as those are instances)
|
||||
# FIXME(asarfaty): This can be handled nicer by adding
|
||||
# __deepcopy__ methods to the provider classes to do the deepcopy
|
||||
# correctly
|
||||
config.token_provider = self.nsxlib_config.token_provider
|
||||
config.client_cert_provider = (
|
||||
self.nsxlib_config.client_cert_provider)
|
||||
self.nsx_api = v3.NsxLib(config)
|
||||
else:
|
||||
self.nsx_api = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user