Specifications

2-31
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
Saving the Target Configuration
The client application uses the <Save> operation along with the <File> tag to save the contents of the
target configuration to a binary file on the Cisco CRS-1 Series router.
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 is returned unless the optional Boolean attribute Overwrite is included on the <File> tag
with a value of true.
Note No mechanism is provided by the XML interface for browsing through the file directory structure.
If the save operation is successful, the response contains both the <Save> and <File> tags. If the save
operation fails, the response can also contain the ErrorCode and ErrorMsg attributes that indicate 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>
<File Overwrite=”true”>disk0:/my_bgp.cfg</File>
</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”>disk0:/my_bgp.cfg</File>
</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.