[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Write ARP=0 to ifcfg file when VSWITCH=1 is set on s390x (#561926).



> diff --git a/network.py b/network.py
> index 2fabff1..bb8ca09 100644
> --- a/network.py
> +++ b/network.py
> @@ -244,9 +244,16 @@ class NetworkDevice(SimpleConfigFile):
>              keys.remove("DESC")
>          if "KEY" in keys:
>              keys.remove("KEY")
> -        if iutil.isS390() and ("OPTIONS" in keys) and ("HWADDR" in keys) and \
> -           (self.info["OPTIONS"].find("layer2=1") != -1):
> -            keys.remove("HWADDR")
> +        if iutil.isS390() and ("OPTIONS" in keys):
> +            if self.info["OPTIONS"].find("layer2=1") != -1:
> +                if "HWADDR" in keys:
> +                    keys.remove("HWADDR")
> +
> +                if ("VSWITCH" in keys) and (self.info["VSWITCH"] == "1"):
> +                    keys.append("ARP")
> +                    self.info["ARP"] = "0"
> +        if "VSWITCH" in keys:
> +            keys.remove("VSWITCH")
>  
>          for key in keys:
>              if (key == 'NAME') or \

You've clearly been writing a lot more C than python recently given all
the extra parens, but it looks like the patch does what the comment says
it does.

- Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]