From: Lukasz Muszkieta Date: Fri, 22 May 2020 12:50:26 +0000 (+0200) Subject: use existing pnf - logging improvement X-Git-Tag: 1.7.1~131^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=594721c136abf0b1f203228bf946a286747ed34c;p=so.git use existing pnf - logging improvement Issue-ID: SO-2937 Signed-off-by: Lukasz Muszkieta Change-Id: Ic4832d7f6608b684d0b1c902a8a7b48f6639e6e1 --- diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java index 7184bba377..3b22cd9d81 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java @@ -98,7 +98,8 @@ public class AAIPnfResources { pnfFromAai.getPnfName()); } else { String errorMessage = String.format( - "pnf with name %s already exists with orchestration status %s, only status Inventoried allows to use existing pnf", + "pnf with name %s already exists with orchestration status %s, existing pnf can be used only " + + "if status is not set or set as Inventoried", pnfFromAai.getPnfName(), pnfFromAai.getOrchestrationStatus()); logger.error(errorMessage); throw new Exception(errorMessage); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIPnfResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIPnfResourcesTest.java index 5e9b4c7592..59cd53edd5 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIPnfResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIPnfResourcesTest.java @@ -149,7 +149,8 @@ public class AAIPnfResourcesTest extends TestDataSetup { } catch (Exception e) { // then assertThat(e.getMessage()).isEqualTo(String.format( - "pnf with name %s already exists with orchestration status Active, only status Inventoried allows to use existing pnf", + "pnf with name %s already exists with orchestration status Active, existing pnf can be used only " + + "if status is not set or set as Inventoried", PNF_NAME)); } }