Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Vertiv MPH Power Distribution Units #3438

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
33 changes: 33 additions & 0 deletions netmiko/vertiv/vertiv_mph_ssh.py
Original file line number Diff line number Diff line change
@@ -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
Loading