diff --git a/app/models/manageiq/providers/inventory/persister/builder/physical_infra_manager.rb b/app/models/manageiq/providers/inventory/persister/builder/physical_infra_manager.rb index 04440e8d572b..c44082a04049 100644 --- a/app/models/manageiq/providers/inventory/persister/builder/physical_infra_manager.rb +++ b/app/models/manageiq/providers/inventory/persister/builder/physical_infra_manager.rb @@ -48,9 +48,31 @@ def physical_storages add_common_default_values end - def canisters + def physical_switches + add_properties(:manager_ref => %i(uid_ems)) add_common_default_values end + + # TODO! serial_number wasn't in old refresh's find_key + # but there can be more canisters for one storage + # http://sysmgt.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.lxca_restapis.doc%2Frest_apis_reference.html + # In doc, there is UUID, but not used in this provider + # # Tmp solution with serial_number works for specs + def canisters + add_properties(:manager_ref => %i(physical_storage serial_number)) + end + + # TODO! serial_number wasn't in old refresh's find_key + # Like canisters, physical disks are not uniquely identified in old refresh + # Tmp solution with serial_number works for specs + def physical_disks + add_properties(:manager_ref => %i(physical_storage serial_number)) + end + + def customization_scripts + add_properties(:manager_ref => %i(manager_ref)) + add_default_values(:manager_id => ->(persister) { persister.manager.id }) + end end end end