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-09-02 15:15:45 +0000
committerwaqas.ikram <waqas.ikram@est.tech>2019-09-02 15:15:45 +0000
commiteb38f19c14f0f2842d8a165a77a437fc571aa976 (patch)
tree070ee83caae002ab4cfca37c9ccd40116f0ad328 /plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
parent65c3199202e7e44cc81b85fbdcb2f125561ffc2b (diff)
populating esr data in a&ai simulator
Change-Id: I85498b0a4d14e6839329b515112f98ee22822a41 Issue-ID: SO-2239 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.sh28
1 files changed, 28 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 3f91f0da..16dc09f6 100755
--- a/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
+++ b/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh
@@ -58,6 +58,9 @@ populate_aai_simulator()
PLATFORM_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/platform.json
CLOUD_REGION_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/cloud-region.json
TENANT_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/tenant.json
+ ESR_VNFM_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/esr-vnfm.json
+ 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
STATUS_CODE_ACCEPTED="202"
echo "$SCRIPT_NAME $(current_timestamp): checking health of AAI Simulator"
@@ -128,6 +131,31 @@ populate_aai_simulator()
exit 1
fi
+ echo "$SCRIPT_NAME $(current_timestamp): Adding esr-vnfm"
+ 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/external-system/esr-vnfm-list/esr-vnfm/c5e99cee-1996-4606-b697-838d51d4e1a3 -X PUT -d @$"$ESR_VNFM_JSON_FILE")
+
+ if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then
+ echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put esr-vnfm data in AAI Simulator. Status code received: $status_code"
+ exit 1
+ fi
+
+ echo "$SCRIPT_NAME $(current_timestamp): Adding esr-system-info"
+ 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/external-system/esr-vnfm-list/esr-vnfm/c5e99cee-1996-4606-b697-838d51d4e1a3/esr-system-info-list/esr-system-info/5c067098-f2e3-40f7-a7ba-155e7c61e916 -X PUT -d @$"$ESR_SYSTEM_INFO_JSON_FILE")
+
+ if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then
+ echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put esr-system-info data in AAI Simulator. Status code received: $status_code"
+ exit 1
+ fi
+
+ echo "$SCRIPT_NAME $(current_timestamp): Adding cloud esr-system-info"
+ 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/esr-system-info-list/esr-system-info/e6a0b318-9756-4f11-94e8-919312d6c2bd -X PUT -d @$"$CLOUD_ESR_SYSTEM_INFO_JSON_FILE")
+
+ if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then
+ echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put cloud esr-system-info data in AAI Simulator. Status code received: $status_code"
+ exit 1
+ fi
+
+
echo "$SCRIPT_NAME $(current_timestamp): AAI Simulator Populated Successfully"
}