PUT /api/3.0/federations only respects first item in request payload #6104
Labels
bug
something isn't working as intended
high impact
impacts the basic function, deployment, or operation of a CDN
Traffic Ops
related to Traffic Ops
Milestone
This Bug Report affects these Traffic Control components:
Current behavior:
A request to PUT /api/3.0/federations with a request body like:
will wipe out ALL "Federation to federation resolver mappings" associated with a user’s Delivery Service(s) and replace them with only the first one in the request payload. So if you have 100 mappings and try to add one, you will end up with 1 (instead of 101)
Expected behavior:
the "Federation to federation resolver mappings" associated with a user’s Delivery Service(s) should be replaced with ALL entries sent in the request payload. not just the first obviously.
Steps to reproduce:
to create 2 federation mappings for your user. verify that 2 were created by calling GET /api/3.0/federations/all. Now try the PUT /api/3.0/federations endpoint with the same payload as the POST. verify that only 1 mapping exists by calling GET /api/3.0/federations/all.
Side note: what is the difference between the POST and PUT /api/3.0/federations (besides one apparently has a bug and the other does not)
The text was updated successfully, but these errors were encountered: