Loading The Target Configuration; Setting The Target Configuration Explicitly - Cisco CRS-1 - Carrier Routing System Router Api Manual

Carrier routing system xml api guide
Hide thumbs Also See for CRS-1 - Carrier Routing System Router:
Table of Contents

Advertisement

Configuration Operations

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 will contain both the <Load> and <File> tags. If the load
operation 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 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>
</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>
</Load>
</Response>
See also the

Setting the Target Configuration Explicitly

The client application modifies the target configuration as needed using the <Delete> and <Set>
operations. Note that there are not separate "Create" and "Modify" operations, because a <Set>
operation for an item will 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 will contain just the
<Delete/> or <Set/> tag. If the operation fails, the response will include the element or object hierarchy
passed in the request along with one or more ErrorCode and ErrorMsg attributes indicating the cause of
the failure.
A syntax check will be performed whenever the client application writes to the target configuration. A
successful write to the target configuration, however, does not guarantee that the configuration change
will succeed when a subsequent commit of the target configuration is attempted. For example, errors
resulting from failed verifications may be returned from the commit. The error information returned
from the XML API is described in more detail in the section "Error Reporting".
Cisco CRS-1 Series Carrier Routing System XML API Guide
2-32
<File>disk0:/my_bgp.cfg</File>
<File>disk0:/my_bgp.cfg</File>
"Setting the Target Configuration Explicitly" section on page
Chapter 2
Cisco CRS-1 Series XML Router Configuration and Management
32.
OL-4596-01

Advertisement

Table of Contents
loading

This manual is also suitable for:

Crs-1 series

Table of Contents