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: Iec6c4be5c61710f2a7a0056168d0c31ade987b1f
This commit is contained in:
Mike Durnosvystov 2021-04-23 09:10:33 +00:00
parent 04e5ead7c0
commit 83c6fa7f74
4 changed files with 4 additions and 4 deletions

View File

@ -564,7 +564,7 @@ class Store(glance_store.Store):
"""Build ESX host session cookie header."""
if verify_session and not self.session.is_current_session_active():
self.reset_session()
vim_cookies = self.session.vim.client.options.transport.cookiejar
vim_cookies = self.session.vim.client.cookiejar
if len(list(vim_cookies)) > 0:
cookie = list(vim_cookies)[0]
return cookie.name + '=' + cookie.value

View File

@ -54,7 +54,7 @@ oslo.serialization==2.18.0
oslo.service==1.41.1
oslotest==3.2.0
oslo.utils==4.7.0
oslo.vmware==2.17.0
oslo.vmware==3.6.0
Parsley==1.3
pbr==3.1.1
prettytable==0.7.2

View File

@ -63,7 +63,7 @@ console_scripts =
[extras]
# Dependencies for each of the optional stores
vmware =
oslo.vmware>=2.17.0 # Apache-2.0
oslo.vmware>=3.6.0 # Apache-2.0
swift =
httplib2>=0.9.1 # MIT
python-swiftclient>=3.2.0 # Apache-2.0

View File

@ -21,7 +21,7 @@ oslotest>=3.2.0 # Apache-2.0
# Dependencies for each of the optional stores
boto3>=1.9.199 # Apache-2.0
oslo.vmware>=2.17.0 # Apache-2.0
oslo.vmware>=3.6.0 # Apache-2.0
httplib2>=0.9.1 # MIT
python-swiftclient>=3.2.0 # Apache-2.0
python-cinderclient>=4.1.0 # Apache-2.0