summaryrefslogtreecommitdiffstats
path: root/test/util.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2020-12-04 17:50:26 -0500
committerFlorin Coras <florin.coras@gmail.com>2020-12-06 18:54:07 +0000
commit1135f65586513c7cabb0dca063d1d2f97b07d7cd (patch)
treeaca2a38091d2995598055f478871e16631defee4 /test/util.py
parent24841867d17f0b57abcce6353e23c9a668e70517 (diff)
tests: refactor ForeignAddressFactory
Move ForeignAddressFactory back to test_lisp. It is the only test that uses the code and has embedded addresses specific to the test. Type: test Change-Id: If1a39f9b167e36dd7aff7481350ddb8fe17155d2 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/util.py')
-rw-r--r--test/util.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/test/util.py b/test/util.py
index fc1eae03742..b691deb642f 100644
--- a/test/util.py
+++ b/test/util.py
@@ -203,19 +203,6 @@ class Host(object):
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 """