Project

General

Profile

Bug #3729

Hammer doesn't give reasonable output when using names instead of id numbers while updating hosts.

Added by Martin Hovmöller about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:
Red Hat JIRA:

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.


Related issues

Related to Foreman - Bug #4266: Host API doesn't give reasonable response when sending ids of non-existing environmentsClosed

History

#1 Updated by Tomáš Strachota about 9 years ago

  • Related to Bug #4266: Host API doesn't give reasonable response when sending ids of non-existing environments added

#2 Updated by Tomáš Strachota about 9 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.

Also available in: Atom PDF