diff --git a/app/models/manageiq/providers/redhat/infra_manager/refresh/parse/strategies/host_inventory.rb b/app/models/manageiq/providers/redhat/infra_manager/refresh/parse/strategies/host_inventory.rb index 3e714fcf3..ee1f629d9 100644 --- a/app/models/manageiq/providers/redhat/infra_manager/refresh/parse/strategies/host_inventory.rb +++ b/app/models/manageiq/providers/redhat/infra_manager/refresh/parse/strategies/host_inventory.rb @@ -194,6 +194,7 @@ def host_inv_to_hardware_hash(inv) unless hw_info.blank? result[:manufacturer] = hw_info.manufacturer result[:model] = hw_info.product_name + result[:serial_number] = hw_info.serial_number end result[:number_of_nics] = inv.nics.count diff --git a/app/models/manageiq/providers/redhat/inventory/parser/infra_manager.rb b/app/models/manageiq/providers/redhat/inventory/parser/infra_manager.rb index df7bf7d4e..169a866b3 100644 --- a/app/models/manageiq/providers/redhat/inventory/parser/infra_manager.rb +++ b/app/models/manageiq/providers/redhat/inventory/parser/infra_manager.rb @@ -204,6 +204,7 @@ def host_hardware(persister_host, host, networks, nics) :cpu_total_cores => cpu_sockets * cpu_cores, :manufacturer => hw_info.manufacturer, :model => hw_info.product_name, + :serial_number => hw_info.serial_number, :number_of_nics => nics.count ) diff --git a/app/models/manageiq/providers/redhat/inventory_collection_default/infra_manager.rb b/app/models/manageiq/providers/redhat/inventory_collection_default/infra_manager.rb index a2d0c4fd0..7d717872a 100644 --- a/app/models/manageiq/providers/redhat/inventory_collection_default/infra_manager.rb +++ b/app/models/manageiq/providers/redhat/inventory_collection_default/infra_manager.rb @@ -479,7 +479,8 @@ def hardwares_attributes :memory_mb, :model, :networks, - :number_of_nics + :number_of_nics, + :serial_number ] } end diff --git a/spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_1_spec.rb b/spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_1_spec.rb index a897b64a2..ec7cdad89 100644 --- a/spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_1_spec.rb +++ b/spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_1_spec.rb @@ -334,7 +334,8 @@ def assert_specific_host :guest_os_full_name => nil, :vmotion_enabled => nil, :cpu_usage => nil, - :memory_usage => nil + :memory_usage => nil, + :serial_number => "30353036-3837-4247-3831-303946353235" ) expect(@host.hardware.networks.size).to eq(1) diff --git a/spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_async_spec.rb b/spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_async_spec.rb index ce1bd6580..e08972f61 100644 --- a/spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_async_spec.rb +++ b/spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_async_spec.rb @@ -253,7 +253,8 @@ def assert_specific_host :guest_os_full_name => nil, :vmotion_enabled => nil, :cpu_usage => nil, - :memory_usage => nil + :memory_usage => nil, + :serial_number => "30353036-3837-4247-3831-303946353239" ) expect(@host.hardware.networks.size).to eq(1)