Project

General

Profile

Bug #7776

It is possible to register multiple parameters with the same name using the REST API

Added by Geir Hedemark almost 8 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

When doing several equal posts to https://<host>/api/v2/hostgroups/<hostgroupname>/parameters with a json of { "parameter" : { "name" : "foo", "value" : "something" } }, I am able to create several parameters named "foo".

When manipulating the same parameters with put on https://<host>/api/v2/hostgroups/<hostgroupname>/parameters/<internal id of param> with the json of { "parameter" : { "value" : "something" } }, an error stating

{
"error": {"id":3528,"errors":{"name":["has already been taken"]},"full_messages":["Name has already been taken"]}
}

is returned. I feel that this error should also be returned on the second POST above in the interests of providing a clear and orthogonal API.


Related issues

Is duplicate of Foreman - Bug #6695: Adding two OS parameters with same name doesn't raise any error when values are differentClosed2014-07-20

History

#1 Updated by Dominic Cleal almost 8 years ago

  • Is duplicate of Bug #6695: Adding two OS parameters with same name doesn't raise any error when values are different added

#2 Updated by Dominic Cleal almost 8 years ago

  • Status changed from New to Feedback

Thanks for the report, I think we've fixed this via #6695 for Foreman 1.7. If you get the opportunity, please try out our nightly builds to verify.

#3 Updated by Anonymous about 5 years ago

  • Status changed from Feedback to Resolved

no reaction, closing

Also available in: Atom PDF