From 52558c8d482308318c9abca6904603abccded451 Mon Sep 17 00:00:00 2001 From: tjuyinkanglin <14_ykl@tongji.edu.cn> Date: Fri, 29 Jul 2016 13:43:31 +0800 Subject: Create Bash Sheel Utilities for TC052 JIRA: YARDSTICK-277 Change-Id: I4837ec865e73c3a77cd5edc076be15f3a0695617 Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn> --- .../availability/ha_tools/nova/create_flavor.bash | 19 +++++++++++++++++++ .../availability/ha_tools/nova/delete_flavor.bash | 19 +++++++++++++++++++ .../availability/ha_tools/nova/show_flavors.bash | 18 ++++++++++++++++++ .../scenarios/availability/operation_conf.yaml | 4 ++++ .../scenarios/availability/result_checker_conf.yaml | 4 +++- 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash create mode 100644 yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash create mode 100644 yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash 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 -- cgit 1.2.3-korg