Hi,
I have the following Yang:
` container network-instances {
action loopback {
description "Loopback";
input {
leaf name {
type string;
}
}
output {
leaf oname {
type string;
}
}
}
}
The registration successfully works. And I am able to call the action as well. However, when I try to return the reply it fails with this on Mgsoft browser:
*[2019/07/31 14:37:15]* Command 16f4cb7a-cfae-46b0-b5ed-58c64b51f8db:8; unknown was unsuccessful. Error reported:
*[2019/07/31 14:37:15]* command timed out
I ran this XML:
<?xml version="1.0" encoding="utf-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:yang-1_1="urn:ietf:params:xml:ns:yang:1"
xmlns:ni="urn:ietf:params:xml:ns:yang:ietf-network-instance"
message-id="1">
<action xmlns="urn:ietf:params:xml:ns:yang:1">
<network-instances xmlns="urn:ietf:params:xml:ns:yang:ietf-network-instance">
<loopback>
<name>x</name>
</loopback>
</network-instances>
</action>
</rpc>
My code for returning action reply:
confd_tag_value_t reply[15];
int i=0;
CONFD_SET_TAG_XMLBEGIN(&reply[i], ni_loopback, ni__ns); i++;
CONFD_SET_TAG_STR(&reply[i], ni_oname, "hello" ); i++;
CONFD_SET_TAG_XMLEND(&reply[i], ni_loopback, ni__ns); i++;
confd_action_reply_values(uinfo, reply, i);
Is there anything wrong with the above code snippet? I have implemented it similar to the example provided in the Confd manual.
Moreover, when I print reply I get the following:
ConfDAdaptorNetworkInstancesLoopback::ActionReply : Reply 0: 1046154078:343067885, tag<343067885>
ConfDAdaptorNetworkInstancesLoopback::ActionReply : Reply 1: 0:1580536827, "hello"
ConfDAdaptorNetworkInstancesLoopback::ActionReply : Reply 2: 1046154078:343067885, tag<343067885>
In the confd_devel.log, I found this:
devel-c bad return tag for loopback in 'urn:ietf:params:xml:ns:yang:ietf-network-instance': /network-instances/loopback/$output/loopback/oname
The confd compiler returns the required tags and namespaces.
Please suggest a solution for this problem.
Thanking you in advance.
Regards,
Ramakrishnan