From: Benjamin, Max (mb388a) Date: Sat, 8 Jun 2019 00:28:02 +0000 (-0400) Subject: Merge remote-tracking branch 'origin/dublin' into 'origin/master' X-Git-Tag: 1.5.2~286 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=242e71883f59b8ad971f77c9bbdf032527fd77c0;p=so.git Merge remote-tracking branch 'origin/dublin' into 'origin/master' Change-Id: Ib8eaae7ee4a404bde568803afaf6c4e183cbbd53 Issue-ID: SO-2004 Signed-off-by: Benjamin, Max (mb388a) --- 242e71883f59b8ad971f77c9bbdf032527fd77c0 diff --cc asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java index a084ce7177,619d89438e..317296fbed --- a/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java @@@ -68,9 -67,10 +68,11 @@@ public class ActivitySpecsActions Response response = httpClient.post(payload); int statusCode = response.getStatus(); - if (statusCode != HttpStatus.SC_OK) { + if (statusCode == HttpStatus.SC_UNPROCESSABLE_ENTITY) { - logger.warn("{} {} {}", "ActivitySpec", activitySpec.getName(), "already exists in SDC"); ++ logger.warn(Strings.repeat("{} ", 3), "ActivitySpec", activitySpec.getName(), "already exists in SDC"); + } else if (statusCode != HttpStatus.SC_OK && statusCode != HttpStatus.SC_CREATED) { - logger.warn("{} {} {}", "Error creating activity spec", activitySpec.getName(), statusCode); + logger.warn(Strings.repeat("{} ", 3), "Error creating activity spec", activitySpec.getName(), + statusCode); } else { if (response.getEntity() != null) { ActivitySpecCreateResponse activitySpecCreateResponse = @@@ -110,8 -110,10 +112,11 @@@ int statusCode = response.getStatus(); - if (statusCode != HttpStatus.SC_OK) { + if (statusCode == HttpStatus.SC_UNPROCESSABLE_ENTITY) { - logger.warn("{} {} {}", "ActivitySpec with id", activitySpecId, "is already certified in SDC"); ++ logger.warn(Strings.repeat("{} ", 3), "ActivitySpec with id", activitySpecId, ++ "is already certified in SDC"); + } else if (statusCode != HttpStatus.SC_OK) { - logger.warn("{} {} {}", "Error certifying activity", activitySpecId, statusCode); + logger.warn(Strings.repeat("{} ", 3), "Error certifying activity", activitySpecId, statusCode); } else { certificationResult = true; }