mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
addhardware: Add support for disk discard option
Complete this part of feature for commit d13b793b
.
Signed-off-by: Lin Ma <lma@suse.com>
This commit is contained in:
parent
242844fefa
commit
a919a1ae4e
@ -1273,6 +1273,8 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self.widget("storage-devtype"))
|
||||
cache = uiutil.get_list_selection(
|
||||
self.widget("storage-cache"))
|
||||
discard = uiutil.get_list_selection(
|
||||
self.widget("storage-discard"))
|
||||
|
||||
controller_model = None
|
||||
if (bus == "scsi" and
|
||||
@ -1297,6 +1299,8 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
disk.bus = bus
|
||||
if cache:
|
||||
disk.driver_cache = cache
|
||||
if discard:
|
||||
disk.driver_discard = discard
|
||||
|
||||
# Generate target
|
||||
disks = (self.vm.xmlobj.devices.disk +
|
||||
|
Loading…
Reference in New Issue
Block a user