Closed etiedem closed 1 year ago
Do you see term width 500
being called when you add it to init_exec_commands?
Can you share the connection log as well as the device.execute output?
It does not run the command when I have it like: init_exec_commands=["term len 0", "term width 500"],
.
Terminal length is affected as well even when testing on IOS-XE.
2022-07-09 14:25:06,619: %UNICON-INFO: +++ Unicon plugin iosxe (unicon.plugins.iosxe) +++
2022-07-09 14:25:10,266: %UNICON-INFO: +++ connection to spawn: ssh 1.1.1.1, id: 4472972160 +++
2022-07-09 14:25:10,266: %UNICON-INFO: connection to test
(1.1.1.1) Password:
test#
2022-07-09 14:25:10,926: %UNICON-INFO: +++ initializing handle +++
show ip bgp vpnv4 all neighbors 2.2.2.2 received-routes
BGP table version is 7302986, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.4.26.252/32 2.2.2.2 0 65010 i
*> 10.4.26.253/32 2.2.2.2 0 65010 i
*> 10.40.0.0/19 2.2.2.2 0 65010 i
*> 10.40.32.0/19 2.2.2.2 0 65010 i
*> 10.40.64.0/19 2.2.2.2 0 65010 i
*> 10.40.96.0/19 2.2.2.2 0 65010 i
*> 10.40.128.0/19 2.2.2.2 0 65010 i
*> 10.40.160.0/19 2.2.2.2 0 65010 i
Network Next Hop Metric LocPrf Weight Path
*> 10.40.192.0/19 2.2.2.2 0 65010 i
*> 10.40.224.0/20 2.2.2.2 0 65010 i
*> 10.40.240.0/20 2.2.2.2 0 65010 i
*> 10.41.0.0/21 2.2.2.2 0 65010 i
*> 10.41.8.0/23 2.2.2.2 0 65010 i
*> 10.41.10.0/24 2.2.2.2 0 65010 i
*> 10.41.11.0/24 2.2.2.2 0 65010 i
*> 10.41.12.0/24 2.2.2.2 0 65010 i
*> 10.41.13.0/28 2.2.2.2 0 65010 i
*> 10.41.13.16/28 2.2.2.2 0 65010 i
*> 10.41.13.32/27 2.2.2.2 0 65010 i
Network Next Hop Metric LocPrf Weight Path
*> 10.41.13.64/27 2.2.2.2 0 65010 i
*> 10.41.13.96/28 2.2.2.2 0 65010 i
*> 10.41.13.112/28 2.2.2.2 0 65010 i
*> 10.41.13.128/25 2.2.2.2 0 65010 i
*> 10.41.14.0/23 2.2.2.2 0 65010 i
*> 10.41.16.0/20 2.2.2.2 0 65010 i
*> 10.41.32.0/20 2.2.2.2 0 65010 i
*> 10.41.48.0/20 2.2.2.2 0 65010 i
*> 10.41.64.0/20 2.2.2.2 0 65010 i
*> 10.41.80.0/20 2.2.2.2 0 65010 i
*> 10.41.96.0/20 2.2.2.2 0 65010 i
Also putting device.execute
setting the terminal length and width does work in the CommonSetup as long as it is after the initial connect.
Hi @etiedem have you tried passing these commands in the testbed yaml?
devices:
<device_name>:
os: nxos
connections:
<name>:
init_exec_commands:
- term length 0
- term width 500
Something appears to set the terminal width for NXOS devices to 80 which causes output to be line wrapped and even affects the genie parser as things like AS Path are truncated.
Setting
init_exec_commands=["term len 0", "term width 500"]
doesn't resolve this issue either. Only runningdevice.execute("term width 500")
after the CommonSetup corrects the behavior.