Project

General

Profile

Actions

Bug #3729

closed

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

Added by Martin Hovmöller over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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 1 (0 open1 closed)

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

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
Actions #2

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.

Actions

Also available in: Atom PDF