diff options
author | Russ White <russ@riw.us> | 2023-02-21 14:01:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 14:01:03 +0100 |
commit | ba755d35e508c2452e5459bdd7c0dd67a70a88a4 (patch) | |
tree | adc08f46788b8012240faec23ae7e7271bb0d40d /python | |
parent | Merge pull request #12849 from opensourcerouting/fix/tests_enum (diff) | |
parent | bgpd: handle case where passed RD is null (diff) | |
download | frr-ba755d35e508c2452e5459bdd7c0dd67a70a88a4.tar.xz frr-ba755d35e508c2452e5459bdd7c0dd67a70a88a4.zip |
Merge pull request #12248 from pguibert6WIND/bgpasdot
lib, bgp: add initial support for asdot format
Diffstat (limited to 'python')
-rw-r--r-- | python/clidef.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/clidef.py b/python/clidef.py index d71b482a9..244a8205b 100644 --- a/python/clidef.py +++ b/python/clidef.py @@ -51,6 +51,12 @@ _fail = (_end == argv[_i]->arg) || (*_end != '\\0');""" ) +class AsDotHandler(RenderHandler): + argtype = "as_t" + decl = Template("as_t $varname = 0;") + code = Template("_fail = !asn_str2asn(argv[_i]->arg, &$varname);") + + # A.B.C.D/M (prefix_ipv4) and # X:X::X:X/M (prefix_ipv6) are "compatible" and can merge into a # struct prefix: @@ -152,6 +158,7 @@ handlers = { "IPV6_PREFIX_TKN": Prefix6Handler, "MAC_TKN": PrefixEthHandler, "MAC_PREFIX_TKN": PrefixEthHandler, + "ASNUM_TKN": AsDotHandler, } # core template invoked for each occurence of DEFPY. |