RUGGEDCOM NETCONF
Reference Guide
|
.
.
.
• 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?
.
.
.
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.
Using the Text-Based Tree
+--rw key?
leafref
boolean
Chapter 4
Getting Data
39