]> git.proxmox.com Git - mirror_ifupdown2.git/commit - ifupdown2/ifupdown/ifupdownmain.py
Support value-in-range with <number> keyword
authorSam Osterkil <sam.osterkil@stateless.net>
Tue, 1 Jun 2021 19:45:34 +0000 (13:45 -0600)
committerSam Osterkil <sam.osterkil@stateless.net>
Tue, 1 Jun 2021 20:11:59 +0000 (14:11 -0600)
commitb20f983630cafc06b1031fd695733d8dbcbe6462
tree937f061616dfd7365d5b3ec3e0739baec95c59d0
parenta8dd54b0faf710a331b58dd033b8eec03a020b1c
Support value-in-range with <number> keyword

This allows syntax checking to pass for fields like vxlan-ttl/vxlan-tos
which can be a number in a range OR a string value representing a special
meaning (0-255 or "auto", for instance).  Without this, you can only pass
a --syntax-check for such fields if your value is one of those literally
specified because, for instance, "64" is not "auto", "0", or "255":

invalid value "64": valid attribute values: ['0', '255']
info: exit status 1

Note that _applying_ such configuration still works, because netlink's
acceptance criteria are independent of ifupdown2's.
ifupdown2/addons/vxlan.py
ifupdown2/ifupdown/ifupdownmain.py