|
Table Of Contents
Cisco CRS-1 Series XML and Encapsulated CLI Operations
Cisco CRS-1 Series XML and Encapsulated CLI Operations
The extensible markup language (XML) interface for the Cisco CRS-1 Series Carrier Routing System (Cisco CRS-1 Series) provides support for XML encapsulated command-line interface (CLI) commands and responses.
This chapter provides information on XML CLI command tags.
Note The XML application programming interface (API) code is available for use on any Cisco platform that runs Cisco IOS XR software.
XML CLI Command Tags
A client application can request a CLI command by encoding the text for the command within a pair of <CLI> start and </CLI> end tags, and <Configuration> tags. The router responds with the uninterpreted CLI text result.
Note XML encapsulated CLI commands use the same target configuration as the corresponding XML operations <Get>, <Set>, and <Delete>.
When used for CLI operations, the <Configuration> tag supports the optional Operation attribute, which can take one of the values listed in Table 6-1.
The following example uses the <CLI> operation tag:
Sample XML Client Request for CLI Command Using CLI Tags
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<CLI>
<Configuration>
router bgp 3
default-metric 10
timers bgp 80 160
exit
show config
</Configuration>
</CLI>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">
<CLI>
<Configuration>
Building configuration...
router bgp 3
default-metric 10
timers bgp 80 160
end
</Configuration>
</CLI>
</Response>
CLI Command Limitations
The initial CLI command support through XML is limited to CLI configuration and subsequent responses wrapped in <CLI> tags.
The following conditions are not supported:
•<Operational> namespace commands.
•<Action> namespace commands.
•Sending a request in <CLI> format and getting back an XML encoded response.
•Sending an XML encoded request and getting back a response in <CLI> format.
•"Long running" commands, for example, "ping" and "top."
•Iterators in responses to CLI commands such as the show run and show configuration commands.
•Multiple simultaneous CLI requests; that is, only one XML request can be issued at a time across all client sessions on the router.
Posted: Sun Nov 7 12:51:39 PST 2004
All contents are Copyright © 1992--2004 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.