arista_eos_show_interfaces not valid json
Closed this issue · 2 comments
ryanmerolle commented
ISSUE TYPE
- Template Issue with error and raw data
TEMPLATE USING
arista_eos_show_interfaces
SAMPLE COMMAND OUTPUT
ceos1#show interface
Ethernet1 is up, line protocol is up (connected)
Hardware is Ethernet, address is aac1.ab3b.1c7a (bia aac1.ab3b.1c7a)
Description: "Test interface Et1"
Internet address is 10.0.0.1/30
Broadcast address is 255.255.255.255
IPv6 link-local address is fe80::a8c1:abff:fe3b:1c7a/64
No IPv6 global unicast address is assigned
IP MTU 1500 bytes (default), BW 1000000 kbit
Full-duplex, 1Gb/s, auto negotiation: off, uni-link: n/a
Up 21 minutes, 40 seconds
Loopback Mode : None
2 link status changes since last clear
Last clearing of "show interface" counters never
5 minutes input rate 0 bps (0.0% with framing overhead), 0 packets/sec
5 minutes output rate 0 bps (0.0% with framing overhead), 0 packets/sec
5280 packets input, 381190 bytes
Received 1 broadcasts, 273 multicast
0 runts, 0 giants
0 input errors, 0 CRC, 0 alignment, 0 symbol, 0 input discards
0 PAUSE input
0 packets output, 0 bytes
Sent 0 broadcasts, 0 multicast
0 output errors, 0 collisions
0 late collision, 0 deferred, 0 output discards
0 PAUSE output
Ethernet2 is up, line protocol is up (connected)
Hardware is Ethernet, address is aac1.ab31.e593 (bia aac1.ab31.e593)
Description: "Test interface Et1"
Internet address is 192.168.1.1/30
Broadcast address is 255.255.255.255
IPv6 link-local address is fe80::a8c1:abff:fe31:e593/64
No IPv6 global unicast address is assigned
IP MTU 1500 bytes (default), BW 1000000 kbit
Full-duplex, 1Gb/s, auto negotiation: off, uni-link: n/a
Up 21 minutes, 40 seconds
Loopback Mode : None
2 link status changes since last clear
Last clearing of "show interface" counters never
5 minutes input rate 0 bps (0.0% with framing overhead), 0 packets/sec
5 minutes output rate 0 bps (0.0% with framing overhead), 0 packets/sec
5061 packets input, 362112 bytes
Received 1 broadcasts, 61 multicast
0 runts, 0 giants
0 input errors, 0 CRC, 0 alignment, 0 symbol, 0 input discards
0 PAUSE input
0 packets output, 0 bytes
Sent 0 broadcasts, 0 multicast
0 output errors, 0 collisions
0 late collision, 0 deferred, 0 output discards
0 PAUSE output
Ethernet3 is up, line protocol is up (connected)
Hardware is Ethernet, address is aac1.ab23.bb13 (bia aac1.ab23.bb13)
Ethernet MTU 9214 bytes, BW 1000000 kbit
Full-duplex, 1Gb/s, auto negotiation: off, uni-link: n/a
Up 21 minutes, 40 seconds
Loopback Mode : None
2 link status changes since last clear
Last clearing of "show interface" counters never
5 minutes input rate 0 bps (0.0% with framing overhead), 0 packets/sec
5 minutes output rate 0 bps (0.0% with framing overhead), 0 packets/sec
900 packets input, 106797 bytes
Received 0 broadcasts, 900 multicast
0 runts, 0 giants
0 input errors, 0 CRC, 0 alignment, 0 symbol, 0 input discards
0 PAUSE input
187 packets output, 16634 bytes
Sent 0 broadcasts, 187 multicast
0 output errors, 0 collisions
0 late collision, 0 deferred, 0 output discards
0 PAUSE output
Ethernet4 is up, line protocol is up (connected)
Hardware is Ethernet, address is aac1.abb1.4f2c (bia aac1.abb1.4f2c)
Ethernet MTU 9214 bytes, BW 1000000 kbit
Full-duplex, 1Gb/s, auto negotiation: off, uni-link: n/a
Up 21 minutes, 40 seconds
Loopback Mode : None
2 link status changes since last clear
Last clearing of "show interface" counters never
5 minutes input rate 0 bps (0.0% with framing overhead), 0 packets/sec
5 minutes output rate 0 bps (0.0% with framing overhead), 0 packets/sec
705 packets input, 90157 bytes
Received 0 broadcasts, 705 multicast
0 runts, 0 giants
0 input errors, 0 CRC, 0 alignment, 0 symbol, 0 input discards
0 PAUSE input
0 packets output, 0 bytes
Sent 0 broadcasts, 0 multicast
0 output errors, 0 collisions
0 late collision, 0 deferred, 0 output discards
0 PAUSE output
Loopback0 is up, line protocol is up (connected)
Hardware is Loopback
Internet address is 1.1.1.1/32
Broadcast address is 255.255.255.255
IP MTU 65535 bytes (default)
Up 21 minutes, 51 seconds
Management0 is up, line protocol is up (connected)
Hardware is Ethernet, address is 001c.7338.71c6 (bia 001c.7338.71c6)
Internet address is 172.20.20.2/24
Broadcast address is 255.255.255.255
IP MTU 1500 bytes (default), BW 1000000 kbit
Full-duplex, 1Gb/s, auto negotiation: on, uni-link: n/a
Up 21 minutes, 53 seconds
Loopback Mode : None
3 link status changes since last clear
Last clearing of "show interface" counters never
5 minutes input rate 426 bps (0.0% with framing overhead), 0 packets/sec
5 minutes output rate 424 bps (0.0% with framing overhead), 0 packets/sec
884 packets input, 108713 bytes
Received 0 broadcasts, 0 multicast
0 runts, 0 giants
0 input errors, 0 CRC, 0 alignment, 0 symbol, 47 input discards
0 PAUSE input
878 packets output, 127164 bytes
Sent 0 broadcasts, 0 multicast
0 output errors, 0 collisions
0 late collision, 0 deferred, 0 output discards
0 PAUSE output
Vlan100 is up, line protocol is up (connected)
Hardware is Vlan, address is 001c.7338.71c7 (bia 001c.7338.71c7)
Description: VLAN100
Internet address is 10.100.0.1/24
Broadcast address is 255.255.255.255
IPv6 link-local address is fe80::21c:73ff:fe38:71c7/64
No IPv6 global unicast address is assigned
IP MTU 1500 bytes (default)
Up 21 minutes, 56 seconds
Vlan500 is up, line protocol is up (connected)
Hardware is Vlan, address is 001c.7338.71c7 (bia 001c.7338.71c7)
Description: VLAN500
Internet address is 192.168.5.1/24
Broadcast address is 255.255.255.255
IPv6 link-local address is fe80::21c:73ff:fe38:71c7/64
IPv6 global unicast address(es):
2001:192:168:5::1, subnet is 2001:192:168:5::/64
IP MTU 1500 bytes (default)
Up 21 minutes, 56 seconds
SUMMARY
- interface_up_time is provide a few strings that should either be a list of strings or a single string.
- description is adding too many quotes
I am running this test on ceos 4.29.3M
STEPS TO REPRODUCE
see sample command output
EXPECTED RESULTS
{
"show interface": [
{
"address": "aac1.ab3b.1c7a",
"bandwidth": "1000000 kbit",
"bia": "aac1.ab3b.1c7a",
"description": "Test interface Et1",
"hardware_type": "Ethernet",
"interface": "Ethernet1",
"interface_up_time": "9 minutes, 18 seconds",
"ip_address": "10.0.0.1/30",
"link_status": "up",
"link_status_change": "2",
"mtu": "1500",
"protocol_status": "up (connected)"
},
{
"address": "aac1.ab31.e593",
"bandwidth": "1000000 kbit",
"bia": "aac1.ab31.e593",
"description": "Test interface Et1",
"hardware_type": "Ethernet",
"interface": "Ethernet2",
"interface_up_time": "9 minutes, 18 seconds",
"ip_address": "192.168.1.1/30",
"link_status": "up",
"link_status_change": "2",
"mtu": "1500",
"protocol_status": "up (connected)"
},
{
"address": "aac1.ab23.bb13",
"bandwidth": "1000000 kbit",
"bia": "aac1.ab23.bb13",
"description": "",
"hardware_type": "Ethernet",
"interface": "Ethernet3",
"interface_up_time": "9 minutes, 18 seconds",
"ip_address": "",
"link_status": "up",
"link_status_change": "2",
"mtu": "9214",
"protocol_status": "up (connected)"
},
{
"address": "aac1.abb1.4f2c",
"bandwidth": "1000000 kbit",
"bia": "aac1.abb1.4f2c",
"description": "",
"hardware_type": "Ethernet",
"interface": "Ethernet4",
"interface_up_time": "9 minutes, 18 seconds",
"ip_address": "",
"link_status": "up",
"link_status_change": "2",
"mtu": "9214",
"protocol_status": "up (connected)"
},
{
"address": "",
"bandwidth": "",
"bia": "",
"description": "",
"hardware_type": "Loopback",
"interface": "Loopback0",
"interface_up_time": "9 minutes, 29 seconds",
"ip_address": "1.1.1.1/32",
"link_status": "up",
"link_status_change": "",
"mtu": "65535",
"protocol_status": "up (connected)"
},
{
"address": "001c.7338.71c6",
"bandwidth": "1000000 kbit",
"bia": "001c.7338.71c6",
"description": "",
"hardware_type": "Ethernet",
"interface": "Management0",
"interface_up_time": "9 minutes, 31 seconds",
"ip_address": "172.20.20.2/24",
"link_status": "up",
"link_status_change": "3",
"mtu": "1500",
"protocol_status": "up (connected)"
},
{
"address": "001c.7338.71c7",
"bandwidth": "",
"bia": "001c.7338.71c7",
"description": "VLAN100",
"hardware_type": "Vlan",
"interface": "Vlan100",
"interface_up_time": "9 minutes, 34 seconds",
"ip_address": "10.100.0.1/24",
"link_status": "up",
"link_status_change": "",
"mtu": "1500",
"protocol_status": "up (connected)"
}
]
}
ACTUAL RESULTS
{'show interface': [{'address': 'aac1.ab3b.1c7a',
'bandwidth': '1000000 kbit',
'bia': 'aac1.ab3b.1c7a',
'description': '"Test interface Et1"',
'hardware_type': 'Ethernet',
'interface': 'Ethernet1',
'interface_up_time': '9 minutes, 18 '
'seconds',
'ip_address': '10.0.0.1/30',
'link_status': 'up',
'link_status_change': '2',
'mtu': '1500',
'protocol_status': 'up (connected)'},
{'address': 'aac1.ab31.e593',
'bandwidth': '1000000 kbit',
'bia': 'aac1.ab31.e593',
'description': '"Test interface Et1"',
'hardware_type': 'Ethernet',
'interface': 'Ethernet2',
'interface_up_time': '9 minutes, 18 '
'seconds',
'ip_address': '192.168.1.1/30',
'link_status': 'up',
'link_status_change': '2',
'mtu': '1500',
'protocol_status': 'up (connected)'},
{'address': 'aac1.ab23.bb13',
'bandwidth': '1000000 kbit',
'bia': 'aac1.ab23.bb13',
'description': '',
'hardware_type': 'Ethernet',
'interface': 'Ethernet3',
'interface_up_time': '9 minutes, 18 '
'seconds',
'ip_address': '',
'link_status': 'up',
'link_status_change': '2',
'mtu': '9214',
'protocol_status': 'up (connected)'},
{'address': 'aac1.abb1.4f2c',
'bandwidth': '1000000 kbit',
'bia': 'aac1.abb1.4f2c',
'description': '',
'hardware_type': 'Ethernet',
'interface': 'Ethernet4',
'interface_up_time': '9 minutes, 18 '
'seconds',
'ip_address': '',
'link_status': 'up',
'link_status_change': '2',
'mtu': '9214',
'protocol_status': 'up (connected)'},
{'address': '',
'bandwidth': '',
'bia': '',
'description': '',
'hardware_type': 'Loopback',
'interface': 'Loopback0',
'interface_up_time': '9 minutes, 29 '
'seconds',
'ip_address': '1.1.1.1/32',
'link_status': 'up',
'link_status_change': '',
'mtu': '65535',
'protocol_status': 'up (connected)'},
{'address': '001c.7338.71c6',
'bandwidth': '1000000 kbit',
'bia': '001c.7338.71c6',
'description': '',
'hardware_type': 'Ethernet',
'interface': 'Management0',
'interface_up_time': '9 minutes, 31 '
'seconds',
'ip_address': '172.20.20.2/24',
'link_status': 'up',
'link_status_change': '3',
'mtu': '1500',
'protocol_status': 'up (connected)'},
{'address': '001c.7338.71c7',
'bandwidth': '',
'bia': '001c.7338.71c7',
'description': 'VLAN100',
'hardware_type': 'Vlan',
'interface': 'Vlan100',
'interface_up_time': '9 minutes, 34 '
'seconds',
'ip_address': '10.100.0.1/24',
'link_status': 'up',
'link_status_change': '',
'mtu': '1500',
'protocol_status': 'up (connected)'}]}
jvanderaa commented
The Description I think we have covered on a PR that was just recently merged. Will put out a release on that. I'm not seeing anything obvious of why the template is splitting seconds onto its own line.
jvanderaa commented
@ryanmerolle this should be all set from a PR merged that addressed this. The GH auto-tag didn't function on that PR close. (#1377). A new release is coming out as soon as I can get the approvals.