acl-plugin: make test: add a test which deletes an interface with applied ACL
[vpp.git] / test / util.py
index 512bf9e..7d973bd 100644 (file)
@@ -4,7 +4,7 @@ import socket
 import sys
 from abc import abstractmethod, ABCMeta
 from cStringIO import StringIO
-from scapy.layers.inet6 import in6_mactoifaceid
+from scapy.utils6 import in6_mactoifaceid
 
 from scapy.layers.l2 import Ether
 from scapy.packet import Raw
@@ -65,6 +65,11 @@ def mk_ll_addr(mac):
     return addr
 
 
+def ip6_normalize(ip6):
+    return socket.inet_ntop(socket.AF_INET6,
+                            socket.inet_pton(socket.AF_INET6, ip6))
+
+
 class NumericConstant(object):
     __metaclass__ = ABCMeta