Brocade Fibre Channel Networking Community

Expand all | Collapse all

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

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

    Posted 03-15-2019 11:04 AM

    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

     

     

     


    #BrocadeFibreChannelNetworkingCommunity


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

    Posted 03-18-2019 12:42 AM

    Hello,

     

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


    #BrocadeFibreChannelNetworkingCommunity