Bug #15291
hammer host-collection add-host/remove-host always return success
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1335559
Description of problem:
The `hammer host-collection add-host/remove-host` commands always return success messages, regardless of whether the hosts added/removed are found.
Version-Release number of selected component (if applicable):
6.1,6.2,devel
How reproducible:
Always
Steps to Reproduce:
1. Run the following hammer commands with a valid host collection but invalid host ids
`hammer host-collection add-host --id 1 --host-ids 2354,34`
`hammer host-collection remove-host --id 1 --host-ids 2354,34`
Actual results:
The host(s) has been added
The host(s) has been removed
Expected results:
Could not find hosts with IDs 2354,34. No hosts added.
Could not find hosts with IDs 2354,34. No hosts removed.
Additional info:
Related issues
Associated revisions
History
#1
Updated by Dominic Cleal over 4 years ago
- Project changed from Hammer CLI to Katello
- Category set to Hammer
#2
Updated by Justin Sherrill over 4 years ago
- Priority changed from Normal to Low
- Legacy Backlogs Release (now unused) set to 143
- Difficulty set to medium
#3
Updated by Justin Sherrill over 4 years ago
- Legacy Backlogs Release (now unused) changed from 143 to 114
#4
Updated by The Foreman Bot over 4 years ago
- Status changed from New to Ready For Testing
- Assignee set to Andrew Kofink
- Legacy Backlogs Release (now unused) deleted (
114) - Pull request https://github.com/Katello/katello/pull/6229 added
#5
Updated by Anonymous over 4 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|2e3e5edf4d8a1883aa827a6278ad7cd83bdc00d4.
#6
Updated by Justin Sherrill over 4 years ago
- Legacy Backlogs Release (now unused) set to 162
#7
Updated by Andrew Kofink over 3 years ago
- Copied to Bug #21281: hammer host-collection add-host/remove-host always return success added
Fixes #15291 - Add detailed error messages to HCs (#6229)
Add detailed error messages to host_collections#add_hosts and
host_collections#remove_hosts for the cases when a host cannot be
found and when a host already exists/doesn't exist on the host
collection, respectively.