...
apps/nst/optimizers/conf/configIinputs.json
OSDF CHANGES(FOR NSI SELECTION)
3) AAI preload script should be run
Populating aai with an NSSI and an NSI (For now the script has to be updated manually every time the model changes )
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#!/bin/bash
echo "preloading AAI data";
result=
resourceversion=
result=$(curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://10.0.0.9:30233/aai/v14/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/4115d3c8-dd59-45d6-b09d-e756dee9b518 -d '{
"service-instance-id": "4115d3c8-dd59-45d6-b09d-e756dee9b518",
"service-instance-name": "nsi_test_0211",
"service-type": "embb",
"service-role": "nsi",
"model-invariant-id": "2d5b9bc2-0ece-4b5c-b5f7-dcdc19f53ad1",
"model-version-id": "9507fc4a-37d3-4024-a991-9a56c16c4dc0",
"orchestration-status": "active"}')
echo $result
result=$(curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://10.0.0.9:30233/aai/v14/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/1a636c4d-5e76-427e-bfd6-241a947224b0 -d '{
"service-instance-id": "1a636c4d-5e76-427e-bfd6-241a947224b0",
"service-instance-name": "nssi_test_0211",
"service-type": "embb",
"service-role": "nssi",
"environment-context": "cn",
"model-invariant-id": "c0eeaa3b-625c-4518-bd1f-f01cc784813c",
"model-version-id": "836eb219-346d-4b8b-8376-b0c4d17954a9",
"orchestration-status": "active"}')
echo $result
resourceversion=$(curl --user AAI:AAI -X GET -H "X-FromAppId:AAI" -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://10.0.0.9:30233/aai/v14/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/4115d3c8-dd59-45d6-b09d-e756dee9b518 | jq --raw-output '."resource-version"')
result=$(curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://10.0.0.9:30233/aai/v14/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/4115d3c8-dd59-45d6-b09d-e756dee9b518 -d '{
"service-instance-id": "4115d3c8-dd59-45d6-b09d-e756dee9b518",
"service-instance-name": "nsi_test_0211",
"service-type": "embb",
"service-role": "nsi",
"orchestration-status": "active",
"model-invariant-id": "2d5b9bc2-0ece-4b5c-b5f7-dcdc19f53ad1",
"model-version-id": "9507fc4a-37d3-4024-a991-9a56c16c4dc0",
"resource-version":"'"$resourceversion"'",
"relationship-list": {
"relationship": [
{
"related-to": "service-instance",
"relationship-label": "org.onap.relationships.inventory.ComposedOf",
"related-link": "/aai/v16/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/1a636c4d-5e76-427e-bfd6-241a947224b0",
"relationship-data": [
{
"relationship-key": "customer.global-customer-id",
"relationship-value": "5GCustomer"
},
{
"relationship-key": "service-subscription.service-type",
"relationship-value": "5G"
},
{
"relationship-key": "service-instance.service-instance-id",
"relationship-value": "1a636c4d-5e76-427e-bfd6-241a947224b0"
}
],
"related-to-property": [
{
"property-key": "service-instance.service-instance-name",
"property-value": "nssi_test_0211"
}
]
}
]
}
}')
echo $result
resourceversion=$(curl --user AAI:AAI -X GET -H "X-FromAppId:AAI" -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://10.0.0.9:30233/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/1a636c4d-5e76-427e-bfd6-241a947224b0/slice-profiles/slice-profile/cdad9f49-4201-4e3a-aac1-b0f27902c299 | jq --raw-output '."resource-version"')
echo $resourceversion
result=$(curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://10.0.0.9:30233/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/1a636c4d-5e76-427e-bfd6-241a947224b0/slice-profiles/slice-profile/cdad9f49-4201-4e3a-aac1-b0f27902c299 -d '{
"profile-id": "cdad9f49-4201-4e3a-aac1-b0f27902c299",
"latency": 5,
"max-number-of-UEs": 0,
"coverage-area-TA-list": "[{\"province\":\"??\",\"city\":\"???\",\"county\":\"???\",\"street\":\"?????\"}]",
"ue-mobility-level": "stationary",
"resource-sharing-level": "shared",
"exp-data-rate-UL": 100,
"exp-data-rate-DL": 100,
"activity-factor": 0,
"e2e-latency": 0,
"jitter": 0,
"survival-time": 0,
"exp-data-rate": 0,
"payload-size": 0,
"traffic-density": 0,
"conn-density": 0,
"reliability":99.999,
"resource-version":"'"$resourceversion"'"
}')
echo $result
exit |
4) Local policies (vnf, subscriber, threshold policy) should be copied to the osdf pod (/opt/osdf/test/policy-local-policies/ )
(For now, all the three policies has to be updated manually everytime the model changes). For convinience test folder is kept in the test environment.
Example of these three policies can be found in this link https://wiki.onap.org/display/DW/Policy+Models+and+Sample+policies+-+NSI+selection
1) In OOF charts,
- oof/resources/config/common-config.yml has to be updated to use local policies instead of remote policies
- chnge the model name