Minor fixes for missing data in new ceph deployment
Related-PROD: PROD-36845
Change-Id: I754727deb4a66e1d6512fb6bc51a24b60ac3305a
diff --git a/cfg_checker/modules/ceph/info.py b/cfg_checker/modules/ceph/info.py
index a3006af..1f3b8cb 100644
--- a/cfg_checker/modules/ceph/info.py
+++ b/cfg_checker/modules/ceph/info.py
@@ -412,14 +412,14 @@
'image': _s['version']['image'],
'version': _s['version']['version'],
'device_classes': self._parse_dev_classes(
- _s['storage']['deviceClasses']
+ _s['storage'].get('deviceClasses', [])
),
'phase': _s['phase'],
'state': _s['state'],
- 'health': _s['ceph']['health'],
- 'previousHealth': _s['ceph']['previousHealth'],
- 'lastChanged': _s['ceph']['lastChanged'],
- 'lastChecked': _s['ceph']['lastChecked'],
+ 'health': _s['ceph'].get('health', {}),
+ 'previousHealth': _s['ceph'].get('previousHealth', {}),
+ 'lastChanged': _s['ceph'].get('lastChanged', ""),
+ 'lastChecked': _s['ceph'].get('lastChecked', ""),
'mon_count': _cluster['spec']['mon']['count']
})
self.nodes = _cluster['spec']['storage']['nodes'],