[PATCH rhel7-branch 4/6] network: generate kickstart commands for bridge devices (#1075195)

Radek Vykydal rvykydal at redhat.com
Fri Sep 26 13:20:05 UTC 2014


On 09/25/2014 01:30 PM, Radek Vykydal wrote:
> @@ -721,6 +726,20 @@ def ifcfg_to_ksdata(ifcfg, devname):
>           if teamconfig:
>               nd.teamconfig = teamconfig
>   
> +    # bridging
> +    if ifcfg.get("TYPE") == "Bridge":
> +        slaves = get_slaves_from_ifcfgs("BRIDGE", [devname, ifcfg.get("UUID")])
> +        if slaves:
> +            kwargs["bridgeslaves"] = ",".join(slaves)
> +
> +        bridgeopts = ifcfg.get("BRIDGING_OPTS").replace('_', '-').split()
> +        if ifcfg.get("STP"):
> +            bridgeopts.append("%s=%s" % ("stp", ifcfg.get("STP")))
> +        if ifcfg.get("DELAY"):
> +            bridgeopts.append("%s=%s" % ("forward-delay", ifcfg.get("DELAY")))
> +        if bridgeopts:
> +            kwargs["bridgeopts"] = ",".join(bridgeopts)
> +
This chunk should be moved few lines up, just before

     nd = handler.NetworkData(**kwargs)




More information about the anaconda-patches mailing list