0

I have defined a list for operational data in yang model as:

list listener-state {
key “listener-name”;
config false;
description
“common statistics for given listener (i.e sent messages)”;
uses listener-state-info;
…
}

I use opendaylight api (org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream) which will convert the json body in request to org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode, in order to finally generate the XML rpc for confd server. In my case, I want to fetch all rows from this operation list, then I try to make the json as :

“command”: {“service” : {“server” : {“listener-state” : {}}}},

I will get exception that : “Input is missing some of the keys of listener-state” Then I can add the key value to the json body :

“command”: {“service” : {“server” : {“listener-state” : {“listener-name”: “first”}}}},

This case, I can only get one row. I also try to leave the key value as blank:

“command”: {“service” : {“server” : {“listener-state” : {“listener-name”: “”}}}},

Then the response will be all key values instead of all rows. So now my question is what the json will be in order to get all rows in the list without knowing the key values ? This should be feasible since I figure out XML request can do that. But I can't figure out what the matching json will be.

Thanks.

bubu0321
  • 497
  • 1
  • 6
  • 18

1 Answers1

0

I did bunch of investigation. Unfortunately, I don't think there is a way to fetch the whole table

bubu0321
  • 497
  • 1
  • 6
  • 18