aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/LispSetup.py
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2016-07-07 23:00:04 +0200
committerFlorin Coras <fcoras@cisco.com>2016-07-25 18:18:27 +0200
commit721f39743c31003ccbdad3c27ffcc3145bfccf90 (patch)
tree19b8e2c18278f4356af2e16612683a774335a8f4 /resources/libraries/python/LispSetup.py
parentfc88af0ead3ca2a47cb47509383e5d21b438a77f (diff)
CSIT-199: Use static adjacencies in LISP dp tests
Switch to using static adjacencies and remote mappings instead of only the latter in LISP data plane tests. Change-Id: Ia2a05165425ac68fa7839f9c8f402033b8274fcf Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'resources/libraries/python/LispSetup.py')
-rw-r--r--resources/libraries/python/LispSetup.py59
1 files changed, 59 insertions, 0 deletions
diff --git a/resources/libraries/python/LispSetup.py b/resources/libraries/python/LispSetup.py
index 82e1a9787a..13d0501abb 100644
--- a/resources/libraries/python/LispSetup.py
+++ b/resources/libraries/python/LispSetup.py
@@ -103,6 +103,65 @@ class LispRemoteMapping(object):
seid=seid,
seid_prefix=seid_prefix,
rloc=rloc)
+class LispAdjacency(object):
+ """Class for lisp adjacency API."""
+
+ def __init__(self):
+ pass
+
+ @staticmethod
+ def vpp_add_lisp_adjacency(node, vni, deid, deid_prefix, seid,
+ seid_prefix):
+ """Add lisp adjacency on the VPP node in topology.
+
+ :param node: VPP node.
+ :param vni: Vni.
+ :param deid: Destination eid address.
+ :param deid_predix: Destination eid address prefix_len.
+ :param seid: Source eid address.
+ :param seid_prefix: Source eid address prefix_len.
+ :type node: dict
+ :type vni: int
+ :type deid: str
+ :type deid_prefix: int
+ :type seid: str
+ :type seid_prefix: int
+ """
+
+ VatExecutor.cmd_from_template(node,
+ 'lisp/add_lisp_adjacency.vat',
+ vni=vni,
+ deid=deid,
+ deid_prefix=deid_prefix,
+ seid=seid,
+ seid_prefix=seid_prefix)
+
+ @staticmethod
+ def vpp_del_lisp_adjacency(node, vni, deid, deid_prefix, seid,
+ seid_prefix):
+ """Delete lisp adjacency on the VPP node in topology.
+
+ :param node: VPP node.
+ :param vni: Vni.
+ :param deid: Destination eid address.
+ :param deid_predix: Destination eid address prefix_len.
+ :param seid: Source eid address.
+ :param seid_prefix: Source eid address prefix_len.
+ :type node: dict
+ :type vni: int
+ :type deid: str
+ :type deid_prefix: int
+ :type seid: str
+ :type seid_prefix: int
+ """
+
+ VatExecutor.cmd_from_template(node,
+ 'lisp/del_lisp_adjacency.vat',
+ vni=vni,
+ deid=deid,
+ deid_predix=deid_prefix,
+ seid=seid,
+ seid_prefix=seid_prefix)
class LispGpeIface(object):