File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 11"""Subclass specific to Cisco APIC."""
22
33from netmiko .linux .linux_ssh import LinuxSSH
4+ from netmiko .cisco_base_connection import CiscoSSHConnection
45
56
67class 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" )
You can’t perform that action at this time.
0 commit comments