def get_oem_firmware(self, bmcver): if self.has_tsm or self.has_ami or self.has_asrock: command = firmware.get_categories()["firmware"] fw_cmd = self.get_cmd_type("firmware", command) rsp = self.ipmicmd.xraw_command(**fw_cmd) # the newest Lenovo ThinkServer versions are returning Bios version # numbers through another command bios_versions = None if self.has_tsm or self.has_asrock: bios_command = firmware.get_categories()["bios_version"] bios_cmd = self.get_cmd_type("bios_version", bios_command) bios_rsp = self.ipmicmd.xraw_command(**bios_cmd) if self.has_asrock: bios_versions = bios_rsp['data'] else: bios_versions = bios_command["parser"](bios_rsp['data']) # pass bios versions to firmware parser # TODO: find a better way to implement this return command["parser"](rsp["data"], bios_versions, self.has_asrock) elif self.has_imm: return self.immhandler.get_firmware_inventory(bmcver) elif self.is_fpc: return nextscale.get_fpc_firmware(bmcver, self.ipmicmd, self._fpc_variant) return super(OEMHandler, self).get_oem_firmware(bmcver)
def get_oem_firmware(self, bmcver): if self.has_tsm: command = firmware.get_categories()["firmware"] rsp = self.ipmicmd.xraw_command(**command["command"]) return command["parser"](rsp["data"]) elif self.has_imm: return self.immhandler.get_firmware_inventory(bmcver) elif self.is_fpc: return nextscale.get_fpc_firmware(bmcver, self.ipmicmd, self._fpc_variant) return super(OEMHandler, self).get_oem_firmware(bmcver)
def get_oem_firmware(self, bmcver): if self.has_tsm: command = firmware.get_categories()["firmware"] rsp = self.ipmicmd.xraw_command(**command["command"]) return command["parser"](rsp["data"]) elif self.has_imm: return self.immhandler.get_firmware_inventory(bmcver) elif self.is_fpc: return nextscale.get_fpc_firmware(bmcver, self.ipmicmd, self._fpc_variant) return super(OEMHandler, self).get_oem_firmware(bmcver)