[virt-tools-list] [PATCH virt-manager] virtManager, create: disable ISO detection with remote connections

Giuseppe Scrivano gscrivan at redhat.com
Tue Aug 5 09:02:28 UTC 2014


Cole Robinson <crobinso at redhat.com> writes:

> The logic is getting quite fragmented. Check set_install_page where we already
> handle hiding the detection UI for options like PXE. We should extend that to
> hide detection for remote HV + CDROM option, and probably revert the previous
> patch.

sorry to have missed this part for the first patch.

Moving the logic of the first commit+the additional check for URL
installations to set_install_page works for me:

diff --git a/virtManager/create.py b/virtManager/create.py
index 00d909a..09bd305 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -1168,9 +1168,7 @@ class vmmCreate(vmmGObjectUI):
         self.start_detection(forward=forward)
 
     def toggle_detect_os(self, src):
-        dodetect = not self.conn.is_remote()
-        src.set_active(dodetect)
-        src.set_visible(dodetect)
+        dodetect = src.get_active()
 
         self.widget("install-os-type-label").set_visible(dodetect)
         self.widget("install-os-version-label").set_visible(dodetect)
@@ -1288,7 +1286,12 @@ class vmmCreate(vmmGObjectUI):
                                    INSTALL_PAGE_CONTAINER_OS]
         osbox.set_visible(iscontainer)
 
-        if instpage in (INSTALL_PAGE_ISO, INSTALL_PAGE_URL):
+        enabledetect = (instpage == INSTALL_PAGE_ISO and
+                        self.conn and
+                        not self.conn.is_remote() or
+                        self.get_config_install_page() == INSTALL_PAGE_URL)
+
+        if enabledetect:
             detectbox.show()
         else:
             detectbox.hide()
-- 
1.9.3


Thanks,
Giuseppe




More information about the virt-tools-list mailing list