From 4e288f27c54e9cefc62ccbf277a1c1ca7b048ff9 Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Wed, 14 Aug 2019 12:30:06 +0000 Subject: Move: WRK installation into ansible - Remove ability to install from framework. - Control via ansible with other dependencies. Signed-off-by: Peter Mikus Change-Id: I5fd0ca18b4f76c30b6c28b4dcd15e538e01cb315 (cherry picked from commit 37a9451377f7239365b5af778b8072d1585a2d2a) --- resources/tools/wrk/wrk.py | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) (limited to 'resources/tools/wrk/wrk.py') diff --git a/resources/tools/wrk/wrk.py b/resources/tools/wrk/wrk.py index 43355b99fb..b7989b8852 100644 --- a/resources/tools/wrk/wrk.py +++ b/resources/tools/wrk/wrk.py @@ -57,13 +57,13 @@ REGEX_LATENCY_DIST = \ REGEX_NUM = r"(\d*\.*\d*)(\D*)" -def install_wrk(tg_node): - """Install wrk on the TG node. +def check_wrk(tg_node): + """Check if wrk is installed 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 if the - installation fails. + command is not availble. """ if tg_node['type'] != NodeType.TG: @@ -74,33 +74,10 @@ def install_wrk(tg_node): ret, _, _ = ssh.exec_command( "sudo -E " - "sh -c '{0}/resources/tools/wrk/wrk_utils.sh install false'". - format(Constants.REMOTE_FW_DIR), timeout=1800) + "sh -c '{0}/resources/tools/wrk/wrk_utils.sh installed'". + format(Constants.REMOTE_FW_DIR)) if int(ret) != 0: - 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.') + raise RuntimeError('WRK is not installed on TG node.') def run_wrk(tg_node, profile_name, tg_numa, test_type, warm_up=False): -- cgit 1.2.3-korg