Revision 715d097c
Added by Shimon Shtein over 6 years ago
app/controllers/api/v2/hosts_controller.rb | ||
---|---|---|
param :type, String, :desc => N_("optional: the STI type of host to create")
|
||
|
||
def facts
|
||
@host = detect_host_type.import_host params[:name], params[:facts][:_type] || 'puppet', params[:certname], detected_proxy.try(:id)
|
||
state = @host.import_facts(params[:facts].to_unsafe_h)
|
||
@host = detect_host_type.import_host params[:name], params[:certname]
|
||
state = @host.import_facts(params[:facts].to_unsafe_h, detected_proxy)
|
||
process_response state
|
||
rescue ::Foreman::Exception => e
|
||
render_message(e.to_s, :status => :unprocessable_entity)
|
Also available in: Unified diff
Fixes #15409 - Separated puppet facts from core