X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=plans%2Fusecases-pnf-sw-upgrade%2Fpnf-sw-upgrade%2Fsorch%2Fconfig%2Fpopulate-aai-simulator.sh;h=bbc5b9f3f93673e3abc88e16b6e1e15d9fee34f4;hb=1feb0a77c857d811283d74d0f3df018d42c2debe;hp=26673fcfeee2044c5af47c7e00e4f39e5c8c9cb2;hpb=a94201cdbbe0c1ceb2fa0e676a61627e4bc7b657;p=integration%2Fcsit.git diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh index 26673fcf..bbc5b9f3 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh @@ -62,6 +62,7 @@ populate_aai_simulator() ESR_SYSTEM_INFO_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/esr-system-info.json CLOUD_ESR_SYSTEM_INFO_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/cloud-esr-system-info.json PNF_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/pnf.json + PNF2_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/pnf2.json SERVICE_INSTANCE_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/service-instance-aai.json STATUS_CODE_ACCEPTED="202" @@ -157,8 +158,16 @@ populate_aai_simulator() exit 1 fi + echo "$SCRIPT_NAME $(current_timestamp): Adding PNF_2.0" + status_code=$(curl -k --write-out %{http_code} --silent --output /dev/null -H "$BASIC_AUTHORIZATION_HEADER" -H "$ACCEPT_HEADER" -H "$CONTENT_TYPE_HEADER" $BASE_URL/network/pnfs/pnf/PNFDemo1 -X PUT -d @$"$PNF2_JSON_FILE") + + if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then + echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put PNF data in AAI Simulator. Status code received: $status_code" + exit 1 + fi + echo "$SCRIPT_NAME $(current_timestamp): Adding ServiceInstance" - status_code=$(curl -k --write-out %{http_code} --silent --output /dev/null -H "$BASIC_AUTHORIZATION_HEADER" -H "$ACCEPT_HEADER" -H "$CONTENT_TYPE_HEADER" $BASE_URL/business/customers/customer/5df8b6de-2083-11e7-93ae-92361f002676/service-subscriptions/service-subscription/pNF/service-instances/service-instance/ETE_Customer_807c7a02-249c-4db8-9fa9-bee973fe08ce -X PUT -d @$"$SERVICE_INSTANCE_JSON_FILE") + status_code=$(curl -k --write-out %{http_code} --silent --output /dev/null -H "$BASIC_AUTHORIZATION_HEADER" -H "$ACCEPT_HEADER" -H "$CONTENT_TYPE_HEADER" $BASE_URL/business/customers/customer/807c7a02-249c-4db8-9fa9-bee973fe08ce/service-subscriptions/service-subscription/pNF/service-instances/service-instance/cd4decf6-4f27-4775-9561-0e683ed43635 -X PUT -d @$"$SERVICE_INSTANCE_JSON_FILE") if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put ServiceInstance data in AAI Simulator. Status code received: $status_code"