Project

General

Profile

Bug #32878

Parent Hostgroup hammer parameter accept only name, not title

Added by Oleh Fedorenko about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
High
Category:
Other commands
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1807536

Description of problem: While creating hostgroup through hammer getting error:
~~
Could not create the hostgroup:
Error: hostgroup not found.
~
~

Creating the child hostgroup through WEB UI works as it gives the option to select the complete Parent hostgroup path. However from hammer we cannot select the complete Parent hostgroup path.

For example:
~~
[root@sat ~]# hammer hostgroup create --organization RedHat --name 20c --parent new1/latest/abcd
Could not create the hostgroup:
Error: hostgroup not found.
~
~

While, we can create a child hostgroup by only mentioning abcd:
~~
[root@sat ~]# hammer hostgroup create --organization RedHat --name 20c --parent abcd
~
~

This becomes a problem if we have multiple parent hostgroup paths with same names. For example:
- new1/latest/abcd
- new1/abcd
- new2/latest

In the above scenario, we can easily create child hostgroup from WEB UI as it suggests the complete hostgroup paths in "Parent Hostgroup" option. On the other hand, it is impossible to use the same using hammer as the same name is used in multiple paths.

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

How reproducible: Everytime

Steps to Reproduce:
1. The hostgroup can be created by mentioning sinagle name
  1. hammer hostgroup create --organization RedHat --name 20c --parent abcd
2. If you mention the complete path then it fails:
  1. hammer hostgroup create --organization RedHat --name 20c --parent new1/latest/abcd
    Could not create the hostgroup:
    Error: hostgroup not found.

Actual results: For creating child hostgroups using hammer we cannot specify the complete parent hostgroup path

Expected results: hammer should allow to use complete parent hostgroup path just like the Satellite web UI

Additional info:

Associated revisions

Revision 11f019da (diff)
Added by Oleh Fedorenko about 1 year ago

Fixes #32878 - Add parent title option for hostgroup

Revision 4e6adfac
Added by Yifat Makias about 1 year ago

Merge pull request #579 from ofedoren/bug-32878-add-title-opt

Fixes #32878 - Add parent title option for hostgroup

History

#1 Updated by Oleh Fedorenko about 1 year ago

  • Assignee set to Oleh Fedorenko
  • Status changed from New to Assigned

#2 Updated by The Foreman Bot about 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/579 added

#3 Updated by The Foreman Bot about 1 year ago

  • Fixed in Releases hammer-cli-foreman-3.1.0 added

#4 Updated by Oleh Fedorenko about 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF