Hello,
The parser for "show ip interface brief | include Vlan" is currently broken for IOS-XE. src/genie/libs/parser/iosxe/show_interface.py
This is because it calls super.cli():
class ShowIpInterfaceBriefPipeVlan(ShowIpInterfaceBrief):
cli_command = "show ip interface brief | include Vlan"
def cli(self):
super(ShowIpInterfaceBriefPipeVlan, self).cli()
cli_command just a string in this case, but in the ShowIpInterfaceBrief.cli() function, it's expecting a list
class ShowIpInterfaceBrief(ShowIpInterfaceBriefSchema):
cli_command = ['show ip interface brief {interface}','show ip interface brief']
def cli(self, interface='',output=None):
"""parsing mechanism: cli
Function cli() defines the cli type output parsing mechanism which
typically contains 3 steps: exe
cuting, transforming, returning
"""
parsed_dict = {}
if output is None:
if interface:
cmd = self.cli_command[0].format(interface=interface)
else:
cmd = self.cli_command[1]
out = self.device.execute(cmd)
else:
out = output
So it's taking index 1 of the string, which is just "h"
As a workaround, I think ShowIpInterfaceBriefPipeVlan.cli() needs its own code. I was able to take the code from ShowIpInterfaceBriefPipeIp.cli() and change the dictionary keys to match schema of ShowIpInterfaceBriefSchema (interface_is_ok,status,protocol) and get parsing to work
Hello,
The parser for "show ip interface brief | include Vlan" is currently broken for IOS-XE. src/genie/libs/parser/iosxe/show_interface.py
This is because it calls super.cli():
cli_command just a string in this case, but in the ShowIpInterfaceBrief.cli() function, it's expecting a list
So it's taking index 1 of the string, which is just "h"
As a workaround, I think ShowIpInterfaceBriefPipeVlan.cli() needs its own code. I was able to take the code from ShowIpInterfaceBriefPipeIp.cli() and change the dictionary keys to match schema of ShowIpInterfaceBriefSchema (interface_is_ok,status,protocol) and get parsing to work