dpdk-ipsec: store buffer index into crypto-op private
[vpp.git] / test / lisp.py
index 865070d..2dace8f 100644 (file)
@@ -1,10 +1,4 @@
-from random import randint
-from socket import AF_INET, AF_INET6
-from scapy.all import *
-from scapy.packet import *
 from scapy.fields import *
-from lisp import *
-from framework import *
 from vpp_object import *
 
 
@@ -70,7 +64,7 @@ class VppLispLocator(VppObject):
 
     @property
     def priority(self):
-        return self.priority
+        return self._priority
 
     @property
     def weight(self):
@@ -190,6 +184,10 @@ class VppLispMapping(VppObject):
         mapping = self.get_lisp_mapping_dump_entry()
         return mapping
 
+    def object_id(self):
+        return 'lisp-mapping-[%s]-%s-%s-%s' % (
+            self.vni, self.eid, self.priority, self.weight)
+
 
 class VppLocalMapping(VppLispMapping):
     """ LISP Local mapping """
@@ -292,7 +290,8 @@ class VppLispAdjacency(VppObject):
                 reid_len=self._reid.prefix_length, vni=self._vni)
         self._test.registry.register(self, self.test.logger)
 
-    def eid_equal(self, eid, eid_type, eid_data, prefix_len):
+    @staticmethod
+    def eid_equal(eid, eid_type, eid_data, prefix_len):
         if eid.eid_type != eid_type:
             return False