Committing The Target Configuration; Commit Operation - Cisco CRS-1 - Carrier Routing System Router Api Manual

Carrier routing system xml api guide
Hide thumbs Also See for CRS-1 - Carrier Routing System Router:
Table of Contents

Advertisement

Configuration Operations
Use the <File> tag to name the file to which the configuration is to be saved. You must specify the
complete path of the file to be saved when you use the <File> tag. If the file already exists on the router,
then an error will be returned unless the optional Boolean attribute Overwrite is included on the <File>
tag with a value of "true".
Note
No mechanism is currently provided by the XML interface for "browsing" through the file directory
structure.
If the save operation is successful, the response will contain both the <Save> and <File> tags. If the save
operation fails, the response will also contain the ErrorCode and ErrorMsg attributes indicating the cause
of the save failure.
The following example shows a request to save the contents of the target configuration to the file named
my_bgp.cfg on the router.
Sample XML Client Request to Save the Target Configuration to a File
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Save>
</Save>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">
<Save>
<File Overwrite="true">
</Save>
</Response>

Committing the Target Configuration

In order for the configuration in the target area to become part of the running configuration, the target
configuration must be explicitly committed by the client application using the <Commit> operation.

Commit Operation

Four optional attributes can be specified with the <Commit> operation:
Cisco CRS-1 Series Carrier Routing System XML API Guide
2-34
<File Overwrite="true">disk0:/my_bgp.cfg</File>
disk0:/my_bgp.cfg
Mode—Use the Mode attribute in the request to specify whether the target configuration should be
committed on an Atomic or BestEffort basis. In the case of a commit with the Atomic option, the
entire configuration in the target area is committed only if application of all the configuration in the
target area to the running configuration succeeds. If any errors occur, the commit operation is rolled
back and the errors are returned to the client application. In the case of commit with the BestEffort
option, the configuration is committed even if some configuration items fail during the commit
operation. In this case, the errors are also returned to the client application. By default, the commit
operation is carried out on a BestEffort basis.
KeepFailedConfig—Use this Boolean value to specify whether any configuration that fails during
the commit operation should remain in the target configuration buffer. The default value for
KeepFailedConfig is false. That is, by default the target configuration buffer will be cleared after
Chapter 2
Cisco CRS-1 Series XML Router Configuration and Management
OL-4596-01

Advertisement

Table of Contents
loading

This manual is also suitable for:

Crs-1 series

Table of Contents