From 13367c80e7540d72607aa4f82fae375e6c60ef36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadej=20Borov=C5=A1ak?= Date: Mon, 28 May 2018 06:54:09 +0200 Subject: [PATCH] Add physical server asset details collection Most of the metadata about the physical servers is stored in associated asset details entry, which serves as a data source for UI components. This commit adds default collection for asset details that can be used to store physical server metadata. --- .../physical_infra_manager.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/models/manager_refresh/inventory_collection_default/physical_infra_manager.rb b/app/models/manager_refresh/inventory_collection_default/physical_infra_manager.rb index f00149c566a..b3e96f81ba8 100644 --- a/app/models/manager_refresh/inventory_collection_default/physical_infra_manager.rb +++ b/app/models/manager_refresh/inventory_collection_default/physical_infra_manager.rb @@ -11,5 +11,16 @@ def physical_servers(extra_attributes = {}) attributes.merge!(extra_attributes) end + + def physical_server_details(extra_attributes = {}) + attributes = { + :model_class => ::AssetDetail, + :association => :physical_server_details, + :manager_ref => [:resource], + :parent_inventory_collections => [:physical_servers], + } + + attributes.merge!(extra_attributes) + end end end