napalm-procurve icon indicating copy to clipboard operation
napalm-procurve copied to clipboard

Add get_vlans method

Open fredronnv opened this issue 4 years ago • 3 comments

Also update support for Napalm >=3

fredronnv avatar Jun 24 '20 13:06 fredronnv

This has been tested across a fleet of a few hundred hp/aruba procurve devices, however it's rudimentary and probably requires some edits.

fredronnv avatar Jun 24 '20 13:06 fredronnv

Thanks for the PR.

That's an interesting approach, pulling this from the running configuration. show vlans was no good?

ixs avatar Jun 24 '20 13:06 ixs

Show vlans gives output of the form:

sw1# show vlans 

 Status and Counters - VLAN Information

  Maximum VLANs to support : 256                  
  Primary VLAN : DEFAULT_VLAN       
  Management VLAN :                    

  VLAN ID Name                             | Status     Voice Jumbo
  ------- -------------------------------- + ---------- ----- -----
  1       DEFAULT_VLAN                     | Port-based No    No   
  99      _NOT_IN_USE_                     | Port-based No    No   

Which does not include interface assignments. You could try and loop through a lot of show commands to get it, but it seems very inefficient. The running configuration should 'in theory' capture the real-time state of affairs, unless I'm missing something.

fredronnv avatar Jun 24 '20 15:06 fredronnv