Junos 10.3 Junos XML Management Protocol Guide
Requesting One Configuration Object
88
The following example shows how to request the identifier for each interface configured
at the
hierarchy level. The output is from the candidate configuration
[edit interfaces]
and is tagged with Junos XML tag elements (the default).
Client Application
<rpc>
<get-configuration>
<configuration>
<interfaces>
<interface recurse="false"/>
</interfaces>
</configuration>
</get-configuration>
</rpc>
To request information about a single configuration object, a client application emits the
<get-configuration>
tag element and encloses the tag elements that represent the entire
statement path down to the object, starting with the
represent the requested object, the application emits only the container tag element and
identifier tag elements (each complete with the identifier value) for the object. It does
not emit tag elements that represent other object characteristics. It encloses the entire
request in an
tag element. In the following, the identifier tag element is called
<rpc>
name
:
<rpc>
<get-configuration>
<configuration>
<!-- opening tags for each parent of the object -->
<object>
<name>identifier</name>
</object>
<!-- closing tags for each parent of the object -->
</configuration>
</get-configuration>
</rpc>
Junos XML Protocol Server
<rpc-reply xmlns:junos="URL ">
<configuration junos:changed-seconds=" seconds " \
junos:changed-localtime="timestamp">
<interfaces>
<interface>
<name>fe-0/0/0</name>
</interface>
<interface>
<name>fxp0</name>
</interface>
<interface>
<name>lo0</name>
</interface>
</interfaces>
</configuration>
</rpc-reply>
<configuration>
tag element. To
Copyright © 2010, Juniper Networks, Inc.