...
Note | ||
---|---|---|
|
The model used for illustration purposes is as below :
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
module gnodeb { yang-version 1.1; namespace "urn:gnodeb:test"; prefix gnb; description "Yang model for gnodeb"; revision "2019-12-03" { description "initial version"; } container cells { list cellinfolist { key cell-id; leaf cell-id { type uint16; } leaf cell-uuid { type uint32; } leaf cell-description { type string; description "Possible name or description"; } } } } |
Once the above model is added to a mount point ( say PNFDemo ) on SDNC this model should show up on the GUI, with methods for operating on all public leaves as below.
All of these are well documented with examples.
Alternatively, these can be tested via Postman as :
GET all cells - http://localhost:8282/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/gnodeb:cells
PUT add/update cell - http://localhost:8282/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/gnodeb:cells/cellinfolist/{cell-id}
GET particular cell-id - http://localhost:8282/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/gnodeb:cells/cellinfolist/2
Filtering
This uses a different bundle (notice the URL).
For Field filtering we can use RESTConf "fields" option :
Check RESTConf fields filtering for examples on using fileting filtering option on RESTConf.
Sample URLS :
GET cell details - http://localhost:8282/rests/data/network-topology:network-topology/topology=topology-netconf/node=PNFDemo/yang-ext:mount/gnodeb:cells/cellinfolist=1
GET cell details with filtering - http://localhost:8282/rests/data/network-topology:network-topology/topology=topology-netconf/node=PNFDemo/yang-ext:mount/gnodeb:cells/cellinfolist=1?fields=cell-uuid
GET multiple fields with filtering - http://localhost:8282/rests/data/network-topology:network-topology/topology=topology-netconf/node=PNFDemo/yang-ext:mount/gnodeb:cells/cellinfolist=1?fields=cell-uuid;cell-id