Bug 1122929

Summary: not able to read guest_ids of a content host
Product: Red Hat Satellite Reporter: Tomas Lestach <tlestach>
Component: APIAssignee: Adam Price <adprice>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bbuckingham, omaciel, shetze
Target Milestone: UnspecifiedKeywords: PrioBumpQA, Triaged, UserExperience
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 20:32:59 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:

Description Tomas Lestach 2014-07-24 12:33:00 UTC
Description of problem:
I am able to set guest_ids for a content host, there isn't a way to read it.

Version-Release number of selected component (if applicable):
Satellite-6.0.4-RHEL-6-20140716.0-Satellite-x86_64

How reproducible:
always

Steps to Reproduce:
1. Both APIs - for registering and updating content host information - contains a 'guest_ids' optional parameter:

guest_ids /optional/ IDs of the virtual guests running on this content host /Value: Array

and you are allowed to set the parameter

2. Try to read the guest_ids parameter

Actual results:

I do not see a way to check the value of the guest_ids parameter
* 'hammer content-host info --id <uuid>' does not list the guest_ids information
* return value of create/update content host information API does not contain guest_ids information, only following keys are included:
["activation_keys", "autoheal", "checkin_time", "content_overrides", "content_view", "content_view_id", "created", "customInfo", "description", "distribution", "entitlementStatus", "environment", "host", "hostCollections", "href", "id", "installedProducts", "location", "name", "permissions", "products", "release", "release_ver", "service_level", "uuid"]
* Looking at WebUI - https://<fqdn>/content_hosts/<uuid>/info and other content_hosts tabs, I do not see any information about guest_ids

Expected results:
If your allowed to set a parameter, you shall be able to read it out as well.

Comment 2 Sebastian Hetze 2016-01-24 12:05:25 UTC
The only way I have found to retrieve host/guest relationship through API is via the deprecated "GET /katello/api/systems/:id" call using the undocumented fields=full parameter.

For example:

https://sat6.example.com/katello/api/systems/a3367516-4131-4ea7-8eca-4d438a769288?fields=full

reveals:

{
    "katello_id": ​78,
    "uuid": "a3367516-4131-4ea7-8eca-4d438a769288",
    "name": "guest.example.com",
    "description": "Initial Registration Params",
    "location": "None",

...

"type": "Virtual Guest",
"compliance": 
{

    "date": "2016-01-24T11:37:15.164+0000",
    "compliantUntil": "2016-02-13T05:00:00.000+0000",
    "nonCompliantProducts": [ ],
    "compliantProducts": 
...
},
"facts": 
{
...
}, 
"release_ver": "7Server",
"virtual_host": 
{

    "id": ​14,
    "uuid": "27251435-04ea-44d3-8962-5381f650b47c",
    "name": "hv01.example.com",
    "description": "Initial Registration Params",
    "location": "None",
    "environment_id": ​1,
    "created_at": "2015-09-02T17:38:43Z",
    "updated_at": "2015-09-02T17:38:43Z",
    "type": "Katello::Hypervisor",
    "content_view_id": ​1,
    "host_id": null

},
...
}

Comment 3 Peter Ondrejka 2017-02-10 13:30:28 UTC
Checked on Satellite 6.2.8, there were some changes meanwhile, content host api calls were moved under host, the setting is now called host[subscription_facet_attributes][hypervisor_guest_uuids]  when creating a host and hypervisor_guest_uuids when registering a host. Though no new options to view the value were added.

Comment 4 Bryan Kearney 2017-08-01 20:32:59 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.