aboutsummaryrefslogtreecommitdiffstats
path: root/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
diff options
context:
space:
mode:
authorwaqas.ikram <waqas.ikram@est.tech>2019-08-20 15:01:02 +0000
committerWaqas Ikram <waqas.ikram@est.tech>2019-08-20 15:01:25 +0000
commitb7045fd2144322b419c899275b2feeafff3f9f65 (patch)
tree5db4403d4a8f4a422a0ed8dc81fc50b7db68e57a /plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
parent241cd37ac8cf7a12bb0b160e8881d1543726b86b (diff)
Adding cloud region endpoints
Change-Id: I68563dd035b4e52b29ddce012a84b9124a8a48e3 Issue-ID: SO-2219 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Diffstat (limited to 'plans/so/integration-etsi-testing/config/populate-aai-simulator.sh')
-rwxr-xr-xplans/so/integration-etsi-testing/config/populate-aai-simulator.sh9
1 files changed, 9 insertions, 0 deletions
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 2a805d6c..d96301cf 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 @@ populate_aai_simulator()
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 @@ populate_aai_simulator()
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"
}