From 79fe886ac816e07e7a80cd4c9a454396562aa63b Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 25 Jan 2020 13:09:37 -0500 Subject: [PATCH] virtManager: Remove disk format/driver_type UI This was proposed here: https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html """ * disk: storage format: this was from before the days when we storage-ified everything and we could get the disk format wrong, telling qemu it has a raw image when it's qcow2. shouldn't be needed anymore for normal virt usage """ Signed-off-by: Cole Robinson --- tests/uitests/details.py | 1 - tests/uitests/livetests.py | 1 - ui/details.ui | 80 ---------------------------------- virtManager/details/details.py | 15 +------ virtManager/object/domain.py | 4 +- 5 files changed, 2 insertions(+), 99 deletions(-) diff --git a/tests/uitests/details.py b/tests/uitests/details.py index ec19eda6c..d36a3a7c2 100644 --- a/tests/uitests/details.py +++ b/tests/uitests/details.py @@ -228,7 +228,6 @@ class Details(uiutils.UITestCase): tab.find("Shareable:", "check box").click() tab.find("Readonly:", "check box").click() tab.find("Advanced options", "toggle button").click_expander() - tab.find("Storage format:", "text").text = "vmdk" tab.find("Disk bus:", "text").text = "usb" tab.find("Performance options", "toggle button").click_expander() tab.find("IO mode:", "text").text = "threads" diff --git a/tests/uitests/livetests.py b/tests/uitests/livetests.py index 5846a6c6e..53ffb569d 100644 --- a/tests/uitests/livetests.py +++ b/tests/uitests/livetests.py @@ -187,7 +187,6 @@ class Console(uiutils.UITestCase): win.find("SCSI Disk 1", "table cell").click() tab = win.find("disk-tab", None) uiutils.check_in_loop(lambda: tab.showing) - self.assertTrue(tab.find("Storage format:", "text").text == "qcow2") win.find("config-remove").click() delete = self.app.root.find_fuzzy("Delete", "frame") delete.find_fuzzy("Delete", "button").click() diff --git a/ui/details.ui b/ui/details.ui index 655cef4ce..8d751ae7d 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -3077,86 +3077,6 @@ 0 - - - True - False - vertical - 6 - - - True - True - - - - False - True - 0 - - - - - True - False - 3 - - - True - False - gtk-dialog-warning - - - False - True - 0 - - - - - True - False - <small>Changing this will not change the disk image format, it only tells libvirt about the existing image format. </small> - True - True - 30 - - - False - False - 1 - - - - - False - True - 1 - - - - - 1 - 3 - - - - - True - False - end - start - 4 - 4 - Storage forma_t: - True - disk-format - - - 0 - 3 - - True diff --git a/virtManager/details/details.py b/virtManager/details/details.py index b45f1b94d..ccad9c7e0 100644 --- a/virtManager/details/details.py +++ b/virtManager/details/details.py @@ -62,7 +62,6 @@ from ..xmleditor import vmmXMLEditor EDIT_DISK_DISCARD, EDIT_DISK_DETECT_ZEROES, EDIT_DISK_BUS, - EDIT_DISK_FORMAT, EDIT_DISK_SGIO, EDIT_DISK_PATH, EDIT_DISK_PR, @@ -101,7 +100,7 @@ from ..xmleditor import vmmXMLEditor EDIT_FS, - EDIT_HOSTDEV_ROMBAR) = range(1, 56) + EDIT_HOSTDEV_ROMBAR) = range(1, 55) # Columns in hw list model @@ -501,7 +500,6 @@ class vmmDetails(vmmGObjectUI): "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), - "on_disk_format_changed": self.disk_format_changed, "on_disk_sgio_entry_changed": lambda *x: self.enable_apply(x, EDIT_DISK_SGIO), "on_disk_pr_checkbox_toggled": lambda *x: self.enable_apply(x, EDIT_DISK_PR), @@ -1399,10 +1397,6 @@ class vmmDetails(vmmGObjectUI): # Disk callbacks - def disk_format_changed(self, ignore): - self.widget("disk-format-warn").show() - self.enable_apply(EDIT_DISK_FORMAT) - def _disk_source_browse_clicked_cb(self, src): disk = self.get_hw_row()[HW_LIST_COL_DEVICE] if disk.is_floppy(): @@ -1729,9 +1723,6 @@ class vmmDetails(vmmGObjectUI): kwargs["detect_zeroes"] = uiutil.get_list_selection( self.widget("disk-detect-zeroes")) - if self.edited(EDIT_DISK_FORMAT): - kwargs["driver_type"] = self.widget("disk-format").get_text() - if self.edited(EDIT_DISK_SGIO): sgio = uiutil.get_list_selection(self.widget("disk-sgio")) kwargs["sgio"] = sgio @@ -2264,7 +2255,6 @@ class vmmDetails(vmmGObjectUI): io = disk.driver_io discard = disk.driver_discard detect_zeroes = disk.driver_detect_zeroes - driver_type = disk.driver_type or "" size = "-" if path: @@ -2309,9 +2299,6 @@ class vmmDetails(vmmGObjectUI): uiutil.set_list_selection(self.widget("disk-detect-zeroes"), detect_zeroes) - self.widget("disk-format").set_text(driver_type) - self.widget("disk-format-warn").hide() - vmmAddHardware.populate_disk_bus_combo(self.vm, devtype, self.widget("disk-bus").get_model()) uiutil.set_list_selection(self.widget("disk-bus"), bus) diff --git a/virtManager/object/domain.py b/virtManager/object/domain.py index 6375dfe85..0e090aa0a 100644 --- a/virtManager/object/domain.py +++ b/virtManager/object/domain.py @@ -658,7 +658,7 @@ class vmmDomain(vmmLibvirtObject): path=_SENTINEL, readonly=_SENTINEL, shareable=_SENTINEL, removable=_SENTINEL, cache=_SENTINEL, io=_SENTINEL, discard=_SENTINEL, detect_zeroes=_SENTINEL, - driver_type=_SENTINEL, bus=_SENTINEL, addrstr=_SENTINEL, + bus=_SENTINEL, addrstr=_SENTINEL, sgio=_SENTINEL, managed_pr=_SENTINEL): xmlobj = self._make_xmlobj_to_define() editdev = self._lookup_device_to_define(xmlobj, devobj, do_hotplug) @@ -711,8 +711,6 @@ class vmmDomain(vmmLibvirtObject): editdev.driver_discard = discard or None if detect_zeroes != _SENTINEL: editdev.driver_detect_zeroes = detect_zeroes or None - if driver_type != _SENTINEL: - editdev.driver_type = driver_type or None if sgio != _SENTINEL: editdev.sgio = sgio or None