Create the SLI-API input model
Here is a simplistic modle if 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.
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": "VCPE-API", "rpc-name": "vcpe-vgw-activate", "mode": "sync", "sli-parameter": [ { "parameter-name": "vcpe-vgw-activate-input.vgw-oam-address", "string-value": "10.1.20.2" }, { "parameter-name": "vcpe-vgw-activate-input.vgw-vlanid", "string-value": "101" }, { "parameter-name": "vcpe-vgw-activate-input.dcae-collector-ip", "string-value": "10.0.0.1" } ] } }
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
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.
Node | Comment |
---|---|
DGSTART | Standard starting node for any DG |
Module | This matches our YANG Model name VCPE-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 |
Use the SLI-API to test the DG and any Adapter nodes
- go to the 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!
- You should see a 200 ok response
Log into SDNC and check the svclogic.log and see the results.
Next Steps
- You can add additional parameters to the input JSON and create input for other operations like vBRG config
- You can add REST API CALL Node to call the Netconf interface to configure a vGW device
- You can add AAI node to update AAI