Cisco CRS-1 - Carrier Routing System Router Api Manual

Carrier routing system xml api guide
Hide thumbs Also See for CRS-1 - Carrier Routing System Router:
Table of Contents

Advertisement

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
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 526-4100
Text Part Number: OL-4596-01

Advertisement

Table of Contents
loading

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...
  • Page 2 OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY. The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB’s public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.
  • Page 3: Table Of Contents

    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...
  • Page 9: Preface

    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.
  • Page 10: Document Conventions

    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)”...
  • Page 11: Related Documents

    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.
  • Page 12: Documentation Feedback

    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.
  • Page 13: Definitions Of Service Request Severity

    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.
  • Page 15: Chapter 1 Cisco Crs-1 Series Xml Api Overview

    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.
  • Page 16: Chapter 1 Cisco Cr-1 Serie Xml Api Overview

    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.
  • Page 17: Cisco Crs-1 Series Xml Api And Cisco Crs-1 Series Router System Features

    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).
  • Page 18: Cisco Crs-1 Series Xml Api Tags

    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.
  • Page 19: Xml Declaration Tag

    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.
  • Page 20: Request And Response Tags

    “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>)
  • Page 21: Operation Type Tags

    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.
  • Page 22: Configuration Services Operation Tags

    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...
  • Page 23: Get Next Operation Tag

    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/>...
  • Page 25: Chapter 2 Cisco Crs-1 Series Xml Router Configuration And Management

    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.
  • Page 26: Configuration Operations

    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”...
  • Page 27: Locking The Running 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 •...
  • Page 28: Getting Configuration Data

    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.
  • Page 29: Browsing The Changed 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>...
  • Page 31: Modifying The Target Configuration

    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"...
  • Page 32: Loading The Target Configuration

    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>...
  • Page 33: Saving The Target 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. Cisco CRS-1 Series Carrier Routing System XML API Guide...
  • Page 34: Committing The Target Configuration

    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.
  • Page 36: Commit Errors

    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...
  • Page 37: Loading A Failed Configuration

    Sample XML Client Request to Load the Failed Configuration from the Last <Commit> Operation <?xml version="1.0" encoding="UTF-8"?> <Request MajorVersion="1" MinorVersion="0"> <Load> <FailedConfig/> </Load> <Get> <Configuration Source=”ChangedConfig”/> </Get> </Request> Sample XML Response from the Cisco CRS-1 Series Router <?xml version="1.0" encoding="UTF-8"?> <Response MajorVersion="1" MinorVersion="0"> <Load> <FailedConfig/> </Load> <Get> <Configuration OperationType=”Set”> <BGP MajorVersion=”1” MinorVersion=”0”> <AS>...
  • Page 38: Unlocking The Running Configuration

    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.”...
  • Page 40: Clearing A Target Session

    • 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.
  • Page 41: Rolling Back Configuration Changes To A Specified Number Of Commits

    • 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.
  • Page 42: Getting Rollback Changes

    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>...
  • Page 43: Getting Configuration History

    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.
  • Page 44: Getting Configuration Session Information

    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.
  • Page 45: Replacing The Current Running Configuration

    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>...
  • Page 47: Chapter 3 Cisco Crs-1 Series Xml Operational Requests And Fault Management

    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”...
  • Page 48: Action 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.
  • Page 49: Cisco Crs-1 Series Xml And Fault Management

    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...
  • Page 51: Chapter 4 Cisco Crs-1 Series Xml And Native Data Operations

    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.
  • Page 52: Request Type Tag And Namespaces

    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.
  • Page 53: Main Hierarchy Structure

    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...
  • Page 55: Dependencies Between Configuration Items

    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.
  • Page 56: Operation Triggering

    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>...
  • Page 57: Native Data Operation Examples

    Sample XML Client Request to <Set> Configuration Values for a BGP Neighbor <?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> <BGPEntity> <NeighborTable> <Neighbor> <Naming> <IPAddress> <IPV4Address>10.0.101.6</IPV4Address> </IPAddress> </Naming> <RemoteAS>6</RemoteAS> <EBGPMultihopMaxHopCount>255</EBGPMultihopMaxHopCount> <NeighborAFTable> <NeighborAF> Cisco CRS-1 Series Carrier Routing System XML API Guide 4-57 OL-4596-01...
  • Page 58: Get Request: Example

    </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).
  • Page 59: Get Request Of Nonexistent Data: 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.
  • Page 60 <Naming> <IPAddress> <IPV4Address>10.0.101.99</IPV4Address> </IPAddress> </Naming> </Neighbor> </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"> <Get> <Configuration> <BGP MajorVersion=”1” MinorVersion=”0”> <AS> <Naming> <AS>3</AS> </Naming> <BGPEntity> <NeighborTable> <Neighbor>...
  • Page 61: Delete Request: Example

    </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...
  • Page 63: Chapter 5 Cisco Crs-1 Series Xml And Native Data Access Techniques

    (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.
  • Page 64: Xml Request For All Configuration Data

    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>...
  • Page 65: Xml Request For All Data Within A Container

    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">...
  • Page 66: Xml Request For Specific Data Items

    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...
  • Page 68: Xml Request With Combined Object Class Hierarchies

    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>...
  • Page 70: Xml Request Using Wildcarding (Match Attribute)

    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>...
  • Page 72: Xml Request For Specific Object Instances (Repeated Naming Information)

    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">...
  • Page 74: Xml Request Using Operation Scope (Content Attribute)

    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.
  • Page 75: Limiting The Number Of Table Entries Returned (Count Attribute)

    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>...
  • Page 77: Custom Filtering (Filter Element)

    <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>...
  • Page 79: Chapter 6 Cisco Crs-1 Series Xml And Encapsulated Cli Operations

    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>...
  • Page 80: Cli Command Limitations

    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 </Configuration>...
  • Page 81: Chapter 7 Cisco Crs-1 Series Xml And Large Data Retrieval (Iterators)

    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>...
  • Page 84: Terminating An Iterator

    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...
  • Page 87: Chapter 8 Cisco Crs-1 Series Xml Security

    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: •...
  • Page 88: Chapter 8 Cisco Cr-1 Serie Xml Security

    Sample XLM Request to Retrieve AAA Configuration Information <?xml version="1.0" encoding="UTF-8"?> <Request MajorVersion="1" MinorVersion="0"> <Get> <Configuration> <AAA 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"> <Get> <Configuration> <AAA MajorVersion=”1” MinorVersion=”0”> AAA configuration returned here </AAA>...
  • Page 89: Task Names

    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...
  • Page 91: Chapter 9 Cisco Crs-1 Series Xml Schema Versioning

    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.
  • Page 92: Run-Time Use Of Version Information

    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...
  • Page 93: Version Lag

    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...
  • Page 94: Version Creep

    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"?>...
  • Page 95: Retrieving Version Information

    </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...
  • Page 97: Chapter 10 Error Reporting In Cisco Crs-1 Series Xml Responses

    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.
  • Page 98: Error Attributes

    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>...
  • Page 99: Xml Schema Errors

    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="&apos;XML Service Library&apos; detected the &apos;warning&apos; condition &apos;An error was encountered in the XML beneath this operation tag&apos;">...
  • Page 101: Operation Processing Errors

    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...
  • Page 103: Chapter 11 Xml Transport And Event Notifications

    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.
  • Page 104: Idl Interface

    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.
  • Page 105: Authentication

    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...
  • Page 106: Corba Nameserver

    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...
  • Page 107: Corba Notification Structure

    Filterable data: filter:SourceID : filter:Category : filter:Severity : Variable header: variable:SourceID : variable:Category : variable:Severity : Payload: <?xml version= "1.0" encoding= "UTF-8"?> <Event Version= "1.0" Module= "AlarmAgent"> <Alarm> <SourceID>String</SourceID> Cisco CRS-1 Series Carrier Routing System XML API Guide 11-107 OL-4596-01...
  • Page 108: Starting The Corba Xml Agent

    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...
  • Page 109: Xml Agent Errors

    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...
  • Page 111: Notification Response

    (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”>...
  • Page 113: Chapter 13 Cisco Crs-1 Series Xml Schemas

    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.
  • Page 114: Chapter 13 Cisco Cr-1 Serie Xml Schema

    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.
  • Page 115: Appendix

    120 125 130 maximum-paths 6 bgp dampening 2 2400 2800 3 bgp scan-time 40 network 10.10.1.0/24 network 10.10.2.0/24 aggregate-address 80.100.0.0/16 summary-only redistribute connected exit neighbor 10.0.101.1 remote-as 1 ebgp-multihop 255 Cisco CRS-1 Series Carrier Routing System XML API Guide A-117 OL-4596-01...
  • Page 116 10.0.101.6 remote-as 6 ebgp-multihop 255 address-family ipv4 unicast prefix-list orf in capability orf prefix-list both exit address-family ipv4 multicast prefix-list orf in exit exit neighbor 10.0.101.7 remote-as 7 Cisco CRS-1 Series Carrier Routing System XML API Guide A-118 OL-4596-01...
  • Page 117: Sample Bgp Configuration

    10.0.101.8 remote-as 8 ebgp-multihop 255 address-family ipv4 multicast exit exit exit Cisco CRS-1 Series Carrier Routing System XML API Guide A-119 OL-4596-01...
  • Page 118 Appendix A Sample BGP Configuration Cisco CRS-1 Series Carrier Routing System XML API Guide A-120 OL-4596-01...
  • Page 119: G L O S S A R Y

    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.
  • Page 123: I N D E X

    <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...

This manual is also suitable for:

Crs-1 series

Table of Contents