Issue 365
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
-
Owner
+1
-
563 | 566 | disk = VMDisk.deserialize(disk) |
564 | 567 | domain.detachDevice(disk.dump_xml()) |
568 | # Libvirt does NOT report failed detach so test it. | |
569 | __check_detach(domain, disk.source) | |
570 | ||
571 | ||
572 | def __check_detach(domain, disk): | |
573 | """ Test if detach was successfull by searching | |
574 | for disk in the XML""" | |
575 | xml = domain.XMLDesc() | |
576 | root = ET.fromstring(xml) | |
577 | devices = root.find('devices') | |
578 | for d in devices.findall("disk"): | |
579 | if disk in d.find('source').attrib.values()[0]: | |
580 | raise Exception("Disk could not been detached. " | |
581 | "Check if acpiphp module is loaded.") | |
Please
register
or
sign in
to reply
|
+1
Added 1 new commit:
Added 1 new commit: