MCPcopy
hub / github.com/ktbyers/netmiko / execute_cmd

Function execute_cmd

tests/test_timeout_read_until_pattern.py:8–10  ·  view source on GitHub ↗
(conn, pattern, read_timeout, cmd="show tech-support\n", max_loops=None)

Source from the content-addressed store, hash-verified

6
7
8def execute_cmd(conn, pattern, read_timeout, cmd="show tech-support\n", max_loops=None):
9 conn.write_channel("show tech-support\n")
10 return conn.read_until_pattern(pattern=pattern, read_timeout=read_timeout, max_loops=max_loops)
11
12
13def my_cleanup(conn, sleep=180):

Callers 3

show_long_runningFunction · 0.70

Calls 2

read_until_patternMethod · 0.80
write_channelMethod · 0.45

Tested by

no test coverage detected