On 08/05/2014 10:40 AM, Giuseppe Scrivano wrote: > Cole Robinson <crobinso@xxxxxxxxxx> writes: > >> On 08/04/2014 12:12 PM, chenhanxiao@xxxxxxxxxxxxxx wrote: >>> >>> >>>> -----Original Message----- >>>> From: virt-tools-list-bounces@xxxxxxxxxx >>>> [mailto:virt-tools-list-bounces@xxxxxxxxxx] On Behalf Of Giuseppe Scrivano >>>> Sent: Monday, August 04, 2014 5:43 PM >>>> To: virt-tools-list@xxxxxxxxxx >>>> Subject: [PATCH virt-manager] virtManager, create: disable ISO >>>> detection with remote connections >>>> >>>> Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx> >>>> --- >>>> virtManager/create.py | 4 +++- >>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/virtManager/create.py b/virtManager/create.py >>>> index fe08cdc..00d909a 100644 >>>> --- a/virtManager/create.py >>>> +++ b/virtManager/create.py >>>> @@ -1168,7 +1168,9 @@ class vmmCreate(vmmGObjectUI): >>>> self.start_detection(forward=forward) >>>> >>>> def toggle_detect_os(self, src): >>>> - dodetect = src.get_active() >>>> + dodetect = not self.conn.is_remote() >>>> + src.set_active(dodetect) >>>> + src.set_visible(dodetect) >>>> >>>> self.widget("install-os-type-label").set_visible(dodetect) >>>> self.widget("install-os-version-label").set_visible(dodetect) >> >> This will also disable the detection option for URL installs, which still >> works if connected to a remote HV. > > OK to push this? > > From b6d5ee8807c285cf6ddef14ec7d8606946f40f04 Mon Sep 17 00:00:00 2001 > From: Giuseppe Scrivano <gscrivan@xxxxxxxxxx> > Date: Tue, 5 Aug 2014 10:37:37 +0200 > Subject: [PATCH] virtManager, create: re-enable distro detection with URLs > > It was broken by commit 4ee97133e787105e6bc824600201e9b15c90584a > > Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx> > --- > virtManager/create.py | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/virtManager/create.py b/virtManager/create.py > index 00d909a..1047f0b 100644 > --- a/virtManager/create.py > +++ b/virtManager/create.py > @@ -1168,7 +1168,9 @@ class vmmCreate(vmmGObjectUI): > self.start_detection(forward=forward) > > def toggle_detect_os(self, src): > - dodetect = not self.conn.is_remote() > + dodetect = (self.conn and > + not self.conn.is_remote() or > + self.get_config_install_page() == INSTALL_PAGE_URL) > src.set_active(dodetect) > src.set_visible(dodetect) > > @@ -1383,6 +1385,8 @@ class vmmCreate(vmmGObjectUI): > > self.widget("create-finish").grab_focus() > > + self.toggle_detect_os(self.widget("install-detect-os")) > + > self.set_page_num_text(pagenum) > self.widget("create-back").set_sensitive(pagenum != PAGE_NAME) > self.widget("create-forward").set_visible(pagenum != PAGE_FINISH) > 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. - Cole _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list