aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VPPUtil.py
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2017-08-15 19:33:50 +0200
committerTibor Frank <tifrank@cisco.com>2017-10-09 14:46:24 +0000
commit442a2a7b0dfd2f1cd5a4ba03fb91ed32c96f8965 (patch)
treee1b97e0254606bcca42f8588ad9896dad17ffe07 /resources/libraries/python/VPPUtil.py
parente65ba17d162581fa8b803070a5e706f344c30f33 (diff)
CSIT-775 HC Test: CRUD over IPv6 control-plane interface
Adds new test suite which accesses Honeycomb's Restconf and Netconf northbound over IPv6. This is done by sending the requests to TG where an IPv4 to IPv6 tunnel is configured to the Honeycomb DUT. Change-Id: I3b7467d8108b0da9756e632851215c66ed41bb61 Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/libraries/python/VPPUtil.py')
-rw-r--r--resources/libraries/python/VPPUtil.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/resources/libraries/python/VPPUtil.py b/resources/libraries/python/VPPUtil.py
index da59d1958d..5881d18966 100644
--- a/resources/libraries/python/VPPUtil.py
+++ b/resources/libraries/python/VPPUtil.py
@@ -46,3 +46,35 @@ class VPPUtil(object):
ssh.connect(node)
for _, value in def_setting_tb_displayed.items():
ssh.exec_command_sudo('vppctl sh {}'.format(value))
+
+ @staticmethod
+ def stop_vpp_service(node):
+ """Stop VPP service on the specified node.
+
+ :param node: VPP node.
+ :type node: dict
+ :raises RuntimeError: If VPP fails to stop.
+ """
+
+ ssh = SSH()
+ ssh.connect(node)
+ cmd = "service vpp stop"
+ ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=80)
+ if int(ret_code) != 0:
+ raise RuntimeError("VPP service did not shut down gracefully.")
+
+ @staticmethod
+ def start_vpp_service(node):
+ """start VPP service on the specified node.
+
+ :param node: VPP node.
+ :type node: dict
+ :raises RuntimeError: If VPP fails to start.
+ """
+
+ ssh = SSH()
+ ssh.connect(node)
+ cmd = "service vpp start"
+ ret_code, _, _ = ssh.exec_command_sudo(cmd)
+ if int(ret_code) != 0:
+ raise RuntimeError("VPP service did not start.")