RUGGEDCOM NETCONF
Reference Guide
Chapter 4
Getting Data
Getting Information for a Specific Object
33
Section 4.4
Getting Information for a Specific Object
To retrieve information for a specific object, such as a user, an interface, or other identified object, specify the
identification for the item item in the XML element hierarchy or XPath.
CONTENTS
•
Section 4.4.1, “Specifying Objects with Hierarchical XML Elements”
•
Section 4.4.2, “Specifying Objects with XPaths”
Section 4.4.1
Specifying Objects with Hierarchical XML Elements
When using hierarchical XML elements, enclose the identifying data within its element. For example:
{element}
...
{element}{data}{/element}
...
{/element}
Where:
•
{element}
is an element in the data model.
•
...
represents multiple elements in the data model to the target element.
•
{data}
is the identifying data for the object whose information you want to retrieve.
For example, to return the role for a specific user, send an rpc-message similar to the following:
<rpc message-id="3030"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<admin xmlns="http://ruggedcom.com/ns/rmf_admin">
<users>
<userid>
<name>oper</name>
<role />
</userid>
</users>
</admin>
</filter>
</get>
</rpc>]]>]]>
The device returns the following rpc-reply:
<?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">
<users>
<userid>
<name>oper</name>
<role>operator</role>
</userid>
Содержание 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 ...