[virt-tools-list] [virt-manager PATCH 2/2] addhardware: Add support for disk io mode option
Lin Ma
lma at suse.com
Thu Sep 6 07:49:30 UTC 2018
Signed-off-by: Lin Ma <lma at suse.com>
---
ui/addhardware.ui | 32 ++++++++++++++++++++++++++++----
virtManager/addhardware.py | 5 +++++
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/ui/addhardware.ui b/ui/addhardware.ui
index 9a360b05..b5038e7b 100644
--- a/ui/addhardware.ui
+++ b/ui/addhardware.ui
@@ -255,6 +255,30 @@
<property name="top_attach">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label-storage-io">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">_IO mode:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">storage-io</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="storage-io">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
<child>
<object class="GtkLabel" id="label-storage-discard">
<property name="visible">True</property>
@@ -266,7 +290,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -276,7 +300,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -290,7 +314,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -300,7 +324,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
</object>
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index 9a517b74..f21549ed 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -193,6 +193,7 @@ class vmmAddHardware(vmmGObjectUI):
self.build_disk_bus_combo(self.vm, self.widget("storage-bustype"))
self._build_disk_device_combo()
self.build_disk_cache_combo(self.vm, self.widget("storage-cache"))
+ self.build_disk_io_combo(self.vm, self.widget("storage-io"))
self.build_disk_discard_combo(self.vm, self.widget("storage-discard"))
self.build_disk_detect_zeroes_combo(self.vm,
self.widget("storage-detect-zeroes"))
@@ -1280,6 +1281,8 @@ class vmmAddHardware(vmmGObjectUI):
self.widget("storage-devtype"))
cache = uiutil.get_list_selection(
self.widget("storage-cache"))
+ io = uiutil.get_list_selection(
+ self.widget("storage-io"))
discard = uiutil.get_list_selection(
self.widget("storage-discard"))
detect_zeroes = uiutil.get_list_selection(
@@ -1308,6 +1311,8 @@ class vmmAddHardware(vmmGObjectUI):
disk.bus = bus
if cache:
disk.driver_cache = cache
+ if io:
+ disk.driver_io = io
if discard:
disk.driver_discard = discard
if detect_zeroes:
--
2.15.1
More information about the virt-tools-list
mailing list