...
Code Block | ||
---|---|---|
| ||
{ "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_discripterdistinguisher", "string-value": "6020:101" } ] } } |
...
Expand | ||
---|---|---|
| ||
[{"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.openecomponap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomponap.org/sdnc/svclogic ./svclogic.xsd' module 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=\"vnfvolte-topologywan-operation-inputactivate.\" />","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.openecompsli.sdnccore.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_discripter`distinguisher`\"/>","comments":"","outputs":1,"x":559,"y":301,"z":"30ac5fe5.ab4d2","wires":[[]]}] |
...
Move the resulting DG around the pane.
Node | Comment |
---|---|
DGSTART | Standard starting node for any DG |
Module | This matches our YANG Model name VOLTE-API |
Method | The RPC that will be used by the northbound system to call SDNC |
BLOCK | wrap these nodes into a succes/fail transaction with "atomic" one branch at a time execute |
RECORD | Save some data to a file. Click on the node to see the fields that are being saved |
SET | Set the order status to Active |
SET service data to input | In 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 indicator | Set the response on success. A real DG has error legs we are worrying about in this example |
RETURN : Success | HTTP 200 return of success |
Save the DG using the big red button in the upper right corner
...
Click on "Try It out!"
- You should see a 200 ok response and any data returned by the Directed Graph
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
- You can add additional parameters to the input JSON and create input for other operations like Data Center Gateway config
You can add a REST API CALL Node to call a 3rd party controller- You can create and load a 3rd party contorller feature bundle and add a configure or execute node to call that adapter
- You can add an AAI node to update AAI
- You can repeat this process for other Directed Graph like Deactivate