Skip to end of metadata
Go to start of metadata




Create the SLI-API input model

Here is a simplistic modle if the attributes that might be needed as input to the VOLTE-API:volte-wan-activate REST API call from SO to SDNC. The module-name and rpc-name must match the Directed Graph you will be creating in the next section. The parameters section contains the parameters that you would expect to get in from SO.

This is not a complete list but should give you a framework for prototyping.


Save this as a text file so you can copy/paste it into the SDNC apidoc swagger interface in step 3. For now the parameter names will be the variables we use in the Directed Graph in step 2.

{
"input": {
	"module-name": "VOLTE-API",
	"rpc-name": "volte-wan-activate",
	"mode": "sync",
	"sli-parameter": [
		{
			"parameter-name": "volte-wan-activate.dca-wanip",
			"string-value": "10.1.20.2"
		}, 
		{
			"parameter-name": "volte-wan-activate.dcz-wanip",
			"string-value": "10.2.20.2"
		},
		{
		"parameter-name": "volte-wan-activate.wan_vni",
		"string-value": "101"
		},
		{
		"parameter-name": "volte-wan-activate.route_target",
		"string-value": "6020:201"
		},
				{
		"parameter-name": "volte-wan-activate.route_distinguisher",
		"string-value": "6020:101"
		}
		]
	}
}



Create the Directed Graph

Go to the dbguilder applicaiont on port 3000 of the SDNC (http://10.0.7.1:3000/#)  login with dguser/test123

Create a new tab by clicking on the "+" simbol on the right hand side if you dont have a blank pane already.

Here is a getting started json string

[{"id":"40983a09.90a524","type":"dgstart","name":"DGSTART","outputs":1,"x":111,"y":81,"z":"30ac5fe5.ab4d2","wires":[["1c91b4f1.e45473"]]},{"id":"1c91b4f1.e45473","type":"service-logic","name":"VOLTE-API 0.0.1-DEMO","module":"VOLTE-API","version":"0.0.1-DEMO","comments":"","xml":"<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='VOLTE-API' version='0.0.1-DEMO'>","outputs":1,"x":317.1666564941406,"y":106.16667175292969,"z":"30ac5fe5.ab4d2","wires":[["a28ec6bd.3832d8"]]},{"id":"a28ec6bd.3832d8","type":"method","name":"method volte-wan-activate","xml":"<method rpc='volte-wan-activate' mode='sync'>\n","comments":"","outputs":1,"x":181.16668701171875,"y":170.16665649414062,"z":"30ac5fe5.ab4d2","wires":[["e53e6cd.afc3f1"]]},{"id":"e53e6cd.afc3f1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":389,"y":258,"z":"30ac5fe5.ab4d2","wires":[["cdeda8e3.1218f","9794fca5.9de488","cd5f5503.b9f128","19f372e1.31b345","8ff8c47.cd19b38"]]},{"id":"cdeda8e3.1218f","type":"set","name":"set: order-status = Active","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"Active\"/>","comments":"","x":611,"y":370,"z":"30ac5fe5.ab4d2","wires":[]},{"id":"19f372e1.31b345","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />\n\t<parameter name='error-message' value=\"`'service-data.dcz-wanip=' + $service-data.dcz-wanip`\"/>","comments":"","x":583,"y":557,"z":"30ac5fe5.ab4d2","wires":[]},{"id":"9794fca5.9de488","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"volte-wan-activate.\" />","comments":"","x":610.8888854980469,"y":471.388916015625,"z":"30ac5fe5.ab4d2","wires":[]},{"id":"cd5f5503.b9f128","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":605.2063369750977,"y":515.1031608581543,"z":"30ac5fe5.ab4d2","wires":[]},{"id":"8ff8c47.cd19b38","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"volte-wan-activate\"/>\n<parameter name=\"field3\" value=\"`$volte-wan-activate.dca-wanip`\"/>\n<parameter name=\"field4\" value=\"`$volte-wan-activate.dcz-wanip`\"/>\n<parameter name=\"field5\" value=\"`$volte-wan-activate.route_target`\"/>\n<parameter name=\"field6\" value=\"`$volte-wan-activate.route_distinguisher`\"/>","comments":"","outputs":1,"x":559,"y":301,"z":"30ac5fe5.ab4d2","wires":[[]]}]

Copy it to your clipboard

On dgbuilder page, select the  menu on the right hand side (the three stackk horizonal bars ) and select "import" and "clipboard"

Paste the json string into the dialog box

Move the resulting DG around the pane.



NodeComment
DGSTARTStandard starting node for any DG
ModuleThis matches our YANG Model name VOLTE-API
MethodThe RPC that will be used by the northbound system to call SDNC
BLOCKwrap these nodes into a succes/fail transaction with "atomic" one branch at a time execute
RECORDSave some data to a file. Click on the node to see the fields that are being saved
SETSet the order status to Active
SET service data to inputIn a real application we copy input to the md-sal tree via this type of node. Doing it late in the tree lets us know what existing already in md-sal to distringuish an update from a new.
SET final indicatorSet the response on success. A real DG has error legs we are worrying about in this example
RETURN : SuccessHTTP 200 return of success


Save the DG  using the big red button in the upper right corner

Click on the DGStart node and upload the XML 



Note: you may need to point your dgbuilder at port 32768 running dbguilder outside of the SDNC VM.



Click on the "Activate" link in the DG list to Activate the DG




Your DG is now read for testing.

Use the SLI-API to test the DG and any Adapter nodes


  1. Go to the swagger ui on the SDNC controller at http://<sdnc_ip:8282/apidoc/explorer/index.html
  2. Select the SLI-API to open up its methods
  3. Select the "/operations/SLI-API:execute-graph"
  4. Paste the json string from the first step into the box 



  1. Click on "Try It out!"

  2. You should see a 200 ok response and any data returned by the Directed Graph
  3. Log into SDNC and check the svclogic.log and see the results.


Lets continue this tutorial by Adding the capability to update the local controllers with a REST API call node.

 Tutorial: VoLTE Example: Adding REST Node

Next Steps

  1. You can add additional parameters to the input JSON and create input for other operations like Data Center Gateway config
  2. You can add a REST API CALL Node to call a 3rd party controller
  3. You can create and load a 3rd party contorller feature bundle and add a configure or execute node to call that adapter
  4. You can add an AAI node to update AAI  
  5. You can repeat this process for other Directed Graph like Deactivate