Specifications

2-29
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
</Get>
</Response>
Loading the Target Configuration
The client application uses the <Load> operation along with the <File> tag to populate the target
configuration with the contents of a binary configuration file previously saved on the router using the
<Save> operation.
Use the <File> tag to name the file from which the configuration is to be loaded. When you use the
<File> tag to name the file from which the configuration is to be loaded, specify the complete path of
the file to be loaded.
If the load operation is successful, the response contains both the <Load> and <File> tags. If the load
operation fails, the response can also contain the ErrorCode and ErrorMsg attributes that indicates the
cause of the load failure.
The following example shows a request to load the target configuration from the contents of the file
my_bgp.cfg:
Sample XML Client Request to Load the Target Configuration from a Named File
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Load>
<File>disk0:/my_bgp.cfg</File>
</Load>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">
<Load>
<File>disk0:/my_bgp.cfg</File>
</Load>
</Response>
See also the Setting the Target Configuration Explicitly section on page 29.
Setting the Target Configuration Explicitly
The client application modifies the target configuration as needed using the <Delete> and <Set>
operations.
Note There are not separate Create and Modify operations, because a <Set> operation for an item can
result in the creation of the item if it does not already exist in the configuration, and a modification of
the item if it does already exist.
The client application can optionally use CLI commands encoded within XML tags to modify the target
configuration.
If the operation to modify the target configuration is successful, the response contains only the <Delete/>
or <Set/> tag. If the operation fails, the response includes the element or object hierarchy passed in the
request along with one or more ErrorCode and ErrorMsg attributes indicating the cause of the failure.