Project

General

Profile

« Previous | Next » 

Revision c83e29ac

Added by Lukas Zapletal about 10 years ago

fixes #1966 - improved UI errors for proxy

View differences:

lib/proxy_api/tftp.rb
# Returns : Boolean status
def set mac, args
parse(post(args, "#{@variant}/#{mac}"))
rescue => e
raise ProxyException.new(url, e, N_("Unable to set TFTP boot entry for %s"), mac)
end
# Deletes a TFTP boot entry
......
# Returns : Boolean status
def delete mac
parse(super("#{@variant}/#{mac}"))
rescue => e
raise ProxyException.new(url, e, N_("Unable to delete TFTP boot entry for %s"), mac)
end
# Requests that the proxy download the bootfile from the media's source
......
# Returns : Boolean status
def fetch_boot_file args
parse(post(args, "fetch_boot_file"))
rescue => e
raise ProxyException.new(url, e, N_("Unable to fetch TFTP boot file"))
end
# returns the TFTP boot server for this proxy
......
false
rescue RestClient::ResourceNotFound
nil
rescue => e
raise ProxyException.new(url, e, N_("Unable to detect TFTP boot server"))
end
# Create a default pxe menu
......
# Returns : Boolean status
def create_default args
parse(post(args, "create_default"))
rescue => e
raise ProxyException.new(url, e, N_("Unable to create default TFTP boot menu"))
end
end

Also available in: Unified diff