Skip to content

Commit

Permalink
Vertiv MPH Driver (#3460)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Bremer <[email protected]>
  • Loading branch information
ktbyers and Daniel Bremer authored Jul 10, 2024
1 parent e3acedd commit dddf3d4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions PLATFORMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
- Sophos SFOS
- Ubiquiti Unifi Switch
- Versa Networks FlexVNF
- Vertiv MPH Power Distribution Units
- Watchguard Firebox
- Zyxel NOS
- 6WIND TurboRouter
Expand Down
2 changes: 2 additions & 0 deletions netmiko/ssh_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -275,6 +276,7 @@
"ubiquiti_edgerouter": UbiquitiEdgeRouterSSH,
"ubiquiti_edgeswitch": UbiquitiEdgeSSH,
"ubiquiti_unifiswitch": UbiquitiUnifiSwitchSSH,
"vertiv_mph": VertivMPHSSH,
"vyatta_vyos": VyOSSSH,
"vyos": VyOSSSH,
"watchguard_fireware": WatchguardFirewareSSH,
Expand Down
3 changes: 3 additions & 0 deletions netmiko/vertiv/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from netmiko.vertiv.vertiv_mph_ssh import VertivMPHSSH

__all__ = ["VertivMPHSSH"]
31 changes: 31 additions & 0 deletions netmiko/vertiv/vertiv_mph_ssh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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 super().cleanup(command=command)


class VertivMPHSSH(VertivMPHBase):
pass

0 comments on commit dddf3d4

Please sign in to comment.