Retrieving operational data with pagination – Brocade Network OS NETCONF Operations Guide v4.1.1 User Manual

Page 48

Advertising
background image

16

Network OS NETCONF Operations Guide

53-1003231-02

Retrieving operational data

2

<interface-type>tengigabitethernet</interface-type>

<interface-name>9/0/54</interface-name>

<port-profile>

<name>auto-for_iscsi</name>

</port-profile>

</interface>

</rpc-reply>

Refer to the Network OS YANG Reference Manual for a list of custom RPCs, a brief description of
their function, and their location.

Retrieving operational data with pagination

Some RPCs return operational data that consists of lists of entities. For example, an RPC might
return detailed information about every interface. For these kinds of applications, to make the
output manageable, pagination is supported by providing a <has-more> element in the output of
the RPC.

The following example shows how the <has-more> element works to provide pagination for the
<get-vlan-brief> RPC. In the input, you can request information about a specific VLAN, or about all
VLANs by not providing an input parameter. If you request input about all VLANs, you will first
receive information about the VLAN with the lowest VLAN ID. You can then check the <has-more>
element in the output to determine whether information is available for additional VLANs. If
<has-more> is true, use the value returned in <last-vlan-id> as the <last-rcvd--vlan-id> input
parameter to the next call to <get-vlan-brief>. The <get-vlan-brief> RPC then returns the next
available VLAN. Continue until <has-more> returns false.

+---x get-vlan-brief

+--ro input

|

+--ro (request-type)?

| +--:(get-request)

| | +--ro vlan-id? interface:vlan-type

| +--:(get-next-request)

| +--ro last-rcvd-vlan-id? interface:vlan-type

+--ro output

+--ro vlan [vlan-id]

| +--ro vlan-id interface:vlan-type

| +--ro vlan-type? enumeration

| +--ro vlan-name? string

| +--ro vlan-state? enumeration

| +--ro interface [interface-type interface-name]

| +--ro interface-type enumeration

| +--ro interface-name union

| +--ro tag? enumeration

+--ro last-vlan-id? interface:vlan-type

+--ro has-more? boolean

The following example uses the <get-interface-brief> RPC to return information about the first
VLAN. In this case, the first VLAN is VLAN 20.

<rpc message-id="207" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<get-vlan-brief xmlns="urn:brocade.com:mgmt:brocade-interface-ext">

</get-vlan-brief>

</rpc>

rpc-reply message-id="207" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<vlan xmlns="urn:brocade.com:mgmt:brocade-interface-ext">

<vlanid>20</vlanid>

<vlan-type>static</vlan-type>

Advertising