use existing pnf - logging improvement 38/108138/1
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>
Fri, 22 May 2020 12:50:26 +0000 (14:50 +0200)
committerLukasz Muszkieta <lukasz.muszkieta@nokia.com>
Fri, 22 May 2020 12:54:55 +0000 (14:54 +0200)
Issue-ID: SO-2937
Signed-off-by: Lukasz Muszkieta <lukasz.muszkieta@nokia.com>
Change-Id: Ic4832d7f6608b684d0b1c902a8a7b48f6639e6e1

bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIPnfResourcesTest.java

index 7184bba..3b22cd9 100644 (file)
@@ -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);
index 5e9b4c7..59cd53e 100644 (file)
@@ -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));
         }
     }