summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2016-08-11 00:37:34 +0800
committershangxdy <shang.xiaodong@zte.com.cn>2016-08-11 00:37:34 +0800
commite3b652342724c15be0f79c6f606b43fc9670e349 (patch)
tree1be5e527eaec6205103f6314d44d53192ca67ff7
parent08bd9224fd482246180fc1c08396074cc13971f5 (diff)
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 <shang.xiaodong@zte.com.cn>
-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 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."
)
}