def info(self): manuStrList = [ "ASUSTeK COMPUTER INC.", ] self.manu = FmUtil.dmiDecodeWithCache("system-manufacturer") if self.manu not in manuStrList: return None self.model = FmUtil.dmiDecodeWithCache("system-product-name") self.sn = FmUtil.dmiDecodeWithCache("system-serial-number") ret = HwInfoPcBranded() ret.vendor = "ASUS" ret.model = self.model ret.hwSpec = self._hwSpec() ret.serialNumber = self.sn ret.arch = "amd64" ret.chassis_type = self._chassisType() ret.hwDict = _UtilHwDict.get(ret.hwSpec) ret.changeList = self._changeList(ret.hwSpec, ret.hwDict) ret.kernelCfgRules = self._kernelCfgRules() ret.useFlags = self._useFlags() ret.grubExtraWaitTime = 0 return ret
def info(self): self.manu = FmUtil.dmiDecodeWithCache("system-manufacturer") if self.manu not in ["Hewlett-Packard", "HP"]: return None self.model = FmUtil.dmiDecodeWithCache("system-product-name") self.sn = FmUtil.dmiDecodeWithCache("system-serial-number") ret = HwInfoPcBranded() ret.vendor = "HP" ret.model = self._name() ret.hwSpec = self._hwSpec() ret.serialNumber = self.sn ret.arch = "amd64" ret.chassis_type = self._chassisType() ret.hwDict = _UtilHwDict.get(ret.hwSpec) ret.changeList = self._changeList(ret.hwSpec, ret.hwDict) ret.kernelCfgRules = self._kernelCfgRules() ret.useFlags = self._useFlags() ret.grubExtraWaitTime = 0 return ret
def info(self): self.manu = FmUtil.dmiDecodeWithCache("system-manufacturer") if self.manu != "Alibaba Cloud": return None assert FmUtil.dmiDecodeWithCache("system-product-name") == "Alibaba Cloud ECS" self.sn = FmUtil.dmiDecodeWithCache("system-serial-number") self.model = FmUtil.getMachineInfoWithCache("ALIYUN-HWNAME") assert self.model in self._MODELS ret = HwInfoPcBranded() ret.vendor = "ALIYUN" ret.model = self.model ret.hwSpec = self._hwSpec() ret.serialNumber = self.sn ret.arch = "amd64" ret.chassis_type = ChassisType.COMPUTER ret.hwDict = self._hwDict(ret.hwSpec) ret.changeList = self._changeList(ret.hwSpec, ret.hwDict) ret.kernelCfgRules = self._kernelCfgRules() ret.useFlags = self._useFlags() ret.grubExtraWaitTime = 20 return ret