Skip to content

Commit

Permalink
Merge branch 'develop' into huawei_smartax_improve_closing
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers authored Jan 3, 2025
2 parents 7f7d130 + 5a692f2 commit fef2085
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion netmiko/cisco/cisco_apic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Subclass specific to Cisco APIC."""

from netmiko.linux.linux_ssh import LinuxSSH
from netmiko.cisco_base_connection import CiscoSSHConnection


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

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

0 comments on commit fef2085

Please sign in to comment.