summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2016-08-11 03:41:41 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-11 03:41:41 +0000
commit06da764fca304f4b695020f9941fbda52b986a75 (patch)
tree2cc1da0b3830a89751be647cb994be550154c78a /tests
parentd2a7b7ffb4e45dd0803f01c9b5328b7cfba2c572 (diff)
parente3b652342724c15be0f79c6f606b43fc9670e349 (diff)
Merge "Add heat stack validation in integration with functest about vRNC"
Diffstat (limited to 'tests')
-rwxr-xr-xtests/functest_run.sh38
1 files changed, 35 insertions, 3 deletions
diff --git a/tests/functest_run.sh b/tests/functest_run.sh
index f72dd09..d60e894 100755
--- a/tests/functest_run.sh
+++ b/tests/functest_run.sh
@@ -105,20 +105,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."
)
}