Closed neill-k closed 4 years ago
It appears that this isn't (yet) supported by the OpenConfig YANG model for VLANs.
On which version of IOS is this, and on what hardware platform? Thanks.
The switch is old. The IOS release is from 2016. I can strip the line before passing the config to the parser; it's not something I (or probably anyone) need modeled.
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 26 WS-C2960-24TC-L 15.0(2)SE10a C2960-LANBASEK9-M
That wold be the quickest win for you to strip the line before passing in the config...
There is support for this in the Cisco-managed YANG models for IOS 16.x, but we don't have support for that in Rosetta yet. Still much work to be done on the grand scheme.
For example: https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/16101/Cisco-IOS-XE-vlan.yang
I ran into that same issue on Cisco IOS:
Cisco IOS XE Software, Version 16.08.01
That is a very common config in Cisco switch land:
vlan internal allocation policy ascending
I will try stripping that config out with a preprocessor
This simply needs to be fixed in the parser. There are a few different commands starting with vlan
that don't end in an integer.
cat9k(config)#vlan ?
WORD ISL VLAN IDs 1-4094
access-map Create vlan access-map or enter vlan access-map command mode
accounting VLAN accounting configuration
configuration vlan feature configuration mode
dot1q dot1q parameters
filter Apply a VLAN Map
group Create a vlan group
I put in PR (#35) for this and would welcome any feedback.
When the command
vlan internal allocation policy ascending
is present, parser fails withinvalid literal for int() with base 10: 'internal'
Need to ignore that command, as the parser is trying to parse "internal" as a vlan id.
Stack trace follows:
VLAN portion of config where it fails: