diff options
author | Jing Lu <lvjing5@huawei.com> | 2017-08-23 01:19:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-08-23 01:19:20 +0000 |
commit | 4303528272c8a2ea2787868b0394722d8d07e7bb (patch) | |
tree | 1095814afdaf473a02b1eb5d64c8465169fb64f1 /yardstick/benchmark | |
parent | b82340a4e3b63b38fe3b797070baacfb70a6df38 (diff) | |
parent | 6c2142fff679b12bf9489631052186b364ef10c5 (diff) |
Merge "Add test case file, document and related scripts of yardstick tc058(HA_TC015)"
Diffstat (limited to 'yardstick/benchmark')
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 |