aboutsummaryrefslogtreecommitdiffstats
path: root/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh
diff options
context:
space:
mode:
authorajay_dp001 <ajay.deep.singh@est.tech>2020-11-20 21:16:50 +0530
committerajay_dp001 <ajay.deep.singh@est.tech>2020-11-21 20:37:54 +0530
commitec3bb1a85df07d4d65d428c40d45bacaab8bed8f (patch)
treee3efe8a6c2713fd34d0481e8b560eaab24e584f0 /plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh
parentea2fb7dca82a4d6a254ee271eea33e1fa7f81346 (diff)
Update AAI-Simulator Support for Service Level Upgrade
Issue-ID: INT-1592 Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech> Change-Id: I28f8cf22f7e6314ca746acef7850629cb8a85671
Diffstat (limited to 'plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh')
-rwxr-xr-xplans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh17
1 files changed, 9 insertions, 8 deletions
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 6852e3f9..26673fcf 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
+ SERVICE_INSTANCE_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/service-instance-aai.json
STATUS_CODE_ACCEPTED="202"
echo "$SCRIPT_NAME $(current_timestamp): checking health of AAI Simulator"
@@ -76,14 +77,6 @@ populate_aai_simulator()
echo "$SCRIPT_NAME $(current_timestamp): Populating AAI Simulator"
- echo "$SCRIPT_NAME $(current_timestamp): Adding Cloud-Customer Data"
- 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/DemoCustomer -X PUT -d @"$CUSTOMER_JSON_FILE")
-
- if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then
- echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put customer data in AAI Simulator. Status code received: $status_code"
- exit 1
- fi
-
echo "$SCRIPT_NAME $(current_timestamp): Adding Project"
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/projects/project/PnfSwUCsitProject -X PUT -d @"$PROJECT_JSON_FILE")
@@ -164,6 +157,14 @@ populate_aai_simulator()
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")
+
+ 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"
+ exit 1
+ fi
+
echo "$SCRIPT_NAME $(current_timestamp): AAI Simulator Populated Successfully"
}