beautypg.com

Subtree filtering – Brocade Network OS NETCONF Operations Guide v4.1.1 User Manual

Page 44

background image

12

Network OS NETCONF Operations Guide

53-1003231-02

Retrieving configuration data

2

The following example shows a client message that issues the operation in its most
basic form. It retrieves the entire running configuration.

Such a request, however, typically results in an unwanted or unmanageable amount of output. To
restrict the output to the portion of the configuration you want, Brocade supports two types of
filtering: subtree filtering and xpath filtering.

For complete details about subtree filtering and xpath filtering, refer to the RFC 4741, The
NETCONF Protocol
. The following sections provide some examples.

Subtree filtering

Subtree filtering defines a point in the configuration hierarchy that limits the returned configuration
data. Only data at this point and the subtrees below it are returned. For example, to retrieve the
Fibre Channel configuration for all Fibre Channel interfaces configured on the switch, use the
following filter. This operation returns all configuration data for all Fibre Channel ports on the
managed device.

The purpose of each filter element is as follows:

The element tag contains a type statement that identifies the filter type as a subtree
filter.

The element constrains the output to the interface configuration in the
urn:brocade.com:mgmt:brocade-interface namespace.

The element further constrains the output to the information under the
node. Used in this way, is termed a containment node.

To further restrict the output and retrieve Fibre Channel configuration data for only one specific
Fibre Channel interface, use the following filter. In this example, the element is termed a
content match node; the filter returns the values of all Fibre Channel attributes for the specified
port.