Bug #20433
closedHammer hostgroup not updating by title when katello plugin is installed
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1473534
Description of problem:
Hammer can't find hostgroup by --title in update command when hammer-cli-katello is installed.
[root@satellite ~]# hammer hostgroup list --search 'title ~ test'
---|---------|------------------|------------------|------------------------------------------------|------
ID | NAME | TITLE | OPERATING SYSTEM | ENVIRONMENT | MODEL
---|---------|------------------|------------------|------------------------------------------------|------
5 | test | HG2/test | | |
6 | test | HG2/test/test | | |
7 | test | hostgroup-1/test | | |
4 | test123 | test123 | RedHat 7.3 | KT_Default_Organization_Library_puppet_view_21 |
---|---------|------------------|------------------|------------------------------------------------|------
- hammer -d hostgroup update --domain-id 2 --title=HG2/test
Could not update the hostgroup:
Error: Could not find hostgroup, please set one of options --name, --title, --id.
Steps to Reproduce:
1. hammer hostgroup update --title 'HG2/test'
Actual results:
Could not update the hostgroup:
Error: Could not find hostgroup, please set one of options --name, --title, --id.
Expected results:
Hammer should find and update the hostgroup.
Additional info:
Without hammer-cli-katello hostgroup update works fine.
We can use --id 'ID' without issue. Name does not work as we have multiple names with different parents. Title is a valid option according to the help and the output of the command itself.
When creating, you create with a name + parent which equals title. As per the example, I can retrieve the titles but cannot pass these to the title argument to update.