Specifications
2-25
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
Locking the Running Configuration
The client application uses the <Lock> operation to obtain an exclusive lock on the running
configuration in order to prevent modification by other users or applications.
If the lock operation is successful, the response contains only the <Lock/> tag. If the lock operation fails,
the response also contains ErrorCode and ErrorMsg attributes that indicates the cause of the lock failure.
The following example shows a request to lock the running configuration. This request corresponds to
the command-line interface (CLI) command configure exclusive.
Sample XML Request from the Client Application
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Lock/>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">
<Lock/>
</Response>
The following issues are used to lock the running configuration:
• The scope of the lock is the entire configuration “namespace.”
• Only one client application can hold the lock on the running configuration at a time. If a client
application attempts to lock the configuration while another application holds the lock, an error is
returned.
• If a client application has locked the running configuration, all other client applications can read
only the running configuration, but cannot modify it (that is, they cannot commit changes to it).
• No mechanism is provided to allow a client application to break the lock of another user.
• If a client session is terminated, any outstanding locks are automatically released.
• The Cisco CRS-1 Series XML API does not support timeouts for locks.
• The <GetConfigurationSessions> operation is used to identify the user session holding the lock.
Browsing the Target or Running Configuration
The client application browses the target or current running configuration using the <Get> operation
along with the <Configuration> request type tag. The client application optionally uses CLI commands
encoded within XML tags to browse the configuration.
The <Configuration> tag supports the optional Source attribute, which is used to specify the source of
the configuration information returned from a <Get> operation.