2-41
Cisco CRS-1 Series Carrier Routing System XML API Guide
OL-4596-01
Chapter 2 Cisco CRS-1 Series XML Router Configuration and Management
Additional Cisco CRS-1 Series Router Configuration and Management Options Using XML
• Comment—A user-specified comment to be associated with the roll back in the Cisco CRS-1 Series
router commit database.
The following example shows a request to roll back the configuration changes to a specified commit
identifier. This request corresponds to the CLI command rollback configuration to 1000000072
.
Sample XML Request to Roll Back the Configuration Changes to a Specified Commit Identifier
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Rollback Label=”BGPRollback1” Comment=”My BGP rollback”>
<CommitID>1000000072</CommitID>
</Rollback>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">
<Rollback Label=”BGPRollback1”
Comment=”My BGP rollback”>
<CommitID>1000000072</CommitID>
</Rollback>
</Response>
Note Note that the commit identifier can also be obtained by using the <GetConfigurationHistory> operation
described in the section “Getting Configuration History”.
Rolling Back Configuration Changes to a Specified Number of Commits
The client application uses the <Rollback> operation with the <Previous> tag to roll back the
configuration changes made during the most recent [x] commits, where [x] is a number ranging from 0
to the number of saved commits in the commit database. If the <Previous> value is specified as “0”,
nothing is rolled back. The target configuration must be unlocked at the time the <Rollback> operation
is requested.
If the roll back operation is successful, the response will contain both the <Rollback> and <Previous>
tags. If the roll back operation fails, the response will also contain the ErrorCode and ErrorMsg attributes
indicating the cause of the rollback failure.
The following optional attributes can be specified with the <Rollback> operation by the client
application when rolling back a specified number of commits:
• Label—A unique user-specified label to be associated with the roll back in the Cisco CRS-1 Series
router commit database. If specified, the label must begin with an alphabetic character and cannot
match any existing label in the Cisco CRS-1 Series router commit database.
• Comment—A user-specified comment to be associated with the roll back in the Cisco CRS-1 Series
router commit database.
The following example shows a request to roll back the configuration changes made during the previous
3 three commits. This request corresponds to the CLI command rollback configuration last 3.
Sample XML Request to Roll Back Configuration Changes to a Specified Number of Commits
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Rollback>