You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I see is this:
{
"interface": {
"Port-Channel1": {
"load-interval": "30",
"switchport": {
"trunk": {},
"mode": {}
},
"mlag": "1"
},
"Port-Channel2": {
"load-interval": "30",
"switchport": {
"trunk": {},
"mode": {}
},
"mlag": "2"
},
"Port-Channel3": {
"load-interval": "30",
"switchport": {
"trunk": {},
"mode": {}
},
"mlag": "3"
}
}
}
However I would expect that trunk block should became a key, "native" subkey and "vlan 100" as a value
{
"interface": {
"Port-Channel1": {
"load-interval": "30",
"switchport": {
"trunk": {
"native": "vlan 100"
},
"mode": "trunk"
},
"mlag": "1"
},
Sorry I am exhausted with ideas, maybe tried all what is possible ))
The text was updated successfully, but these errors were encountered:
I am trying to pare Arista EOS config, which is mostly Cisco like, however getting unexpected results:
#!/usr/bin/python3
import sys
import confparser
doc = '''
parent: interface
child:
name: load-interval
parent: switchport
child:
parent: trunk
child:
name: mlag
'''
cfg = '''
interface Port-Channel1
load-interval 30
switchport trunk native vlan 100
switchport trunk allowed vlan 100,200,300-303,400,500
switchport mode trunk
mlag 1
spanning-tree portfast
!
interface Port-Channel2
description et-50/1 Core-1-port-0
load-interval 30
switchport trunk native vlan 100
switchport trunk allowed vlan 100,200,300-303,400,500
switchport mode trunk
mlag 2
spanning-tree portfast
!
interface Port-Channel3
description et-0/0/52-to-Core-2-port-0
load-interval 30
switchport trunk native vlan 100
switchport trunk allowed vlan 100,200,300-303,400,500
switchport mode trunk
mlag 3
spanning-tree portfast
!
'''
print(confparser.Dissector(doc).parse_str(cfg, indent=3))
What I see is this:
{
"interface": {
"Port-Channel1": {
"load-interval": "30",
"switchport": {
"trunk": {},
"mode": {}
},
"mlag": "1"
},
"Port-Channel2": {
"load-interval": "30",
"switchport": {
"trunk": {},
"mode": {}
},
"mlag": "2"
},
"Port-Channel3": {
"load-interval": "30",
"switchport": {
"trunk": {},
"mode": {}
},
"mlag": "3"
}
}
}
However I would expect that trunk block should became a key, "native" subkey and "vlan 100" as a value
{
"interface": {
"Port-Channel1": {
"load-interval": "30",
"switchport": {
"trunk": {
"native": "vlan 100"
},
"mode": "trunk"
},
"mlag": "1"
},
Sorry I am exhausted with ideas, maybe tried all what is possible ))
The text was updated successfully, but these errors were encountered: