RUGGEDCOM NETCONF
Reference Guide
Chapter 4
Getting Data
Using the Text-Based Tree
39
| +--rw key? leafref
.
.
.
•
rw
indicates a read-write node.
•
ro
indicates a read-only node.
•
[square braces]
indicate an identifier or name for a data object.
• text following the node name indicates the data type for the node, such as boolean, string, and so on.
CONTENTS
•
Section 4.6.3.1, “Using the Text-Based Tree”
Section 4.6.3.1
Using the Text-Based Tree
Refer to the text-based tree to help build paths and element references in your NETCONF commands. Use the
structure shown in the text-based tree diagram to build the XML used in your NETCONF
<rpc>
messages.
For example, to enable the NTP service on a device, locate the
ntp/enabled
field in the tree:
+--rw services
+--rw time
+--rw ntp
+--rw enabled? boolean
.
.
.
In the XML, this tree structure looks like the following:
<services>
<ntp>
<enabled></enabled>
</ntp>
</services>
To set the
Enabled
field to true, the XML in your NETCONF
<rpc>
looks like the following:
<rpc message-id="233" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<candidate/>
</target>
<config>
<services xmlns="http://ruggedcom.com/ns/rmf_services">
<ntp>
<enabled>true</enabled>
</ntp>
</services>
</config>
</edit-config>
</rpc>]]>]]>
Note that you need to add the XML namespace to the root element in the data structure.
To address an identified object, you need to refer to the object's identifying name or key. In this example, we want
to set a peer IP address for the NTP server named
ntp_server_01
.
Содержание 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 ...