Project

General

Profile

Bug #14190

API and WebUI Inconsistent full hostgroup naming

Added by Ori Rabin almost 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1195180
Description of problem:
The naming of the full hostgroup is inconsistent in both WebUI and API. In total is has 4 different names for the same value:

API
hosts -> hostgroup_name
hostgroups -> title

WebUI search has:
Hosts -> hostgroup_fullname or hostgroup_title field
Host Groups -> label field

API:

  1. curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hostgroups | jq '.results[] | .title' | grep Backup
    "crash/Backup"
    "crash/Backup/BackupTest"
  1. curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hosts | jq '.results[].hostgroup_name' | grep Backup
    "crash/Backup/BackupTest"

WebUI search:

Host Groups page:
"label ~ Backup"

Hosts page:
"hostgroup_fullname ~ Backup"
or
"hostgroup_title ~ Backup"

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

How reproducible:

Steps to Reproduce:
1. Create nested hostgroups
2. Add host to hostgroup
3. Query the full hostgroup name/label

Actual results:
Different field names has to be used

Expected results:
Consistent field name. Preferably label as this is also consistent with the Katello part.

Additional info:

Associated revisions

Revision a322a96e (diff)
Added by Ori Rabin almost 5 years ago

Fixes #14190 - consistent api output and search options

History

#1 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3378 added

#2 Updated by Ori Rabin almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 136

Also available in: Atom PDF