MAP: Use explicit address/prefix types in API
Change-Id: Ic751fecc4a060eedcdb9eaf5d02e1416c838fd63
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/test/vpp_ip.py b/test/vpp_ip.py
index 6d22c16..2083e03 100644
--- a/test/vpp_ip.py
+++ b/test/vpp_ip.py
@@ -200,6 +200,20 @@
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