Skip to content

Commit

Permalink
Parse the serial number during refresh
Browse files Browse the repository at this point in the history
Parse the serial number of host during refresh.
This is required for:
https://bugzilla.redhat.com/show_bug.cgi?id=1410183
  • Loading branch information
Boris Odnopozov committed Oct 15, 2017
1 parent 91c3218 commit dd6bab8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ def hardwares_attributes
:memory_mb,
:model,
:networks,
:number_of_nics
:number_of_nics,
:serial_number
]
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dd6bab8

Please sign in to comment.