Bug #15589
closedRemove `hammer content-host update` - New command is `hammer host update`
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1338780
Description of problem:
Unable to update content host name via 'hammer content-host update' command - operation succeeds but name is not updating.
Version-Release number of selected component (if applicable):
Sat 6.2.0 GA SNAP 12.1
How reproducible:
Always
Steps to Reproduce:
1. Create any content host:
hammer host subscription register --content-view-id="30" --organization-id="31" --name="XehsTnSPdubYUBECpJJq" --lifecycle-environment-id="30"
2. Get content host info:
hammer content-host info --id="2"
3. Update content-host name via hammer:
hammer content-host update --id="f2cef045-2381-4700-8013-ebbea6a2f141" --new-name="mjbhe8gnp34ihmtocyuusqfk8nzvbokn"
4. Get content-host info again, check its name
hammer content-host info --id="f2cef045-2381-4700-8013-ebbea6a2f141"
Actual results:
Content host name was not updated (although 'Content host updated' message received):
hammer content-host info --id="f2cef045-2381-4700-8013-ebbea6a2f141"
Name: XehsTnSPdubYUBECpJJq
ID: f2cef045-2381-4700-8013-ebbea6a2f141
Katello Agent Installed: no
Location: None
Lifecycle Environment: Library
Content View: Default Organization View
Entitlement Status: valid
Release Version:
Autoheal: true
Security Errata: 0
Bugfix Errata: 0
Enhancement Errata: 0
Expected results:
Content host name should be updated. And if it wasn't updated for some reason - 'hammer content-host update' should return error message with non-zero return code.
Additional info: