Hello,
The Conf-D NETCONF server is not returning list and sub-list keys for a request that contains a subtree filter. Please see the example below. The response does not return the ‘name’ field, which is the key for ‘my-list’.
Is there something I can configure in Conf-D to enable returning list keys for requests?
This is the only form of a NETCONF get that behaves this way and is inconsistent with the other five get variations. All other variations of NETCONF get operations return list keys.
NETCONF Get Operations that return list keys:
- with subtree filter
- with subtree filter
- with xpath filter
- with xpath filter
- with xpath filter
NETCONF Get Operations that do not return list keys:
- with subtree filter
get Request:
<get>
<filter type="subtree">
<my-test-module:my-list xmlns:my-test-module="urn:my:yang:my-test-module">
<my-test-module:my-entry>
<my-test-module:str-data/>
</my-test-module:my-entry>
</my-test-module:my-list>
</filter>
</get>
get Response:
<?xml version="1.0" encoding="utf-8"?>
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<my-list xmlns="urn:my:yang:my-test-module">
<my-entry>
<str-data>some data (1)</str-data>
</my-entry>
<my-entry>
<str-data>some data (2)</str-data>
</my-entry>
<my-entry>
<str-data>some data (3)</str-data>
</my-entry>
</my-list>
</data>
get-data Request:
<get-data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"
xmlns:ncds="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda">
<ncds:datastore xmlns="urn:ietf:params:xml:ns:yang:ietf-datastores">operational</ncds:datastore>
<subtree-filter>
<my-test-module:my-list xmlns:my-test-module="urn:my:yang:my-test-module">
<my-test-module:my-entry>
<my-test-module:str-data/>
</my-test-module:my-entry>
</my-test-module:my-list>
</subtree-filter>
</get-data>
get-data Response:
<?xml version="1.0" encoding="utf-8"?>
<data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda">
<my-list xmlns="urn:my:yang:my-test-module">
<my-entry>
<name>TEST00000001</name>
<str-data>some data (1)</str-data>
</my-entry>
<my-entry>
<name>TEST00000002</name>
<str-data>some data (2)</str-data>
</my-entry>
<my-entry>
<name>TEST00000003</name>
<str-data>some data (3)</str-data>
</my-entry>
</my-list>
</data>
Module:
module my-test-module {
yang-version 1.1;
namespace "urn:my:yang:my-test-module";
prefix "my-test-module";
organization "My Test YANG Module.";
contact
"My Test YANG Module.
";
description
"My Test YANG Module.";
revision 2022-08-26 {
reference "My Test YANG Module.";
}
container my-list {
description "An example of a list.";
list my-entry {
key name;
description "An example of a list entry.";
leaf name {
type string;
description "Name identifying a list entry.";
}
leaf str-data {
type string;
description "String data for this list entry.";
}
leaf int-data {
type int32;
description "Integer data for this list entry.";
}
}
}
}