I made a yang model with one container and 2 lists. First list uni, second list evc.
Inside first list uni, i have a key uni-id and a leaf uni-id type string.
Below there is a leaf node and a leaf termination-point. These leafs are type node-ref and tp-ref from network topology yang model which i had imported.
Inside second list evc, there is a key evc-id, a leaf evc-id type string and a sublist with a key ref-to-uni and a leaf ref-to-uni type leafref, with path to uni-id from first list uni.
Compilation works fine.
Opendaylight controller is up and running with all the needed features and a mininet with a simple topology is connected to the controller. So i have a topology seen in http://localhost:8181/restconf/operational/network-topology:network-topology/ When i post a json message to put my container in datastore no error comes out.
Problems. 1. For node-ref and tp-ref, when i use a get method after post method there is a null pointer exception. It cant actaully refer to a node from network topology.
- For ref-to-uni, i cannot make a leaf in a list tha refers to uni-id of the fist list.
Questions: Is leafref and references in general working in yangtools? The network topology yang model is working fine with leafrefs? Why do i get a null pointer exception when i post a uni list with leafs that refer to nodes and termination-points of network topology that already exist?