Skip to content

Commit a7dd1f8

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "vmware: Use cookiejar from oslo.vmware client directly"
2 parents 5c276fb + 17184e7 commit a7dd1f8

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

nova/tests/unit/virt/vmwareapi/fake.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,12 +1225,7 @@ def __init__(self, protocol="https", host="localhost", trace=None):
12251225
self.client = FakeClient()
12261226
self.client.factory = FakeFactory()
12271227

1228-
transport = DataObject()
1229-
transport.cookiejar = "Fake-CookieJar"
1230-
options = DataObject()
1231-
options.transport = transport
1232-
1233-
self.client.options = options
1228+
self.client.cookiejar = "Fake-CookieJar"
12341229

12351230
service_content = self.client.factory.create('ns0:ServiceContent')
12361231
service_content.propertyCollector = "PropCollector"

nova/virt/vmwareapi/vmops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def _configure_config_drive(self, context, instance, vm_ref, dc_info,
212212
datastore, injected_files, admin_password,
213213
network_info):
214214
session_vim = self._session.vim
215-
cookies = session_vim.client.options.transport.cookiejar
215+
cookies = session_vim.client.cookiejar
216216
dc_path = vutil.get_inventory_path(session_vim, dc_info.ref)
217217
uploaded_iso_path = self._create_config_drive(context,
218218
instance,
@@ -415,7 +415,7 @@ def _fetch_image_as_file(self, context, vi, image_ds_loc):
415415
dc_path = vutil.get_inventory_path(session.vim, vi.dc_info.ref)
416416

417417
host = self._session._host
418-
cookies = session.vim.client.options.transport.cookiejar
418+
cookies = session.vim.client.cookiejar
419419

420420
images.fetch_image(
421421
context,

0 commit comments

Comments
 (0)