Bug 1449202

Summary: API Hostgroup GET missing kickstart_repository_id
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: API - ContentAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Brad Buckingham <bbuckingham>
Severity: medium Docs Contact:
Priority: high    
Version: 6.2.9CC: bbuckingham, bkearney, brubisch, ehelms, jcallaha
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-3.4.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122832    

Description Peter Vreman 2017-05-09 12:10:46 UTC
Description of problem:
The field kickstart_repository_id is not made available through the API.



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


How reproducible:


Steps to Reproduce:
1. Run curl -HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost:443/api/v2/hostgroups/109
2.
3.

Actual results:
Field kickstart_repository_id not included

Expected results:
Field ickstart_repository_id included

Additional info:

Comment 1 Peter Vreman 2017-05-09 12:14:43 UTC
--- $ktdir/app/views/katello/api/v2/hostgroups_extensions/show.json.rabl
+++ $ktdir/app/views/katello/api/v2/hostgroups_extensions/show.json.rabl
@@ -1,3 +1,3 @@
 object @hostgroup
 extends 'api/v2/hostgroups/show'
-attributes :content_source_id, :content_source_name, :content_view_id, :content_view_name, :lifecycle_environment_id, :lifecycle_environment_name
+attributes :content_source_id, :content_source_name, :content_view_id, :content_view_name, :lifecycle_environment_id, :lifecycle_environment_name, :kickstart_repository_id

Comment 2 Justin Sherrill 2017-05-09 13:16:06 UTC
Created redmine issue http://projects.theforeman.org/issues/19489 from this bug

Comment 3 Satellite Program 2017-05-09 14:18:19 UTC
Upstream bug assigned to jsherril

Comment 4 Satellite Program 2017-05-09 14:18:23 UTC
Upstream bug assigned to jsherril

Comment 6 Satellite Program 2017-05-10 18:18:14 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19489 has been resolved.

Comment 7 Brad Buckingham 2017-08-02 18:16:08 UTC
Verified with Satellite 6.3 SNAP 9: satellite-6.3.0-16.0.beta.el7sat.noarch, tfm-rubygem-katello-3.4.2-1.el7sat.noarch

# curl -k -u admin:changeme -H"Content-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost:443/api/v2/hostgroups/3|json_reformat
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1169    0  1152  100    17   6526     96 --:--:-- --:--:-- --:--:--  6545
{
    "content_source_id": 1,
    "content_source_name": "bkr-hv01-guest23.dsal.lab.eng.bos.redhat.com",
    "content_view_id": 4,
    "content_view_name": "Default Organization View",
    "lifecycle_environment_id": 2,
    "lifecycle_environment_name": "Library",
    "kickstart_repository_id": 11,
    "subnet_id": null,
    "subnet_name": null,
    "operatingsystem_id": 3,
    "operatingsystem_name": "RedHat 7.4",
    "domain_id": null,
    "domain_name": null,
    "environment_id": null,
    "environment_name": null,
    "compute_profile_id": null,
    "compute_profile_name": null,
    "ancestry": null,
    "parent_id": null,
    "parent_name": null,
    "ptable_id": null,
    "ptable_name": null,
    "medium_id": null,
    "medium_name": null,
    "architecture_id": 1,
    "architecture_name": "x86_64",
    "realm_id": null,
    "realm_name": null,
    "created_at": "2017-08-02 18:10:54 UTC",
    "updated_at": "2017-08-02 18:10:54 UTC",
    "id": 3,
    "name": "rhel7",
    "title": "rhel7",
    "puppet_proxy_id": null,
    "puppet_proxy_name": null,
    "puppet_ca_proxy_id": null,
    "puppet_ca_proxy_name": null,
    "puppet_proxy": null,
    "puppet_ca_proxy": null,
    "template_combinations": [

    ],
    "puppetclasses": [

    ],
    "config_groups": [

    ],
    "parameters": [

    ],
    "all_puppetclasses": {

    },
    "locations": [

    ],
    "organizations": [
        {
            "id": 3,
            "name": "b-corp",
            "title": "b-corp",
            "description": ""
        }
    ]
}

Comment 8 Satellite Program 2018-02-21 16:51:07 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336