summaryrefslogtreecommitdiffstats
path: root/tests/ci/prepare_storperf_admin-rc.sh
diff options
context:
space:
mode:
authorliang gao <jean.gaoliang@huawei.com>2016-07-26 01:34:49 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-07-26 01:34:49 +0000
commit2e97a114e55df1d0ac196b2f959aba36e4dc5019 (patch)
tree92bd8d9a4843535fe16d50701bb6fb34d9a4a2b3 /tests/ci/prepare_storperf_admin-rc.sh
parentdab477b757c53c18cc619f7f5c82fe5c0e61e67f (diff)
parent151e2655c678e3241ac08d049945a0f35083d3af (diff)
Merge "StorPerf integration into Yardstick as a pulgin."
Diffstat (limited to 'tests/ci/prepare_storperf_admin-rc.sh')
-rwxr-xr-xtests/ci/prepare_storperf_admin-rc.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/ci/prepare_storperf_admin-rc.sh b/tests/ci/prepare_storperf_admin-rc.sh
new file mode 100755
index 000000000..0401719ff
--- /dev/null
+++ b/tests/ci/prepare_storperf_admin-rc.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
+#
+# 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
+##############################################################################
+
+AUTH_URL=${OS_AUTH_URL}
+USERNAME=${OS_USERNAME:-admin}
+PASSWORD=${OS_PASSWORD:-console}
+TENANT_NAME=${OS_TENANT_NAME:-admin}
+VOLUME_API_VERSION=${OS_VOLUME_API_VERSION:-2}
+PROJECT_NAME=${OS_PROJECT_NAME:-$TENANT_NAME}
+TENANT_ID=`keystone tenant-get admin|grep 'id'|awk -F '|' '{print $3}'|sed -e 's/^[[:space:]]*//'`
+
+
+rm -f ~/storperf_admin-rc
+touch ~/storperf_admin-rc
+
+echo "OS_AUTH_URL="$AUTH_URL >> ~/storperf_admin-rc
+echo "OS_USERNAME="$USERNAME >> ~/storperf_admin-rc
+echo "OS_PASSWORD="$PASSWORD >> ~/storperf_admin-rc
+echo "OS_TENANT_NAME="$TENANT_NAME >> ~/storperf_admin-rc
+echo "OS_VOLUME_API_VERSION="$VOLUME_API_VERSION >> ~/storperf_admin-rc
+echo "OS_PROJECT_NAME="$PROJECT_NAME >> ~/storperf_admin-rc
+echo "OS_TENANT_ID="$TENANT_ID >> ~/storperf_admin-rc