Skip to content

Add get_vlans method#12

Open
fredronnv wants to merge 1 commit intoixs:masterfrom
fredronnv:dev/get_vlans
Open

Add get_vlans method#12
fredronnv wants to merge 1 commit intoixs:masterfrom
fredronnv:dev/get_vlans

Conversation

@fredronnv
Copy link

Also update support for Napalm >=3

Also update support for Napalm >=3
@fredronnv
Copy link
Author

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

@ixs
Copy link
Owner

ixs commented Jun 24, 2020

Thanks for the PR.

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

@fredronnv
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants