Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the key of network device to be both ipv4 + ipv6 #16619

Merged
merged 1 commit into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/ems_refresh/save_inventory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def save_networks_inventory(hardware, hashes, mode = :refresh)
saved_hashes, new_hashes = hashes.partition { |h| h[:id] }
saved_hashes.each { |h| deletes.delete_if { |d| d.id == h[:id] } } unless deletes.empty? || saved_hashes.empty?

save_inventory_multi(hardware.networks, new_hashes, deletes, [:ipaddress], nil, :guest_device)
save_inventory_multi(hardware.networks, new_hashes, deletes, [:ipaddress, :ipv6address], nil, :guest_device)
when :scan
save_inventory_multi(hardware.networks, hashes, :use_association, [:description, :guid])
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class << self
def networks(extra_attributes = {})
attributes = {
:model_class => ::Network,
:manager_ref => [:hardware, :ipaddress],
:manager_ref => [:hardware, :ipaddress, :ipv6address],
:association => :networks,
}

Expand Down