]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: Add server serial info to gather-facts 46411/head
authorPaul Cuzner <pcuzner@redhat.com>
Thu, 26 May 2022 23:02:45 +0000 (11:02 +1200)
committerPaul Cuzner <pcuzner@redhat.com>
Thu, 26 May 2022 23:02:45 +0000 (11:02 +1200)
Adds serial numbers for the chassis, mainboard and
server to the output of gather-facts

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
src/cephadm/cephadm

index 3023337fd7e7667fc104b5295df1bf66b946c28a..4e21e4d92b1974419e488aa5e17fd497fe2af80b 100755 (executable)
@@ -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