Hi,
My confd action model returns an output which is a list
output {
list outlist {
leaf A {
type string;
}
leaf B{
type string;
}
}
My callpoint is implemented in Python.
I have returned data when the output is a single leaf using something like this
result = [_confd.TagValue(_confd.XmlTag(ns_hash, tag),
_confd.Value(value))]
dp.action_reply_values(self.uinfo, result)
I am not able to figure out how to do it for returning the data in the list format.
The XML tags worked when called with the following format.
begin_tag = _confd.TagValue(_confd.XmlTag(ns_hash,outlist_tag),_confd.Value((outlist_tag,ns_hash),_confd.C_XMLBEGIN))
result.append(begin_tag)
.
.
.
.
Hi, We are facing similar problem to show some values in a list. We are using Python 2.7. Simply while calling, confd.XmlTag, getting error.
ns.hash ( It is integer with hash value)
outlist_tag = ns.configuration_result (it is string which is tag name โresultโ)
_confd.XmlTag(ns.hash,outlist_tag)
Error is: Config manager: Unable to perform config operation: an integer is required
If giving hash value for result tag (i.e.: 401396173) , it works, but output is integer and meaningless.
This is what is in the list of output:
[_confd.TagValue(tag=401396173, ns=1550764805), _confd.TagValue(tag=1998270519, ns=1550764805), _confd.TagValue(tag=1714291735, ns=1550764805), _confd.TagValue(tag=401396173, ns=1550764805), _confd.TagValue(tag=401396173, ns=1550764805), _confd.TagValue(tag=1998270519, ns=1550764805), _confd.TagValue(tag=1714291735, ns=1550764805), _confd.TagValue(tag=401396173, ns=1550764805)]