summaryrefslogtreecommitdiffstats
path: root/yardstick
diff options
context:
space:
mode:
authorliang gao <jean.gaoliang@huawei.com>2016-08-01 07:18:02 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-01 07:18:02 +0000
commit147ef861038a8a9b17c828c201d6fceab9feb565 (patch)
tree99c067ef9443bdd3221725b64f438972eeb6a74f /yardstick
parent8b41bad253d2bdae0ff0cb06dd406ab5b490dc61 (diff)
parent52558c8d482308318c9abca6904603abccded451 (diff)
Merge "Create Bash Sheel Utilities for TC052"
Diffstat (limited to 'yardstick')
-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