Chapter 1
Introduction
RUGGEDCOM NETCONF
Reference Guide
6
Sample Session: Performing an Action
• All commands must be enclosed within
<rpc>
tags. The
message-id
attribute is not required but is
recommended. The
message-id
attribute is returned in the device response, allowing you to match
responses with requests.
• The
<source>
element indicates the datastore from which we are requesting data. In this example we are
requesting data from the running configuration database.
• The
<filter>
element encloses the data model tags. The
type="subtree"
attribute is mandatory.
• The
<admin>
element is the root of the RUGGEDCOM admin namespace. Within the
<admin>
element,
additional elements
navigate
down to the desired element. In this example, we are navigating to
admin/
system-name
in the RUGGEDCOM NETCONF data model.
• The
]]>]]>
string indicates the end of the NETCONF message. Each NETCONF message must end with
]]>]]>
The device responds with the requested data:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1001">
<data>
<admin xmlns="http://ruggedcom.com/ns/rmf_admin">
<system-name>Substation Ethernet Switch 2</system-name>
</admin>
</data>
</rpc-reply>]]>]]>
• The
<rpc-reply>
element contains the response. Notice the
message-id
attribute returned with the
<rpc-reply>
element; it corresponds to the <message-id> sent in the
<rpc>
request.
4. After receiving the data, close the session:
<rpc message-id="1002" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<close-session/>
</rpc>]]>]]>
The device responds with the following and closes the session:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1002">
<ok/>
</rpc-reply>]]>]]
Section 1.5.2
Sample Session: Performing an Action
To perform an action on a device, do the following:
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 ...