Skip to content

Commit

Permalink
Merge pull request #223 from agrare/bz_1562089_sort_nic_by_unit_numbe…
Browse files Browse the repository at this point in the history
…r_as_integer

Sort unitNumber as an integer not a string
(cherry picked from commit 577068e)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1562235
  • Loading branch information
gmcculloug authored and simaishi committed Mar 30, 2018
1 parent 772a49c commit 9dec685
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -140,7 +140,7 @@ def get_network_adapters
end

devs = inventory_hash.fetch_path("config", "hardware", "device") || []
devs.select { |d| d.key?('macAddress') }.sort_by { |d| d['unitNumber'] }
devs.select { |d| d.key?('macAddress') }.sort_by { |d| d['unitNumber'].to_i }
end

def get_network_device(vimVm, _vmcs, _vim = nil, vlan = nil)
Expand Down

0 comments on commit 9dec685

Please sign in to comment.