summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorYiting.Li <liyiting@huawei.com>2016-01-20 11:01:43 +0800
committerJun Li <matthew.lijun@huawei.com>2016-01-20 06:05:23 +0000
commit9f6acc0ed5e118f7874c70071e68def42118703b (patch)
tree6054415a0c9de8617076766c43dedaccbd6997cc /utils
parent6d9521fff519412e66d585d8f980824414a218eb (diff)
JIRA: BOTTLENECKS-41 define the documents of vstf in B release
Change-Id: Ib2ef6fabf0452a3e686d3de0ec7424e9a0500482 Signed-off-by: Yiting.Li <liyiting@huawei.com> (cherry picked from commit 194ae04e266f63512a8f041f6bfd0dc330cd81af)
Diffstat (limited to 'utils')
-rw-r--r--utils/infra_setup/heat_template/vstf_heat_template/launch_vstf.sh9
-rw-r--r--utils/infra_setup/heat_template/vstf_heat_template/scp.sh93
-rw-r--r--utils/infra_setup/heat_template/vstf_heat_template/ssh.sh28
-rwxr-xr-xutils/infra_setup/heat_template/vstf_heat_template/vstf_HOT_create_instance.sh9
-rw-r--r--utils/infra_setup/heat_template/vstf_heat_template/vstf_test.sh14
5 files changed, 24 insertions, 129 deletions
diff --git a/utils/infra_setup/heat_template/vstf_heat_template/launch_vstf.sh b/utils/infra_setup/heat_template/vstf_heat_template/launch_vstf.sh
index 37754f98..f2a0aeaa 100644
--- a/utils/infra_setup/heat_template/vstf_heat_template/launch_vstf.sh
+++ b/utils/infra_setup/heat_template/vstf_heat_template/launch_vstf.sh
@@ -1,5 +1,12 @@
#!/bin/bash
-
+##############################################################################
+# Copyright (c) 2015 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
+##############################################################################
set -x
STACK_NAME="vstf"
diff --git a/utils/infra_setup/heat_template/vstf_heat_template/scp.sh b/utils/infra_setup/heat_template/vstf_heat_template/scp.sh
deleted file mode 100644
index b3d6a27b..00000000
--- a/utils/infra_setup/heat_template/vstf_heat_template/scp.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-function scp_cmd()
-{
- local ip=$1
- local usr=$2
- local passwd=$3
- srcfile=$4
- desfile=$5
- opt=$6
- case $opt in
- file)
- expect -c "
- spawn scp -r $srcfile $usr@$ip:$desfile
- set timeout -1
- expect {
- \"*no)?\" {
- send \"yes\r\"
- exp_continue
- }
- \"*assword:*\" {
- send \"$passwd\r\"
- exp_continue
- }
- }
- "
- ;;
- dir)
- expect -c "
- spawn scp -r $srcfile $usr@$ip:$desfile
- set timeout -1
- expect {
- \"*no)?\" {
- send \"yes\r\"
- exp_continue
- }
- \"*assword:*\" {
- send \"$passwd\r\"
- exp_continue
- }
- }
- "
- ;;
- *)
- echo "err"
- ;;
- esac
-}
-
-function remote_scp_cmd()
-{
- local ip=$1
- local usr=$2
- local passwd=$3
- srcfile=$4
- desfile=$5
- opt=$6
- case $opt in
- file)
- expect -c "
- spawn scp -r $usr@$ip:$srcfile $desfile
- set timeout -1
- expect {
- \"*no)?\" {
- send \"yes\r\"
- exp_continue
- }
- \"*assword:*\" {
- send \"$passwd\r\"
- exp_continue
- }
- }
- "
- ;;
- dir)
- expect -c "
- spawn scp -r $usr@$ip:$srcfile $desfile
- set timeout -1
- expect {
- \"*no)?\" {
- send \"yes\r\"
- exp_continue
- }
- \"*assword:*\" {
- send \"$passwd\r\"
- exp_continue
- }
- }
- "
- ;;
- *)
- echo "err"
- ;;
- esac
-}
diff --git a/utils/infra_setup/heat_template/vstf_heat_template/ssh.sh b/utils/infra_setup/heat_template/vstf_heat_template/ssh.sh
deleted file mode 100644
index 35600065..00000000
--- a/utils/infra_setup/heat_template/vstf_heat_template/ssh.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-function run_cmd()
-{
- local ip=$1
- local usr=$2
- local passwd=$3
- local cmd=$4
- expect -c "
- spawn ssh $usr@$ip
- set timeout -1
- expect {
- \"*no)?\" {
- send \"yes\r\"
- exp_continue
- }
- \"*assword:*\" {
- send \"$passwd\r\"
- exp_continue
- }
- \"*#\" {
- send \"$cmd\r\"
- exec sleep 1
- send \"exit\r\"
- expect eof
- }
- }
- "
-}
-
diff --git a/utils/infra_setup/heat_template/vstf_heat_template/vstf_HOT_create_instance.sh b/utils/infra_setup/heat_template/vstf_heat_template/vstf_HOT_create_instance.sh
index 45000256..ce8ed439 100755
--- a/utils/infra_setup/heat_template/vstf_heat_template/vstf_HOT_create_instance.sh
+++ b/utils/infra_setup/heat_template/vstf_heat_template/vstf_HOT_create_instance.sh
@@ -1,5 +1,12 @@
#!/bin/bash
-
+##############################################################################
+# Copyright (c) 2015 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
+##############################################################################
set -ex
GERRIT_REFSPEC_DEBUG=$1
diff --git a/utils/infra_setup/heat_template/vstf_heat_template/vstf_test.sh b/utils/infra_setup/heat_template/vstf_heat_template/vstf_test.sh
index a5f06f8e..d13a6de6 100644
--- a/utils/infra_setup/heat_template/vstf_heat_template/vstf_test.sh
+++ b/utils/infra_setup/heat_template/vstf_heat_template/vstf_test.sh
@@ -1,12 +1,17 @@
#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 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
+##############################################################################
set -x
VM_MANAGER_USER="root"
VM_MANAGER_PASSWD="root"
STACK_NAME="vstf"
-#load func
-source ./ssh.sh
-source ./scp.sh
function fn_parser_ipaddress(){
#parser and get output ipaddress
@@ -35,7 +40,6 @@ function fn_vstf_test_config(){
#setting testting ipaddress
local cmd="vstfadm settings ${tester_testing_ip} ${target_testing_ip}"
echo "$cmd"
- #run_cmd ${manager_control_public_ip} ${VM_MANAGER_USER} ${VM_MANAGER_PASSWD} "${cmd}"
ssh-keygen -f "/home/jenkins-ci/.ssh/known_hosts" -R ${manager_control_public_ip}
sshpass -p root ssh -o StrictHostKeyChecking=no root@${manager_control_public_ip} "${cmd}"
@@ -55,7 +59,6 @@ function fn_testing_scenario(){
echo ${cmd}
ssh-keygen -f "/home/jenkins-ci/.ssh/known_hosts" -R ${manager_control_public_ip}
- #run_cmd ${manager_control_public_ip} ${VM_MANAGER_USER} ${VM_MANAGER_PASSWD} "${head_cmd} ${scene} ${test_tool} ${protocol} ${test_type} \"${test_length_list}\" > /root/${scene}"
sshpass -p root ssh -o StrictHostKeyChecking=no root@${manager_control_public_ip} "${cmd}"
sleep 10
done
@@ -68,7 +71,6 @@ function fn_result(){
rm -rf ./result/*
for scene in ${test_scenario_list}
do
- #remote_scp_cmd ${manager_control_public_ip} ${VM_MANAGER_USER} ${VM_MANAGER_PASSWD} "/root/${scene}-result.txt" "./result/${scene}" "file"
sshpass -p root ssh -o StrictHostKeyChecking=no root@${manager_control_public_ip} "cat /root/${scene}-result.txt"
sshpass -p root scp -o StrictHostKeyChecking=no root@${manager_control_public_ip}:/root/${scene}-result.txt "./result/${scene}"
done