Project

General

Profile

« Previous | Next » 

Revision 0c3e15d2

Added by Ohad Levy over 12 years ago

  • ID 0c3e15d210a01b712b35ef07ccce31925ec08cd6

fixes #1186 foreman does not forward sparc dhcp vendor options when creating a sparc Solaris host

View differences:

lib/proxy_api.rb
# Returns : Hash or false
def record subnet, mac
response = parse(get("#{subnet}/#{mac}"))
Net::DhcpRecord.new response.merge(:network => subnet, :proxy => self)
attrs = response.merge(:network => subnet, :proxy => self)
if response.keys.grep(/Sun/i).empty?
Net::DHCP::SparcRecord.new attrs
else
Net::DHCP::Record.new attrs
end
rescue RestClient::ResourceNotFound
false
nil
end
# Sets a DHCP entry

Also available in: Unified diff