2-33
Cisco CRS-1 Series Carrier Routing System XML API Guide
OL-4596-01
Chapter 2 Cisco CRS-1 Series XML Router Configuration and Management
Configuration Operations
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 “Replacing the Current Running
Configuration”.
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.