DeepSea is being updated to use ceph_volume internally (see
https://github.com/SUSE/DeepSea/pull/1517). Once this is done,
the mgr_orch.get_inventory runner will just be returning the
raw ceph_volume output, so this commit updates the DeepSea mgr
module to match.
Signed-off-by: Tim Serong <tserong@suse.com>
result = []
if event_data['success']:
for node_name, node_devs in event_data["return"].items():
- devs = []
- for d in node_devs:
- dev = orchestrator.InventoryDevice()
- dev.blank = d['blank']
- dev.type = d['type']
- dev.id = d['id']
- dev.size = d['size']
- dev.extended = d['extended']
- dev.metadata_space_free = d['metadata_space_free']
- devs.append(dev)
+ devs = list(map(lambda di:
+ orchestrator.InventoryDevice.from_ceph_volume_inventory(di),
+ node_devs))
result.append(orchestrator.InventoryNode(node_name, devs))
else:
self.log.error(event_data['return'])