[PATCH pykickstart rhel7-branch?] Add support for network team devices (#1003591)

Radek Vykydal rvykydal at redhat.com
Tue Nov 12 12:56:59 UTC 2013


On 11/08/2013 02:57 AM, Brian C. Lane wrote:
> On Wed, Nov 06, 2013 at 11:02:14AM +0100, Radek Vykydal wrote:
>> +        cmd = "network --device team0 --bootproto static --ip=10.34.102.222 --netmask=255.255.255.0 --gateway=10.34.102.254 --nameserver=10.34.39.2 --teamslaves=\"p3p1'{\\\"prio\\\": -10, \\\"sticky\\\": true}',p3p2'{\\\"prio\\\": 100}'\" --teamconfig=\"{\\\"runner\\\": {\\\"name\\\": \\\"activebackup\\\"}}\" --activate"
>> +        self.assert_parse(cmd)
>> +
>> +        cmd = "network --device team0 --bootproto dhcp --teamslaves=p3p1,p3p2 --teamconfig=\"{\\\"runner\\\": {\\\"name\\\": \\\"roundrobin\\\"}}\" --activate"
>> +        self.assert_parse(cmd)
>> +
>> +        # --teamslaves
>> +        # --teamslaves="<DEV1>['<CONFIG1>'],<DEV2>['<CONFIG2>'],..."
>> +        # CONFIGX is json with " escaped to \"
>> +
>> +        teamslaves_strings = [
>> +            "eth1,eth2",
>> +            "eth1,eth2'{\\\"prio\\\": 100}'",
>> +            "eth1'{\\\"prio\\\": -10, \\\"sticky\\\": true}',eth2",
>> +            "eth1'{\\\"prio\\\": -10, \\\"sticky\\\": true}',eth2'{\\\"prio\\\": 100}'",
>> +            "eth1,eth2,eth3",
>> +            "eth1,eth2'{\\\"prio\\\": 100}',eth3",
> All these escapes might be a bit more readable if you use r"" so you can
> drop escaping the escape :)
>

Changed locally, thanks.


More information about the anaconda-patches mailing list