Ending A Junos Xml Protocol Session And Closing The Connection - 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

Ending a Junos XML Protocol Session and Closing the Connection

Copyright © 2010, Juniper Networks, Inc.
there are some restrictions on the commit operation for a private copy. For more
information, see "Committing a Private Copy of the Configuration" on page 135.
To discard the private copy without committing it, a client application emits the
<close-configuration/>
tag enclosed in an
<rpc>
<close-configuration/>
</rpc>
Any changes to the private copy are lost. Changes to the private copy are also lost if the
Junos XML protocol session ends for any reason before the changes are committed. It is
not possible to save changes to a private copy other than by emitting the
tag element.
<commit-configuration>
The following example shows how to create a private copy of the configuration. The
Junos XML protocol server includes a reminder in its confirmation response that changes
are discarded from a private copy if they are not committed before the session ends.
Client Application
Junos XML Protocol Server
<rpc>
<open-configuration>
<private/>
</open-configuration>
</rpc>
<rpc-reply xmlns:junos="URL ">
<xnm:warning xmlns="http://xml.juniper.net/xnm/1.1/xnm" \
<message>uncommitted changes will be discarded on exit</message>
</xnm:warning>
</rpc-reply>
When a client application is finished making requests, it ends the Junos XML protocol
session by emitting the
<request-end-session/>
<rpc>
<request-end-session/>
</rpc>
In response, the Junos XML protocol server emits the
tag element and a closing
<rpc-reply>
<rpc-reply xmlns:junos="URL">
<end-session/>
</rpc-reply>
</junoscript>
The client application waits to receive this reply before emitting its closing
tag:
</junoscript>
For an example of the exchange of closing tags, see "Closing the Junos XML Protocol
Session" on page 59.
Chapter 3: Controlling the Junos XML Management Protocol Session
<rpc>
tag element:
xmlns:xnm="http://xml.juniper.net/xnm/1.1/xnm">
tag within an
<end-session/>
tag:
</junoscript>
tag element:
<rpc>
tag enclosed in an
</junoscript>
55

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junos os

Table of Contents