]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: add Ceph's device id to inventory 31211/head
authorSebastian Wagner <sebastian.wagner@suse.com>
Fri, 18 Oct 2019 11:59:44 +0000 (13:59 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 29 Oct 2019 09:50:46 +0000 (10:50 +0100)
This will benefit the orchestrator and dashboard to show a unified view of devices with SMART data

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit e70d6041c1a093ed5c2b77abe17e1ede533d9659)

src/ceph-volume/ceph_volume/tests/test_inventory.py
src/ceph-volume/ceph_volume/util/device.py

index 71cb027ed87596d6ecd95971f6237849eac9829f..9721fccdb6434b8e510a47c25784a99d7b67ba1c 100644 (file)
@@ -25,7 +25,8 @@ def device_report_keys(device_info):
                      'sectorsize': '512',
                      'size': 1999844147200.0,
                      'support_discard': '',
-                     'vendor': 'DELL'}
+                     'vendor': 'DELL',
+                     'device_id': 'Vendor-Model-Serial'}
     }
  )
     report = Devices().json_report()[0]
@@ -67,6 +68,7 @@ class TestInventory(object):
         'sys_api',
         'available',
         'lvs',
+        'device_id',
     ]
 
     expected_sys_api_keys = [
index 9e0f186090cc9018218ae3d3de6f19a28033d82f..08692f5ea84043c47bc6079bcf21d47d8938cadb 100644 (file)
@@ -62,6 +62,7 @@ class Device(object):
         'available',
         'path',
         'sys_api',
+        'device_id',
     ]
     pretty_report_sys_fields = [
         'human_readable_size',