Bug 1488130

Summary: /api/v2/hosts/:id does not expose content_source_id
Product: Red Hat Satellite Reporter: Andrii Balakhtar <abalakht>
Component: API - ContentAssignee: Andrew Kofink <akofink>
Status: CLOSED ERRATA QA Contact: Bruno Rocha <rochacbruno>
Severity: high Docs Contact:
Priority: high    
Version: 6.3.0CC: akarsale, akofink, bbuckingham, bkearney, brubisch, csulekha, cwelton, dlezzoum, dlobatog, egolov, ehelms, jentrena, mburgerh, mhulan, peter.vreman, rankumar, rplevka, satellite6-bugs, sauchter, tstrachota
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1339613 Environment:
Last Closed: 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:
Attachments:
Description Flags
Host API Examples none

Description Andrii Balakhtar 2017-09-04 12:03:40 UTC
+++ This bug was initially created as a clone of Bug #1339613 +++

Seems like regression has happened and GET request does not return content_source_id field again. Also, according to Bug #1339613 , PUT was never fixed.

Description of problem:
GET or PUT /api/v2/hosts/:id does not return content_source_id field

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

How reproducible:
Always

Steps to Reproduce:
1. Issue a HTTP GET or PUT to /api/v2/hosts/:id
2. Check the returned json
3.

Actual results:
content_source_id is missing

Expected results:
content_source_id is present

Additional info:
Modifying content_source_id with a PUT call seems to work, but the current value of content_source_id can not be queried

Comment 4 Andrii Balakhtar 2017-09-04 12:16:35 UTC
UPD. Version-Release number of selected component field:
Satellite 6.3.0 Snap 13

Comment 5 Daniel Lobato Garcia 2017-09-04 15:42:26 UTC
This regression might have happened if #17644 was not fully cherry-picked or badly rebased from upstream. Linking them in a minute...

Comment 6 Daniel Lobato Garcia 2017-09-04 15:43:39 UTC
Connecting redmine issue http://projects.theforeman.org/issues/17644 from this bug

Comment 7 Satellite Program 2017-09-04 16:18:30 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17644 has been resolved.

Comment 8 Satellite Program 2017-09-06 18:18:34 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17644 has been resolved.

Comment 11 Andrew Kofink 2017-09-21 17:09:24 UTC
The `content_source_[id|name]` parameters were moved to `content_facet_attributes["content_source_[id|name]"]`

Comment 20 Andrew Kofink 2017-09-27 15:42:23 UTC
Created attachment 1331478 [details]
Host API Examples

satellite-6.3.0-18.0.beta.el7sat.noarch

I am able to see the content_facet_attributes with the content_source_id properly filled, and I am able to update content_facet_attributes. See the attachment for the exact commands and output I tried.

Comment 26 Bruno Rocha 2017-10-04 18:51:35 UTC
Verified in 

rpm -q satellite
satellite-6.3.0-18.0.beta.el7sat.noarch


Field `content_source_id` shows under `content_facet_attributes`

Also verified the changing of this field via api PUT and also via web UI.

Comment 27 Djebran Lezzoum 2017-10-09 15:26:06 UTC
qe_test_coverage PR : https://github.com/SatelliteQE/robottelo/pull/5307

Comment 28 Bryan Kearney 2018-02-21 17:34:08 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

Comment 29 Bryan Kearney 2018-02-21 17:34:09 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