From: shangxdy Date: Wed, 10 Aug 2016 16:37:34 +0000 (+0800) Subject: Add heat stack validation in integration with functest about vRNC X-Git-Tag: colorado.1.0~37^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=e3b652342724c15be0f79c6f606b43fc9670e349;p=parser.git Add heat stack validation in integration with functest about vRNC As a tester; I want to known the functest result of vRNC deploy; So i add stack validation about vRNC. JIRA:PARSER-81 Change-Id: I97cb76d8f0a5dcd3ea104023149ed0a282d688c6 Signed-off-by: shangxdy --- diff --git a/tests/functest_run.sh b/tests/functest_run.sh index f741912..ce114e3 100755 --- a/tests/functest_run.sh +++ b/tests/functest_run.sh @@ -104,20 +104,52 @@ translator_and_deploy_vRNC() { openstack stack delete --yes --wait ${PARSER_STACK_NAME} } # 2. Switch env to parser project temporally + echo "switch openstak env to parser project" change_env_to_parser_user_project - # 3. Translator and deploy vRNC + # 3. Translator yaml + echo "Translator input file ${VRNC_INPUT_TEMPLATE_FILE} and output is ${VRNC_OUTPUT_TEMPLATE_FILE}" heat-translator --template-type tosca --template-file ${VRNC_INPUT_TEMPLATE_FILE} \ --output-file ${VRNC_OUTPUT_TEMPLATE_FILE} # 4. deploy vRNC + echo "Deploy stack..." openstack stack create -t ${VRNC_OUTPUT_TEMPLATE_FILE} ${PARSER_STACK_NAME} # 5. Wait for create vRNC - sleep 60 + sleep 180 # 6. Validate the deploy result. - + echo "Checking the result of deployment..." + # 1). check vdu + openstack server list | grep -qwo "${PARSER_STACK_NAME}" && { + echo " Check VDU successful." + } || { + echo " Check VDU unsuccessful." + exit 1 + } + # 2). check VL-network + openstack network list | grep -qwo "${PARSER_STACK_NAME}" && { + echo " Check VL-network successful." + } || { + echo " Check VL-network unsuccessful." + exit 1 + } + # 3). check VL-subnet + openstack subnet list | grep -qwo "${PARSER_STACK_NAME}" && { + echo " Check VL-subnet successful." + } || { + echo " Check VL-subnet unsuccessful." + exit 1 + } + # 4). check port + neutron port-list | grep -qwo "${PARSER_STACK_NAME}" && { + echo " Check CP successful." + } || { + echo " Check CP unsuccessful." + exit 1 + } + echo "Checkthe result of deployment successfully." ) }