I assume this posting has been superseded by your other posting submitted under the [CDB and APIs] category with the title of “JSON RPC Query Call issue”. If not, please complete your question.
Yes I have another question … again related to JSON RPC…
If I have nested containers, what is the best way to get all the the leafs from all the containers with key-value pairs… like a mib walk…
container 1 {
leaf1
container 2 {
leaf2
container 3 {
leaf 3
}
}
}
The best way is to provide the keypaths (/c1/leaf1, /c1/c2/leaf2, /c1/c2/c3/leaf3) to a series of get_value calls and their corresponding values will be returned with the key in the call itself and the value in the results.
You may also want to take a look at the get_schema call to dynamically discover the data elements in your YANG data model at runtime. This will allow you to read all of the leaf elements in your nested containers at runtime without knowing their actual structures at coding time.