Bug 1390153 - /api/v2/hosts/:id does not expose content_source_id
Summary: /api/v2/hosts/:id does not expose content_source_id
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API - Content
Version: 6.2.0
Hardware: All
OS: Linux
high
high vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: jcallaha
URL:
Whiteboard:
Depends On: 1316897 1339613
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker 1122832 1405520
TreeView+ depends on / blocked
 
Reported: 2016-10-31 10:36 UTC by Roman Plevka
Modified: 2021-06-10 11:38 UTC (History)
11 users (show)

Fixed In Version: rubygem-katello-3.0.0.91-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1339613
: 1405520 (view as bug list)
Environment:
Last Closed: 2017-01-26 10:43:58 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15697 0 None None None 2016-10-31 10:36:13 UTC
Red Hat Knowledge Base (Solution) 2763741 0 None None None 2016-11-13 19:16:45 UTC
Red Hat Product Errata RHBA-2017:0197 0 normal SHIPPED_LIVE Satellite 6.2.7 Async Bug Release 2017-01-26 15:38:38 UTC

Comment 2 Bryan Kearney 2016-10-31 12:20:36 UTC
Upstream bug component is API - Content

Comment 3 Bryan Kearney 2016-10-31 12:20:40 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15697 has been resolved.

Comment 4 jcallaha 2017-01-10 19:41:45 UTC
Verified in Satellite 6.2.7 Snap 1

Querying the host, without modification returns
{
...
"content_source_id": null,
...
}

Submitting a PUT to the host path with a specific valid ID results in that id being saved/displayed in subsequent requests.
{
...
"content_source_id": null,
...
}

Submitting a PUT to the host path with an invalid ID results in the following error message.
{
  "error": {
    "message": "ERROR:  insert or update on table \"hosts\" violates foreign key constraint \"hosts_content_source_id_fk\"\nDETAIL:  Key (content_source_id)=(101) is not present in table \"smart_proxies\".\n"
  }
}

Comment 6 errata-xmlrpc 2017-01-26 10:43:58 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/RHBA-2017:0197


Note You need to log in before you can comment on or make changes to this bug.