Specifications
4-54
Cisco CRS-1 Series Carrier Routing System XML API Guide
OL-4596-02
Chapter 4 Cisco CRS-1 Series XML and Native Data Operations
Native Data Operation Content
Hierarchy Tables
One special type of container element is a table. Tables can hold any number of keyed entries, and are
used when there can be multiple instances of an entity. 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
<NeighborTable>, and its child element signifying a particular neighbor is <Neighbor>. To specify the
key, an extension to the basic parent-child hierarchy is used, where a <Naming> element appears under
the child element, containing the key to the table entry.
The following example shows hierarchy tables:
<Configuration>
<BGP>
.
.
.
<BGPEntity>
<NeighborTable>
<Neighbor>
<Naming>
<IPAddress>
<IPV4Address>10.0.101.6</IPV4Address>
</IPAddress>
</Naming>
<RemoteAS>6</RemoteAS>
</Neighbor>
<Neighbor>
<Naming>
<IPAddress>
<IPV4Address>10.0.101.7</IPV4Address>
</IPAddress>
</Naming>
<RemoteAS>7</RemoteAS>
</Neighbor>
</NeighborTable>
</BGPEntity>
.
.
.
</BGP>
<ISIS>
.
.
.
</ISIS>
</Configuration>
Use tables to access a specific data item for an entry (for example, getting the remote autonomous system
number for neighbor 10.0.101.6), or all data for an entry, or even all data for all entries.
Tables also provide the extra feature of allowing the list of entries in the table to be returned. See the
“XML Request Using Operation Scope (Content Attribute)” section on page 5-74 in Chapter 5, “Cisco
CRS-1 Series XML and Native Data Access Techniques.”
Returned entries from tables can be used to show all neighbors configured, for example, without showing
all of their data.
Tables in the operational data model often have a further feature when retrieving their entries. The tables
can be filtered on particular criteria to return just the set of entries that fulfill those criteria. For instance,
the table of BGP neighbors can be filtered on address family or autonomous system number or update
group, or all three. 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.