Bug #6054
closedhammer: cmd to remove a content host from host-collection should use system id instead of UUID
Description
Description of problem:
to remove a content-host from host collection, I passed system-id (as help says) but commands throws:
Could not remove content host:
Couldn't find Katello::System with uuid = 3
Its misleading, either we need to update the --help to use --UUID or we need to update the cli api to use --system-id.
[root@dhcp207-55 ~]# hammer host-collection content-hosts --id 1
---|--------------------------------------|--------------------------
ID | UUID | NAME
---|--------------------------------------|--------------------------
2 | 92c8c0a4-fcd8-4d00-a1de-900bf742c96e | vodka.katellolabs.org
3 | 3a248438-5092-467d-8ee0-1671fb125ef4 | scroponok.katellolabs.org
---|--------------------------------------|--------------------------
[root@dhcp207-55 ~]# hammer host-collection remove-content-host --name hc1 --organization-id 1 --system-id 3
Could not remove content host:
Couldn't find Katello::System with uuid = 3
[root@dhcp207-55 ~]# hammer host-collection remove-content-host --help
Usage:
hammer host-collection remove-content-host [OPTIONS]
Options:
--id ID
--name NAME Name to search by
--organization ORGANIZATION_NAME
--organization-id ORGANIZATION_ID
--organization-label ORGANIZATION_LABEL
--system SYSTEM_NAME
--system-id SYSTEM_ID
-h, --help print help
Version-Release number of selected component (if applicable):
sat6 beta snap7 compose 2 (Satellite-6.0.3-RHEL-6-20140528.4)
How reproducible:
always
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
we need to update the --help to use --UUID or we need to update the cli api to use --system-id.
Additional info: