Hello,

I use a foreman hooks script which controlled by the host parameters, but the 
script has not worked since updating foreman from 1.13 to 1.14.

When looking into the code, I found that it's due to "Fixes #16114" on 1.14.0.
JSON representation of the hook object passed in on stdin has not included 
parameters/all_parameters arrays.

[Add parameters to host API response when given include=parameters or 
all_parameters (#16114)]
<http://projects.theforeman.org/issues/16114>

app/views/api/v2/hosts/show.json.rabl
 
5   -node do |host|
6   -  { :parameters => partial("api/v2/parameters/base", :object => 
host.host_parameters.authorized) }
7   -end
8   -
9   -node do |host|
10  -  { :all_parameters => partial("api/v2/parameters/base", :object => 
host.host_params_objects) }
11  -end


In addition to foreman hooks, host API such as "POST /api/hosts" and "PUT 
/api/hosts/:id" have not returned parameters/all_parameters arrays in JSON 
response since applying this patch.

I suggest to return to show.json.rabl back to the original. I think that the 
restoration of show.json.rabl does not affect the other API's JSON response 
such as "GET /api/hosts" or "GET /api/hosts/:id".

Does it have any problems or affect any APIs/Plugins?
If so, I will propose an alternative patch for foreman hooks to revive missing 
arrays.

Regards,
Akira Hirai

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to