diff --git a/PLATFORMS.md b/PLATFORMS.md index 59dbce226..075961e01 100644 --- a/PLATFORMS.md +++ b/PLATFORMS.md @@ -99,6 +99,7 @@ - F5 Linux - Fortinet - Garderos GRS +- Genexis Saturn SOLT33 - MRV Communications OptiSwitch - MRV LX - Nokia/Alcatel SR-OS @@ -280,6 +281,7 @@ - extreme_telnet - generic_telnet - generic_termserver_telnet +- genexis_solt33_telnet - hp_comware_telnet - hp_procurve_telnet - huawei_olt_telnet diff --git a/netmiko/genexis/__init__.py b/netmiko/genexis/__init__.py new file mode 100644 index 000000000..3f0bccd39 --- /dev/null +++ b/netmiko/genexis/__init__.py @@ -0,0 +1,3 @@ +from netmiko.genexis.genexis_solt33 import GenexisSOLT33Telnet + +__all__ = ["GenexisSOLT33Telnet"] diff --git a/netmiko/genexis/genexis_solt33.py b/netmiko/genexis/genexis_solt33.py new file mode 100644 index 000000000..fc6496b31 --- /dev/null +++ b/netmiko/genexis/genexis_solt33.py @@ -0,0 +1,31 @@ +from netmiko.cisco_base_connection import CiscoBaseConnection + + +class GenexisSOLT33Base(CiscoBaseConnection): + def session_preparation(self) -> None: + self._test_channel_read(pattern=r"[>#]") + self.set_base_prompt() + self.enable() + self.config_mode() + cmd = "line width 256" + self.set_terminal_width(command=cmd, pattern=cmd) + self.disable_paging(command="screen-rows per-page 0") + self.clear_buffer() + self.exit_config_mode() + self.exit_enable_mode() + + def exit_enable_mode(self, exit_command: str = "exit") -> str: + output = "" + if self.check_enable_mode(): + self.write_channel(self.normalize_cmd(exit_command)) + self.read_until_pattern(pattern=exit_command) + output += self.read_until_pattern(pattern=r">") + if self.check_enable_mode(): + raise ValueError("Failed to exit enable mode.") + return output + + +class GenexisSOLT33Telnet(GenexisSOLT33Base): + """Genexis SOLT33 telnet driver""" + + pass diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index 70be1f5b2..7ff484e25 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -86,6 +86,7 @@ from netmiko.flexvnf import FlexvnfSSH from netmiko.fortinet import FortinetSSH from netmiko.garderos import GarderosGrsSSH +from netmiko.genexis import GenexisSOLT33Telnet from netmiko.hillstone import HillstoneStoneosSSH from netmiko.hp import HPProcurveSSH, HPProcurveTelnet, HPComwareSSH, HPComwareTelnet from netmiko.huawei import HuaweiSSH, HuaweiVrpv8SSH, HuaweiTelnet @@ -143,7 +144,6 @@ from netmiko.supermicro import SmciSwitchSmisTelnet from netmiko.zyxel import ZyxelSSH - if TYPE_CHECKING: from netmiko.base_connection import BaseConnection from netmiko.scp_handler import BaseFileTransfer @@ -350,12 +350,14 @@ CLASS_MAPPER["extreme_netiron_telnet"] = ExtremeNetironTelnet CLASS_MAPPER["generic_telnet"] = GenericTelnet CLASS_MAPPER["generic_termserver_telnet"] = TerminalServerTelnet +CLASS_MAPPER["genexis_solt33_telnet"] = GenexisSOLT33Telnet CLASS_MAPPER["hp_procurve_telnet"] = HPProcurveTelnet CLASS_MAPPER["hp_comware_telnet"] = HPComwareTelnet CLASS_MAPPER["huawei_telnet"] = HuaweiTelnet CLASS_MAPPER["huawei_olt_telnet"] = HuaweiSmartAXSSH CLASS_MAPPER["ipinfusion_ocnos_telnet"] = IpInfusionOcNOSTelnet CLASS_MAPPER["juniper_junos_telnet"] = JuniperTelnet +CLASS_MAPPER["maipu_telnet"] = MaipuTelnet CLASS_MAPPER["nokia_sros_telnet"] = NokiaSrosTelnet CLASS_MAPPER["oneaccess_oneos_telnet"] = OneaccessOneOSTelnet CLASS_MAPPER["paloalto_panos_telnet"] = PaloAltoPanosTelnet @@ -368,7 +370,6 @@ CLASS_MAPPER["tplink_jetstream_telnet"] = TPLinkJetStreamTelnet CLASS_MAPPER["yamaha_telnet"] = YamahaTelnet CLASS_MAPPER["zte_zxros_telnet"] = ZteZxrosTelnet -CLASS_MAPPER["maipu_telnet"] = MaipuTelnet # Add serial drivers CLASS_MAPPER["cisco_ios_serial"] = CiscoIosSerial