smartctl JSON output contains the device's serial number in two
different keys ('serial_number' & 'output'). Serial is now obfuscated in
both.
Fixes: https://tracker.ceph.com/issues/43939
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
host, anon_host))
# anonymize the smartctl report itself
- for k in ['serial_number']:
- if k in m:
- m.pop(k)
+ serial = devid.rsplit('_', 1)[1]
+ m_str = json.dumps(m)
+ m = json.loads(m_str.replace(serial, 'deleted'))
if anon_host not in res:
res[anon_host] = {}