aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/mso/src
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/model-impl/mso/src')
-rw-r--r--controlloop/common/model-impl/mso/src/main/java/org/onap/policy/mso/MSOManager.java12
-rw-r--r--controlloop/common/model-impl/mso/src/test/java/org/onap/policy/mso/TestDemo.java12
2 files changed, 14 insertions, 10 deletions
diff --git a/controlloop/common/model-impl/mso/src/main/java/org/onap/policy/mso/MSOManager.java b/controlloop/common/model-impl/mso/src/main/java/org/onap/policy/mso/MSOManager.java
index 9f4fe5bbc..c23935586 100644
--- a/controlloop/common/model-impl/mso/src/main/java/org/onap/policy/mso/MSOManager.java
+++ b/controlloop/common/model-impl/mso/src/main/java/org/onap/policy/mso/MSOManager.java
@@ -60,8 +60,8 @@ public final class MSOManager {
MSOResponse response = Serialization.gsonPretty.fromJson(httpDetails.b, MSOResponse.class);
String body = Serialization.gsonPretty.toJson(response);
- System.out.println("***** Response to post:");
- System.out.println(body);
+ logger.debug("***** Response to post:");
+ logger.debug(body);
String requestId = response.requestReferences.requestId;
int attemptsLeft = 20;
@@ -75,24 +75,26 @@ public final class MSOManager {
Pair<Integer, String> httpDetailsGet = RESTManager.get(urlGet, username, password, headers);
responseGet = Serialization.gsonPretty.fromJson(httpDetailsGet.b, MSOResponse.class);
body = Serialization.gsonPretty.toJson(responseGet);
- System.out.println("***** Response to get:");
- System.out.println(body);
+ logger.debug("***** Response to get:");
+ logger.debug(body);
if(httpDetailsGet.a == 200){
if(responseGet.request.requestStatus.requestState.equalsIgnoreCase("COMPLETE") ||
responseGet.request.requestStatus.requestState.equalsIgnoreCase("FAILED")){
- System.out.println("***** ######## VF Module Creation "+responseGet.request.requestStatus.requestState);
+ logger.debug("***** ######## VF Module Creation "+responseGet.request.requestStatus.requestState);
return responseGet;
}
}
Thread.sleep(20000);
}
+
if (responseGet != null
&& responseGet.request != null
&& responseGet.request.requestStatus != null
&& responseGet.request.requestStatus.requestState != null) {
logger.warn("***** ######## VF Module Creation timeout. Status: ( {})", responseGet.request.requestStatus.requestState);
}
+
return responseGet;
} catch (JsonSyntaxException e) {
logger.error("Failed to deserialize into MSOResponse: ", e);
diff --git a/controlloop/common/model-impl/mso/src/test/java/org/onap/policy/mso/TestDemo.java b/controlloop/common/model-impl/mso/src/test/java/org/onap/policy/mso/TestDemo.java
index c840894e8..2c8253f0b 100644
--- a/controlloop/common/model-impl/mso/src/test/java/org/onap/policy/mso/TestDemo.java
+++ b/controlloop/common/model-impl/mso/src/test/java/org/onap/policy/mso/TestDemo.java
@@ -33,9 +33,11 @@ import org.onap.policy.mso.MSORequestDetails;
import org.onap.policy.mso.MSORequestInfo;
import org.onap.policy.mso.MSORequestParameters;
import org.onap.policy.mso.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class TestDemo {
-
+ private static final Logger logger = LoggerFactory.getLogger(TestDemo.class);
@Test
public void test() {
@@ -102,19 +104,19 @@ public class TestDemo {
request.requestDetails.requestParameters.userParams.add(userParam2);
String body = Serialization.gsonPretty.toJson(request);
- System.out.println(body);
+ logger.debug(body);
//MSOResponse response = MSOManager.createModuleInstance("http://localhost:7780/", "my_username", "my_passwd", request);
//body = Serialization.gsonPretty.toJson(response);
- //System.out.println(body);
+ //logger.debug(body);
}
@Test
public void testHack() {
- System.out.println("** HACK **");
+ logger.debug("** HACK **");
MSORequest request = new MSORequest();
//
@@ -166,7 +168,7 @@ public class TestDemo {
request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2);
String body = Serialization.gsonPretty.toJson(request);
- System.out.println(body);
+ logger.debug(body);
}
}