The <get-data> operation can be used to retrieve all or specified configuration or status data sets from the NMDA data set.
The following example shows how to query the task group configuration of the AAA feature in the <ietf-datastores:running/> configuration database. The queried group information is returned in an RPC reply message.
RPC request
<?xml version="1.0" encoding="utf-8"?> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <get-data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda" xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> <datastore>ds:running</datastore> <subtree-filter> <aaa:aaa xmlns:aaa="urn:huawei:yang:huawei-aaa"> <aaa:task-groups> <aaa:task-group/> </aaa:task-groups> </aaa:aaa> </subtree-filter> </get-data> </rpc>
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5"> <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"> <aaa xmlns="urn:huawei:yang:huawei-aaa"> <task-groups> <task-group> <name>manage-tg</name> </task-group> <task-group> <name>system-tg</name> </task-group> <task-group> <name>monitor-tg</name> </task-group> <task-group> <name>visit-tg</name> </task-group> </task-groups> </aaa> </data> </rpc-reply>
<?xml version="1.0" encoding="utf-8"?> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <get-data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda" xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> <datastore>ds:running</datastore> <xpath-filter xmlns:aaa="urn:huawei:yang:huawei-aaa">/aaa:aaa/aaa:task-groups/aaa:task-group</xpath-filter> </get-data> </rpc>
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5"> <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"> <aaa xmlns="urn:huawei:yang:huawei-aaa"> <task-groups> <task-group> <name>manage-tg</name> </task-group> <task-group> <name>system-tg</name> </task-group> <task-group> <name>monitor-tg</name> </task-group> <task-group> <name>visit-tg</name> </task-group> </task-groups> </aaa> </data> </rpc-reply>