Table of Contents |
---|
Create the SLI-API input model
Here is a simplistic modle if model of the attributes that might be needed as input to the VCPE-API:vcpe-vgw-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.
...
Expand | ||
---|---|---|
| ||
[{"id":"d79d0d35.a622a8","type":"dgstart","name":"DGSTART","outputs":1,"x":112,"y":62,"z":"9a684888.3f2538","wires":[["e8368657.f2d8f"]]},{"id":"e8368657.f2d8f","type":"service-logic","name":"VCPE-API 0.0.1-DEMO","module":"VCPE-API","version":"0.0.1-DEMO","comments":"","xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='VCPE-API' version='0.0.1-DEMO'>","outputs":1,"x":318.1666564941406,"y":87.16667175292969,"z":"9a684888.3f2538","wires":[["69f272d9.6bf4f4"]]},{"id":"69f272d9.6bf4f4","type":"method","name":"method vcpe-vgw-activate","xml":"<method rpc='vcpe-vgw-activate' mode='sync'>\n","comments":"","outputs":1,"x":182.16668701171875,"y":151.16665649414062,"z":"9a684888.3f2538","wires":[["2cdda2a7.c88146"]]},{"id":"2cdda2a7.c88146","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":390,"y":239,"z":"9a684888.3f2538","wires":[["2fed121c.e86f76","f5677f8e.1ec748","942de7f6.8bda2","100c8a63.bf0bee","d9c7cd5d.e69768"]]},{"id":"2fed121c.e86f76","type":"set","name":"set: order-status = Active","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"Active\"/>","comments":"","x":612,"y":351,"z":"9a684888.3f2538","wires":[]},{"id":"100c8a63.bf0bee","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":584,"y":538,"z":"9a684888.3f2538","wires":[]},{"id":"f5677f8e.1ec748","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"vnfvcpe-topologyvgw-operationactivate-input.\" />","comments":"","x":611.8888854980469,"y":452.388916015625,"z":"9a684888.3f2538","wires":[]},{"id":"942de7f6.8bda2","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":606.2063369750977,"y":496.1031608581543,"z":"9a684888.3f2538","wires":[]},{"id":"d9c7cd5d.e69768","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.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=\"vcpe-vgw-activate\"/>\n<parameter name=\"field3\" value=\"`$vcpe-vgw-activate-input.vgw-oam-address`\"/>\n","comments":"","outputs":1,"x":560,"y":282,"z":"9a684888.3f2538","wires":[[]]}] |
Amsterdam DG
Expand | ||
---|---|---|
| ||
[{"id":"38bd709c.175368","type":"dgstart","name":"DGSTART","outputs":1,"x":178.5,"y":80,"z":"f2df1f12.6ab348","wires":[["d0de403c.350ae8"]]},{"id":"d0de403c.350ae8","type":"service-logic","name":"VCPE-API 0.0.1-DEMO","module":"VCPE-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='VCPE-API' version='0.0.1-DEMO'>","outputs":1,"x":384.6666564941406,"y":105.16667175292969,"z":"f2df1f12.6ab348","wires":[["ea270635.56b8e"]]},{"id":"ea270635.56b8e","type":"method","name":"method vcpe-vgw-activate","xml":"<method rpc='vcpe-vgw-activate' mode='sync'>\n","comments":"","outputs":1,"x":248.66668701171875,"y":169.16665649414062,"z":"f2df1f12.6ab348","wires":[["39ffd5bc.c63c62"]]},{"id":"39ffd5bc.c63c62","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":456.5,"y":257,"z":"f2df1f12.6ab348","wires":[["b5a325da.3ccee8","d565b9ae.cc476","f1c4d756.c5524","9cd0f957.1aba88","47578ecb.8dd218"]]},{"id":"b5a325da.3ccee8","type":"set","name":"set: order-status = Active","xml":"<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"Active\"/>","comments":"","x":678.5,"y":369,"z":"f2df1f12.6ab348","wires":[]},{"id":"d565b9ae.cc476","type":"set","name":"set: service-data = input","xml":"<set>\n\t<parameter name=\"service-data.\" value=\"vcpe-vgw-activate-input.\" />","comments":"","x":678.3888854980469,"y":470.388916015625,"z":"f2df1f12.6ab348","wires":[]},{"id":"f1c4d756.c5524","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":672.7063369750977,"y":514.1031608581543,"z":"f2df1f12.6ab348","wires":[]},{"id":"9cd0f957.1aba88","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":650.5,"y":556,"z":"f2df1f12.6ab348","wires":[]},{"id":"47578ecb.8dd218","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.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=\"vcpe-vgw-activate\"/>\n<parameter name=\"field3\" value=\"`$vcpe-vgw-activate-input.vgw-oam-address`\"/>\n","comments":"","outputs":1,"x":626.5,"y":300,"z":"f2df1f12.6ab348","wires":[[]]}] |
Copy it to your clipboard
...
Click on the "Activate" link in the DG list to Activate the DG
Your DG is now read for testing.
...
- Go to the swagger ui on the SDNC controller at http://<sdnc_ip:8282/apidoc/explorer/index.html
- Select the SLI-API to open up its methods
- Select the "/operations/SLI-API:execute-graph"
- Paste the json string from the first step into the box
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.
Other Topics
Understanding the the GENERIC-RESOURCE-APIs
Next Steps
- You can add additional parameters to the input JSON and create input for other operations like vBRG config
- You can add a REST API CALL Node to call the Netconf interface to configure a vGW device
- You can add an AAI node to update AAI
- You can repeat this process for other Directed Graph like Deactivate
...