Project

General

Profile

« Previous | Next » 

Revision f2248acc

Added by Ohad Levy over 12 years ago

  • ID f2248accb505ab1736b67c656971656a72c3d93e

clean up code passing, and removed duplicate code between dhcp server implementations

View differences:

lib/dhcp_api.rb
post "/dhcp/:network" do
begin
content_type :json
options = params.reject{|k,v| k["network"]}
@server.addRecord(options)
@server.addRecord(params)
rescue Proxy::DHCP::Collision => e
log_halt 409, e
rescue Proxy::DHCP::AlreadyExists

Also available in: Unified diff