X-Git-Url: https://gerrit.onap.org/r/gitweb?p=integration%2Fcsit.git;a=blobdiff_plain;f=scripts%2Fdcaegen2-services-slice-analysis-ms%2Fslice-analysis-ms%2Fcps-aai%2Fcps-aai-setup.sh;h=65b2c29d49ab3e8dfb51b08e08558a9f1fb292f2;hp=4cd5e4475bc7d39d3fd738fa6bb14d0093302a56;hb=9ed698d4522c487445a1ca048f29836c5f59c5e6;hpb=8f88f01b9fbbdd2af363a747ecf43b9de15a9b6e diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/cps-aai-setup.sh b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/cps-aai-setup.sh index 4cd5e447..65b2c29d 100644 --- a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/cps-aai-setup.sh +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/cps-aai-setup.sh @@ -42,36 +42,63 @@ echo "\nuploading tbdmt-templates" curl --location --request POST \ http://$CPS_TBDMT_IP:8080/templates \ --header 'Content-Type: application/json' \ ---data-raw '{"templateId": "get-nearrtric-config","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::NearRTRIC","includeDescendants": true}' +--data-raw '{"templateId": "get-nearrtric-config","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::NearRTRIC","includeDescendants": true,"transformParam":"NearRTRIC"}' curl --location --request POST \ http://$CPS_TBDMT_IP:8080/templates \ --header 'Content-Type: application/json' \ ---data-raw '{"templateId": "get-gnbdufunction-by-snssai","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::GNBDUFunction","includeDescendants": true}' +--data-raw '{"templateId": "get-gnbdufunction-by-snssai","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::GNBDUFunction","includeDescendants": true,"transformParam":"GNBDUFunction"}' curl --location --request POST \ http://$CPS_TBDMT_IP:8080/templates \ --header 'Content-Type: application/json' \ ---data-raw '{"templateId": "get-nrcelldu-by-snssai","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::NearRTRIC","includeDescendants": true}' +--data-raw '{"templateId": "get-nrcelldu-by-snssai","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::NearRTRIC","includeDescendants": true,"transformParam":"NearRTRIC"}' ##Uploading aai data AAI_RESOURCES_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' aai-resources ) - echo "\nUploading data to aai-resources" curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer \ --d @sim-data/customers.json +-d @sim-data/customers.json -i curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G \ --d @sim-data/service_subscriptions.json +-d @sim-data/service_subscriptions.json -i curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84 \ --d @sim-data/service_instances.json +-d @sim-data/service_instances.json -i curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ https://$AAI_RESOURCES_IP:8447/aai/v24/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84/slice-profiles/slice-profile/684hf846f-863b-4901-b202-0ab86a638555 \ --d @sim-data/slice_profile.json +-d @sim-data/slice_profile.json -i + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/b2ae730f-1d5f-495a-8112-dac017a7348c \ +-d @sim-data/sliceprofile_an_sa1.json -i + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/cad8fa36-2d55-4c12-a92e-1bd551517a0c \ +-d @sim-data/sliceprofile_cn_sa1.json -i + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/8d0d698e-77f4-4453-8c09-ae2cbe6a9a04 \ +-d @sim-data/sliceprofile_tn_sa1.json -i + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/0835fd19-6726-4081-befb-cc8932c47767 \ +-d @sim-data/alloted-resource.json -i + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/0835fd19-6726-4081-befb-cc8932c47767/allotted-resources/allotted-resource/530d188d-9087-49af-a44a-90c40e0c2d47 \ +-d @sim-data/alloted-resource-data.json -i + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/50f418a6-804f-4453-bf70-21f0efaf6fcd \ +-d @sim-data/nssi.json -i + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/09cad94e-fbb8-4c70-9c4d-74ec75e97683 \ +-d @sim-data/nsi.json -i