From 3f8aabb29a49d650609832073c60589e68d9f3e8 Mon Sep 17 00:00:00 2001 From: JingLu5 Date: Mon, 25 Jul 2016 11:01:36 +0800 Subject: Update setup.py to include plugin install/remove scripts and rename "script" directory to "scripts" Change-Id: I420b391acc15e6c65816c33b8568e86d8238bcc7 Signed-off-by: JingLu5 --- setup.py | 4 +++- yardstick/cmd/commands/plugin.py | 4 ++-- yardstick/resources/script/install/sample.bash | 18 ------------------ yardstick/resources/script/remove/sample.bash | 16 ---------------- yardstick/resources/scripts/install/sample.bash | 18 ++++++++++++++++++ yardstick/resources/scripts/remove/sample.bash | 16 ++++++++++++++++ 6 files changed, 39 insertions(+), 37 deletions(-) delete mode 100644 yardstick/resources/script/install/sample.bash delete mode 100644 yardstick/resources/script/remove/sample.bash create mode 100644 yardstick/resources/scripts/install/sample.bash create mode 100644 yardstick/resources/scripts/remove/sample.bash diff --git a/setup.py b/setup.py index 8b37943ea..35037382c 100755 --- a/setup.py +++ b/setup.py @@ -19,7 +19,9 @@ setup( 'benchmark/scenarios/networking/*.txt', 'benchmark/scenarios/parser/*.sh', 'benchmark/scenarios/storage/*.bash', - 'resources/files/*' + 'resources/files/*', + 'resources/scripts/install/*.bash', + 'resources/scripts/remove/*.bash' ] }, url="https://www.opnfv.org", diff --git a/yardstick/cmd/commands/plugin.py b/yardstick/cmd/commands/plugin.py index 52ecf2005..8e3ddb5a5 100644 --- a/yardstick/cmd/commands/plugin.py +++ b/yardstick/cmd/commands/plugin.py @@ -76,7 +76,7 @@ class PluginCommands(object): '''Deployment environment setup''' target_script = plugin_name + ".bash" self.script = pkg_resources.resource_filename( - 'yardstick.resources', 'script/install/' + target_script) + 'yardstick.resources', 'scripts/install/' + target_script) deployment_user = deployment.get("user") deployment_ip = deployment.get("ip") @@ -95,7 +95,7 @@ class PluginCommands(object): '''Deployment environment setup''' target_script = plugin_name + ".bash" self.script = pkg_resources.resource_filename( - 'yardstick.resources', 'script/remove/' + target_script) + 'yardstick.resources', 'scripts/remove/' + target_script) deployment_user = deployment.get("user") deployment_ip = deployment.get("ip") diff --git a/yardstick/resources/script/install/sample.bash b/yardstick/resources/script/install/sample.bash deleted file mode 100644 index 21eb14680..000000000 --- a/yardstick/resources/script/install/sample.bash +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -############################################################################## -# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Sample plugin installation script - -set -e - -cat > test.sh < test.sh <