aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VPPUtil.py
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2020-12-03 13:08:43 +0100
committerJan Gelety <jgelety@cisco.com>2020-12-03 13:08:43 +0100
commit0bb14d79edb065bc97fdd11a7bfa7d1605266e08 (patch)
tree4690f659ee12d8b7007f0094b4a032f08148cbf4 /resources/libraries/python/VPPUtil.py
parentac776adf699e105081630c44a3e36906d9ce2903 (diff)
vpp-device: GENEVE tunnel test, l3 mode
Jira: CSIT-1769 Change-Id: I98510cd8e627d7347f77d0032b7bac28f2e36c61 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/VPPUtil.py')
-rw-r--r--resources/libraries/python/VPPUtil.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/resources/libraries/python/VPPUtil.py b/resources/libraries/python/VPPUtil.py
index c735494282..a7ec44c974 100644
--- a/resources/libraries/python/VPPUtil.py
+++ b/resources/libraries/python/VPPUtil.py
@@ -361,3 +361,26 @@ class VPPUtil:
logger.trace(f"show threads:\n{threads_data}")
return threads_data
+
+ @staticmethod
+ def vpp_add_graph_node_next(node, graph_node_name, graph_next_name):
+ """Set the next node for a given node.
+
+ :param node: Node to run command on.
+ :param graph_node_name: Graph node to add the next node on.
+ :param graph_next_name: Graph node to add as the next node.
+ :type node: dict
+ :type graph_node_name: str
+ :type graph_next_name: str
+ :returns: The index of the next node.
+ :rtype: int
+ """
+ cmd = u"add_node_next"
+ args = dict(
+ node_name=graph_node_name,
+ next_name=graph_next_name
+ )
+ with PapiSocketExecutor(node) as papi_exec:
+ reply = papi_exec.add(cmd, **args).get_reply()
+
+ return reply[u"next_index"]