Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion oslo_vmware/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def _poll_task(self, task):
"task: %s.",
task)
else:
task_detail = {'id': task.value}
task_detail = {'id': vim_util.get_moref_value(task)}
# some internal tasks do not have 'name' set
if getattr(task_info, 'name', None):
task_detail['name'] = task_info.name
Expand Down
6 changes: 3 additions & 3 deletions oslo_vmware/pbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def convert_datastores_to_hubs(pbm_client_factory, datastores):
hubs = []
for ds in datastores:
hub = pbm_client_factory.create('ns0:PbmPlacementHub')
hub.hubId = ds.value
hub.hubId = vim_util.get_moref_value(ds)
hub.hubType = 'Datastore'
hubs.append(hub)
return hubs
Expand All @@ -178,7 +178,7 @@ def filter_datastores_by_hubs(hubs, datastores):
filtered_dss = []
hub_ids = [hub.hubId for hub in hubs]
for ds in datastores:
if ds.value in hub_ids:
if vim_util.get_moref_value(ds) in hub_ids:
filtered_dss.append(ds)
return filtered_dss

Expand Down Expand Up @@ -217,7 +217,7 @@ def get_profiles(session, vm):
profile_manager = pbm.service_content.profileManager

object_ref = pbm.client.factory.create('ns0:PbmServerObjectRef')
object_ref.key = vm.value
object_ref.key = vim_util.get_moref_value(vm)
object_ref.objectType = 'virtualMachine'

return session.invoke_api(pbm, 'PbmQueryAssociatedProfile',
Expand Down
4 changes: 2 additions & 2 deletions oslo_vmware/rw_handles.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def __init__(self, session, host, port, rp_ref, vm_folder_ref, import_spec,
url, thumbprint = self._find_vmdk_url(lease_info, host, port)
self._vm_ref = lease_info.entity

cookies = session.vim.client.options.transport.cookiejar
cookies = session.vim.client.cookiejar
# Create HTTP connection to write to VMDK URL
if http_method == 'PUT':
overwrite = 't'
Expand Down Expand Up @@ -604,7 +604,7 @@ def __init__(self, session, host, port, vm_ref, vmdk_path,

# find URL of the VMDK file to be read and open connection
url, thumbprint = self._find_vmdk_url(lease_info, host, port)
cookies = session.vim.client.options.transport.cookiejar
cookies = session.vim.client.cookiejar
self._conn = self._create_read_connection(url,
cookies=cookies,
ssl_thumbprint=thumbprint)
Expand Down
Loading