mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Modify the remove_xml_dev function
add a remove_disk function,so that we can do some special things when remove a disk Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
2a63003133
commit
8b7854af1f
@ -1108,9 +1108,15 @@ class vmmDetails(vmmGObjectUI):
|
||||
self.err.show_err((_("Error launching hardware dialog: %s") %
|
||||
str(e)))
|
||||
|
||||
def remove_disk(self, disk):
|
||||
self.remove_device(disk)
|
||||
|
||||
def remove_xml_dev(self, src_ignore):
|
||||
devobj = self.get_hw_row()[HW_LIST_COL_DEVICE]
|
||||
self.remove_device(devobj)
|
||||
if devobj.DEVICE_TYPE == "disk":
|
||||
self.remove_disk(devobj)
|
||||
else:
|
||||
self.remove_device(devobj)
|
||||
|
||||
|
||||
############################
|
||||
|
Loading…
Reference in New Issue
Block a user