RAN Slicing - TBDMT Templates
Create the dataspace, schemaset and anchor using the below CPS-Core APIs:
Dataspace:
curl -k -H "Content-Type: application/json" -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST http://<ipaddress>:8883/cps/api/v1/dataspaces?dataspace-name='E2EDemo'
Schemaset:
CoverageArea: curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://<ipaddress>:8883/cps/api/v1/dataspaces/E2EDemo/schema-sets' --form 'file=@"cps-cavsta-onap-internal@2021-01-28.yang"' --form 'schema-set-name="ran-coverage-area"' cps-cavsta-onap-internal@2021-01-28.yang
RAN Network: curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://<ipaddress>:8883/cps/api/v1/dataspaces/E2EDemo/schema-sets' --form 'file=@"ran-network.zip"' --form 'schema-set-name="ran-network"' ran-network.zip
RAN inventory: curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://localhost:8883/cps/api/v1/dataspaces/E2EDemo/schema-sets' --form 'file=@"cps-ran-inventory.yang"' --form 'schema-set-name="ran-inventory"' cps-ran-inventory.yang
Anchor:
CoverageArea: curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://<ipaddress>:8883/cps/api/v1/dataspaces/E2EDemo/anchors?schema-set-name='ran-coverage-area'&anchor-name='coverage-area-onap''
RAN Network: curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://<ipaddress>:8883/cps/api/v1/dataspaces/E2EDemo/anchors?schema-set-name='ran-network'&anchor-name='11''
RAN inventory: curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://localhost:8883/cps/api/v1/dataspaces/E2EDemo/anchors?schema-set-name='ran-inventory'&anchor-name='ran-inventory-anchor''
Initial data:
CoverageArea: curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://<ipaddress>:8883/cps/api/v1/dataspaces/E2EDemo/anchors/coverage-area-onap/nodes' \
--header 'Content-Type: application/json' -d @cavstareq.json cavstareq.jsonRAN Network: curl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://<ipaddress>:8883/cps/api/v1/dataspaces/E2EDemo/anchors/11/nodes' \
--header 'Content-Type: application/json' -d @ran-network-initial-data.json ran-network-initial-data.jsoncurl -H "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" --request POST 'http://<ipaddress>:8883/cps/api/v1/dataspaces/E2EDemo/anchors/ran-inventory-anchor/nodes' --header 'Content-Type: application/json' --data-raw '{
"ran-inventory":{
}
}'
Schemaset-anchor mapping:
cps-tbdmt/docker-compose/application.yml should have the below mapping under the section schemaToAnchor:
schemaToAnchor:
ran-coverage-area: coverage-area-onap
e2e-cavsta-schemaset: e2e-cavsta1
CSIT-SchemaSet: CSIT-Anchor
ns-schemaset: ns-anchor
ran-network: 11
ran-inventory: ran-inventory-anchor
TBDMT Templates:
Templates are uploaded and tested for this release. The templates can be preloaded in TBDMT during the deployment time itself. Refer the Demo at https://wiki.onap.org/download/attachments/117746417/2022-02-08%20E2E%20Network%20Slicing%20Weekly%20Meeting.mp4?api=v2 1:40-9:40 minutes
instantiateRANSlice - Allocate:
TBDMT Templates:
instantiateRANSlice - ModifyAllocate (Done in Istanbul Release)
instantiateRANSlice - reconfigure
activateRANSlice
S.No | Config DB API | xPath | Template | Schema | id | JSON Payload |
---|---|---|---|---|---|---|
1 | api/sdnc-config-db/v4/nearrtric/{ranNFNSSIId} | //attributes/ranNFNSSIIdList/element[text()="ac8ca1a9-e1ec-4480-8720-c74e92566885"]/ancestor::NearRTRIC | { | ran-network | get-nearrtric-by-rannfnssi | { |
2 | /api/sdnc-config-db/v4/plmn/{sliceProfileId}} | //attributes/sliceProfilesList[@sliceProfileId="314aab80-1754-446c-bfd9-6aae5b1ae348"]/ancestor::NearRTRIC | { | ran-network | get-plmnmccid-by-sliceprofileid | { "inputParameters": { |
3 | /api/sdnc-config-db/v4/plmn/{sliceProfileId} | //attributes/sliceProfilesList[@sliceProfileId="314aab80-1754-446c-bfd9-6aae5b1ae348"]/ancestor::NearRTRIC | { | ran-network | get-plmnmncid-by-sliceprofileid | { "inputParameters": { |
4 | /api/sdnc-config-db/v4/nearRTRIC | /ran-network/NearRTRIC[@idNearRTRIC="11"]/attributes/pLMNInfoList[@mcc="310" and @mnc="410"] | { | ran-network | put-status-nearrtric | { "inputParameters":{ |
5 | /api/sdnc-config-db/v4/gNBCUUP | /ran-network/NearRTRIC[@idNearRTRIC="11"]/GNBCUUPFunction[@idGNBCUUPFunction="22"]/attributes/pLMNInfoList[@mcc="310" and @mnc="410"] | { | ran-network | put-status-gnbcuup | { "inputParameters":{ |
6 | /api/sdnc-config-db/v4/gNBDU | /ran-network/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="22"]/NRCellDU[@idNRCellDU="15299"]/attributes/pLMNInfoList[@mcc="310" and @mnc="410"] | { | ran-network | put-status-nrcelldu | { "inputParameters":{ |
7 | /api/sdnc-config-db/v4/gNBCUCP | /ran-network/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="32"]/NRCellCU[@idNRCellCU="15199"]/attributes/pLMNInfoList[@mcc="310" and @mnc="410"] | { | ran-network | put-status-nrcellcu | { "inputParameters":{ |
terminateRANSlice
preload-terminateRANSlice
S.No | Config DB API | xPath | Template | Schema | id | JSON Payload |
---|---|---|---|---|---|---|
1 | api/sdnc-config-db/v4/nearrtric/{ranNFNSSIId} | //attributes/ranNFNSSIIdList/element[text()="ac8ca1a9-e1ec-4480-8720-c74e92566885"]/ancestor::NearRTRIC | { | ran-network | get-nearrtric-by-rannfnssi | { |
2 | /api/sdnc-config-db/v4/plmn/{sliceProfileId}} | //attributes/sliceProfilesList[@sliceProfileId="314aab80-1754-446c-bfd9-6aae5b1ae348"]/ancestor::NearRTRIC | { | ran-network | get-plmnmccid-by-sliceprofileid | { "inputParameters": { |
3 | /api/sdnc-config-db/v4/plmn/{sliceProfileId} | //attributes/sliceProfilesList[@sliceProfileId="314aab80-1754-446c-bfd9-6aae5b1ae348"]/ancestor::NearRTRIC | { | ran-network | get-plmnmncid-by-sliceprofileid | { "inputParameters": { |
4 | /api/sdnc-config-db/v4/nearRTRIC | /ran-network/NearRTRIC[@idNearRTRIC="11"]/attributes/pLMNInfoList[@mcc="310" and @mnc="410"]/sNSSAIList[@sNssai="1000-1012"] | { | ran-network | delete-nssai-from-rtric | { "inputParameters": { |
5 | /api/sdnc-config-db/v4/gNBCUCP | /ran-network/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15289"]/attributes/pLMNInfoList[@mcc="310" and @mnc="410"]/sNSSAIList[@sNssai=01-500004"] | { | ran-network | delete-nssai-from-cucp-plmninfo | { |
6 | /api/sdnc-config-db/v4/gNBCUCP | /ran-network/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15289"]/attributes/RRMPolicyRatio[@id="55"]/attributes/rRMPolicyMemberList[@idx="8"] | { | ran-network | delete-nssai-from-cucp-rrmpolicy | { |
7 | /api/sdnc-config-db/v4/gNBCUUP | /ran-network/NearRTRIC[@idNearRTRIC="11"]/GNBCUUPFunction[@idGNBCUUPFunction="1111"]/attributes/pLMNInfoList[@mcc="310" and @mnc="410"]/sNSSAIList[@sNssai="01-500004"] | { | ran-network | delete-nssai-from-cuup-plmninfo | { |
8 | /api/sdnc-config-db/v4/gNBCUUP | /ran-network/NearRTRIC[@idNearRTRIC="11"]/GNBCUUPFunction[@idGNBCUUPFunction="1111"]/attributes/RRMPolicyRatio[@id="35"]/attributes/rRMPolicyMemberList[@idx="35"] | { | ran-network | delete-nssai-from-cuup-rrmpolicy | { |
9 | /api/sdnc-config-db/v4/gNBDU | /ran-network/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="110"]/NRCellDU[@idNRCellDU="15289"]/attributes/pLMNInfoList[@mcc="310" and @mnc="410"]/sNSSAIList[@sNssai="01-500004"] | { | ran-network | delete-nssai-from-du-plmninfo | { |
10 | /api/sdnc-config-db/v4/gNBDU | /ran-network/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="110"]/NRCellDU[@idNRCellDU="15289"]/attributes/RRMPolicyRatio[@id="34"]/attributes/rRMPolicyMemberList[@idx="6"] | { | ran-network | delete-nssai-from-du-rrmpolicy | { |
11 | Delete RRMPolicyRatio - NRCellCU | /ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBCUCPFunction[@idGNBCUCPFunction='\''{{idGNBCUCPFunction}}'\'']/NRCellCU[@idNRCellCU='\''{{idNRCellCU}}'\'']/attributes/RRMPolicyRatio[@id='\''{{id}}'\'']/attributes | curl -k -H "Content-Type: application/json" --request POST 'http://10.31.4.15:8080/templates' --data-raw '{ | ran-network | { | |
12 | Delete RRMPolicyRatio - CUUP | /ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBCUUPFunction[@idGNBCUUPFunction='\''{{idGNBCUUPFunction}}'\'']/attributes/RRMPolicyRatio[@id='\''{{id}}'\'']/attributes | curl -k -H "Content-Type: application/json" --request POST 'http://10.31.4.15:8080/templates' --data-raw '{ | ran-network | { | |
13 | Delete RRMPolicyRatio - NRCellDU | /ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBDUFunction[@idGNBDUFunction='\''{{idGNBDUFunction}}'\'']/NRCellDU[@idNRCellDU='\''{{idNRCellDU}}'\'']/attributes/RRMPolicyRatio[@id='\''{{id}}'\'']/attributes | curl -k -H "Content-Type: application/json" --request POST 'http://10.31.4.15:8080/templates' --data-raw '{ | ran-network | { | |
14 | Patch RRMPolicyRatio - NRCellCU | /ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBCUCPFunction[@idGNBCUCPFunction='\''{{idGNBCUCPFunction}}'\'']/NRCellCU[@idNRCellCU='\''{{idNRCellCU}}'\'']/attributes/RRMPolicyRatio[@id='\''{{id}}'\''] | curl -k -H "Content-Type: application/json" --request POST 'http://localhost:8088/templates' --data-raw '{ | ran-network | ||
15 | Patch RRMPolicyRatio - CUUP | /ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBCUUPFunction[@idGNBCUUPFunction='\''{{idGNBCUUPFunction}}'\'']/attributes/RRMPolicyRatio[@id='\''{{id}}'\''] | curl -k -H "Content-Type: application/json" --request POST 'http://localhost:8088/templates' --data-raw '{ | ran-network | ||
16 | Patch RRMPolicyRatio - NRCellDU | /ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBDUFunction[@idGNBDUFunction='\''{{idGNBDUFunction}}'\'']/NRCellDU[@idNRCellDU='\''{{idNRCellDU}}'\'']/attributes/RRMPolicyRatio[@id='\''{{id}}'\''] | curl -k -H "Content-Type: application/json" --request POST 'http://localhost:8088/templates' --data-raw '{ | ran-network | ||
17 | /api/sdnc-config-db/v4/ranslice-details | /ran-inventory/ran-slices[@rannfnssiid="ac8ca1a9-e1ec-4480-8720-c74e92566885"] | { | ran-network | delete-rannfnssi | { |
18 | /api/sdnc-config-db/v4/ranslice-details//{rannfnssiid}/{sliceProfileId} | /ran-inventory/ran-slices[@rannfnssiid="ac8ca1a9-e1ec-4480-8720-c74e92566885"]/sliceProfilesList[@sliceProfileId="314aab80-1754-446c-bfd9-6aae5b1ae348"] | { | ran-network | delete-slice-profile | { "sliceProfileId": "e75a8b68-0dee-4a9c-9a61-b0893e03ca45" |
19 | /api/sdnc-config-db/v4/ranslice-details | /ran-inventory/ran-slices[@rannfnssiid="ac8ca1a9-e1ec-4480-8720-c74e92566885"] | { | ran-network | get-ran-slices | { |
Known issue about templates.
When you copy the templates into your tools (Postman, Swagger) or just into a file, it may happen that unwanted characters are generated. That brings to a "bad json format" error and hence template execution fails
e.g. For patch-configData template you can notice that the xpathTemplate may have different unwanted characters such as " ''' " as in the first case or "' \'' " as in the second case here below shown
first case
{
"templateId": "patch-configData",
"model": "ran-network",
"requestType": "patch",
"xpathTemplate": "/ran-network/NearRTRIC[@idNearRTRIC='''{{idNearRTRIC}}''']/attributes/pLMNInfoList[@mcc='''{{mcc}}''' and @mnc='''{{mnc}}''']/sNSSAIList[@sNssai='''{{sNssai}}''']",
"includeDescendants": true
}
second case
{
"templateId": "patch-configData",
"model": "ran-network",
"requestType": "patch",
"xpathTemplate": "/ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/attributes/pLMNInfoList[@mcc='\''{{mcc}}'\'' and @mnc='\''{{mnc}}'\'']/sNSSAIList[@sNssai='\''{{sNssai}}'\'']",
"includeDescendants": true
}
The right xpathTemplate syntax should be the following (i.e. single " ' "):
{
"templateId": "patch-configData",
"model": "ran-network",
"requestType": "patch",
"xpathTemplate": "/ran-network/NearRTRIC[@idNearRTRIC='{{idNearRTRIC}}']/attributes/pLMNInfoList[@mcc='{{mcc}}' and @mnc='{{mnc}}']/sNSSAIList[@sNssai='{{sNssai}}']",
"includeDescendants": true
}