Deprecate PUT target tag multi-assignment (#2468)
* Deprecate PUT /rest/v1/targettags/{targetTagId}/assigned -> use new POST method with same endpoint and params
* Remove deprecated DS tag mulit-assigned PUT method /rest/v1/distributionsettags/{distributionsetTagId}/assigned -> use already existing POST method with same endpoint and params
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -429,7 +429,7 @@ class MgmtDistributionSetTagResourceTest extends AbstractManagementApiIntegratio
|
||||
withMissing.addAll(missing);
|
||||
|
||||
mvc.perform(
|
||||
put(MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
post(MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
.content(JsonBuilder.toArray(withMissing))
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
.andDo(MockMvcResultPrinter.print())
|
||||
|
||||
@@ -314,7 +314,7 @@ public class MgmtTargetTagResourceTest extends AbstractManagementApiIntegrationT
|
||||
final Target assigned0 = targets.get(0);
|
||||
final Target assigned1 = targets.get(1);
|
||||
|
||||
mvc.perform(put(MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
mvc.perform(post(MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
.content(JsonBuilder.toArray(Arrays.asList(assigned0.getControllerId(), assigned1.getControllerId())))
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
.andDo(MockMvcResultPrinter.print())
|
||||
@@ -347,7 +347,7 @@ public class MgmtTargetTagResourceTest extends AbstractManagementApiIntegrationT
|
||||
final List<String> withMissing = new ArrayList<>(targets);
|
||||
withMissing.addAll(missing);
|
||||
|
||||
mvc.perform(put(MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
mvc.perform(post(MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
.content(JsonBuilder.toArray(withMissing))
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
.andDo(MockMvcResultPrinter.print())
|
||||
@@ -387,7 +387,7 @@ public class MgmtTargetTagResourceTest extends AbstractManagementApiIntegrationT
|
||||
final List<String> withMissing = new ArrayList<>(targets);
|
||||
withMissing.addAll(missing);
|
||||
|
||||
mvc.perform(put(MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
mvc.perform(post(MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
.param("onNotFoundPolicy", MgmtTargetTagRestApi.OnNotFoundPolicy.ON_WHAT_FOUND_AND_FAIL.name())
|
||||
.content(JsonBuilder.toArray(withMissing))
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
@@ -429,7 +429,7 @@ public class MgmtTargetTagResourceTest extends AbstractManagementApiIntegrationT
|
||||
final List<String> withMissing = new ArrayList<>(targets);
|
||||
withMissing.addAll(missing);
|
||||
|
||||
mvc.perform(put(MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
mvc.perform(post(MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
|
||||
.param("onNotFoundPolicy", MgmtTargetTagRestApi.OnNotFoundPolicy.ON_WHAT_FOUND_AND_SUCCESS.name())
|
||||
.content(JsonBuilder.toArray(withMissing))
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
|
||||
Reference in New Issue
Block a user