summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-07-27 21:09:10 +0000
committerGerrit Code Review <review@openstack.org>2012-07-27 21:09:10 +0000
commit8a139e6750adeec3597d6aa1ae82354d7fc8f38d (patch)
tree93e26c73ee8b2d79cf927ae5ff1a59f4e5886994
parentf6f6c36bb34a06e7afd1c3a7ebbc5ae098c20628 (diff)
parenteef8556444de21623da8c750dad37c506be5c484 (diff)
downloadnova-8a139e6750adeec3597d6aa1ae82354d7fc8f38d.tar.gz
nova-8a139e6750adeec3597d6aa1ae82354d7fc8f38d.tar.xz
nova-8a139e6750adeec3597d6aa1ae82354d7fc8f38d.zip
Merge "xenapi: Use instance uuid when calling DB API"
-rw-r--r--nova/virt/xenapi/host.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/virt/xenapi/host.py b/nova/virt/xenapi/host.py
index 6594600d5..df6b4f85d 100644
--- a/nova/virt/xenapi/host.py
+++ b/nova/virt/xenapi/host.py
@@ -78,7 +78,7 @@ class Host(object):
dest = _host_find(ctxt, self._session, host, host_ref)
(old_ref, new_ref) = db.instance_update_and_get_original(
ctxt,
- instance.id,
+ instance['uuid'],
{'host': dest,
'task_state': task_states.MIGRATING})
notifications.send_update(ctxt, old_ref, new_ref)
@@ -89,7 +89,7 @@ class Host(object):
(old_ref, new_ref) = db.instance_update_and_get_original(
ctxt,
- instance.id,
+ instance['uuid'],
{'vm_state': vm_states.ACTIVE})
notifications.send_update(ctxt, old_ref, new_ref)
@@ -99,7 +99,7 @@ class Host(object):
'from %(host)s' % locals())
(old_ref, new_ref) = db.instance_update_and_get_original(
ctxt,
- instance.id,
+ instance['uuid'],
{'hosts': host,
'vm_state': vm_states.ACTIVE})
notifications.send_update(ctxt, old_ref, new_ref)