Specifications
2-39
Cisco CRS-1 Series Carrier Routing System XML API Guide
OL-4596-02
Chapter 2 Cisco CRS-1 Series XML Router Configuration and Management
Additional Cisco CRS-1 Series Router Configuration and Management Options Using XML
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 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 contains both the <Rollback> and <Previous> tags.
If the roll back operation fails, the response can also contain the ErrorCode and ErrorMsg attributes that
indicate the cause of the rollback failure.
Table 2-5 describes the optional attributes that are specified with the <Rollback> operation by the client
application when rolling back a specified number of commits.
Table 2-5 Optional Attributes for Rollback Operation (Number of Commits)
Name Description
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.