Find nova vs. vm mapping relation 19/38519/1
authorzhihui wu <wu.zhihui1@zte.com.cn>
Tue, 1 Aug 2017 09:51:04 +0000 (17:51 +0800)
committerzhihui wu <wu.zhihui1@zte.com.cn>
Tue, 1 Aug 2017 09:51:04 +0000 (17:51 +0800)
Find nova vs. vm mapping relation, and save it to a
json file named "nova_vm.json"

JIRA: QTIP-253

Change-Id: Ib9b6356525d78cd69752843ff65425a4628bd160
Signed-off-by: zhihui wu <wu.zhihui1@zte.com.cn>
integration/storperf/openstack.sh
integration/storperf/start_job.sh
integration/storperf/storperf.sh

index 011aadb..9970187 100755 (executable)
@@ -56,3 +56,10 @@ create_storperf_flavor()
     fi
     openstack flavor show storperf
 }
+
+
+nova_vm_mapping()
+{
+    rm ./nova_vm.json
+    openstack server list --name storperf-agent -c ID -c Host --long -f json > nova_vm.json
+}
\ No newline at end of file
index 6ac95ec..363072f 100755 (executable)
@@ -30,6 +30,8 @@ if [[ -z $WORKSPACE ]];then
     WORKSPACE=`pwd`
 fi
 
+source $WORKSPACE/openstack.sh
+
 echo ==========================================================================
 echo "Start to create storperf stack"
 cat ${stack_json} 1>&2
@@ -39,6 +41,8 @@ curl -X POST --header 'Content-Type: application/json' \
      --header 'Accept: application/json' -d @${stack_json} \
      'http://127.0.0.1:5000/api/v1.0/configurations'
 
+nova_vm_mapping
+
 echo
 echo ==========================================================================
 echo "Start to run storperf test"
index 7a0253d..8120cb9 100755 (executable)
@@ -38,8 +38,8 @@ installer_ip=${installer_ip:-$INSTALLER_IP}
 stack_json=${stack_json:-"$WORKSPACE/default_stack.json"}
 job_json=${job_json:-"$WORKSPACE/default_job.json"}
 
-source ./openstack.sh
-source ./storperf_docker.sh
+source $WORKSPACE/openstack.sh
+source $WORKSPACE/storperf_docker.sh
 
 git clone --depth 1 https://gerrit.opnfv.org/gerrit/storperf $WORKSPACE/storperf
 git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng