Exemple #1
0
 def version(self):
     # To get revisions of BMC and power/controller/the CPLD:
     #line = subprocess.check_output(["ipmitool", "-H", self._get_ip(), "-U", "admin", "-P", "admin", "raw", "0x3c", "0x00", "0x00", "0x00"])
     # Maybe it's just the running and next CPLD versions.
     # Instead do: ipmitool bmc info
     version = subprocess.check_output("ipmitool bmc info | grep 'Firmware Revision' | cut -d: -f2 | tr -d ' '", shell=True)
     version = version.strip()
     return FirmwareUtils.normalize_version(version)
Exemple #2
0
 def version(self):
     # To get revisions of BMC and power/controller/the CPLD:
     #line = subprocess.check_output(["ipmitool", "-H", self._get_ip(), "-U", "admin", "-P", "admin", "raw", "0x3c", "0x00", "0x00", "0x00"])
     # Maybe it's just the running and next CPLD versions.
     # Instead do: ipmitool bmc info
     version = subprocess.check_output(
         "ipmitool bmc info | grep 'Firmware Revision' | cut -d: -f2 | tr -d ' '",
         shell=True)
     version = version.strip()
     return FirmwareUtils.normalize_version(version)
Exemple #3
0
 def version(self, typ):
     self._log(3, "FirmwareExpander:expnum = "+str(self.expnum))
     if self._mux_set(2+self.expnum):
         if not self.hw_versions:
             self._log(3, "setup succeeded; fetching version")
             self.hw_versions = super(FirmwareExpander, self).identifydevice()
             self._log(3, "version finished; resetting port")
             self._mux_restore()
             self._log(3, "resetting port finished")
         try:
             return FirmwareUtils.normalize_version(self.hw_versions[0][typ])
         except:
             pass
     return None
Exemple #4
0
 def version(self, typ):
     self._log(3, "FirmwareExpander:expnum = " + str(self.expnum))
     if self._mux_set(2 + self.expnum):
         if not self.hw_versions:
             self._log(3, "setup succeeded; fetching version")
             self.hw_versions = super(FirmwareExpander,
                                      self).identifydevice()
             self._log(3, "version finished; resetting port")
             self._mux_restore()
             self._log(3, "resetting port finished")
         try:
             return FirmwareUtils.normalize_version(
                 self.hw_versions[0][typ])
         except:
             pass
     return None
Exemple #5
0
 def version(self):
     version = subprocess.check_output(["dmidecode", "-s", "bios-version"])
     version = version.strip()
     return FirmwareUtils.normalize_version(version)
Exemple #6
0
 def version(self):
     version = subprocess.check_output(["dmidecode", "-s", "bios-version"])
     version = version.strip()
     return FirmwareUtils.normalize_version(version)