Skip to content

Commit

Permalink
InventoryCollection definitions for Lenovo
Browse files Browse the repository at this point in the history
  • Loading branch information
slemrmartin committed Oct 8, 2018
1 parent 9d0607d commit 123c4c3
Showing 1 changed file with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 123c4c3

Please sign in to comment.