diff --git a/app/models/manageiq/providers/infra_manager.rb b/app/models/manageiq/providers/infra_manager.rb index 22b608a062b..9e0a9a8e87a 100644 --- a/app/models/manageiq/providers/infra_manager.rb +++ b/app/models/manageiq/providers/infra_manager.rb @@ -18,6 +18,7 @@ class InfraManager < BaseManager has_many :subnets, -> { distinct }, :through => :lans has_many :networks, :through => :hardwares has_many :guest_devices, :through => :hardwares + has_many :ems_custom_attributes, :through => :vms_and_templates class << model_name define_method(:route_key) { "ems_infras" } diff --git a/app/models/manager_refresh/inventory_collection/builder/infra_manager.rb b/app/models/manager_refresh/inventory_collection/builder/infra_manager.rb index 0b5896001f8..9b599324c5e 100644 --- a/app/models/manager_refresh/inventory_collection/builder/infra_manager.rb +++ b/app/models/manager_refresh/inventory_collection/builder/infra_manager.rb @@ -54,8 +54,9 @@ def host_operating_systems ) end - def custom_attributes + def ems_custom_attributes add_properties( + :model_class => ::CustomAttribute, :manager_ref => %i(name), :parent_inventory_collections => %i(vms miq_templates), )