summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorTrey Morris <trey.morris@rackspace.com>2011-03-07 18:46:44 -0600
committerTrey Morris <trey.morris@rackspace.com>2011-03-07 18:46:44 -0600
commit4e8b6a14324ef2d1f550233cbcfc94c6363533d8 (patch)
tree4f6f77db1bbd6ea0ea62cb4e83dd135c29aa582f /nova
parent5ec9cbcdee3de3868a47ca5ec351a9a2594ceea2 (diff)
downloadnova-4e8b6a14324ef2d1f550233cbcfc94c6363533d8.tar.gz
nova-4e8b6a14324ef2d1f550233cbcfc94c6363533d8.tar.xz
nova-4e8b6a14324ef2d1f550233cbcfc94c6363533d8.zip
virt.xenapi.vmops._get_vm_opaque_ref changed vm to vm_ref and ref to obj
Diffstat (limited to 'nova')
-rw-r--r--nova/virt/xenapi/vmops.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py
index c0fbf96fc..0adabe7f5 100644
--- a/nova/virt/xenapi/vmops.py
+++ b/nova/virt/xenapi/vmops.py
@@ -190,10 +190,10 @@ class VMOps(object):
"""
# if instance_or_vm is a string it must be opaque ref or instance name
if isinstance(instance_or_vm, basestring):
- ref = None
+ obj = None
try:
# check for opaque ref
- ref = self._session.get_xenapi().VM.get_record(instance_or_vm)
+ obj = self._session.get_xenapi().VM.get_record(instance_or_vm)
return instance_or_vm
except self.XenAPI.Failure:
# wasn't an opaque ref, must be an instance name
@@ -215,11 +215,11 @@ class VMOps(object):
# otherwise instance_or_vm is an instance object
else:
instance_name = instance_or_vm.name
- vm = VMHelper.lookup(self._session, instance_name)
- if vm is None:
+ vm_ref = VMHelper.lookup(self._session, instance_name)
+ if vm_ref is None:
raise exception.NotFound(
_('Instance not present %s') % instance_name)
- return vm
+ return vm_ref
def _acquire_bootlock(self, vm):
"""Prevent an instance from booting"""