From: Paul Cuzner Date: Thu, 26 May 2022 23:02:45 +0000 (+1200) Subject: cephadm: Add server serial info to gather-facts X-Git-Tag: v18.0.0~783^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6ad12697d0676e97eee21f3bf24cf025780fc1e5;p=ceph.git cephadm: Add server serial info to gather-facts Adds serial numbers for the chassis, mainboard and server to the output of gather-facts Signed-off-by: Paul Cuzner --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 3023337fd7e7..4e21e4d92b19 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -8476,6 +8476,24 @@ class HostFacts(): """Determine server BIOS date from DMI data in sysfs""" return read_file(HostFacts._dmi_path_list, 'bios_date') + @property + def chassis_serial(self): + # type: () -> str + """Determine chassis serial number from DMI data in sysfs""" + return read_file(HostFacts._dmi_path_list, 'chassis_serial') + + @property + def board_serial(self): + # type: () -> str + """Determine mainboard serial number from DMI data in sysfs""" + return read_file(HostFacts._dmi_path_list, 'board_serial') + + @property + def product_serial(self): + # type: () -> str + """Determine server's serial number from DMI data in sysfs""" + return read_file(HostFacts._dmi_path_list, 'product_serial') + @property def timestamp(self): # type: () -> float