summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjuyinkanglin <14_ykl@tongji.edu.cn>2016-07-29 13:43:31 +0800
committertjuyinkanglin <14_ykl@tongji.edu.cn>2016-07-29 13:43:31 +0800
commit52558c8d482308318c9abca6904603abccded451 (patch)
treedf04f7788ccb3da40f8fbfc2bcdf824c2656c4ed
parenta2ba9d0d6d2e44dcfeb7693bd0e4f728d5076f13 (diff)
Create Bash Sheel Utilities for TC052
JIRA: YARDSTICK-277 Change-Id: I4837ec865e73c3a77cd5edc076be15f3a0695617 Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash19
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash19
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash18
-rw-r--r--yardstick/benchmark/scenarios/availability/operation_conf.yaml4
-rw-r--r--yardstick/benchmark/scenarios/availability/result_checker_conf.yaml4
5 files changed, 63 insertions, 1 deletions
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash
new file mode 100644
index 000000000..5c2d6d70e
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+##############################################################################
+# (c) OPNFV, Yin Kanglin and others.
+# 14_ykl@tongji.edu.cn
+# 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
+##############################################################################
+
+# create flavor
+# parameter: $1-name $2-id $3-ram $4-disk $5-vcpus
+
+set -e
+
+source /root/openrc
+
+nova flavor-create $1 $2 $3 $4 $5
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash
new file mode 100644
index 000000000..67d0c902e
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+##############################################################################
+# (c) OPNFV, Yin Kanglin and others.
+# 14_ykl@tongji.edu.cn
+# 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
+##############################################################################
+
+# delete a flavor
+# parameter: $1 - flavor name/id
+
+set -e
+
+source /root/openrc
+
+nova flavor-delete $1 \ No newline at end of file
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash
new file mode 100644
index 000000000..0b1a9f056
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+##############################################################################
+# (c) OPNFV, Yin Kanglin and others.
+# 14_ykl@tongji.edu.cn
+# 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
+##############################################################################
+
+# show all of the flavors
+
+set -e
+
+source /root/openrc
+
+nova flavor-list \ No newline at end of file
diff --git a/yardstick/benchmark/scenarios/availability/operation_conf.yaml b/yardstick/benchmark/scenarios/availability/operation_conf.yaml
index 1e6746302..309a03de8 100644
--- a/yardstick/benchmark/scenarios/availability/operation_conf.yaml
+++ b/yardstick/benchmark/scenarios/availability/operation_conf.yaml
@@ -14,3 +14,7 @@ swift-upload-file:
swift-download-file:
action_script: ha_tools/swift/download.bash
rollback_script: ha_tools/file/remove_file.bash
+
+nova-create-flavor:
+ action_script: ha_tools/nova/create_flavor.bash
+ rollback_script: ha_tools/nova/delete_flavor.bash \ No newline at end of file
diff --git a/yardstick/benchmark/scenarios/availability/result_checker_conf.yaml b/yardstick/benchmark/scenarios/availability/result_checker_conf.yaml
index 638c39a6e..faa4eb57d 100644
--- a/yardstick/benchmark/scenarios/availability/result_checker_conf.yaml
+++ b/yardstick/benchmark/scenarios/availability/result_checker_conf.yaml
@@ -8,4 +8,6 @@ process-checker:
service-checker:
verify_script: ha_tools/check_service.bash
nova-instance-checker:
- verify_script: ha_tools/nova/show_instances.bash \ No newline at end of file
+ verify_script: ha_tools/nova/show_instances.bash
+nova-flavor-checker:
+ verify_script: ha_tools/nova/show_flavors.bash \ No newline at end of file