Parsing fails for Port-Channel
See original GitHub issuer = task.run(task=netmiko_send_command, command_string="sh interfaces gi1/0/1", use_genie=True)
results in parsing the interface correcty for all Devices the task was ran against:
* sw1 ** changed : False ******************************************
vvvv get_int ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO
---- netmiko_send_command ** changed : False ----------------------------------- INFO
{ 'GigabitEthernet1/0/1': { 'arp_timeout': '04:00:00',
'arp_type': 'arpa',
'bandwidth': 1000000,
'connected': True,
'counters': { 'in_broadcast_pkts': 710886,
'in_crc_errors': 0,
'in_errors': 0,
'in_frame': 0,
'in_giants': 0,
'in_ignored': 0,
'in_mac_pause_frames': 0,
'in_multicast_pkts': 710886,
'in_no_buffer': 0,
'in_octets': 6106154003,
'in_overrun': 0,
'in_pkts': 27065773,
'in_runts': 0,
'in_throttles': 0,
'in_watchdog': 0,
'in_with_dribble': 0,
'last_clear': 'never',
'out_babble': 0,
'out_buffer_failure': 0,
'out_buffers_swapped': 0,
'out_collision': 0,
'out_deferred': 0,
'out_errors': 0,
'out_interface_resets': 1,
'out_late_collision': 0,
'out_lost_carrier': 0,
'out_mac_pause_frames': 0,
'out_no_carrier': 0,
'out_octets': 46617138213,
'out_pkts': 166995802,
'out_underruns': 0,
'out_unknown_protocl_drops': 0,
'rate': { 'in_rate': 9000,
'in_rate_pkts': 6,
'load_interval': 300,
'out_rate': 46000,
'out_rate_pkts': 14}},
'delay': 10,
'description': 'desc',
'duplex_mode': 'full',
'enabled': True,
'encapsulations': {'encapsulation': 'arpa'},
'flow_control': {'receive': True, 'send': False},
'keepalive': 10,
'last_input': '00:00:04',
'last_output': '00:00:00',
'line_protocol': 'up',
'mac_address': '3c13.ccfd.2c81',
'media_type': '10/100/1000BaseTX',
'mtu': 1500,
'oper_status': 'up',
'output_hang': 'never',
'phys_address': '3c13.ccfd.2c81',
'port_channel': {'port_channel_member': False},
'port_speed': '1000mb/s',
'queues': { 'input_queue_drops': 0,
'input_queue_flushes': 0,
'input_queue_max': 2000,
'input_queue_size': 0,
'output_queue_max': 40,
'output_queue_size': 0,
'queue_strategy': 'Class-based',
'total_output_drop': 36393},
'reliability': '255/255',
'rxload': '1/255',
'txload': '1/255',
'type': 'Gigabit Ethernet'}}
^^^^ END get_int ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* sw2 ** changed : False *************************************************
vvvv get_int ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO
---- netmiko_send_command ** changed : False ----------------------------------- INFO
{ 'GigabitEthernet1/0/1': { 'arp_timeout': '04:00:00',
'arp_type': 'arpa',
'bandwidth': 100000,
'connected': True,
'counters': { 'in_broadcast_pkts': 0,
'in_crc_errors': 24,
'in_errors': 24,
'in_frame': 0,
'in_giants': 0,
'in_ignored': 0,
'in_mac_pause_frames': 0,
'in_multicast_pkts': 0,
'in_no_buffer': 0,
'in_octets': 3425535252,
'in_overrun': 0,
'in_pkts': 40134656,
'in_runts': 0,
'in_throttles': 0,
'in_watchdog': 0,
'in_with_dribble': 0,
'last_clear': 'never',
'out_babble': 0,
'out_buffer_failure': 0,
'out_buffers_swapped': 0,
'out_collision': 0,
'out_deferred': 0,
'out_errors': 0,
'out_interface_resets': 1,
'out_late_collision': 0,
'out_lost_carrier': 0,
'out_mac_pause_frames': 0,
'out_no_carrier': 0,
'out_octets': 2047123083,
'out_pkts': 30216201,
'out_underruns': 0,
'out_unknown_protocl_drops': 0,
'rate': { 'in_rate': 5000,
'in_rate_pkts': 7,
'load_interval': 300,
'out_rate': 2000,
'out_rate_pkts': 3}},
'delay': 100,
'description': 'desc',
'duplex_mode': 'full',
'enabled': True,
'encapsulations': {'encapsulation': 'arpa'},
'flow_control': {'receive': True, 'send': False},
'keepalive': 10,
'last_input': '00:00:07',
'last_output': '00:00:00',
'line_protocol': 'up',
'mac_address': 'c4b2.39d9.fd81',
'media_type': '10/100/1000BaseTX',
'mtu': 1500,
'oper_status': 'up',
'output_hang': 'never',
'phys_address': 'c4b2.39d9.fd81',
'port_channel': {'port_channel_member': False},
'port_speed': '100mb/s',
'queues': { 'input_queue_drops': 0,
'input_queue_flushes': 0,
'input_queue_max': 2000,
'input_queue_size': 0,
'output_queue_max': 40,
'output_queue_size': 0,
'queue_strategy': 'Class-based',
'total_output_drop': 0},
'reliability': '255/255',
'rxload': '1/255',
'txload': '1/255',
'type': 'Gigabit Ethernet'}}
^^^^ END get_int ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
But when you try this against a Port-Channel Interface with
r = task.run(task=netmiko_send_command, command_string="sh interfaces po1", use_genie=True)
only the port-channel of the last device that the task ran against is correctly parsed. All other are not parsed:
* sw1 ** changed : False ******************************************
vvvv get_po ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO
---- netmiko_send_command ** changed : False ----------------------------------- INFO
Port-channel1 is up, line protocol is up (connected)
Hardware is EtherChannel, address is 3c13.ccfd.2cb1 (bia 3c13.ccfd.2cb1)
Description: desc
MTU 1500 bytes, BW 20000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 10Gb/s, link type is auto, media type is N/A
input flow-control is on, output flow-control is unsupported
Members in this channel: Te1/1/1 Te1/1/2
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:01, output hang never
Last clearing of "show interface" counters 7w0d
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
30 second input rate 1662000 bits/sec, 350 packets/sec
30 second output rate 414000 bits/sec, 131 packets/sec
1490137110 packets input, 446358813719 bytes, 0 no buffer
Received 450789351 broadcasts (387070220 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 387070220 multicast, 0 pause input
0 input packets with dribble condition detected
989855804 packets output, 221910287793 bytes, 0 underruns
Output 1269771 broadcasts (0 multicasts)
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
^^^^ END get_po ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* sw2 ** changed : False *************************************************
vvvv get_po ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO
---- netmiko_send_command ** changed : False ----------------------------------- INFO
{ 'Port-channel1': { 'arp_timeout': '04:00:00',
'arp_type': 'arpa',
'auto_negotiate': True,
'bandwidth': 100000,
'connected': False,
'counters': { 'in_broadcast_pkts': 0,
'in_crc_errors': 0,
'in_errors': 0,
'in_frame': 0,
'in_giants': 0,
'in_ignored': 0,
'in_mac_pause_frames': 0,
'in_multicast_pkts': 0,
'in_no_buffer': 0,
'in_octets': 0,
'in_overrun': 0,
'in_pkts': 0,
'in_runts': 0,
'in_throttles': 0,
'in_watchdog': 0,
'in_with_dribble': 0,
'last_clear': 'never',
'out_babble': 0,
'out_buffer_failure': 0,
'out_buffers_swapped': 0,
'out_collision': 0,
'out_deferred': 0,
'out_errors': 0,
'out_interface_resets': 1,
'out_late_collision': 0,
'out_lost_carrier': 0,
'out_mac_pause_frames': 0,
'out_no_carrier': 0,
'out_octets': 0,
'out_pkts': 0,
'out_underruns': 0,
'out_unknown_protocl_drops': 0,
'rate': { 'in_rate': 0,
'in_rate_pkts': 0,
'load_interval': 30,
'out_rate': 0,
'out_rate_pkts': 0}},
'delay': 100,
'description': 'desc',
'duplex_mode': 'auto',
'enabled': True,
'encapsulations': {'encapsulation': 'arpa'},
'flow_control': {'receive': True, 'send': False},
'keepalive': 10,
'last_input': 'never',
'last_output': 'never',
'line_protocol': 'down',
'link_type': 'auto',
'mac_address': '0000.0000.0000',
'media_type': 'N/A',
'mtu': 1500,
'oper_status': 'down',
'output_hang': 'never',
'phys_address': '0000.0000.0000',
'port_channel': {'port_channel_member': False},
'port_speed': 'auto',
'queues': { 'input_queue_drops': 0,
'input_queue_flushes': 0,
'input_queue_max': 2000,
'input_queue_size': 0,
'output_queue_max': 40,
'output_queue_size': 0,
'queue_strategy': 'fifo',
'total_output_drop': 0},
'reliability': '255/255',
'rxload': '1/255',
'txload': '1/255',
'type': 'EtherChannel'}}
^^^^ END get_po ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Solved: 'Command Parsing Failed' - Cisco Community
When we are trying to add new vlans to a Portchannel using switch-profile we get this message: Error(s): Following commands failed parsing: If...
Read more >Cisco Nexus 9k Port Channel Configuration - Step by Step
Configure port channels between NXOS01, NXOS02, NXOS03, and NXOS04 as follows: The links between NXOS03 and NXOS01 should be grouped together in ...
Read more >teamdctl state view Failed to parse JSON port dump · Issue #40
When I try to run the command teamdctl to dump the state, it shows the error message: root@device:/home/admin# teamdctl PortChannel0004 ...
Read more >Using FEX with the F2 Card in a Nexus 7000 - NetCraftsmen
The rule is that if you connect the FEX to the N7K F2 card with more than one port-channel, the connecting port channels...
Read more >Troubleshooting LACP port channel/ interface groups
Why understand and troubleshoot Port Channel Groups? · The network switch is not configured correctly. · The cables from the storage controller ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Nouse4it,
The fix has been merged into our code base, I will update you once there is a release that has the changes.
Thank you, Abdurahman
Hi Abdurahman,
thank you for the good news. I´m did the test with a CentOS7 and a Ubuntu 20.04 Machine
Regards Ben