X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_ip.py;h=2083e03b5e57a5503c4c25701bf4b3ebef28ea34;hb=e61ad8d6c49d6c2fb30d29b446f6e6603c8b1de6;hp=6d22c16ff609dc51f57d4edb76d12f75abd2af2f;hpb=93cc3ee3b3a9c9224a1446625882205f3282a949;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