from framework import VppTestCase, VppTestRunner
from lisp import VppLocalMapping, VppLispAdjacency, VppLispLocator, \
VppLispLocatorSet, VppRemoteMapping, LispRemoteLocator
-from util import ppp, ForeignAddressFactory
+from util import ppp
# From py_lispnetworking.lisp.py: # GNU General Public License v2.0
bind_layers(LISP_GPE_Header, Ether, next_proto=3)
+class ForeignAddressFactory(object):
+ count = 0
+ prefix_len = 24
+ net_template = '10.10.10.{}'
+ net = net_template.format(0) + '/' + str(prefix_len)
+
+ def get_ip4(self):
+ if self.count > 255:
+ raise Exception("Network host address exhaustion")
+ self.count += 1
+ return self.net_template.format(self.count)
+
+
class Driver(metaclass=abc.ABCMeta):
config_order = ['locator-sets',
self._ip6_ll = ip6_ll
-class ForeignAddressFactory(object):
- count = 0
- prefix_len = 24
- net_template = '10.10.10.{}'
- net = net_template.format(0) + '/' + str(prefix_len)
-
- def get_ip4(self):
- if self.count > 255:
- raise Exception("Network host address exhaustion")
- self.count += 1
- return self.net_template.format(self.count)
-
-
class L4_Conn():
""" L4 'connection' tied to two VPP interfaces """