Specifications
2-30
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
A syntax check is 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
can succeed when a subsequent commit of the target configuration is attempted. For example, errors
resulting from failed verifications may be returned from the commit. For information about the error
returned from the XML API, see Chapter 10, “Error Reporting in Cisco CRS-1 Series XML Responses.”
The content and format of <Delete> and <Set> requests are described in additional detail in Chapter 4,
“Cisco CRS-1 Series XML and Native Data Operations.” Encoding CLI commands within XML tags is
described in Chapter 6, “Cisco CRS-1 Series XML and Encapsulated CLI Operations.”
The following example shows how to use a <Set> request to set the default metric and routing timers and
disable neighbor change logging for a particular BGP autonomous system. This request corresponds to
the following CLI commands:
router bgp 3
default-metric 10
timers bgp 60 180
bgp log neighbor changes
exit
Sample XML Client Request to Set Timers and Disable Neighbor Change Logging for a BGP Configuration
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Set>
<Configuration>
<BGP MajorVersion=”1” MinorVersion=”0”>
<AS>
<Naming>
<AS>3</AS>
</Naming>
<Global>
<DefaultMetric>10</DefaultMetric>
<GlobalTimers>
<Keepalive>60</Keepalive>
<Holdtime>180</Holdtime>
</GlobalTimers>
<DisableNbrLogging>true</DisableNbrLogging>
</Global>
</AS>
</BGP>
</Configuration>
</Set>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">
<Set>
<Configuration/>
</Set>
</Response>
To replace a portion of the configuration, the client application should use a <Delete> operation to
remove the unwanted configuration followed by a <Set> operation to add the new configuration. An
explicit “replace” option is not supported.
For more information on replacing the configuration, see the “Replacing the Current Running
Configuration” section on page 2-44.