[PATCH rhel6-branch] network: write bond options in generated kickstart (#1009376)

Vratislav Podzimek vpodzime at redhat.com
Wed May 7 09:54:26 UTC 2014


On Wed, 2014-05-07 at 10:45 +0200, Radek Vykydal wrote:
> Resolves: rhbz#1009376
> ---
>  network.py | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/network.py b/network.py
> index 29f17c4..b9dbf39 100644
> --- a/network.py
> +++ b/network.py
> @@ -571,6 +571,15 @@ class Network:
>              if dev.get("TYPE") == "Vlan":
>                  line += " --vlanid %s" % vlanid
>  
> +            # bonding
> +            if dev.get('TYPE') == "Bond":
> +                slaves = [dname for dname, d in self.netdevices.items()
> +                          if d.get('MASTER') == devName]
This can use a generator instead of a temporary list.

> +                line += " --bondslaves %s" % ",".join(slaves)
> +                bondopts = dev.get('BONDING_OPTS').split()
> +                separator = "," if all(',' not in opt for opt in bondopts) else ";"
> +                line += " --bondopts %s" % separator.join(bondopts)
> +
>              line += "\n"
>              f.write(line)
Otherwise this and the other two patches all look good to me.

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list