Bug #11763
closedHost API does not return all parameters (e.g. from locations, et al.)
Description
The data passed to the host/managed/after_build hook does not contain any parameter data. For example:
# cat HOOKIN | json_reformat { "host": { [..] "all_puppetclasses": [ ], "parameters": [ ], "interfaces": [ ], "puppetclasses": [ ], "config_groups": [ ] } }
Version-Release number of selected component (if applicable):
6.1 GA
How reproducible:
Always.
Steps to Reproduce:
1. In the location, add some paramter data (we add for example time-zone (and set this to 'America/New_York')
2) Add a hook to host/managed/after_build (we simply cat stdin to a tmp file for analysis)
3) the JSON does NOT contain ANY parameter data
Actual results:
the JSON does NOT contain ANY parameter data
Expected results:
The parameter data to be populated correctly with ALL parameters which would be applicable to that host.
Additional info:
Updated by Stephen Benjamin about 9 years ago
- Related to Feature #3220: API for "rendered" view of host parameters, taking into account inheritance added
Updated by Stephen Benjamin about 9 years ago
Hooks uses the API "show" JSON.
That `parameters` key only contains those directly associated to the host, not the inherited ones. The reason being is when working with the API, you can only edit the parameters directly attached to the host, so that's all you're generally interested in.
The API needs to provide an `all_parameters` key like we do for puppetclasses, which provides the full set of resolved parameters from Locations, Hostgroups, etc.
Updated by The Foreman Bot about 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2707 added
- Pull request deleted (
)
Updated by Shlomi Zadok about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset a4d21e680b3178f5170fe7d7b03276f4042e7839.
Updated by Dominic Cleal about 9 years ago
- Assignee set to Shlomi Zadok
- % Done changed from 100 to 0
- Translation missing: en.field_release set to 63
Updated by Dominic Cleal about 9 years ago
- Related to Bug #11860: N+1 query on API hosts#show from inherited parameters added
Updated by Dominic Cleal almost 9 years ago
- Related to Bug #12132: API host's all parameters should also display host's parameters added
Updated by Dominic Cleal almost 9 years ago
- Related to Refactor #12179: String extraction in host_inherited_params is wrong added
Updated by Dominic Cleal over 8 years ago
- Has duplicate Bug #12981: Host API does not return all parameters for locations added