virtManager: Remove disk driver_io UI

This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

The default driver_io value we use seems to be sufficient. It's very
rare to hear that users need to change the value to something
different, and if they do, they are advanced enough users that can
edit the XML directly IMO.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2020-01-25 13:50:07 -05:00
parent 6924e16aaf
commit a162a3b845
4 changed files with 2 additions and 48 deletions

View File

@ -230,7 +230,6 @@ class Details(uiutils.UITestCase):
tab.find("Advanced options", "toggle button").click_expander()
tab.find("Disk bus:", "text").text = "usb"
tab.find("Performance options", "toggle button").click_expander()
tab.find("IO mode:", "text").text = "threads"
tab.find("Cache mode:", "text").text = "unsafe"
appl.click()
uiutils.check_in_loop(lambda: not appl.sensitive)

View File

@ -3125,37 +3125,6 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="disk-io">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_entry">True</property>
<signal name="changed" handler="on_disk_io_combo_changed" swapped="no"/>
<child internal-child="entry">
<object class="GtkEntry" id="disk-io-text">
<property name="can_focus">True</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label79">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">_IO mode:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">disk-io-text</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label-disk-discard">
<property name="visible">True</property>

View File

@ -58,7 +58,6 @@ from ..xmleditor import vmmXMLEditor
EDIT_DISK_SHARE,
EDIT_DISK_REMOVABLE,
EDIT_DISK_CACHE,
EDIT_DISK_IO,
EDIT_DISK_DISCARD,
EDIT_DISK_DETECT_ZEROES,
EDIT_DISK_BUS,
@ -98,7 +97,7 @@ from ..xmleditor import vmmXMLEditor
EDIT_FS,
EDIT_HOSTDEV_ROMBAR) = range(1, 53)
EDIT_HOSTDEV_ROMBAR) = range(1, 52)
# Columns in hw list model
@ -494,7 +493,6 @@ class vmmDetails(vmmGObjectUI):
"on_disk_shareable_changed": lambda *x: self.enable_apply(x, EDIT_DISK_SHARE),
"on_disk_removable_changed": lambda *x: self.enable_apply(x, EDIT_DISK_REMOVABLE),
"on_disk_cache_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_CACHE),
"on_disk_io_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_IO),
"on_disk_discard_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_DISCARD),
"on_disk_detect_zeroes_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_DETECT_ZEROES),
"on_disk_bus_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_BUS),
@ -844,10 +842,6 @@ class vmmDetails(vmmGObjectUI):
disk_cache = self.widget("disk-cache")
vmmAddHardware.build_disk_cache_combo(self.vm, disk_cache)
# Disk io combo
disk_io = self.widget("disk-io")
vmmAddHardware.build_disk_io_combo(self.vm, disk_io)
# Discard combo
combo = self.widget("disk-discard")
vmmAddHardware.build_disk_discard_combo(self.vm, combo)
@ -1708,9 +1702,6 @@ class vmmDetails(vmmGObjectUI):
kwargs["cache"] = uiutil.get_list_selection(
self.widget("disk-cache"))
if self.edited(EDIT_DISK_IO):
kwargs["io"] = uiutil.get_list_selection(self.widget("disk-io"))
if self.edited(EDIT_DISK_DISCARD):
kwargs["discard"] = uiutil.get_list_selection(
self.widget("disk-discard"))
@ -2224,7 +2215,6 @@ class vmmDetails(vmmGObjectUI):
bus = disk.bus
removable = disk.removable
cache = disk.driver_cache
io = disk.driver_io
discard = disk.driver_discard
detect_zeroes = disk.driver_detect_zeroes
@ -2257,7 +2247,6 @@ class vmmDetails(vmmGObjectUI):
self.widget("disk-size").set_text(size)
uiutil.set_list_selection(self.widget("disk-cache"), cache)
uiutil.set_list_selection(self.widget("disk-io"), io)
uiutil.set_list_selection(self.widget("disk-discard"), discard)
uiutil.set_list_selection(self.widget("disk-detect-zeroes"),
detect_zeroes)

View File

@ -657,8 +657,7 @@ class vmmDomain(vmmLibvirtObject):
def define_disk(self, devobj, do_hotplug,
path=_SENTINEL, readonly=_SENTINEL,
shareable=_SENTINEL, removable=_SENTINEL, cache=_SENTINEL,
io=_SENTINEL, discard=_SENTINEL, detect_zeroes=_SENTINEL,
bus=_SENTINEL):
discard=_SENTINEL, detect_zeroes=_SENTINEL, bus=_SENTINEL):
xmlobj = self._make_xmlobj_to_define()
editdev = self._lookup_device_to_define(xmlobj, devobj, do_hotplug)
if not editdev:
@ -703,8 +702,6 @@ class vmmDomain(vmmLibvirtObject):
if cache != _SENTINEL:
editdev.driver_cache = cache or None
if io != _SENTINEL:
editdev.driver_io = io or None
if discard != _SENTINEL:
editdev.driver_discard = discard or None
if detect_zeroes != _SENTINEL: