Closed vjdhama closed 6 years ago
API calls to register new host are not idempotent. Example:
For payload
{ "name": "server01", "token": "dd3a5w2", "group_name": "admin" }
Response to first call is:
{ "success": true, "access_key": "mo5bm2sc", "host": "svr01", "groups": [ "admin", "server01_host_group", ] }
and response to second call is:
{ "success": true, "access_key": "sa35v20a", "host": "svr01", "groups": [ "admin", "admin", "server01_host_group", "server01_host_group", ] }
Fixed with #1a0da5d We weren't creating group twice, but we were adding group twice, now we check if the group exist in host groups then don't add it again.
API calls to register new host are not idempotent. Example:
For payload
Response to first call is:
and response to second call is: