[master/rhel7-branch] Additional completion checks in network spoke. (#1044571)

David Shea dshea at redhat.com
Tue Jan 7 19:39:11 UTC 2014


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")
>           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 to 
do just fine right now with no network available: the status will just 
be "Not connected" or "No network devices available".


More information about the anaconda-patches mailing list