Project

General

Profile

« Previous | Next » 

Revision 52a4727f

Added by Lukas Zapletal about 7 years ago

Fixes #19666 - add DHCP record type field

View differences:

modules/dhcp_common/record/reservation.rb
attr_reader :name
def initialize(name, ip_address, mac_address, subnet, options = {})
@type = "reservation"
@name = name
super(ip_address, mac_address, subnet, options)
end
......
end
def to_json(*opts)
Hash[[:name, :ip, :mac, :subnet].map{|s| [s, send(s)]}].merge(options).to_json(*opts)
Hash[[:name, :ip, :mac, :subnet, :type].map{|s| [s, send(s)]}].merge(options).to_json(*opts)
end
end
end

Also available in: Unified diff