Displaying Cli Output As Xml Tag Elements; Example Of A Junos Xml Protocol Session - Juniper JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010 Manual

Junos xml management protocol guide
Hide thumbs Also See for JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010:
Table of Contents

Advertisement

Junos 10.3 Junos XML Management Protocol Guide

Displaying CLI Output as XML Tag Elements

Example of a Junos XML Protocol Session

56
The client application can then close the SSH, SSL, or other connection to the Junos XML
protocol server machine. Client applications written in Perl can close the Junos XML
protocol session and connection by using the Junos XML protocol Perl module described
in "Writing Junos XML Protocol Perl Client Applications" on page 205. For more information,
see that chapter.
Client applications that do not use the Junos XML protocol Perl module use the routine
provided for closing a connection in the standard library for their programming language.
To display the output from a CLI command as Junos XML protocol tag elements and
Junos XML tag elements instead of as the default formatted ASCII text, pipe the output
from the command to the
OS configuration or operational data belong to the Junos XML API, which defines the
Junos content that can be retrieved and manipulated by the Junos XML management
protocol operations.
The following example shows the output from the
issued on an M20 router that is running the initial version of Junos OS Release 10.3 (the
opening
<chassis-inventory>
user@host> show chassis hardware | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/10.3R1/junos">
<chassis-inventory \
xmlns="http://xml.juniper.net/junos/10.3R1/junos-chassis">
<chassis junos:style="inventory">
<name>Chassis</name>
<serial-number>00118</serial-number>
<description>M20</description>
<chassis-module>
<name>Backplane</name>
<version>REV 06</version>
<part-number>710-001517</part-number>
<serial-number>AB5911</serial-number>
</chassis-module>
<chassis-module>
<name>Power Supply A</name>
<!-- other child tags of <chassis-module> -->
</chassis-module>
<!-- other child tags of <chassis> -->
</chassis>
</chassis-inventory>
</rpc-reply>
This section describes the sequence of tag elements in a sample Junos XML protocol
session. The client application begins by establishing a connection to a Junos XML protocol
server. See the following sections:
Exchanging Initialization PIs and Tag Elements on page 57
Sending an Operational Request on page 57
display xml
command. The tag elements that describe Junos
show chassis hardware
tag appears on two lines only for legibility):
command
Copyright © 2010, Juniper Networks, Inc.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junos os

Table of Contents