-
- # 3. Translator and deploy vRNC
- heat-translator --template-type tosca --template-file ${VRNC_INPUT_TEMPLATE_FILE} -o ${VRNC_OUTPUT_TEMPLATE_FILE} --deploy True
-
- # 4. Wait for create vRNC
- sleep 60
-
- # 5. Validate the deploy result.
-
+ echo ""
+
+ # 3. Patch provider network
+ echo " Make patch for provider network"
+ make_patch_for_provider_network
+
+ # 4. Translator yaml
+ echo " Translator use parser:"
+ echo " 1. Input file: ${VRNC_INPUT_TEMPLATE_FILE}"
+ echo " 2. Output file: ${VRNC_OUTPUT_TEMPLATE_FILE}"
+ heat-translator --template-type tosca --template-file ${VRNC_INPUT_TEMPLATE_FILE} \
+ --output-file ${VRNC_OUTPUT_TEMPLATE_FILE}
+ echo ""
+
+ # 5. Patch translated file
+ echo " Make patch for translated file:"
+ make_patch_for_translated_file
+ echo ""
+
+ # 6. deploy vRNC
+ echo " Deploy stack..."
+ [[ "${PARSER_CI_DEBUG}" == "true" ]] && debug="--debug" || debug=""
+ openstack ${debug} stack create --timeout 15 --wait --enable-rollback \
+ -t ${VRNC_OUTPUT_TEMPLATE_FILE} ${PARSER_STACK_NAME}
+
+ # 7. basic information.
+ echo " The basic information of deployment..."
+ openstack ${debug} stack show ${PARSER_STACK_NAME}
+
+ # 8. deployed resources.
+ echo " The resources of deployment..."
+ openstack ${debug} stack resource list ${PARSER_STACK_NAME}
+
+ # 9. deployed outputs.
+ echo " The outputs of deployment..."
+ openstack ${debug} stack output list ${PARSER_STACK_NAME}
+
+ # 10. Validate the deploy result.
+ echo " Checking the result of deployment..."
+ openstack ${debug} stack show ${PARSER_STACK_NAME} | grep -qow "CREATE_COMPLETE" && {
+ echo " Check the result of deployment successfully."
+ } || {
+ echo " Check the result of deployment unsuccessfully."
+ }