16-slot line card chassis enhanced router (54 pages)
Summary of Contents for Cisco CRS-1 - Carrier Routing System Router
Page 1
Cisco CRS-1 Series Carrier Routing System XML API Guide Cisco IOS XR Software Release 2.0 Corporate Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 526-4100 Text Part Number: OL-4596-01...
C H A P T E R Introduction Definition of Terms Cisco CRS-1 Series Management XML Interface Cisco CRS-1 Series XML API and Cisco CRS-1 Series Router System Features Cisco CRS-1 Series XML API Tags Basic XML Request Content Top-Level Structure...
Page 4
Commit Operation Commit Errors Loading a Failed Configuration Unlocking the Running Configuration Additional Cisco CRS-1 Series Router Configuration and Management Options Using XML Getting Commit Changes Clearing a Target Session Rolling Back Configuration Changes to a Specified Commit Identifier Rolling Back Configuration Changes to a Specified Number of Commits...
Page 5
Get Request: Example Get Request of Nonexistent Data: Example Delete Request: Example Cisco CRS-1 Series XML and Native Data Access Techniques C H A P T E R Available Set of Native Data Access Techniques XML Request for All Configuration Data...
Page 6
CORBA-Based Event Notifications Cisco CRS-1 Series Infrastructure Notifications Registration Notification Response Summary of Cisco CRS-1 Series XML API Configuration Tags C H A P T E R Cisco CRS-1 Series XML Schemas C H A P T E R XML Schema Retrieval...
Page 7
Contents Schema File Upgrades Sample BGP Configuration A P P E N D I X L O S S A R Y N D E X Cisco CRS-1 Series Carrier Routing System XML API Guide OL-4596-01...
Page 8
Contents Cisco CRS-1 Series Carrier Routing System XML API Guide viii OL-4596-01...
The XML schemas referenced in this guide are used by the management application developer to integrate client applications with the Cisco CRS-1 Series programmable interface. The Cisco CRS-1 Series XML API is also available for use on any Cisco platform running Cisco IOS XR software.
Preface Document Conventions Chapter 4, “Cisco CRS-1 Series XML and Native Data Operations” • Chapter 5, “Cisco CRS-1 Series XML and Native Data Access Techniques” • Chapter 6, “Cisco CRS-1 Series XML and Encapsulated CLI Operations” • Chapter 7, “Cisco CRS-1 Series XML and Large Data Retrieval (Iterators)”...
Cisco IOS XR software configuration guides and command references • Obtaining Documentation Cisco documentation and additional literature are available on Cisco.com. Cisco also provides several ways to obtain technical assistance and other technical resources. These sections explain how to obtain technical information from Cisco Systems.
URL: http://www.cisco.com/techsupport/servicerequest For S1 or S2 service requests or if you do not have Internet access, contact the Cisco TAC by telephone. (S1 or S2 service requests are those in which your production network is down or severely degraded.) Cisco TAC engineers are assigned immediately to S1 and S2 service requests to help keep your business operations running smoothly.
Definitions of Service Request Severity To ensure that all service requests are reported in a standard format, Cisco has established severity definitions. Severity 1 (S1)—Your network is “down,” or there is a critical impact to your business operations. You and Cisco will commit all necessary resources around the clock to resolve the situation.
Page 14
Preface Obtaining Additional Publications and Information iQ Magazine is the quarterly publication from Cisco Systems designed to help growing companies • learn how they can use technology to increase revenue, streamline their business, and expand services. The publication identifies the challenges facing these companies and the technologies to help solve them, using real-world case studies and business strategies to help readers make sound technology investment decisions.
Client applications can be used to configure the router, or to request status information from the router, by encoding a request in Cisco CRS-1 Series XML API tags and sending it to the router. The Cisco CRS-1 Series router processes the request and sends the response to the client by again encoding the response in Cisco CRS-1 Series XML API tags.
Chapter 1 Cisco CRS-1 Series XML API Overview Cisco CRS-1 Series Management XML Interface The XML API code is available for use on any Cisco platform that runs Cisco IOS XR software. Note Definition of Terms Table 1-1 defines the words, acronyms, and actions used throughout this guide.
The remote operation interface is implemented on the router by the CORBA specific XML agent. Future releases of the Cisco CRS-1 Series XML API will support other transport mechanisms, which may include terminal based protocols such as Telnet and Secure Shell (SSH).
Cisco CRS-1 Series router for the purpose of router configuration and monitoring. Top-Level Structure The top level of every request sent by a client application to the Cisco CRS-1 Series router must begin with an XML declaration tag followed by a request tag and one or more operation type tags. Similarly, every response returned by the Cisco CRS-1 Series router must begin with an XML declaration tag followed by a response tag and one or more operation type tags.
All examples in this document are formatted with new lines and white space to aid readability. Actual Note XML request and response streams exchanged with the Cisco CRS-1 Series router do not include new lines and white space characters because theseelements would add significantly to the size of the XML data and impact the overall performance of the Cisco CRS-1 Series XML API.
“XML Transport and Event Notifications.” Minimum Response Content If a <Get> request has nothing to return for a particular operation, the Cisco CRS-1 Series router will return the original request and an appropriate empty operation type tag. The minimum response returned by the Cisco CRS-1 Series router in the case of a single operation (for example, <Get>, <Set>, <Delete>)
Following the <Request> tag, the client application must specify the operation types to be carried out by the Cisco CRS-1 Series router. There are three general types of operations supported along with the <GetNext> operation for large responses. Each of these operation types is described in the following sections.
Cisco CRS-1 Series XML API Overview Cisco CRS-1 Series XML API Tags Configuration Services Operation Tags Configuration services operations provide more advanced configuration management functions through the Cisco CRS-1 Series Configuration Manager. The configuration services tags are provided in Table 1-3. Table 1-3...
Retrieval (Iterators).” XML Request Batching The Cisco CRS-1 Series XML interface supports the combining of several requests or operations into a single request. When multiple operations are specified in a single request, the response will contain the same operation tags and in the same order as they appeared in the request.
Page 24
</Configuration> </Set> <Commit/> <Get> <Operational> Get operation content goes here </Operational> </Get> <Unlock/> </Request> Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0"> <Lock/> <Get> <Configuration> Get response content returned here </Configuration> </Get> <Set/>...
Cisco CRS-1 Series Carrier Routing System (Cisco CRS-1 Series) router. Note The XML API code is available for use on any Cisco platform that runs Cisco IOS XR software. The use of XML to configure the Cisco CRS-1 Series router is essentially an abstraction of a configuration editor where client applications can, load, browse, and modify configuration data without affecting the current running (that is, active) configuration on the router.
The semantics of the target configuration is checked only when the target configuration is promoted to the running configuration. Configuration Operations Use the following configuration options from the client application to configure or modify the Cisco CRS-1 Series router with XML: Only the tasks in the “Modifying the Target Configuration”...
If a client session is terminated, any outstanding locks will be automatically released. • The Cisco CRS-1 Series XML API does not currently support timeouts for locks. • The <GetConfigurationSessions> operation can be used to identify the user session currently •...
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 a <Get> request to browse the current Border Gateway Protocol (BGP) configuration.
</Naming> <BGPEntity> <NeighborTable> <Neighbor> <Naming> <IPAddress> <IPV4Address>10.0.101.8</IPV4Address> </IPAddress> </Naming> </Neighbor> </NeighborTable> </BGPEntity> </AS> </BGP> </Configuration> </Delete> </Request> Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> Cisco CRS-1 Series Carrier Routing System XML API Guide 2-29 OL-4596-01...
Page 30
Sample XML Client Request to Browse Uncommitted Target Configuration Changes <?xml version="1.0" encoding="UTF-8"?> <Request MajorVersion="1" MinorVersion="0"> <Get> <Configuration Source=”ChangedConfig”> <BGP MajorVersion=”1” MinorVersion=”0”/> </Configuration> </Get> </Request> Sample Secondary XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0"> <Get> <Configuration OperationType=”Set”> <BGP MajorVersion=”1” MinorVersion=”0”> <AS> <Naming>...
Encoding CLI commands within XML tags is described Chapter 6, “Cisco CRS-1 Series XML and Encapsulated CLI Operations.” The following example shows a simple <Set> request to set the default metric and routing timers for a particular BGP autonomous system: Sample XML Client Request to Set Timer Settings in the Target Configuration <?xml version="1.0"...
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> <File>disk0:/my_bgp.cfg</File> </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> <File>disk0:/my_bgp.cfg</File> </Load> </Response>...
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. Cisco CRS-1 Series Carrier Routing System XML API Guide...
Sample XML Client Request to Save the Target Configuration to a File <?xml version="1.0" encoding="UTF-8"?> <Request MajorVersion="1" MinorVersion="0"> <Save> <File Overwrite=”true”>disk0:/my_bgp.cfg</File> </Save> </Request> Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0"> <Save> <File Overwrite=”true”> disk0:/my_bgp.cfg </Save>...
Page 35
<Rollback> operation. The Label attribute is a unique user-specified label that is associated with the commit in the Cisco CRS-1 Series commit database. If specified, the label must begin with an alphabetic character and cannot match any existing label in the Cisco CRS-1 Series commit database.
Sample Request to Commit the Target Configuration <?xml version="1.0" encoding="UTF-8"?> <Request MajorVersion="1" MinorVersion="0"> <Commit/> </Request> Sample XML Response from the Cisco CRS-1 Series Router Showing Failures for Both Requested Operations <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0"> Cisco CRS-1 Series Carrier Routing System XML API Guide 2-36...
As a result, an event notification is written to the Cisco CRS-1 Series Alarm Channel (that is, the CORBA event notification channel for alarms) and subsequently forwarded to any registered configuration agents. The event notification contains the following information: userid—The name of the user who performed the commit operation.
Page 39
Upon receiving the configuration change notification, a client application can then use the <Get> operation to load and browse the changed configuration. For more information on CORBA-based event notifications and alarms supported by the Cisco CRS-1 Series XML API, see the section “XML Transport.”...
• Label—A unique user-specified label to be associated with the roll back in the Cisco CRS-1 Series router commit database. If specified, the label must begin with an alphabetic character and cannot match any existing label in the Cisco CRS-1 Series router commit database.
• Label—A unique user-specified label to be associated with the roll back in the Cisco CRS-1 Series router commit database. If specified, the label must begin with an alphabetic character and cannot match any existing label in the Cisco CRS-1 Series router commit database.
Chapter 2 Cisco CRS-1 Series XML Router Configuration and Management Additional Cisco CRS-1 Series Router Configuration and Management Options Using XML <Previous>3</Previous> </Rollback> </Request> Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0"> <Rollback>...
RollbackOnly—Use the RollbackOnly Boolean attribute to specify whether the response should contain only those commits that can be rolled back. In addition to the commit history file, the Cisco CRS-1 Series router maintains a commit database of up to 20 records corresponding to the last 20 commits that can be rolled back.
Getting Configuration Session Information The client application uses the <GetConfigurationSessions> operation to get the list of all users currently configuring the Cisco CRS-1 Series router. In the case where the configuration is locked, the list will identify the user holding the lock.
The following example shows a request to get the list of users currently configuring the router. This request corresponds to the CLI command show configuration sessions. Sample XML Request to Get List of Users Currently Configuring the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?>...
Page 46
Chapter 2 Cisco CRS-1 Series XML Router Configuration and Management Additional Cisco CRS-1 Series Router Configuration and Management Options Using XML Load the desired off-the-box configuration into the target configuration using one or more <Set> operations (assuming that the entire desired configuration is available in XML format, perhaps from a previous <Get>...
XML format instead of being just uninterpreted text enclosed within <CLI> tags. Note The XML API code is available for use on any Cisco platform that runs Cisco IOS XR software. This chapter contains the following sections: “Operational Get Requests”...
Boolean object to “true”. The content and format of <Set> requests are described in additional detail Chapter 4, “Cisco CRS-1 Series XML and Native Data Operations.” The following example shows an action request to clear the BGP performance statistics information.
As a result, a fault management event notification is written to the Cisco CRS-1 Series Alarm Channel (that is, the Common Object Request Broker Architecture [CORBA] event notification channel for alarms) and subsequently forwarded to any registered configuration agents.
Page 50
Chapter 3 Cisco CRS-1 Series XML Operational Requests and Fault Management Action Requests Upon receiving the configuration change notification, a client application can then use the <Load> and <Get> operations to load and browse the changed configuration. Cisco CRS-1 Series Carrier Routing System XML API Guide...
This chapter describes the content of the native data operations and provides an example of each operation type. The XML API code is available for use on any Cisco platform that runs Cisco IOS XR software. Note Native Data Operation Content The content of native data operations includes the request type and relevant object class hierarchy as described in the following sections.
Object Class Hierarchy A hierarchy of elements is included to specify the items to get, set, or delete, and so on, after the request type tag is specified. The precise hierarchy is defined by the Cisco CRS-1 Series XML component schemas.
For example, BGP has a table of multiple neighbors, each of which has a unique IP address "key" to identify it. In this case, the table element is Cisco CRS-1 Series Carrier Routing System XML API Guide 4-53...
Page 54
To apply a filter to a table, use another extension to the basic parent-child hierarchy, where a <Filter> element appears under the table element, containing the criteria to filter on. The following example shows table filtering: <Operational> <BGP> <NeighborTable> <Filter> <BGP_AFFilter> Cisco CRS-1 Series Carrier Routing System XML API Guide 4-54 OL-4596-01...
XML infrastructure; for example, if item A is this value, then item B must be one of these values, and so forth. The back-end Cisco CRS-1 Series operating system applications are responsible for preventing inconsistent configuration from being set. In addition, the management agents are responsible for carrying out the appropriate operations on dependent configuration items through the XML interface.
When structuring an XML request, the user should remember the following general rule regarding what to specify in the XML for an operation to take place: As a client XML request is parsed by the Cisco CRS-1 Series router, the specified operation takes place whenever a closing tag is encountered after a series of one or more opening tags (but only when the closing tag is not the </Naming>...
</Neighbor> </NeighborTable> </BGPEntity> </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> Get Request: Example The following example shows a native data request to get the address independent configuration values for a specified BGP neighbor (using the same values set in the previous example).
However, in this example the client application is requesting the configuration for a nonexistent neighbor. Instead of returning an error, the Cisco CRS-1 Series router returns the requested object class hierarchy, but without any data.
</IPAddress> </Naming> </Neighbor> </NeighborTable> </BGPEntity> </AS> </BGP> </Configuration> </Delete> </Request> Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0"> <Delete> <Configuration/> </Delete> </Response> Cisco CRS-1 Series Carrier Routing System XML API Guide 4-61 OL-4596-01...
Page 62
Chapter 4 Cisco CRS-1 Series XML and Native Data Operations Native Data Operation Content Cisco CRS-1 Series Carrier Routing System XML API Guide 4-62 OL-4596-01...
(XML) schema object class hierarchy. The XML API code is available for use on any Cisco platform that runs Cisco IOS XR software. Note Available Set of Native Data Access Techniques The available native data access techniques are as follows: Request all data in the configuration hierarchy.
For example, the BGP neighbor address table contains a list of neighbor addresses, each of which is identified by its IP address. All table entries in the Cisco CRS-1 Series Carrier Routing System (Cisco CRS-1 Series) XML API are identified by the unique value of their <Naming>...
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques <Get> <Configuration> <BGP MajorVersion=”1” MinorVersion=”0”/> </Configuration> </Get> </Request> Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0">...
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0"> <Get> <Configuration> <BGP MajorVersion="1" MinorVersion="0"> <AS> <Naming>...
Page 67
</AS> </BGP> </Configuration> </Get> </Response> Find or list requests followed by another <Get> request are not supported for the first release of the Cisco Note CRS-1 Series router XML API. Cisco CRS-1 Series Carrier Routing System XML API Guide 5-67...
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques XML Request with Combined Object Class Hierarchies Multiple object class hierarchies can be specified in a request. For example, a portion of the hierarchy can be repeated, and multiple instances of a child object class can be included under a parent.
Page 69
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques <Naming> <IPAddress> <!-- Gets all configuration data for this neighbor --> <IPV4Address>10.0.101.7</IPV4Address> </IPAddress> </Naming> </Neighbor> </NeighborTable> </BGPEntity> </AS> </BGP> </Configuration> </Get> </Request>...
XML Request Using Wildcarding (Match Attribute) Use the Match attribute for “wildcarding” of object class naming information. Note that only all-wildcarded node IDs are supported for the first customer shipping of the Cisco CRS-1 Series XML API. Match=”*” can be used on any Naming attribute within a <Get> or <Delete> operation to effectively specify a “wildcarded”...
Page 71
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques <Request MajorVersion="1" MinorVersion="0"> <Get> <Configuration> <BGP MajorVersion="1" MinorVersion="0"> <AS> <Naming> <AS>3</AS> </Naming> <BGPEntity> <NeighborTable> <Neighbor> <Naming> <IPAddress Match=”*”/> </Naming> <RemoteAS/> </Neighbor> </NeighborTable>...
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques data for more neighbors returned here </NeighborTable> </BGPEntity> </AS> </BGP> </Configuration> </Get> </Response> XML Request for Specific Object Instances (Repeated Naming Information) Wildcarding allows the client application to effectively specify all instances of a particular object.
Page 73
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques </NeighborTable> </BGPEntity> </AS> </BGP> </Configuration> </Get> </Request> Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0">...
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques </BGPEntity> </AS> </BGP> </Configuration> </Get> </Response> XML Request Using Operation Scope (Content Attribute) The Content attribute is used on any table element in order to specify the scope of a <Get> operation.
Entries. This restriction does not apply to a table whose children are leaf nodes. As an alternative to the use of the Count attribute, the Cisco CRS-1 Series XML interface supports the retrieval of large XML responses in blocks via iterators. For more information on iterators, see Chapter 7, “Cisco CRS-1 Series XML and Large Data Retrieval (Iterators).”...
Page 76
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques Sample XML Client Request Using the Count Attribute <?xml version="1.0" encoding="UTF-8"?> <Request MajorVersion="1" MinorVersion="0"> <Get> <Configuration> <BGP MajorVersion="1" MinorVersion="0"> <AS> <Naming> <AS>3</AS>...
<BGP MajorVersion=”1” MinorVersion=”0”> <NeighborTable> <Filter> <BGP_ASFilter> <AS>6</AS> </BGP_ASFilter> <Filter> </NeighborTable> </BGP> </Operational> </Get> </Request> Sample Filtered XML Response from the Cisco CRS-1 Series Router <?xml version=”1.0” encoding=”UTF-8”?> <Response MajorVersion="1" MinorVersion="0"> Cisco CRS-1 Series Carrier Routing System XML API Guide 5-77 OL-4596-01...
Page 78
Chapter 5 Cisco CRS-1 Series XML and Native Data Access Techniques Available Set of Native Data Access Techniques <Get> <Operational> <BGP MajorVersion=”1” MinorVersion=”0”> <NeighborTable> <Filter> <BGP_ASFilter> <AS>6</AS> </BGP_ASFilter> </Filter> <Neighbor> data for 1st neighbor returned here </Neighbor> <Neighbor> data for 2nd neighbor returned here returned here </Neighbor>...
This chapter provides information on XML CLI command tags. Note The XML 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>...
CRS-1 Series) supports the retrieval of large XML responses in blocks (that is, in chunks or sections). Note The XML API code is available for use on any Cisco platform that runs Cisco IOS XR software. This chapter provides information on large data retrieval. See the section“Terminating an Iterator”...
Page 82
<Naming> <AS>3</AS> </Naming> <Global/> </AS> </BGP> </Configuration> </Get> </Request> Sample XML Response from the Cisco CRS-1 Series Router Containing the First Block of Retrieved Data <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0" IteratorID=”1”> <Get> <Configuration> <BGP MajorVersion=”1” MinorVersion=”0”> <AS> <Naming> <AS>3</AS>...
Page 83
Third XML Client Request Using) the <GetNext> Iterator to Retrieve the Next Block of BGP Configuration Data <?xml version="1.0" encoding="UTF-8"?> <Request MajorVersion="1" MinorVersion="0"> <GetNext IteratorID=”1”/> </Request> Sample XML Response from the Cisco CRS-1 Series Router Containing Third Block of Retrieved Data <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0" IteratorID=”1”> <Get> <Configuration>...
Chapter 7 Cisco CRS-1 Series XML and Large Data Retrieval (Iterators) Terminating an Iterator <BGP MajorVersion=”1” MinorVersion=”0”> <AS> <Naming> <AS>3</AS> </Naming> <Global> Final block of data returned here </Global> </AS> </BGP> </Configuration> </Get> </Response> Terminating an Iterator A client application may terminate an iterator without retrieving all of the response data by including an Abort attribute with a value of “true”...
Page 85
Chapter 7 Cisco CRS-1 Series XML and Large Data Retrieval (Iterators) Terminating an Iterator 1st block of data returned here </Global> <AS> </BGP> </Configuration> <Get> </Response> Sample XML Request Using the Abort Attribute to Terminate an Iterator <?xml version="1.0" encoding="UTF-8"?>...
Page 86
Chapter 7 Cisco CRS-1 Series XML and Large Data Retrieval (Iterators) Terminating an Iterator Cisco CRS-1 Series Carrier Routing System XML API Guide 7-86 OL-4596-01...
Specific security privileges are required for a client application requesting information from the Cisco CRS-1 Series Carrier Routing System (Cisco CRS-1 Series) router. The XML API code is available for use on any Cisco platform that runs Cisco IOS XR software. Note This chapter contains the following sections: •...
Task Names Each object (that is, data item, table, and so on) exposed through the Cisco CRS-1 Series XML interface and accessible to the client application will have one or more task names associated with it. The task names are published in the XML schema documents as <appinfo>...
Page 90
Instead, that subsection of data will not be included in the <Get> response. Cisco CRS-1 Series Carrier Routing System XML API Guide 8-90...
Cisco CRS-1 Series XML API will have a major and minor version number associated with it. Note The XML API code is available for use on any Cisco platform that runs Cisco IOS XR software. This chapter describes the format of the version information exchanged between the client application and the Cisco CRS-1 Series router, and how the Cisco CRS-1 Series router uses this information at run time to check version compatibility.
Placement of Version Information The following example shows the placement of the MajorVersion and MinorVersion attributes within a client request to retrieve the global BGP configuration data for a specified autonomous system: Cisco CRS-1 Series Carrier Routing System XML API Guide 9-92 OL-4596-01...
Sample XML Client Request with a Version Mismatch <?xml version="1.0" encoding="UTF-8"?> <Request MajorVersion="1" MinorVersion="0"> <Get> <Configuration> <BGP MajorVersion=”1” MinorVersion=”0”> <AS> <Naming> <AS>3</AS> </Naming> <Global/> Cisco CRS-1 Series Carrier Routing System XML API Guide 9-93 OL-4596-01...
The following example shows a request and response with a version mismatch. In this case, the client minor version is ahead of that of the router minor version, resulting in an error response. Sample XML Request with a Minor Version Mismatch Ahead of the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?>...
</Response> Retrieving Version Information The version of the XML schemas running on the Cisco CRS-1 Series router can be retrieved using the <GetVersionInfo> tag followed by the appropriate tags identifying the names of the desired components. In the following example, the <GetVersionInfo> tag is used to retrieve the major and minor version...
Page 96
Chapter 9 Cisco CRS-1 Series XML Schema Versioning Retrieving Version Information <InterfaceConfiguration> <CDP MajorVersion="1" MinorVersion="0"/> <SONET MajorVersion="1" MinorVersion="2"/> <PPP MajorVersion="1" MinorVersion="0"> <IPCP MajorVersion="1" MinorVersion="0"/> </PPP> </InterfaceConfiguration> </Configuration> </GetVersionInfo> </Response> Cisco CRS-1 Series Carrier Routing System XML API Guide 9-96 OL-4596-01...
The error codes and messages returned from the Cisco CRS-1 Series router may originate in the XML agent or in one of the other Cisco CRS-1 Series infrastructure layers; for example, the XML Service Library, XML Parser Library, or Configuration Manager.
In the following example, the client application sends a request to the Cisco CRS-1 Series router that contains mismatched tags, that is, the opening <BGPEntity> tag is not paired with a closing </BGPEntity>...
However, some schema errors may go undetected because, as previously noted, the Cisco CRS-1 Series router does not validate the request against an XML schema. In the following example, the client application has requested a <Set> operation specifying an object <ExternalRoutes>...
Page 100
Chapter 10 Error Reporting in Cisco CRS-1 Series XML Responses Types of Reported Errors </Request> Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Request MajorVersion="1" MinorVersion="0"> <Set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ErrorCode="0x4368a400" ErrorMsg="'XML Service Library' detected the 'warning' condition 'An error was encountered in the XML beneath this operation tag'">...
For more information on errors resulting from a commit of the target configuration, see the section on “Commit Errors”. Error Codes and Messages The error codes and messages returned from the Cisco CRS-1 Series router may originate in any one of several components. Cisco CRS-1 Series Carrier Routing System XML API Guide 10-101...
Page 102
The error codes (cerrnos) returned from these layers are 32-bit integer values. In general, for a given error condition, the error message returned in the XML will be the same as the error message displayed on the command line interface (CLI). Cisco CRS-1 Series Carrier Routing System XML API Guide 10-102 OL-4596-01...
Series), and its Internet Inter-ORB Protocol (IIOP), the protocol used for accessing objects across the Internet. CORBA-based event notifications are also discussed in this chapter. CORBA/IIOP is the transport mechanism provided with the initial release of the Cisco CRS-1 Series Note XML API.
IDL, but are instead encoded in the request itself. To make a Cisco CRS-1 Series XML API request, the client application calls the “invoke()” method sending the “stringified” XML request as the request parameter.
ASCII authentication is used for the username and password. As a result, the username and password supplied in the “login()” method call should be unencrypted ASCII text. Any security for transport should use Secure Socket Layer (SSL). Cisco CRS-1 Series Carrier Routing System XML API Guide 11-105 OL-4596-01...
ID, and so on. The client application can connect to the Naming Service running on the Cisco CRS-1 Series router using a Domain Name Server (DNS) configured router name or via the Naming Service IOR as follows: client -ORBInitRef NameService=iioploc://<router_name>:10001/NameService...
Each client may in turn have up to four open connections. The inactivity timeout for a client connection is 15 minutes. After this timeout the client connection • will be terminated by the CORBA XML agent. Cisco CRS-1 Series Carrier Routing System XML API Guide 11-108 OL-4596-01...
All the errors are returned as XML responses with embedded error codes and messages as defined in Chapter 10, “Error Reporting in Cisco CRS-1 Series XML Responses.” The error codes specific to the XML agent for CORBA are as follows: 0x00000000—Success...
Page 110
Chapter 11 XML Transport and Event Notifications Cisco CRS-1 Series XML Transport and CORBA IDL Cisco CRS-1 Series Carrier Routing System XML API Guide 11-110 OL-4596-01...
(API) tag mapping for the Cisco CRS-1 Series Carrier Routing System (Cisco CRS-1 Series) router target configuration. The XML API code is available for use on any Cisco platform that runs Cisco IOS XR software. Note Table 12-1 CLI Command or Operation to XML Tag Mapping...
Page 112
Chapter 12 Summary of Cisco CRS-1 Series XML API Configuration Tags Table 12-1 CLI Command or Operation to XML Tag Mapping CLI Command or Operation XML Tag show rollback changes last number <Get> with <Configuration Source=“RollbackChanges” PreviousCommits=“number”> show rollback points <GetConfigurationHistory RollbackOnly=“true”>...
XML schema viewing application such as XMLSpy. Common XML Schemas Among the .xsd files that belong to a BASE package are the common Cisco IOS XR XML schemas that include definitions of the high-level XML request and response instances and a number of common datatype definitions.
Schema File Organization For the first release of the Cisco CRS-1 Series system, there is no hard link from the high-level XML request schemas (namespace_types.xsd) and the component schemas. Instead, links appear in the component schemas in the form of include elements that specify the file in which the parent element exists.
Authentication, Authorization, and Accounting. A network security service that provides the primary framework to set up access control on a Cisco CRS-1 Series router or access server. AAA is an architectural framework and modular means of configuring three independent, but closely related security functions in a consistent manner.
Page 120
The Cisco operating system used on Cisco CRS-1 Series routers. IOS XR See Modular Services Card. Line cards are now referred to as MCSs in the Cisco CRS-1 Series router. line card Logical Router. A Cisco CRS-1 Series routing system can be partitioned into several logical routers, each of which is managed independently.
Page 121
Multiprotocol Label Switching traffic engineering. MPLS-TE See Modular Services Card. A card installed and running in an Cisco CRS-1 Series routing system. In the Cisco 12000 series Node Internet Router, nodes are identified by slot number (for example, node 1).
Page 122
XML allows you to define your own customized markup language. A process on the Cisco CRS-1 Series router that is sent XML requests by XML clients and is responsible XML Agent for carrying out the actions contained in the request and returning an XML response back to the client.
<File> <Since> <Filter> <Timestamp> <Get> 21, 27, 29, 47, 51 <Unlock> 22, 38 and AAA privileges <Unlock > and native data operations <UserId> 43, 45 triggering wildcarding Cisco CRS-1 Series Carrier Routing System XML API Guide IN-125 OL-4596-01...
Page 124
XML and null value ClientID attribute encoding (UTF-8), XML client session error attributes 98, 99 commit operation ErrorCode CLI tag ErrorMsg commit 26, 31 Cisco CRS-1 Series Carrier Routing System XML API Guide IN-126 OL-4596-01...
Page 125
18, 21 leaf object Load tag configuration services lock get next Lock tag native data Match attribute privileges, security tags MergedConfig read privileges repeat naming information 63, 72 request Cisco CRS-1 Series Carrier Routing System XML API Guide IN-127 OL-4596-01...
Page 126
27, 45 version, XML target configuration commit and unlocking 26, 38 wildcards 63, 70 write privileges Save tag Set tag Source attribute syslog agent 16, 17 Cisco CRS-1 Series Carrier Routing System XML API Guide IN-128 OL-4596-01...
Page 127
Index client instance operation operation provider parse errors 97, 98 schema definitions for the native data operation type tags errors 97, 99 session syntax check Cisco CRS-1 Series Carrier Routing System XML API Guide IN-129 OL-4596-01...