diff options
author | Jan Gelety <jgelety@cisco.com> | 2020-10-24 07:12:05 +0200 |
---|---|---|
committer | Jan Gelety <jgelety@cisco.com> | 2020-12-03 09:36:08 +0100 |
commit | a9f54ca5080aeef17686f300a6807bf9b46b7c90 (patch) | |
tree | a5ea1c5bcfc5400f5063e2906a36097e73dc2499 /resources/libraries/python/VPPUtil.py | |
parent | 70b633f637f6923d1e266473389ddbba02ca37f1 (diff) |
vpp-device: GENEVE tunnel test, l3 mode
Jira: CSIT-1769
Change-Id: I0ab906966f760b809b8431530c010a8f0835d62c
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/VPPUtil.py')
-rw-r--r-- | resources/libraries/python/VPPUtil.py | 23 |
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"] |