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
Section 4.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>]]>]]>
Section 4.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
Summary of Contents for RUGGEDCOM MX5000RE
Page 8: ...Table of Contents RUGGEDCOM NETCONF Reference Guide viii ...
Page 12: ...Preface RUGGEDCOM NETCONF Reference Guide xii Customer Support ...
Page 26: ...Chapter 1 Introduction RUGGEDCOM NETCONF Reference Guide 14 Sample Session Editing Data ...
Page 40: ...Chapter 3 NETCONF Sessions RUGGEDCOM NETCONF Reference Guide 28 Killing a Session ...
Page 64: ...Chapter 5 Changing Configuration Data RUGGEDCOM NETCONF Reference Guide 52 Committing Changes ...
Page 148: ...Chapter 8 NETCONF XML Elements RUGGEDCOM NETCONF Reference Guide 136 validate ...