Project

General

Profile

Bug #11763

Host API does not return all parameters (e.g. from locations, et al.)

Added by Stephen Benjamin almost 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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:


Related issues

Related to Foreman - Feature #3220: API for "rendered" view of host parameters, taking into account inheritanceNew2013-10-08
Related to Foreman - Bug #11860: N+1 query on API hosts#show from inherited parametersNew2015-09-17
Related to Foreman - Bug #12132: API host's all parameters should also display host's parameters Closed2015-10-11
Related to Foreman - Refactor #12179: String extraction in host_inherited_params is wrongClosed2015-10-15
Has duplicate Foreman - Bug #12981: Host API does not return all parameters for locationsResolved2016-01-04

Associated revisions

Revision a4d21e68 (diff)
Added by Shlomi Zadok almost 4 years ago

Fixes #11763 - Add inherited parameters to Host view api

History

#1 Updated by Stephen Benjamin almost 4 years ago

  • Related to Feature #3220: API for "rendered" view of host parameters, taking into account inheritance added

#2 Updated by Stephen Benjamin almost 4 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.

#3 Updated by The Foreman Bot almost 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2707 added
  • Pull request deleted ()

#4 Updated by Shlomi Zadok almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal almost 4 years ago

  • Assignee set to Shlomi Zadok
  • % Done changed from 100 to 0
  • Legacy Backlogs Release (now unused) set to 63

#6 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #11860: N+1 query on API hosts#show from inherited parameters added

#7 Updated by Dominic Cleal almost 4 years ago

  • % Done changed from 0 to 100

#8 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #12132: API host's all parameters should also display host's parameters added

#9 Updated by Dominic Cleal almost 4 years ago

  • Related to Refactor #12179: String extraction in host_inherited_params is wrong added

#10 Updated by Dominic Cleal over 3 years ago

  • Has duplicate Bug #12981: Host API does not return all parameters for locations added

Also available in: Atom PDF