Merge "vmware: Use cookiejar from oslo.vmware client directly"

This commit is contained in:
Zuul 2021-02-13 16:59:34 +00:00 committed by Gerrit Code Review
commit a7dd1f8881
2 changed files with 3 additions and 8 deletions

View File

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

View File

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