`id` in Device is renamed to `path`.
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
node_osds = device_osd_map.get(inventory_node['name'])
for device in inventory_node['devices']:
if node_osds:
- device['osd_ids'] = sorted(node_osds.get(device['id'], []))
+ device['osd_ids'] = sorted(node_osds.get(device['path'], []))
else:
device['osd_ids'] = []
return inventory_nodes
except ImportError:
from unittest import mock
-from ceph.deployment.inventory import Devices
-
from orchestrator import InventoryNode, ServiceDescription
from . import ControllerTestCase
{
'name': 'host-0',
'devices': [
- {'id': 'nvme0n1'},
- {'id': 'sdb'},
- {'id': 'sdc'},
+ {'path': 'nvme0n1'},
+ {'path': 'sdb'},
+ {'path': 'sdc'},
]
},
{
'name': 'host-1',
'devices': [
- {'id': 'sda'},
- {'id': 'sdb'},
+ {'path': 'sda'},
+ {'path': 'sdb'},
]
}
]