diff options
| author | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2011-10-13 14:58:19 -0500 |
|---|---|---|
| committer | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2011-10-13 14:58:19 -0500 |
| commit | 59abf7ae5aa27a87700a1e2f2b379904e5774a9b (patch) | |
| tree | 04503ea639222fbd7c84916a0b9b50ff2341b6af | |
| parent | 4eb6fd95f7dc989906d2632a673e7e4c8a47ee1c (diff) | |
| download | nova-59abf7ae5aa27a87700a1e2f2b379904e5774a9b.tar.gz nova-59abf7ae5aa27a87700a1e2f2b379904e5774a9b.tar.xz nova-59abf7ae5aa27a87700a1e2f2b379904e5774a9b.zip | |
Remove redundant, dead code.
Removes the module-level function get_vdi_for_vm_safely(), which was
not used; everything used VMHelper.get_vdi_for_vm_safely().
Change-Id: I8c9c5aa3150384da201c36f1842ae5a09b90f431
| -rw-r--r-- | nova/virt/xenapi/vm_utils.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 8230afbf6..a7a551bc5 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -920,22 +920,6 @@ def wait_for_vhd_coalesce(session, instance_id, sr_ref, vdi_ref, return parent_uuid -def get_vdi_for_vm_safely(session, vm_ref): - vdi_refs = VMHelper.lookup_vm_vdis(session, vm_ref) - if vdi_refs is None: - raise Exception(_("No VDIs found for VM %s") % vm_ref) - else: - num_vdis = len(vdi_refs) - if num_vdis != 1: - raise exception.Error(_("Unexpected number of VDIs" - "(%(num_vdis)s) found" - " for VM %(vm_ref)s") % locals()) - - vdi_ref = vdi_refs[0] - vdi_rec = session.get_xenapi().VDI.get_record(vdi_ref) - return vdi_ref, vdi_rec - - def safe_find_sr(session): """Same as find_sr except raises a NotFound exception if SR cannot be determined |
