From a83eb5fcdcfbd6a7896cda66e279696a1191e490 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Fri, 5 Jun 2015 08:41:12 -0700 Subject: [PATCH] VMware: fix AttributeError: TaskInfo instance has no attribute 'name' This happens in stable/icehouse with vCenter 6. This is a stable/icehouse only change since this code was moved to oslo.vmware and in Juno Nova was using this code from oslo.vwmware. Furthermore, the _poll_task code in oslo.vmware was taken from cinder which didn't have the call on task_info.name so the bug isn't there. Change-Id: I729f1cdca1d4e02e31f26aa0e170c30be1a65288 Closes-bug: #1462424 --- nova/virt/vmwareapi/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/virt/vmwareapi/driver.py b/nova/virt/vmwareapi/driver.py index e514bbb72118..db5299bade06 100644 --- a/nova/virt/vmwareapi/driver.py +++ b/nova/virt/vmwareapi/driver.py @@ -977,7 +977,7 @@ class VMwareAPISession(object): try: task_info = self._call_method(vim_util, "get_dynamic_property", task_ref, "Task", "info") - task_name = task_info.name + task_name = getattr(task_info, 'name', '') if task_info.state in ['queued', 'running']: return elif task_info.state == 'success':