Cisco-SAN / mdssdk

Python SDK/API library for Cisco MDS Switches
Other
5 stars 15 forks source link

Show active ZoneSet is very long #19

Open Le-Syl21 opened 2 years ago

Le-Syl21 commented 2 years ago

Hi,

Normaly a hand made "show zoneset active vsan x" take like 20sec

When I do it with your api it take like more than a minute sometimes near two minutes for a small 200 zones zoneset

Same problem with SSH or NX-API, old version and new one 1.4.0

Can you investigate ?

srbharadwaj commented 2 years ago

are you sending the cmd like sw.show("show zoneset active vsan x") ? Also how many members does each of the zones have?

Le-Syl21 commented 2 years ago

I use: zoneset_obj = ZoneSet(switch_obj, 'Z', vsan) for zone in zoneset_obj.active_members.values(): for member in zone.members:

And zoneset_obj.active_members.values(): take a while

Le-Syl21 commented 2 years ago

if I understand the templates you are using show zoneset brief activate vsan x then get all zone name and make a lot of show zone name yyyyyy vsan x Maybe a new template capturing "show zoneset activate vsan x" whitout brief can help a lot

Le-Syl21 commented 2 years ago

sw.show("show zoneset active vsan x") is really faster but the output is ugly like: {'TABLE_zoneset': {'ROW_zoneset': {'TABLE_zone': {'ROW_zone': [ So I use: output=switch_obj.show('show zoneset active vsan '+str(vsan)) for zone in output.get('TABLE_zoneset').get('ROW_zoneset').get('TABLE_zone').get('ROW_zone'): for member in zone.get('TABLE_member').get('ROW_member'):

It's not like RESOLVED but it WORKS like a WorkAround :-p

Thx for your help

srbharadwaj commented 2 years ago

the members api also does the same, i will check why its taking so long and see if it can be optimized