Skip to content

Commit

Permalink
[CLOUDGA-12309] Populate providerCode in regions/az even when config …
Browse files Browse the repository at this point in the history
…is null

Summary:
[CLOUDGA-12309] Populate providerCode in regions/az in case config is null.
YBM as part of edit provider call removes `config` from the GET request. Because of which we are not setting `providerCode` in regions/azs to support backward compatiblity.
This diff removes that check & set `providerCode` for the new regions/zones added.

Test Plan: Manually verified the payload YBM passes.

Reviewers: yshchetinin, sb-yb

Reviewed By: sb-yb

Subscribers: yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D23773
  • Loading branch information
Vars-07 authored and premkumr committed Apr 7, 2023
1 parent d68fa38 commit 83f3b44
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -343,10 +343,7 @@ public Result editAccessKeyRotationSchedule(
// v2 API version 1 backward compatiblity support.
public JsonNode mayBeMassageRequest(JsonNode requestBody, Boolean forEdit) {
JsonNode config = requestBody.get("config");
if (config == null) {
return requestBody;
}
if (forEdit) {
if (forEdit && config != null) {
((ObjectNode) requestBody).remove("config");
}
String providerCode = requestBody.get("code").asText();
Expand Down

0 comments on commit 83f3b44

Please sign in to comment.