Hi,
the model I supplied was a little to simplified, the module which augments data to the main module has a config ans state container with a lot of data.
It is the openconfig-platform and openconfig-platform-transceiver yang model that is used in this case.
the augmentation is conditional:
augment “/oc-platform:components/oc-platform:component” {
when “/oc-platform:components/oc-platform:component/” +
“oc-platform:state/oc-platform:type = ‘oc-platform-types:TRANSCEIVER’” {
description
“Augment is active when component is of type TRANSCEIVER”;
}
description
“Adding transceiver data to physical inventory”;
uses port-transceiver-top;
}
our annotation file contains:
tailf:annotate “/oc-platform:components/oc-platform:component/oc-transceiver:transceiver” {
tailf:callpoint OPENCONFIG-TRANSCEIVER {
tailf:opaque ‘OPENCONFIG-TRANSCEIVER’;
}
}
my query is:
filter xmlns:oc-platform=“http://openconfig.net/yang/platform” type=“xpath” select="/components/component[name=‘inventory::entity::80’]"
the log starts with what seems ok.
TRACE CALL data get_elem(thandle=9,/components/component{inventory::entity::80}/name)get_elem
(inventory::entity::80) --> CONFD_OK
TRACE CALL data get_object(thandle=9,/components/component{inventory::entity::80})
get_object
This is my trace of what I add to the returned tag array, I don’t return anything related to the augmented data
leaf /oc-platform:components/component{inventory::entity::80}/name
enter tag: /oc-platform:components/component{inventory::entity::80}/config
leaf /oc-platform:components/component{inventory::entity::80}/config/name
exit tag: /oc-platform:components/component{inventory::entity::80}/config
here are the state leaf that confd shuld use to descide if the transceiver container should be requested
enter tag: /oc-platform:components/component{inventory::entity::80}/state
leaf /oc-platform:components/component{inventory::entity::80}/state/name
leaf /oc-platform:components/component{inventory::entity::80}/state/type
leaf /oc-platform:components/component{inventory::entity::80}/state/id
leaf /oc-platform:components/component{inventory::entity::80}/state/description
leaf /oc-platform:components/component{inventory::entity::80}/state/mfg-name
leaf /oc-platform:components/component{inventory::entity::80}/state/version
leaf /oc-platform:components/component{inventory::entity::80}/state/serial-no
leaf /oc-platform:components/component{inventory::entity::80}/state/part-no
exit tag: /oc-platform:components/component{inventory::entity::80}/state
enter tag: /oc-platform:components/component{inventory::entity::80}/properties
exit tag: /oc-platform:components/component{inventory::entity::80}/properties
enter tag: /oc-platform:components/component{inventory::entity::80}/subcomponents
exit tag: /oc-platform:components/component{inventory::entity::80}/subcomponents
–> CONFD_OK
TRACE CALL data get_next_object(thandle=9, /components/component{inventory::entity::80}/properties/property, -1)
get_next_object
–> CONFD_OK
TRACE CALL data get_next_object(thandle=9, /components/component{inventory::entity::80}/subcomponents/subcomponent, -1)
get_next_object
–> CONFD_OK
TRACE CALL data get_next_object(thandle=9, /components/component, -1)
But after that confd ask for first object again.
TRACE CALL data get_next_object(thandle=9, /components/component, -1)
–> CONFD_OK
TRACE CALL data find_next(thandle=9, /components/component, next, {inventory::entity::99})
–> CONFD_OK
TRACE CALL data get_object(thandle=9,/components/component{inventory::entity::80})
get_object
–> CONFD_OK
here I get a request for the list in the augmented data but not the config and state container
TRACE CALL data get_next_object(thandle=9, /components/component{inventory::entity::80}/transceiver/physical-channels/channel, -1)
–> CONFD_OK
TRACE CALL trans finish(thandle=9) --> CONFD_OK
The reply from the query shows that the type is TRANSCEIVER and the augmentation should be active
<?xml version="1.0" encoding="UTF-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <data> <components xmlns="http://openconfig.net/yang/platform"> <component> <name>inventory::entity::80</name> <config> <name>inventory::entity::80</name> </config> <state> <name>inventory::entity::80</name> <type xmlns:oc-platform-types="http://openconfig.net/yang/platform-types">oc-platform-types:TRANSCEIVER</type> <id>serialNum</id> <description>descr</description> <mfg-name>client:1:2:21-22</mfg-name> <version>hwRev</version> <serial-no>serialNum</serial-no> <part-no>serialNum</part-no> </state> </component> </components> </data> </rpc-reply>
If I stop using the get_next_object and get_object and only use the get_next and get_elem then I get a get_elem for each of the augmented leafs so the problem for me seems to be that I return the wrong data in the confd_data_reply_next_object_tag_value_arrays but as far as I can see from the manual I return the correct data.
Is there a way for me to trace something in the libconfd library to see why confd is unhappy with the data I return.