From 976a56bbe92d8df3c407f0d7aa87b7f37acbd033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadej=20Borov=C5=A1ak?= Date: Fri, 27 Apr 2018 16:05:25 +0200 Subject: [PATCH] Add Redfish server default collection Partially fixes https://bugzilla.redhat.com/show_bug.cgi?id=1574808 --- .../physical_infra_manager.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/models/manager_refresh/inventory_collection_default/physical_infra_manager.rb 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 new file mode 100644 index 00000000000..f00149c566a --- /dev/null +++ b/app/models/manager_refresh/inventory_collection_default/physical_infra_manager.rb @@ -0,0 +1,15 @@ +class ManagerRefresh::InventoryCollectionDefault::PhysicalInfraManager < ManagerRefresh::InventoryCollectionDefault + class << self + def physical_servers(extra_attributes = {}) + attributes = { + :model_class => ::PhysicalServer, + :association => :physical_servers, + :builder_params => { + :ems_id => ->(persister) { persister.manager.id } + } + } + + attributes.merge!(extra_attributes) + end + end +end