5 VM_MANAGER_PASSWD="root"
11 function fn_parser_ipaddress(){
12 #parser and get output ipaddress
13 manager_control_private_ip=`heat output-show ${STACK_NAME} manager_control_private_ip | sed 's/\"//g'`
14 manager_control_public_ip=`heat output-show ${STACK_NAME} manager_control_public_ip | sed 's/\"//g'`
17 for ipaddr in ${manager_control_private_ip} ${manager_control_public_ip}
19 if [ "${ipaddr}x" == "x" ]
21 echo "[ERROR]The ipaddress is null ,get ip from heat output failed"
29 function fn_vstf_test_config(){
30 #get testing ipaddress
31 tester_testing_ip=`nova list | grep "vstf-tester" | grep "bottlenecks-testing" | awk -F'bottlenecks-testing=' '{print $2}' | awk '{print $1}'`
32 target_testing_ip=`nova list | grep "vstf-target" | grep "bottlenecks-testing" | awk -F'bottlenecks-testing=' '{print $2}' | awk '{print $1}'`
33 echo "tester_testing_ip = ${tester_testing_ip}"
34 echo "target_testing_ip = ${target_testing_ip}"
35 #setting testting ipaddress
36 local cmd='vstfadm settings ${tester_testing_ip} ${target_testing_ip}'
38 #run_cmd ${manager_control_public_ip} ${VM_MANAGER_USER} ${VM_MANAGER_PASSWD} "${cmd}"
43 function fn_testing_scenario(){
44 local head_cmd="vstfadm perf-test "
45 local test_length_list="64"
46 local test_scenario_list="Tu-1 Tu-3"
47 local test_tool="netperf"
49 local test_type="frameloss"
50 for scene in ${test_scenario_list}
52 local cmd="${head_cmd} ${scene} ${test_tool} ${protocol} ${test_type} \"${test_length_list}\" > /root/${scene}-result.txt"
54 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}"
60 local test_scenario_list="Tu-1 Tu-3"
63 for scene in ${test_scenario_list}
65 remote_scp_cmd ${manager_control_public_ip} ${VM_MANAGER_USER} ${VM_MANAGER_PASSWD} "/root/${scene}-result.txt" "./result/${scene}" "file"