For more details, please see ourCookie Policy.


Fibre Channel (SAN)

Reply
Highlighted
Occasional Contributor
Posts: 5
Registered: ‎03-08-2019

Collect Switch port WWNs from more than ~400 switches using REST API + PYTHON

Hello,

 

I have recently learned REST API for BNA and combined it with python to generate the list of Fabric - Switch - Port Index - Port WWN (connected device WWN) from more than 400 switches.

 

I am seeing exterm slowness when I run these loops from script. 

 

Here is my program structure:

 

1. Collect all switches for a Data center with their keys - fcSwitches

2. Using switch key, collect all ports using fcPorts with their port keys

3. Using port keys, collect all reflecting enddevice WWN (reflecting WWNs on that port) using enddeviceports (to include NPIVs)

 

I am using python objects (DICTs) to store each list like switches/ports/wwns etc. and pushing them in file with a formatted table.

 

It takes more than 12-14 hours to collect the data for 400 switches.. it's accurate but horribly slow... 

 

Can anyone suggest a better using REST to collect all switches along with their ports and reflecting WWPNs (including NPIV)? Thank you

 

 

 

Super Contributor
Posts: 286
Registered: ‎04-04-2018

Re: Collect Switch port WWNs from more than ~400 switches using REST API + PYTHON

Hello,

 

did you try to use SNMP GET or WALKS to collect info ?

Please mark this response as "Accept as Solution" if it answers your question.

Marian Bezeg

Join the Broadcom Support Community

Get quick and easy access to valuable resources across the Broadcom Community Network.