Bug #3729
closedHammer doesn't give reasonable output when using names instead of id numbers while updating hosts.
Description
If I use hammer to update a host, and use the name of the value I want to update instead of the id, for example "hammer host update --environment test --name test.test.com" instead of "hammer host update --environment 15 --name test.test.com", the output of hammer is a calm and nice "Host updated".
However, this doesn't actually work, since there is no environment that has the id "test.
What seems to happen instead is that the host does get updated, but not to what you specify in the command line, but rather to the default value for that entry. In the above case with the environment, the machine got moved to the production environment, even though I specified test.
Updated by Tomáš Strachota about 10 years ago
- Related to Bug #4266: Host API doesn't give reasonable response when sending ids of non-existing environments added
Updated by Tomáš Strachota about 10 years ago
- Status changed from New to Closed
The problem is actually in the API that returns 200 even when the associated resource (environment in this case) is not found. I opened #4266, closing this one.