Chapter 4
Getting Data
RUGGEDCOM NETCONF
Reference Guide
30 Using the <get-config> Command
• specify the <filter> element's type attribute as subtree
• construct the path to the desired element within the <filter> element
• specify the namespace for the root element in the path
You can use an XPath in the <filter> element, instead of the hierarchical XML element structure. For
information on how to use an XPath, refer to Section4.3, “Using XPaths with <get> and <get-config>”.
The following example shows how to return the state of the Developer Log Enabled setting using hierarchical
XML elements. In this example, the Developer Log is enabled, so the value for the Enabled setting is returned as
true.
<rpc message-id="3010"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<admin xmlns="http://ruggedcom.com/ns/rmf_admin">
<logging>
<diagnostics>
<developer-log>
<enabled />
</developer-log>
</diagnostics>
</logging>
</admin>
</filter>
</get>
</rpc>]]>]]>
The device returns the following:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3010">
<data>
<admin xmlns="http://ruggedcom.com/ns/rmf_admin">
<logging>
<diagnostics>
<developer-log>
<enabled>true</enabled>
</developer-log>
</diagnostics>
</logging>
</admin>
</data>
</rpc-reply>]]>]]>
Section4.2
Using the <get-config> Command
Use the <get-config> command to retrieve information from a specified configuration, either the running
configuration or the candidate configuration.
The <filter> element contains the path to the information to retrieve. You can specify the path with
hierarchical XML elements, or with an XPath.
When using hierarchical elements, do the following:
• use the <source> element to specify the configuration to query. The configuration can be either
<candidate> or <running>.
• specify the <filter> element's type attribute as subtree