Project

General

Profile

Actions

Bug #11763

closed

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

Added by Stephen Benjamin about 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
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 5 (2 open3 closed)

Related to Foreman - Feature #3220: API for "rendered" view of host parameters, taking into account inheritanceNew10/08/2013Actions
Related to Foreman - Bug #11860: N+1 query on API hosts#show from inherited parametersNew09/17/2015Actions
Related to Foreman - Bug #12132: API host's all parameters should also display host's parameters ClosedShlomi Zadok10/11/2015Actions
Related to Foreman - Refactor #12179: String extraction in host_inherited_params is wrongClosedOri Rabin10/15/2015Actions
Has duplicate Foreman - Bug #12981: Host API does not return all parameters for locationsResolved01/04/2016Actions
Actions #1

Updated by Stephen Benjamin about 9 years ago

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

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.

Actions #3

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 ()
Actions #4

Updated by Shlomi Zadok about 9 years ago

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

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
Actions #6

Updated by Dominic Cleal about 9 years ago

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

Updated by Dominic Cleal about 9 years ago

  • % Done changed from 0 to 100
Actions #8

Updated by Dominic Cleal about 9 years ago

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

Updated by Dominic Cleal about 9 years ago

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

Updated by Dominic Cleal almost 9 years ago

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

Also available in: Atom PDF