Create Bash Sheel Utilities for TC052 79/17779/1
authortjuyinkanglin <14_ykl@tongji.edu.cn>
Fri, 29 Jul 2016 05:43:31 +0000 (13:43 +0800)
committertjuyinkanglin <14_ykl@tongji.edu.cn>
Fri, 29 Jul 2016 05:43:31 +0000 (13:43 +0800)
JIRA: YARDSTICK-277

Change-Id: I4837ec865e73c3a77cd5edc076be15f3a0695617
Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash [new file with mode: 0644]
yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash [new file with mode: 0644]
yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash [new file with mode: 0644]
yardstick/benchmark/scenarios/availability/operation_conf.yaml
yardstick/benchmark/scenarios/availability/result_checker_conf.yaml

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 (file)
index 0000000..5c2d6d7
--- /dev/null
@@ -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 (file)
index 0000000..67d0c90
--- /dev/null
@@ -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 (file)
index 0000000..0b1a9f0
--- /dev/null
@@ -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
index 1e67463..309a03d 100644 (file)
@@ -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
index 638c39a..faa4eb5 100644 (file)
@@ -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