Adding cloud region endpoints
Change-Id: I68563dd035b4e52b29ddce012a84b9124a8a48e3
Issue-ID: SO-2219
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
diff --git a/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh b/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
index 2a805d6..d96301c 100755
--- a/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
+++ b/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
@@ -56,6 +56,7 @@
OWNING_ENTITY_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/owning-entity.json
LINE_OF_BUSINESS_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/line-of-business.json
PLATFORM_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/platform.json
+ CLOUD_REGION_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/cloud-region.json
STATUS_CODE_ACCEPTED="202"
echo "$SCRIPT_NAME $(current_timestamp): checking health of AAI Simulator"
@@ -110,6 +111,14 @@
exit 1
fi
+ echo "$SCRIPT_NAME $(current_timestamp): Adding Cloud Region"
+ 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/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/EtsiCloudRegion -X PUT -d @$"$CLOUD_REGION_JSON_FILE")
+
+ if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then
+ echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put Cloud Region data in AAI Simulator. Status code received: $status_code"
+ exit 1
+ fi
+
echo "$SCRIPT_NAME $(current_timestamp): AAI Simulator Populated Successfully"
}