diff options
author | tjuyinkanglin <14_ykl@tongji.edu.cn> | 2017-08-10 23:48:01 +0800 |
---|---|---|
committer | tjuyinkanglin <14_ykl@tongji.edu.cn> | 2017-08-11 17:48:43 +0800 |
commit | 6c2142fff679b12bf9489631052186b364ef10c5 (patch) | |
tree | 64b98e0df6326355961c96bd8f147e9ec38933f7 /yardstick/benchmark/scenarios/availability | |
parent | 43bf12d6ab7bcaea16dc75ed4ccbe3895cf51da3 (diff) |
Add test case file, document and related scripts of yardstick
tc058(HA_TC015)
JIRA: YARDSTICK-780
Change-Id: I4406776cb6b91265a0d2674b5dd200ca7d13ef14
Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
Diffstat (limited to 'yardstick/benchmark/scenarios/availability')
3 files changed, 50 insertions, 1 deletions
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/get_server_floatingip.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/get_server_floatingip.bash new file mode 100644 index 000000000..78dd27628 --- /dev/null +++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/get_server_floatingip.bash @@ -0,0 +1,23 @@ +#!/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 +############################################################################## + +# get floating ip of a serer +# parameter: $1 - server name + +set -e + +if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then + SECURE="--insecure" +else + SECURE="" +fi + +openstack ${SECURE} server list -f value | grep $1 | awk '{print $5}'
\ No newline at end of file diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/list_servers.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/list_servers.bash new file mode 100644 index 000000000..0f67c021e --- /dev/null +++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/list_servers.bash @@ -0,0 +1,22 @@ +#!/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 +############################################################################## + +# list servers + +set -e + +if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then + SECURE="--insecure" +else + SECURE="" +fi + +openstack ${SECURE} server 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 1c39385a9..50664d087 100644 --- a/yardstick/benchmark/scenarios/availability/operation_conf.yaml +++ b/yardstick/benchmark/scenarios/availability/operation_conf.yaml @@ -25,4 +25,8 @@ swift-download-file: 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 + rollback_script: ha_tools/nova/delete_flavor.bash + +get-floatingip: + action_script: ha_tools/nova/get_server_floatingip.bash + rollback_script: ha_tools/nova/list_servers.bash |