[anaconda][rhel7-branch][PATCH] Always show the Network spoke in Initial Setup (#1259801)

Vratislav Podzimek vpodzime at redhat.com
Fri Sep 4 06:48:06 UTC 2015


On Thu, 2015-09-03 at 17:20 +0200, Martin Kolman wrote:
> As we now always carry the Subscription Manager addon in Initial Setup,
> we should now also always show the Network spoke.
> 
> The Subscription Manager addon needs network connectivity and without
> the Network spoke the user might not be able to use it due to
> disabled or misconfigured networking.
> 
> Resolves: rhbz#1259801
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
>  pyanaconda/ui/gui/spokes/network.py | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
> index 54192a8..69c9cb3 100644
> --- a/pyanaconda/ui/gui/spokes/network.py
> +++ b/pyanaconda/ui/gui/spokes/network.py
> @@ -34,6 +34,7 @@ from gi.repository import Gtk
>  from pyanaconda.flags import can_touch_runtime_system
>  from pyanaconda.i18n import _, N_, C_, CN_
>  from pyanaconda.flags import flags as anaconda_flags
> +from pyanaconda.constants import ANACONDA_ENVIRON, FIRSTBOOT_ENVIRON
>  from pyanaconda.ui.communication import hubQ
>  from pyanaconda.ui.gui import GUIObject
>  from pyanaconda.ui.gui.spokes import NormalSpoke, StandaloneSpoke
> @@ -1399,6 +1400,18 @@ class NetworkSpoke(FirstbootSpokeMixIn, NormalSpoke):
>  
>      category = SystemCategory
>  
> +    @classmethod
> +    def should_run(cls, environment, data):
> +        # the network spoke should run always in the anaconda and also
> +        # always in Initial Setup due to Subscription Manager addon
> +        # needing a means of (re)configuring network connectivity
> +        if environment == ANACONDA_ENVIRON:
> +            return True
> +        elif environment == FIRSTBOOT_ENVIRON:
> +            return True
> +        else:
> +            return False
I'd prefer 'if environment in (ANACONDA_ENVIRON, FIRSTBOOT_ENVIRON)'
here, but I'll leave it up to you to choose what you like better. :)

ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list