Skip to content

Commit

Permalink
feat: collect supermicro and dell tty info
Browse files Browse the repository at this point in the history
Signed-off-by: Dustin Miller <[email protected]>
  • Loading branch information
Dustin Miller committed Sep 18, 2023
1 parent 22db7f9 commit e11f36a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packethardware/component/management_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ def __init__(self):

self.data = {"aux": utils.get_mc_info("aux")}

if "supermicro" in self.vendor.lower():
self.data["tty"] = utils.get_supermicro_serial_port_settings(self)
self._set_tty_port_guess()
elif "dell" in self.vendor.lower():
self.data["tty"] = utils.get_dell_bios_serial_comm_settings(self)
self._set_tty_port_guess()
else:
pass

def _set_tty_port_guess(self):
serial_comm = self.data["tty"].get("SerialComm")
out_of_band_mgmt_port = (
self.data["tty"]
.get("Serial Port Console Redirection", {})
.get("Out-of-Band Mgmt Port")
)

if serial_comm == "OnConRedirCom1" or out_of_band_mgmt_port == "COM1":
self.data["tty"]["ttyPortGuess"] = "ttyS1"

@classmethod
def list(cls, _):
bmcs = []
Expand Down

0 comments on commit e11f36a

Please sign in to comment.