- raise RuntimeError('Installation of wrk on TG node failed.')
-
-
-def destroy_wrk(tg_node):
- """Destroy wrk on the TG node.
-
- :param tg_node: Traffic generator node.
- :type tg_node: dict
- :raises: RuntimeError if the given node is not a TG node or the removal of
- wrk failed.
- """
-
- if tg_node['type'] != NodeType.TG:
- raise RuntimeError('Node type is not a TG.')
-
- ssh = SSH()
- ssh.connect(tg_node)
-
- ret, _, _ = ssh.exec_command(
- "sudo -E "
- "sh -c '{0}/resources/tools/wrk/wrk_utils.sh destroy'".
- format(Constants.REMOTE_FW_DIR), timeout=1800)
- if int(ret) != 0:
- raise RuntimeError('Removal of wrk from the TG node failed.')