+
+ @staticmethod
+ def stop_odl_client(node, path):
+ """Stop ODL client service on the specified node.
+
+ :param node: Node to start ODL client on.
+ :param path: Path to ODL client.
+ :type node: dict
+ :type path: str
+ :raises HoneycombError: If ODL client fails to stop.
+ """
+
+ ssh = SSH()
+ ssh.connect(node)
+
+ cmd = "{0}/*karaf*/bin/stop".format(path)
+
+ ssh = SSH()
+ ssh.connect(node)
+ ret_code, _, _ = ssh.exec_command_sudo(cmd)
+ if int(ret_code) != 0:
+ logger.warn("ODL Client refused to shut down.")
+ cmd = "pkill -f 'karaf'"
+ (ret_code, _, _) = ssh.exec_command_sudo(cmd)
+ if int(ret_code) != 0:
+ raise HoneycombError('Node {0} failed to stop ODL.'.
+ format(node['host']))
+
+ logger.info("ODL client service stopped.")
+
+ @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)
+ if int(ret_code) != 0:
+ raise RuntimeError("Could not stop VPP service on node {0}".format(
+ node['host']))