Specifications

2-35
Cisco CRS-1 Series Carrier Routing System XML API Guide
OL-4596-02
Chapter 2 Cisco CRS-1 Series XML Router Configuration and Management
Configuration Operations
The following example shows a request to load and display the failed configuration from the last
<Commit> operation. This request corresponds to the CLI command show configuration failed.
Sample XML Client Request to Load the Failed Configuration from the Last <Commit> Operation
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Load>
<FailedConfig/>
</Load>
<Get>
<Configuration Source=”ChangedConfig”/>
</Get>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">
<Load>
<FailedConfig/>
</Load>
<Get>
<Configuration OperationType=”Set”>
<BGP MajorVersion=”1” MinorVersion=”0”>
<AS>
<Naming>
<AS>4</AS>
</Naming>
<Global>
<DefaultMetric>10</DefaultMetric>
</Global>
</AS>
</BGP>
</Configuration>
</Get>
</Response>
Unlocking the Running Configuration
The client application must use the <Unlock> operation to release the exclusive lock on the running
configuration for the current session prior to terminating the session.
If the unlock operation is successful, the response contains only the <Unock/> tag. If the unlock
operation fails, the response can also contain the ErrorCode and ErrorMsg attributes that indicate the
cause of the unlock failure.
The following example shows a request to unlock the running configuration. This request corresponds
to the CLI command exit when it is used after the configuration mode is entered through the CLI
command configure exclusive.
Sample XML Client Request to Unlock the Running Configuration
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Unlock/>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">