From 92f30ababa567dffb9fea221f03f9470b088e067 Mon Sep 17 00:00:00 2001 From: JingLu5 Date: Fri, 16 Dec 2016 14:38:16 +0800 Subject: Use openstack command instead keystone command in prepare_storperf_admin-rc.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JIRA: YARDSTICK-476 In Openstack Newton, the ”tenant“ is deprecated and "project" is used. The prepare_storperf_admin-rc.sh uses keystone command to get "tenant id". So for newton, we need to use openstack command to get "project id". This patch also add a copy right header in tests/ci/scp_storperf_admin-rc.sh. Change-Id: Ic69cb07f684ccb557866a4141e9d2724fc054f29 Signed-off-by: JingLu5 --- tests/ci/prepare_storperf_admin-rc.sh | 5 +++-- tests/ci/scp_storperf_admin-rc.sh | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'tests/ci') diff --git a/tests/ci/prepare_storperf_admin-rc.sh b/tests/ci/prepare_storperf_admin-rc.sh index 0401719ff..b3dc2e58e 100755 --- a/tests/ci/prepare_storperf_admin-rc.sh +++ b/tests/ci/prepare_storperf_admin-rc.sh @@ -9,14 +9,15 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +# Prepare storperf_admin-rc for StorPerf. + 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:]]*//'` - +TENANT_ID=`openstack project show admin|grep '\bid\b' |awk -F '|' '{print $3}'|sed -e 's/^[[:space:]]*//'` rm -f ~/storperf_admin-rc touch ~/storperf_admin-rc diff --git a/tests/ci/scp_storperf_admin-rc.sh b/tests/ci/scp_storperf_admin-rc.sh index af2885b01..7c3896d88 100644 --- a/tests/ci/scp_storperf_admin-rc.sh +++ b/tests/ci/scp_storperf_admin-rc.sh @@ -1,5 +1,16 @@ #!/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 +############################################################################## + +# Copy storperf_admin-rc to deployment location. + ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \ root@192.168.200.1:/root/ &> /dev/null -- cgit 1.2.3-korg