diff options
author | waqas.ikram <waqas.ikram@est.tech> | 2019-08-21 11:52:13 +0000 |
---|---|---|
committer | Waqas Ikram <waqas.ikram@est.tech> | 2019-08-21 11:52:29 +0000 |
commit | ed792f66fccdd6857542badbee5bc884119de97c (patch) | |
tree | 2888a3f3d31e0d05a10d2cf2930d00d701fe531a /plans/so/integration-etsi-testing/config | |
parent | b7045fd2144322b419c899275b2feeafff3f9f65 (diff) |
Adding tenant endpoints
Change-Id: I956422b6383a913340f8c40735a25fdf7058c735
Issue-ID: SO-2219
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Diffstat (limited to 'plans/so/integration-etsi-testing/config')
-rw-r--r-- | plans/so/integration-etsi-testing/config/aai-simulator-populate-data/tenant.json | 4 | ||||
-rwxr-xr-x | plans/so/integration-etsi-testing/config/populate-aai-simulator.sh | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/tenant.json b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/tenant.json new file mode 100644 index 00000000..746131a6 --- /dev/null +++ b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/tenant.json @@ -0,0 +1,4 @@ +{ + "tenant-id": "693c7729b2364a26a3ca602e6f66187d", + "tenant-name": "admin" +} 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 d96301cf..87062ed3 100755 --- a/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh +++ b/plans/so/integration-etsi-testing/config/populate-aai-simulator.sh @@ -57,6 +57,7 @@ populate_aai_simulator() 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 + TENANT_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/tenant.json STATUS_CODE_ACCEPTED="202" echo "$SCRIPT_NAME $(current_timestamp): checking health of AAI Simulator" @@ -119,6 +120,14 @@ populate_aai_simulator() exit 1 fi + echo "$SCRIPT_NAME $(current_timestamp): Adding Tenant" + 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/tenants/tenant/693c7729b2364a26a3ca602e6f66187d -X PUT -d @$"$TENANT_JSON_FILE") + + if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then + echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put Tenant data in AAI Simulator. Status code received: $status_code" + exit 1 + fi + echo "$SCRIPT_NAME $(current_timestamp): AAI Simulator Populated Successfully" } |