Bug #32878
closedParent Hostgroup hammer parameter accept only name, not title
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
- hammer hostgroup create --organization RedHat --name 20c --parent abcd
- 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:
Updated by Oleh Fedorenko over 3 years ago
- Status changed from New to Assigned
- Assignee set to Oleh Fedorenko
Updated by The Foreman Bot over 3 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/579 added
Updated by The Foreman Bot over 3 years ago
- Fixed in Releases hammer-cli-foreman-3.1.0 added
Updated by Oleh Fedorenko over 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset hammer-cli-foreman|11f019da1ef027ed0c96f6716bc0be690857570e.