mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-10-27 01:55:20 +03:00
delete: Track kernel/initrd/dtb as well
This commit is contained in:
parent
79ce0dcdc5
commit
330bcd9c8b
@ -242,13 +242,16 @@ def populate_storage_list(storage_list, vm, conn):
|
||||
model = storage_list.get_model()
|
||||
model.clear()
|
||||
|
||||
for disk in vm.get_disk_devices():
|
||||
vol = None
|
||||
diskdata = [(disk.target, disk.path, disk.read_only, disk.shareable) for
|
||||
disk in vm.get_disk_devices()]
|
||||
|
||||
target = disk.target
|
||||
path = disk.path
|
||||
ro = disk.read_only
|
||||
shared = disk.shareable
|
||||
diskdata.append(("kernel", vm.get_xmlobj().os.kernel, True, False))
|
||||
diskdata.append(("initrd", vm.get_xmlobj().os.initrd, True, False))
|
||||
diskdata.append(("dtb", vm.get_xmlobj().os.dtb, True, False))
|
||||
|
||||
for target, path, ro, shared in diskdata:
|
||||
if not path:
|
||||
continue
|
||||
|
||||
# There are a few pieces here
|
||||
# 1) Can we even delete the storage? If not, make the checkbox
|
||||
@ -260,9 +263,6 @@ def populate_storage_list(storage_list, vm, conn):
|
||||
# default? Reasons not to, are if the storage is marked
|
||||
# readonly or sharable, or is in use by another VM.
|
||||
|
||||
if not path:
|
||||
continue
|
||||
|
||||
default = False
|
||||
definfo = None
|
||||
vol = conn.get_vol_by_path(path)
|
||||
|
Loading…
Reference in New Issue
Block a user