Wednesday, March 24, 2021

NetMiko Truncated output

from netmiko import ConnectHandler
from netmiko.ssh_exception import NetMikoAuthenticationException
from netmiko.ssh_exception import NetMikoAuthenticationException
iou1 = {
'device_type': 'cisco_ios_telnet',
'ip': '172.16.1.1',
username': 'Username',
'password': 'password123',
}
try:
    Connect = ConnectHandler(**iou1)
    output = Connect.send_command_timing("sh vlan")
print(output)
except (NetMikoAuthenticationException, NetMikoAuthenticationException) as error:
print(error)

OUTPUT

---- ----------------- ------------------ ------------------ ----------------

1 1 gi1/0/48 gi1/0/1-47, DV

te1/0/1-4,

gi2/0/1-48,

te2/0/1-4,

gi3/0/1-48,

te3/0/1-4,

gi4/0/1-48,

te4/0/1-4,

gi5/0/1-48,

te5/0/1-4,

gi6/0/1-48,

te6/0/1-4,

gi7/0/1-48,

te7/0/1-4,

gi8/0/1-48,

te8/0/1-4,Po1-32

2 Local gi1/0/1-3,gi1/0/6, S

gi1/0/8,

gi1/0/10-18,

gi1/0/20-27,

gi1/0/29-39,

gi1/0/41-48

More: <space>, Quit: q or CTRL+Z, One line: <return>

How can I get the full output, it stops at

More: <space>, Quit: q or CTRL+Z, One line: <return>

When you are logged into the router you can use 'Space bar' to show full output, how can I get full output from my python script



No comments:

Post a Comment