vmware: Use cookiejar from oslo.vmware client directly
With changing the SOAP library backing oslo.vmware [1], the cookiejar of a session must be accessed differently. Therefore, oslo.vmware introduced a property on the client to abstract this change away. This commit uses the new place to access the attribute. [1] https://specs.openstack.org/openstack/oslo-specs/specs/victoria/oslo-vmware-soap-library-switch.html Change-Id: I3c769d3499f906b33725171a57313c8ae35b6a1d
This commit is contained in:
parent
df8a658bd9
commit
17184e7d56
@ -1225,12 +1225,7 @@ class FakeVim(object):
|
||||
self.client = FakeClient()
|
||||
self.client.factory = FakeFactory()
|
||||
|
||||
transport = DataObject()
|
||||
transport.cookiejar = "Fake-CookieJar"
|
||||
options = DataObject()
|
||||
options.transport = transport
|
||||
|
||||
self.client.options = options
|
||||
self.client.cookiejar = "Fake-CookieJar"
|
||||
|
||||
service_content = self.client.factory.create('ns0:ServiceContent')
|
||||
service_content.propertyCollector = "PropCollector"
|
||||
|
@ -212,7 +212,7 @@ class VMwareVMOps(object):
|
||||
datastore, injected_files, admin_password,
|
||||
network_info):
|
||||
session_vim = self._session.vim
|
||||
cookies = session_vim.client.options.transport.cookiejar
|
||||
cookies = session_vim.client.cookiejar
|
||||
dc_path = vutil.get_inventory_path(session_vim, dc_info.ref)
|
||||
uploaded_iso_path = self._create_config_drive(context,
|
||||
instance,
|
||||
@ -415,7 +415,7 @@ class VMwareVMOps(object):
|
||||
dc_path = vutil.get_inventory_path(session.vim, vi.dc_info.ref)
|
||||
|
||||
host = self._session._host
|
||||
cookies = session.vim.client.options.transport.cookiejar
|
||||
cookies = session.vim.client.cookiejar
|
||||
|
||||
images.fetch_image(
|
||||
context,
|
||||
|
Loading…
x
Reference in New Issue
Block a user