diff options
| author | Trey Morris <trey.morris@rackspace.com> | 2011-03-07 18:46:44 -0600 |
|---|---|---|
| committer | Trey Morris <trey.morris@rackspace.com> | 2011-03-07 18:46:44 -0600 |
| commit | 4e8b6a14324ef2d1f550233cbcfc94c6363533d8 (patch) | |
| tree | 4f6f77db1bbd6ea0ea62cb4e83dd135c29aa582f /nova | |
| parent | 5ec9cbcdee3de3868a47ca5ec351a9a2594ceea2 (diff) | |
| download | nova-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.py | 10 |
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""" |
