diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2020-11-23 09:01:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-11-23 09:01:02 +0000 |
commit | 2880525c458856b1a524c0d8f6b61cea0fc1066f (patch) | |
tree | e58e477126832a7ab7bda79aefbcd9746823e73e /plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config | |
parent | d683e38f3c2010c620f8deb218339f76f2f7a84f (diff) | |
parent | ec3bb1a85df07d4d65d428c40d45bacaab8bed8f (diff) |
Merge "Update AAI-Simulator Support for Service Level Upgrade"
Diffstat (limited to 'plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config')
3 files changed, 55 insertions, 9 deletions
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/aai-simulator-populate-data/service-instance-aai.json b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/aai-simulator-populate-data/service-instance-aai.json new file mode 100644 index 00000000..8ea4263b --- /dev/null +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/aai-simulator-populate-data/service-instance-aai.json @@ -0,0 +1,45 @@ +{ + "service-instance-id": "5df8b6de-2083-11e7-93ae-92361f002676", + "service-instance-name": "Service_Ete_Name123452c4-3d7f-42ce-8188-818fab951269", + "environment-context": "General_Revenue-Bearing", + "workload-context": "Production", + "model-version-id": "d88da85c-d9e8-4f73-b837-3a72a431622b", + "modelInvariantId": "fe41489e-1563-46a3-b90a-1db629e4375b", + "resource-version": "1595258335377", + "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/5df8b6de-2083-11e7-93ae-92361f002676/service-data/service-topology/", + "orchestration-status": "Assigned", + "relationship-list": { + "relationship": [ + { + "related-to": "owning-entity", + "related-link": "/aai/v11/business/owning-entities/owning-entity/67f2e84c-734d-4e90-a1e4-d2ffa2e75849", + "relationship-data": [ + { + "relationship-key": "owning-entity.owning-entity-id", + "relationship-value": "67f2e84c-734d-4e90-a1e4-d2ffa2e75849" + } + ] + }, + { + "related-to": "pnf", + "related-link": "/aai/v11/network/pnfs/pnf/PNFDemo", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "PNFDemo" + } + ] + }, + { + "related-to": "pnf", + "related-link": "/aai/v11/network/pnfs/pnf/PNFDemo1", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "PNFDemo1" + } + ] + } + ] + } +}
\ No newline at end of file diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/env b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/env index 95469f90..ab4e3df4 100644 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/env +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/env @@ -1,6 +1,6 @@ NEXUS_DOCKER_REPO_MSO=nexus3.onap.org:10001 DOCKER_ENVIRONMENT=remote -TAG=1.7.5 +TAG=1.7.7-STAGING-latest TIME_OUT_DEFAULT_VALUE_SEC=1200 PROJECT_NAME=pnfSwU DEFAULT_NETWORK_NAME=pnfswu_default diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh index 6852e3f9..26673fcf 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/populate-aai-simulator.sh @@ -62,6 +62,7 @@ populate_aai_simulator() 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 PNF_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/pnf.json + SERVICE_INSTANCE_JSON_FILE=$AAI_SIMULATOR_DATA_DIR/service-instance-aai.json STATUS_CODE_ACCEPTED="202" echo "$SCRIPT_NAME $(current_timestamp): checking health of AAI Simulator" @@ -76,14 +77,6 @@ populate_aai_simulator() echo "$SCRIPT_NAME $(current_timestamp): Populating AAI Simulator" - echo "$SCRIPT_NAME $(current_timestamp): Adding Cloud-Customer Data" - 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/business/customers/customer/DemoCustomer -X PUT -d @"$CUSTOMER_JSON_FILE") - - if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then - echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put customer data in AAI Simulator. Status code received: $status_code" - exit 1 - fi - echo "$SCRIPT_NAME $(current_timestamp): Adding Project" 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/business/projects/project/PnfSwUCsitProject -X PUT -d @"$PROJECT_JSON_FILE") @@ -164,6 +157,14 @@ populate_aai_simulator() exit 1 fi + echo "$SCRIPT_NAME $(current_timestamp): Adding ServiceInstance" + 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/business/customers/customer/5df8b6de-2083-11e7-93ae-92361f002676/service-subscriptions/service-subscription/pNF/service-instances/service-instance/ETE_Customer_807c7a02-249c-4db8-9fa9-bee973fe08ce -X PUT -d @$"$SERVICE_INSTANCE_JSON_FILE") + + if [[ "$status_code" -ne "$STATUS_CODE_ACCEPTED" ]] ; then + echo "$SCRIPT_NAME $(current_timestamp) ERROR: Unable to put ServiceInstance data in AAI Simulator. Status code received: $status_code" + exit 1 + fi + echo "$SCRIPT_NAME $(current_timestamp): AAI Simulator Populated Successfully" } |