Project

General

Profile

Bug #24735

"Parameters" are missing from the GET hostgroup api output

Added by Kavita Gaikwad 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
High
Category:
Host groups
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1620606

Description of problem:

"Parameters" are missing from the GET hostgroup api output

Version-Release number of selected component (if applicable): 6.4

How reproducible: Always

Steps to Reproduce:
1. Compare the output of the below command from sat 6.3 and sat 6.4. (Make sure that the hostgroup has some parameters like activation key on it)

  1. curl -s -u admin:redhat -k https://satellite.example.com/api/v2/hostgroups/1 | json_reformat

Actual results:

GET request does not provide the parameters added on a hostgroup.

Expected results:

GET request should provide the parameters added on a hostgroup.

Additional info:

Adding diff output from 6.3 and 6.4:


[root@satellite ~]# diff u /tmp/6_3 /tmp/6_4
--
/tmp/6_3 2018-08-22 12:50:16.083218432 0400
++ /tmp/6_4 2018-08-22 12:49:54.554759338 -0400
@ -6,10 +6,11 @
"lifecycle_environment_id": 1,
"lifecycle_environment_name": "Library",
"kickstart_repository_id": 7,
"kickstart_repository_name": "Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.5",
"subnet_id": 1,
"subnet_name": "subnet1",
"operatingsystem_id": 2,
"operatingsystem_name": "RedHat 7.5",
+ "operatingsystem_name": "RHEL Server 7.5",
"domain_id": 1,
"domain_name": "example.com",
"environment_id": 4,
@ -24,15 +25,18 @
"medium_id": null,
"medium_name": null,
"pxe_loader": null,
+ "subnet6_id": null,
+ "subnet6_name": null,
"architecture_id": 1,
"architecture_name": "x86_64",
"realm_id": null,
"realm_name": null,
"created_at": "2018-06-07 11:30:02 UTC",
- "updated_at": "2018-08-22 16:43:13 UTC",
+ "updated_at": "2018-08-22 16:49:21 UTC",
"id": 1,
"name": "hostgroup",
"title": "hostgroup",
+ "description": "",
"puppet_proxy_id": 1,
"puppet_proxy_name": "satellite.example.com",
"puppet_ca_proxy_id": 1,
@ -68,16 +72,6 @
"config_groups": [

],
- "parameters": [
- {
- "priority": 4,
- "created_at": "2018-06-07 11:31:14 UTC",
- "updated_at": "2018-06-07 11:31:14 UTC",
- "id": 1,
- "name": "kt_activation_keys",
- "value": "act"
- }
- ],
"all_puppetclasses": [ {
"id": 5,

Customer has proposed the below patch to fix the above issue:

=======================

  1. diff u /usr/share/foreman/app/views/api/v2/hostgroups/show.json.rabl.180822-1 /usr/share/foreman/app/views/api/v2/hostgroups/show.json.rabl
    --
    /usr/share/foreman/app/views/api/v2/hostgroups/show.json.rabl.180822-1 2018-07-27 17:34:29.000000000 0000
    +
    + /usr/share/foreman/app/views/api/v2/hostgroups/show.json.rabl 2018-08-22 11:21:16.122451498 +0000
    @ -2,6 +2,10 @

    extends "api/v2/hostgroups/main"

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

child :template_combinations do
extends "api/v2/template_combinations/base"
end

========================


Related issues

Related to Foreman - Feature #20500: Allow API GET /api/hostgroups to return hostgroup parametersClosed
Related to Katello - Refactor #24772: Add test which ensures parameters included in GET hostgroup apiClosed

Associated revisions

Revision 79b5e84d (diff)
Added by Kavita Gaikwad 4 months ago

Fixes #24735 - parameters missing from GET hostgroup api

History

#1 Updated by The Foreman Bot 4 months ago

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

#2 Updated by Ondřej Pražák 4 months ago

  • Related to Feature #20500: Allow API GET /api/hostgroups to return hostgroup parameters added

#3 Updated by Kavita Gaikwad 4 months ago

  • Related to Refactor #24772: Add test which ensures parameters included in GET hostgroup api added

#4 Updated by Michael Moll 4 months ago

  • Fixed in Releases 1.20.0 added

#5 Updated by Kavita Gaikwad 4 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF