Closed mpenning closed 5 years ago
This has been implemented in version 1.3.31.
The syntax follows:
from ciscoconfparse import CiscoConfParse
import ciscoconfparse
config = """!
interface GigabitEthernet0/1
switchport mode trunk
!""".splitlines()
## Set the max vlan value
ciscoconfparse.models_cisco.MAX_VLAN = 3974
parse = CiscoConfParse(config, factory=True, syntax='ios')
obj = parse.find_objects('^interface')[0]
print obj.trunk_vlans_allowed # This prints <CiscoRange 1-3974>
Not all platforms support vlans to the IEEE max VLAN ID of 4094. Make this maximum vlan configurable.