Project

General

Profile

Actions

Bug #19565

closed

Missing host parameters in foreman_hooks json

Added by Adam Winberg almost 7 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Started playing with foreman_hooks and noticed that the json data passed to my hook script is missing host parameters when I create a new host. I started digging through commits and found that if i revert this commit:

https://github.com/theforeman/foreman/commit/94265cf7ab7e383fc864182efd443be0adfac1de#diff-5ef0189b17a78606adef8f22e909697e

in the app/views/api/v2/hosts/show.json.rabl file it works again.

So, this code (which nowadays is moved to main.json.rabl):

node do |host|
  { :parameters => partial("api/v2/parameters/base", :object => host.host_parameters.authorized) }
end

does not work for me but this do:

child :host_parameters => :parameters do
  extends "api/v2/parameters/base" 
end

I'm running this as administrator in my Foreman installation, am I missing something or is this a bug?

Actions #1

Updated by Dominic Cleal almost 7 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF