aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-02-10 13:40:33 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-10 13:40:33 +0000
commitab5b19282e19cbe1f7f44d58afb99e3d8b9ecae3 (patch)
treeb59617430c3a93340cbc4b4908745d8c99754da1
parent32464a960c6d26fa6a3a1bb25475ac2c1b96e829 (diff)
parentb5dd0fc4de9fc2d6d01392b90c5232664ae0293c (diff)
Merge "Fix logging issue in so-simulator"
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java6
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java6
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ProcessSDNCAssignService.java7
4 files changed, 15 insertions, 6 deletions
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java
index 075a5b7a6b..7b6fb36fab 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java
@@ -5,6 +5,8 @@ import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIResourcesClient;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.consol.citrus.actions.AbstractTestAction;
import com.consol.citrus.context.TestContext;
@@ -13,7 +15,7 @@ public class ProcessNetwork extends AbstractTestAction {
@Override
public void doExecute(TestContext context) {
-
+ final Logger logger = LoggerFactory.getLogger(ProcessNetwork.class);
try {
int random = (int) (Math.random() * 50 + 1);
@@ -35,7 +37,7 @@ public class ProcessNetwork extends AbstractTestAction {
aaiResourceClient.delete(networkURI);
}
} catch (Exception e) {
- e.printStackTrace();
+ logger.debug("Exception in ProcessNetwork.doExecute", e);
}
}
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java
index e061d2b79d..76ad823f18 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java
@@ -58,7 +58,7 @@ public class ProcessVnfc extends AbstractTestAction {
aaiResourceClient.connect(vfModuleURI, vnfcURI);
}
} catch (Exception e) {
- logger.debug(e.getMessage());
+ logger.debug("Exception in ProcessVnfc.doExecute", e);
}
}
}
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java
index eae5ef2135..c8fddcf19c 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java
@@ -7,6 +7,8 @@ import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIResourcesClient;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.core.io.ClassPathResource;
import com.consol.citrus.actions.AbstractTestAction;
import com.consol.citrus.context.TestContext;
@@ -15,6 +17,8 @@ public class CreateAAInventory extends AbstractTestAction {
@Override
public void doExecute(TestContext context) {
+ final Logger logger = LoggerFactory.getLogger(CreateAAInventory.class);
+
try {
String stackName = context.getVariable("stackName");
@@ -30,7 +34,7 @@ public class CreateAAInventory extends AbstractTestAction {
aaiResourceClient.create(vserverURI, vserver);
}
} catch (Exception e) {
- e.printStackTrace();
+ logger.debug("Exception in CreateAAInventory.doExecute", e);
}
}
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ProcessSDNCAssignService.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ProcessSDNCAssignService.java
index c1ba812513..d3e9fc045d 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ProcessSDNCAssignService.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/sdnc/grapi/ProcessSDNCAssignService.java
@@ -1,13 +1,16 @@
package org.onap.so.simulator.scenarios.sdnc.grapi;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.consol.citrus.actions.AbstractTestAction;
import com.consol.citrus.context.TestContext;
public class ProcessSDNCAssignService extends AbstractTestAction {
-
@Override
public void doExecute(TestContext context) {
+ final Logger logger = LoggerFactory.getLogger(ProcessSDNCAssignService.class);
+
try {
String serviceName = context.getVariable("serviceName");
String action = context.getVariable("action");
@@ -21,7 +24,7 @@ public class ProcessSDNCAssignService extends AbstractTestAction {
}
} catch (Exception e) {
- e.printStackTrace();
+ logger.debug("Exception in ProcessSDNCAssignService.doExecute", e);
}
}