Obtaining vlan information for one vlan, Obtaining vlan information for multiple vlans – Brocade Network OS NETCONF Operations Guide v4.1.1 User Manual
Page 328

296
Network OS NETCONF Operations Guide
53-1003231-02
Configuring protocol-based VLAN classifier rules
21
Obtaining VLAN information for one VLAN
To return information about a specific VLAN, issue the <get-vlan-brief> custom RPC from the
urn:brocade.com:mgmt:brocade-interface-ext namespace and specify the VLAN in the <vlan-id>
input parameter.
<rpc message-id="1922" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-vlan-brief xmlns="urn:brocade.com:mgmt:brocade-interface-ext">
<vlan-id>20</vlan-id>
</get-vlan-brief>
</rpc>
rpc-reply message-id="1922" 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>
<vlan-name>vlan-20</vlan-name>
<vlan-state>active</valan-state>
<interface>
<interface-type>tengigabitethernet</interface-type>
<interfce-name>66/0/10</interface-name>
<tag>tagged</tag>
</interface>
</vlan>
<last-vlan-id>20</last-vlan-id>
<has-more>true</has-more>
</rpc>
Obtaining VLAN information for multiple VLANs
To retrieve information for a sequence of VLANs, issue the <get-vlan-brief> RPC multiple times and
specify the last received vlan ID on input.
Before issuing the <get-vlan-brief> RPC, check the output of the previous invocation to determine
whether the <has-more> boolean element is set to “true”. If so, information about additional VLANs
is available; proceed as follows.
1. Issue the <get-vlan-brief> RPC from the urn:brocade.com:mgmt:brocade-interface-ext
namespace
2. Under the <get-vlan-brief> node, include the <last-received-vlan-id> input parameter and set
its value to the VLAN ID returned in the <last-vlan-id> element of the previous invocation of the
<get-vlan-brief> RPC.
3. Check the <has-more> element in the output to determine whether information is available for
additional VLANs.
4. Repeat the procedure until the <has-more> element returns “false”.
<rpc message-id="1923" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-vlan-brief xmlns="urn:brocade.com:mgmt:brocade-interface-ext">
<last-received-vlan-id>20</last-recevied-vlan-id>
</get-vlan-brief>
</rpc>
<rpc-reply message-id="1923" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<vlan xmlns="urn:brocade.com:mgmt:brocade-interface-ext">
<vlanid>30</vlanid>
<vlan-type>static</vlan-type>
<vlan-name>vlan-30</vlan-name>