Skip to content

Commit fef2085

Browse files
authored
Merge branch 'develop' into huawei_smartax_improve_closing
2 parents 7f7d130 + 5a692f2 commit fef2085

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

netmiko/cisco/cisco_apic.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Subclass specific to Cisco APIC."""
22

33
from netmiko.linux.linux_ssh import LinuxSSH
4+
from netmiko.cisco_base_connection import CiscoSSHConnection
45

56

67
class CiscoApicSSH(LinuxSSH):
@@ -10,4 +11,17 @@ class CiscoApicSSH(LinuxSSH):
1011
This class inherit from LinuxSSH because Cisco APIC is based on Linux
1112
"""
1213

13-
pass
14+
def session_preparation(self) -> None:
15+
"""
16+
Prepare the session after the connection has been established.
17+
18+
In LinuxSSH, the disable_paging method does nothing; however, paging is enabled
19+
by default on Cisco APIC. To handle this, we utilize the disable_paging method
20+
from CiscoSSHConnection, the parent class of LinuxSSH. This approach leverages
21+
the shared implementation for Cisco SSH connections and ensures that any updates to
22+
disable_paging in the parent class are inherited.
23+
"""
24+
self.ansi_escape_codes = True
25+
self._test_channel_read(pattern=self.prompt_pattern)
26+
self.set_base_prompt()
27+
CiscoSSHConnection.disable_paging(self, command="terminal length 0")

0 commit comments

Comments
 (0)