aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java4
-rwxr-xr-xsli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java14
-rw-r--r--sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java3
3 files changed, 8 insertions, 13 deletions
diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java
index f34c261d..34fdb537 100644
--- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java
+++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicNodeExecutor.java
@@ -29,10 +29,6 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
import org.onap.ccsdk.sli.core.sli.SvcLogicNode;
import org.onap.ccsdk.sli.core.sli.SvcLogicRecorder;
import org.onap.ccsdk.sli.core.sli.SvcLogicResource;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.ServiceReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java
index 8755ea1d..c7942563 100755
--- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java
+++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -37,12 +39,7 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicStore;
import org.onap.ccsdk.sli.core.sli.SvcLogicStoreFactory;
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceListener;
import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
@@ -80,6 +77,7 @@ public class SvcLogicServiceImpl implements SvcLogicService {
protected BundleContext bctx = null;
protected Properties properties;
protected SvcLogicStore store;
+ private static final String CURRENT_GRAPH="currentGraph";
public SvcLogicServiceImpl(SvcLogicPropertiesProvider resourceProvider) throws SvcLogicException {
properties = resourceProvider.getProperties();
@@ -148,7 +146,7 @@ public class SvcLogicServiceImpl implements SvcLogicService {
// Set service name in MDC to reference current working directed graph
MDC.put(MetricLogger.SERVICE_NAME, graph.getModule() + ":" + graph.getRpc() + "/v" + graph.getVersion());
- MDC.put("currentGraph", graph.toString());
+ MDC.put(CURRENT_GRAPH, graph.toString());
SvcLogicNode curNode = graph.getRootNode();
LOG.info("About to execute graph {}", graph.toString());
@@ -162,7 +160,7 @@ public class SvcLogicServiceImpl implements SvcLogicService {
LOG.debug("SvcLogicServiceImpl caught ExitNodeException");
}
MDC.remove("nodeId");
- MDC.remove("currentGraph");
+ MDC.remove(CURRENT_GRAPH);
return (ctx);
}
@@ -217,7 +215,7 @@ public class SvcLogicServiceImpl implements SvcLogicService {
}
SvcLogicContext ctx = new SvcLogicContext(props);
- ctx.setAttribute("currentGraph", graph.toString());
+ ctx.setAttribute(CURRENT_GRAPH, graph.toString());
ctx.setAttribute("X-ECOMP-RequestID", MDC.get("X-ECOMP-RequestID"));
ctx.setDomDataBroker(domDataBroker);
diff --git a/sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java b/sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java
index ac3dbd2a..37e4fe87 100644
--- a/sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java
+++ b/sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -24,7 +26,6 @@ package org.onap.ccsdk.sli.core.sli.recording;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
-import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;