Project

General

Profile

Actions

Bug #14190

closed

API and WebUI Inconsistent full hostgroup naming

Added by Ori Rabin about 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
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:

Actions #1

Updated by The Foreman Bot about 8 years ago

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

Updated by Ori Rabin about 8 years ago

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

Updated by Dominic Cleal about 8 years ago

  • translation missing: en.field_release set to 136
Actions

Also available in: Atom PDF