Bug 1195180
Summary: | API and WebUI Inconsistent full hostgroup naming | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Peter Vreman <peter.vreman> | ||||
Component: | API | Assignee: | orabin | ||||
Status: | CLOSED ERRATA | QA Contact: | jcallaha | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.0.7 | CC: | bbuckingham, bkearney, cwelton, jcallaha, orabin, peter.vreman | ||||
Target Milestone: | Unspecified | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | http://projects.theforeman.org/issues/14190 | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-07-27 11:38:42 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 | ||||||
Attachments: |
|
Description
Peter Vreman
2015-02-23 10:37:56 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. Created redmine issue http://projects.theforeman.org/issues/14190 from this bug Is this only for searching or would you like to change the name in the results? Everything you see in the UI for search should also be available in the API so you can search on hostgroup_fullname and hostgroup_title from hosts. Is one of them missing? I wouldn't want to remove any options from the api now in case someone is using them. In the output hostgroup_name is not always the same as hostgroup_title. If you are using nested hostgroups where B has the parent A then name would be: B and title: A/B. Do you need the hostgroup_title to also appear in the api result? Currently with Sat6.1.8 the API returns correctly 'name' and 'title' for hostgroup query. [crash] root@li-lc-1017:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hostgroups | jq . | grep Backup "title": "crash/Backup", "name": "Backup", "title": "crash/Backup/BackupTest", "name": "BackupTest", But for hosts API it returns 'hostgroup_name' with the value that belongs in fact to 'hostgroup_title'. [crash] root@li-lc-1017:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hosts | jq . | grep Backup "hostgroup_name": "crash/Backup/BackupTest", My expectation is that the API for /hosts it shall return also both: 'hostgroup_name' 'hostgroup_title' with the same values as returned by /hostgroups 'name' and 'title' My expectation for the WebUI is that in the search bar I can use the same fields as for the API. Hostgroups: 'name' and 'title' (and not 'label' as this is also not in the API available) Hosts: 'hostgroup_name' and 'hostgroup_title' Moving to POST since upstream bug http://projects.theforeman.org/issues/14190 has been closed ------------- Ori Rabin Applied in changeset commit:a322a96e9a948f3b3638fd8af8b84c4d70bcb4d7. Failed QA in Satellite 6.2 Beta Snap 20.2 The Hosts search UI still uses the field hostgroup_fullname whereas the API uses hostgroup_name in the Hosts path. See attached image for UI screenshot. API - /hosts/ "hostgroup_name": "backup", "hostgroup_title": "rhel7 libvirt/backup", API - /hostgroups/ "name": "backup", "title": "rhel7 libvirt/backup" Created attachment 1181759 [details]
ui search fields
I didn't want to break the api or to remove hostgroup_fullname from the UI so now you can search on both hostgroup_fullname and hostgroup_name in the API and UI. You don't see hostgroup_name in the list because the option 'hostgroup' already searches on the name so adding it would again give multiple options for the same thing. I can add it but I wouldn't want to remove hostgroup. Can you try and search both UI and API with hostgroup_name and hostgroup_fullname? It's not on the list so it won't autocomplete but it should still search. If it does and 2 searches on the same thing is ok I can add it to the list. searching with hostgroup_name does work as expected. as you mentioned, it isn't listed in the suggested search fields. this could work for me, but I will ask the reporter if this also meets their intentions. The new behaviour as described in https://bugzilla.redhat.com/show_bug.cgi?id=1195180#c7 is ok for me. Using in the query the 'hostgroup' is also intuitive. That the responds then has hostgroup_xxxxxx fields is perfectly fine to have a clear scoping. The main issues are solved: - 'label' vs. 'title' - 'hostgroup_name' returning the title instead of name only For me issue is solved. Thanks, Peter Peter thank you for the feedback! Based on the input, I am going to move the bugzilla back to ON_QA for GA. Based on #11, this can now be marked Verified in Satellite 6.2 Beta Snap 20.3. 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-2016:1501 |