diff options
Diffstat (limited to 'plans/so/integration-etsi-testing/config')
-rw-r--r-- | plans/so/integration-etsi-testing/config/aai-simulator-populate-data/cloud-region.json | 10 | ||||
-rwxr-xr-x | plans/so/integration-etsi-testing/config/populate-aai-simulator.sh | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/cloud-region.json b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/cloud-region.json new file mode 100644 index 00000000..f495a357 --- /dev/null +++ b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/cloud-region.json @@ -0,0 +1,10 @@ +{ + "cloud-owner": "CloudOwner", + "cloud-region-id": "EtsiCloudRegion", + "cloud-type": "openstack", + "owner-defined-type": "OwnerType", + "cloud-region-version": "1.0", + "cloud-zone": "CloudZone", + "complex-name": "clli1", + "cloud-extra-info": "" +} 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" } |