diff options
author | decheng zhang <decheng.zhang@huawei.com> | 2022-04-10 22:35:55 -0400 |
---|---|---|
committer | decheng zhang <decheng.zhang@huawei.com> | 2022-04-26 12:24:15 -0400 |
commit | 20b23530a59fdad729794164d56a27f2ab3d4614 (patch) | |
tree | 7ec42049efb876ee2296cab3619fcacb7b7adf9a /scripts | |
parent | 9ed698d4522c487445a1ca048f29836c5f59c5e6 (diff) |
[DCAEGEN2-SLICEANALYSISMS] Add new robot for CCVPN/IBN closed-loop functionality in slice-analysis-ms
Issue-ID: DCAEGEN2-3081
Signed-off-by: decheng zhang <decheng.zhang@huawei.com>
Change-Id: Id784631e605552c6753b6cc074032bceac9ddf31
Signed-off-by: decheng zhang <decheng.zhang@huawei.com>
Diffstat (limited to 'scripts')
2 files changed, 19 insertions, 1 deletions
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 65b2c29d..9bbf73dc 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 @@ -3,7 +3,7 @@ #Building cps-tbdmt image git clone "https://gerrit.onap.org/r/cps/cps-tbdmt" mvn -f cps-tbdmt/ -Dmaven.test.skip clean install --settings settings.xml -sudo rm -r cps-tbdmt/ +rm -rf cps-tbdmt/ #Creating containers for cps, cps-tbdmt & aai-resources docker-compose up -d @@ -57,6 +57,7 @@ http://$CPS_TBDMT_IP:8080/templates \ ##Uploading aai data AAI_RESOURCES_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' aai-resources ) +echo "\n\nAAI_RESOURCES_IP=${AAI_RESOURCES_IP}" 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 \ @@ -102,3 +103,12 @@ curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H 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 +##Uploading CCVPN/IBN aai data +curl --location --request PUT https://$AAI_RESOURCES_IP:8447/aai/v24/network/network-policies/network-policy/933dacc1-56e0-4b94-8808-4d099ebc4de5 \ +--header 'Accept: application/json' \ +--header 'Authorization: Basic QUFJOkFBSQ==' \ +--header 'Content-Type: application/json' \ +--header 'X-FromAppId: AAI' \ +--header 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \ +--header 'cache-control: no-cache' \ +-k -d @sim-data/network_policy.json diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/network_policy.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/network_policy.json new file mode 100644 index 00000000..859b521a --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/network_policy.json @@ -0,0 +1,8 @@ +{ + "network-policy-id": "933dacc1-56e0-4b94-8808-4d099ebc4de5", + "network-policy-fqdn": "cll-101", + "name": "TSCi policy", + "type": "SLA", + "latency": 2, + "max-bandwidth": 3000 +}
\ No newline at end of file |