diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index bbec65b54..46469a741 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -129,6 +129,7 @@ from netmiko.ubiquiti import UbiquitiEdgeRouterSSH, UbiquitiEdgeRouterFileTransfer from netmiko.ubiquiti import UbiquitiEdgeSSH from netmiko.ubiquiti import UbiquitiUnifiSwitchSSH +from netmiko.vertiv import VertivMPHSSH from netmiko.vyos import VyOSSSH from netmiko.watchguard import WatchguardFirewareSSH from netmiko.yamaha import YamahaSSH @@ -275,6 +276,7 @@ "ubiquiti_edgerouter": UbiquitiEdgeRouterSSH, "ubiquiti_edgeswitch": UbiquitiEdgeSSH, "ubiquiti_unifiswitch": UbiquitiUnifiSwitchSSH, + "vertiv_mph": VertivMPHSSH, "vyatta_vyos": VyOSSSH, "vyos": VyOSSSH, "watchguard_fireware": WatchguardFirewareSSH, diff --git a/netmiko/vertiv/__init__.py b/netmiko/vertiv/__init__.py new file mode 100644 index 000000000..dcb1f517b --- /dev/null +++ b/netmiko/vertiv/__init__.py @@ -0,0 +1,3 @@ +from netmiko.vertiv.vertiv_mph_ssh import VertivMPHSSH + +__all__ = ["VertivMPHSSH"] \ No newline at end of file diff --git a/netmiko/vertiv/vertiv_mph_ssh.py b/netmiko/vertiv/vertiv_mph_ssh.py new file mode 100644 index 000000000..65c64594e --- /dev/null +++ b/netmiko/vertiv/vertiv_mph_ssh.py @@ -0,0 +1,33 @@ +from typing import Any +from netmiko.no_enable import NoEnable +from netmiko.no_config import NoConfig +from netmiko.cisco_base_connection import CiscoSSHConnection + + +class VertivMPHBase(NoEnable, NoConfig, CiscoSSHConnection): + """ + Support for Vertiv MPH Power Distribution Units. + Should work with any Vertiv Device with an RPC2 module. + """ + + def session_preparation(self) -> None: + """Prepare the session after the connection has been established.""" + # self.ansi_escape_codes = True + self._test_channel_read(pattern=r"cli->") + self.set_base_prompt() + + def save_config( + self, cmd: str = "save", confirm: bool = False, confirm_response: str = "" + ) -> str: + """Saves configuration.""" + return super().save_config( + cmd=cmd, confirm=confirm, confirm_response=confirm_response + ) + + def cleanup(self, command: str = "logout") -> None: + """Return paging before disconnect""" + return super().cleanup(command=command) + + +class VertivMPHSSH(VertivMPHBase): + pass