X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_ip.py;h=2083e03b5e57a5503c4c25701bf4b3ebef28ea34;hb=ffba3c377c679a69fd9507bc8f8bc3acf8258d1e;hp=6d22c16ff609dc51f57d4edb76d12f75abd2af2f;hpb=fccd1b2b694146506e0efdeee6c23674550fc5d5;p=vpp.git diff --git a/test/vpp_ip.py b/test/vpp_ip.py index 6d22c16ff60..2083e03b5e5 100644 --- a/test/vpp_ip.py +++ b/test/vpp_ip.py @@ -200,6 +200,20 @@ class VppIpPrefix(): return False +class VppIp6Prefix(): + def __init__(self, prefix, prefixlen): + self.ip_prefix = ip_address(unicode(prefix)) + self.prefixlen = prefixlen + + def encode(self): + return {'prefix': {'address': self.ip_prefix.packed}, + 'len': self.prefixlen} + + +class VppIp4Prefix(VppIp6Prefix): + pass + + class VppIpMPrefix(): def __init__(self, saddr, gaddr, len): self.saddr = saddr