Project

General

Profile

« Previous | Next » 

Revision de1ecf7b

Added by Ohad Levy over 12 years ago

  • ID de1ecf7b5c4b564c3db6760d35fd7563dee70652

fixes #1154 - ms dhcp smart proxy error 400

This commit is not ideal in term of performance, as it forces us to read each
reservation options, a probably better approch is to read the output from the
dump command instead.

View differences:

lib/proxy/dhcp/record.rb
# represent a DHCP Record
class Record
attr_reader :ip, :mac, :subnet
attr_writer :options
attr_reader :ip, :mac, :subnet, :options
include Proxy::DHCP
include Proxy::Log
include Proxy::Validations
......
self
end
def options
@options.empty? ? @options = subnet.server.loadRecordOptions(self).merge(:mac => mac, :ip => ip) : @options
end
def [] opt
@options[opt]
options[opt.to_sym]
rescue
nil
end

Also available in: Unified diff