I have inserted the data into the confd cdb database using confd_load. Now i want to retrieve the data as rpc reply using python. if i use cdb.get() function I can get only a single value but i need to get the whole inserted data as rpc reply how can i do it.
//servers.yang
module servers {
namespace "http://example.com/ns/servers";
prefix servers;
import ietf-inet-types {
prefix inet;
}
revision "2006-09-01" {
description "Initial servers data model";
}
/* A set of server structures */
container servers {
list server {
key name;
max-elements 64;
leaf name {
type string;
}
leaf ip {
type inet:ip-address;
mandatory true;
}
leaf port {
type inet:port-number;
mandatory true;
}
}
}
}
//servers.xml
<config xmlns="http://tail-f.com/ns/config/1.0">
<servers xmlns="http://example.com/ns/servers">
<server>
<name>dns</name>
<ip>192.168.3.5</ip>
<port>53</port>
</server>
<server>
<name>www</name>
<ip>192.168.3.4</ip>
<port>88</port>
</server>
<server>
<name>www2</name>
<ip>192.168.3.5</ip>
<port>80</port>
</server>
</servers>
</config>
I am inserting the above xml data as into the cdb database I want to write a python code such that when i run the python code it will get the xml data as rpc reply