Ask Your Question

Leafref - Yang to java mapping

asked 2014-12-17 02:04:55 -0700

disideris gravatar image

updated 2014-12-17 02:05:34 -0700

Hi there.

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.

  1. 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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-05-14 05:58:09 -0700

Tony Tkacik gravatar image

updated 2015-05-14 05:58:22 -0700

Hi, RESTCONF had several leaf-ref related problems, which are fixed in Lithium release.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-12-17 02:04:55 -0700

Seen: 1,005 times

Last updated: May 14 '15