[master/rhel7-branch] Additional completion checks in network spoke. (#1044571)
David Shea
dshea at redhat.com
Tue Jan 7 20:19:16 UTC 2014
On 01/07/2014 03:03 PM, Samantha N. Bueno wrote:
> On Tue, Jan 07, 2014 at 02:39:11PM -0500, David Shea wrote:
>> On 01/07/2014 11:58 AM, Samantha N. Bueno wrote:
>>> If our install source is local media, we should not require a
>>> network connection to be configured.
>>>
>>> Resolves: rhbz#1044571
>>> ---
>>> pyanaconda/ui/gui/spokes/network.py | 3 ++-
>>> pyanaconda/ui/tui/spokes/network.py | 7 ++++++-
>>> 2 files changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
>>> index 1dbec82..bdfdb93 100644
>>> --- a/pyanaconda/ui/gui/spokes/network.py
>>> +++ b/pyanaconda/ui/gui/spokes/network.py
>>> @@ -1318,8 +1318,9 @@ class NetworkSpoke(FirstbootSpokeMixIn, NormalSpoke):
>>> @property
>>> def completed(self):
>>> # TODO: check also if source requires updates when implemented
>>> + localinst = bool(self.data.method.method == "cdrom")
>>> return (not flags.can_touch_runtime_system("require network connection")
>>> - or nm.nm_activated_devices())
>>> + or nm.nm_activated_devices() or localinst)
>>> @property
>>> def mandatory(self):
>>> diff --git a/pyanaconda/ui/tui/spokes/network.py b/pyanaconda/ui/tui/spokes/network.py
>>> index a599a40..b8b8d13 100644
>>> --- a/pyanaconda/ui/tui/spokes/network.py
>>> +++ b/pyanaconda/ui/tui/spokes/network.py
>>> @@ -64,8 +64,13 @@ class NetworkSpoke(EditTUISpoke):
>>> @property
>>> def completed(self):
>>> + """ Check whether this spoke is complete or not. Do an additional
>>> + check if we're installing from CD/DVD, since a network connection
>>> + should not be required in this case.
>>> + """
>>> + localinst = bool(self.data.method.method == "cdrom")
> How does this look to you:
> localinst = bool(self.data.method.method in ["cdrom", "harddrive"])
Looks fine to me.
>
>>> return (not can_touch_runtime_system("require network connection")
>>> - or nm_activated_devices())
>>> + or nm_activated_devices() or localinst)
>>> @property
>>> def status(self):
>> "harrdrive" would also be a local install method. And the GUI seems
> Good point; fixed locally, see above for the change.
>
>> to do just fine right now with no network available: the status will
>> just be "Not connected" or "No network devices available".
> Actually, firing up qemu using "-net none" and the rhel07 beta DVD
> renders me unable to proceed past the standalone network spoke. It seems
> like I should be able to since the DVD is a viable install source;
> packaging.log even shows repo metadata retrieval was successful.
>
> So perhaps I should actually just move the check to the standalone
> spoke's completed method.
Huh. You can't just click "continue" without doing anything? There
wouldn't be a method set at all when the standalone network spoke runs,
so I don't think that would check should depend on the install method.
More information about the anaconda-patches
mailing list