Revision 90ff2a3a
Added by Dmitri Dolguikh about 10 years ago
lib/net/dhcp/record.rb | ||
---|---|---|
|
||
# Returns an array of record objects which are conflicting with our own
|
||
def conflicts
|
||
@conflicts ||= [proxy.record(network, mac), proxy.record(network, ip)].delete_if { |c| c == self }.compact
|
||
conflicts = [proxy.record(network, mac), proxy.record(network, ip)].delete_if { |c| c == self }.compact
|
||
@conflicts ||= conflicts.uniq {|c| c.attrs}
|
||
end
|
||
|
||
# Verifies that are record already exists on the dhcp server
|
||
... | ... | |
self == proxy.record(network, mac)
|
||
end
|
||
|
||
def == other
|
||
attrs.values_at(:hostname, :mac, :ip, :network) == other.attrs.values_at(:hostname, :mac, :ip, :network)
|
||
end
|
||
|
||
def attrs
|
||
{ :hostname => hostname, :mac => mac, :ip => ip, :network => network,
|
||
:nextServer => nextServer, :filename => filename
|
Also available in: Unified diff
fixes #4381: dns records are being update after changes to host when dhcp is also present