2-37
Cisco CRS-1 Series Carrier Routing System XML API Guide
OL-4596-01
Chapter 2 Cisco CRS-1 Series XML Router Configuration and Management
Configuration Operations
<Commit ErrorCode="0x40819c00" ErrorMsg="'sysdb' detected the '
warning' condition 'One or more sub-operations failed during a best effort
complex operation'">
<Configuration OperationType=”Set”>
<BGP MajorVersion=”1” MinorVersion=”0”>
<AS>
<Naming>
<AS>4</AS>
</Naming>
<Global>
<DefaultMetric ErrorCode="0x409f8c00" ErrorMsg="AS number is wrong -
BGP is already running with AS number 3">10</DefaultMetric>
</Global>
</AS>
</BGP>
</Configuration>
</Commit>
</Response>
Note See also “Loading a Failed Configuration”.
Loading a Failed Configuration
The client application uses the <Load> operation along with the <FailedConfig> tag to populate the
target configuration with the failed configuration from the most recent <Commit> operation. Loading
the failed configuration in this way is equivalent to specifying a “true” value for the KeepFailedConfig
attribute in the <Commit> operation.
If the load is successful, the response will contain both the <Load> and <FailedConfig> tags. If the load
fails, the response will also contain the ErrorCode and ErrorMsg attributes indicating the cause of the
load failure.
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>