Chapter 4
Getting Data
RUGGEDCOM NETCONF
Reference Guide
32
Using XPaths with <get> and <get-config>
The following example shows how to return the state of the Developer Log
Enabled
setting using an XPath. In this
example, the Developer Log is enabled, so the value for the
Enabled
setting is returned as
true
.
<rpc message-id="3020"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="xpath" select="admin/logging/diagnostics/developer-log/enabled"/>
</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="3020">
<data>
<admin xmlns="http://ruggedcom.com/ns/rmf_admin">
<logging>
<diagnostics>
<developer-log>
<enabled>true</enabled>
</developer-log>
</diagnostics>
</logging>
</admin>
</data>
</rpc-reply>]]>]]>
The following example shows how to use an XPath with the
<get-config>
command.
<rpc message-id="3020"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter type="xpath" select="admin/logging/diagnostics/developer-log/enabled"/>
</get-config>
</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="3020">
<data>
<admin xmlns="http://ruggedcom.com/ns/rmf_admin">
<logging>
<diagnostics>
<developer-log>
<enabled>true</enabled>
</developer-log>
</diagnostics>
</logging>
</admin>
</data>
</rpc-reply>]]>]]>
Содержание RUGGEDCOM MX5000RE
Страница 8: ...Table of Contents RUGGEDCOM NETCONF Reference Guide viii ...
Страница 12: ...Preface RUGGEDCOM NETCONF Reference Guide xii Customer Support ...
Страница 26: ...Chapter 1 Introduction RUGGEDCOM NETCONF Reference Guide 14 Sample Session Editing Data ...
Страница 40: ...Chapter 3 NETCONF Sessions RUGGEDCOM NETCONF Reference Guide 28 Killing a Session ...
Страница 64: ...Chapter 5 Changing Configuration Data RUGGEDCOM NETCONF Reference Guide 52 Committing Changes ...
Страница 148: ...Chapter 8 NETCONF XML Elements RUGGEDCOM NETCONF Reference Guide 136 validate ...