diff options
Diffstat (limited to 'plans/so/integration-etsi-testing/config')
4 files changed, 58 insertions, 0 deletions
diff --git a/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/cloud-esr-system-info.json b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/cloud-esr-system-info.json new file mode 100644 index 00000000..43680038 --- /dev/null +++ b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/cloud-esr-system-info.json @@ -0,0 +1,14 @@ +{ + "esr-system-info-id": "e6a0b318-9756-4f11-94e8-919312d6c2bd", + "system-name": "csit cloud vim", + "type": "OPENSTACK", + "vendor": "RedHat", + "version": "1", + "service-url": "https://csit.etsicloud.com:5000/v3/", + "user-name": "bW1vcnJpcasdw==", + "password": "N0xLcHM1VDRSCCSECSVBESDU0", + "system-type": "VIM", + "port": "example-port-val-93234", + "cloud-domain": "CCP_Domain_34466", + "default-tenant": "693c7729b2364a26a3ca602e6f66187d" +} diff --git a/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/esr-system-info.json b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/esr-system-info.json new file mode 100644 index 00000000..f19da917 --- /dev/null +++ b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/esr-system-info.json @@ -0,0 +1,11 @@ +{ + "esr-system-info-id": "5c067098-f2e3-40f7-a7ba-155e7c61e916", + "system-name": "vnfmSimulator", + "type": "simulator", + "vendor": "EST", + "version": "V1.0", + "service-url": "http://vnfm-simulator:9093/vnflcm/v1", + "user-name": "vnfmadapter", + "password": "123456", + "system-type": "VNFM" +} diff --git a/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/esr-vnfm.json b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/esr-vnfm.json new file mode 100644 index 00000000..e37dac5b --- /dev/null +++ b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/esr-vnfm.json @@ -0,0 +1,5 @@ +{ + "vnfm-id": "c5e99cee-1996-4606-b697-838d51d4e1a3", + "vim-id": "etsiCsitVimId", + "certificate-url": "" +} 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" } |