Chapter 4
Getting Data
RUGGEDCOM NETCONF
Reference Guide
40 Using the Text-Based Tree
Again, refer to the text-based tree diagram to locate the services/ntp/server(name)/peer field in the tree:
+--rw services
   +--rw time
      +--rw ntp
         +--rw enabled?           boolean
         +--rw server [name]
         |  +--rw name           inet:host
         |  +--rw enabled?       empty
         |  +--rw peer?          empty
         .
         .
         .
In the XML, this tree structure looks like the following:
<services>
 <ntp>
  <server>
   <name></name>
   <peer></peer>
  </server>
 </ntp>
</services>
To set a peer for the NTP server, 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>
     <server>
      <name>ntp_server_01</name>
      <peer>192.168.0.100</peer>
     </server>
    </ntp>
   </services>
  </config>
</edit-config>
</rpc>]]>]]>