summaryrefslogtreecommitdiffstats
path: root/restconf-client/provider/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'restconf-client/provider/src/main')
-rw-r--r--restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java9
-rw-r--r--restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java18
-rw-r--r--restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java2
-rwxr-xr-xrestconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml4
4 files changed, 21 insertions, 12 deletions
diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java
index aae80815..e46e47a9 100644
--- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java
+++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java
@@ -28,17 +28,18 @@ import org.slf4j.LoggerFactory;
import java.util.Map;
import static org.onap.ccsdk.sli.plugins.prop.JsonParser.convertToProperties;
+import static org.slf4j.LoggerFactory.getLogger;
/**
* Processes the events from event queue and executes callback DG.
*/
class EventProcessor implements Runnable {
- private static final Logger log = LoggerFactory.getLogger(EventProcessor.class);
+
+ private static final Logger log = getLogger(EventProcessor.class);
private RestconfDiscoveryNode node;
- private static final String EVENT_SUBSCRIPTION_ID = "ietf-notification:notification" +
- ".ietf-yang-push:push-change-update" +
- ".subscription-id";
+ private static final String EVENT_SUBSCRIPTION_ID = "ietf-restconf:" +
+ "notification.ietf-yang-push:push-change-update.subscription-id";
public EventProcessor(RestconfDiscoveryNode node) {
this.node = node;
diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java
index f5366a54..111d6284 100644
--- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java
+++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java
@@ -26,7 +26,6 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
@@ -37,12 +36,15 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
+import static org.slf4j.LoggerFactory.getLogger;
+
/**
* Representation of a plugin to subscribe for notification and then
* to handle the received notifications.
*/
public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin {
- private static final Logger log = LoggerFactory.getLogger(RestconfDiscoveryNode.class);
+
+ private static final Logger log = getLogger(RestconfDiscoveryNode.class);
private ExecutorService executor = Executors.newCachedThreadPool();
private Map<String, PersistentConnection> runnableInfo = new ConcurrentHashMap<>();
@@ -54,15 +56,19 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin {
private static final String SUBSCRIBER_ID = "subscriberId";
private static final String RESPONSE_CODE = "response-code";
private static final String RESPONSE_PREFIX = "responsePrefix";
- private static final String OUTPUT_IDENTIFIER = "ietf-subscribed-notifications:output.identifier";
+ private static final String OUTPUT_IDENTIFIER = "ietf-subscribed-notif" +
+ "ications:establish-subscription.output.identifier";
private static final String RESPONSE_CODE_200 = "200";
private static final String SSE_URL = "sseConnectURL";
/**
- * Creates an instance of RestconfDiscoveryNode and
- * starts processing of event.
+ * Creates an instance of RestconfDiscoveryNode and starts processing of
+ * event.
+ *
+ * @param r restconf api call node
*/
- public RestconfDiscoveryNode() {
+ public RestconfDiscoveryNode(RestconfApiCallNode r) {
+ this.restconfApiCallNode = r;
ExecutorService e = Executors.newFixedThreadPool(20);
EventProcessor p = new EventProcessor(this);
for (int i = 0; i < 20; ++i) {
diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java
index 725826bd..1cc6261a 100644
--- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java
+++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java
@@ -142,7 +142,7 @@ class SvcLogicGraphInfo {
SvcLogicStore store = service.getStore();
if (store != null) {
- SvcLogicGraph subGraph = store.fetch(module, rpc, version, mode);
+ SvcLogicGraph subGraph = store.fetch(module, rpc, mode, version);
if (subGraph != null) {
ctx.setAttribute("subGraph", subGraph.toString());
service.execute(subGraph, ctx);
diff --git a/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml b/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml
index c8f2dc4c..45c335b1 100755
--- a/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml
+++ b/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml
@@ -32,7 +32,9 @@
<argument ref="restapiCallNodeProvider"/>
</bean>
- <bean id="restconfDiscoveryNodeProvider" class="org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode" />
+ <bean id="restconfDiscoveryNodeProvider" class="org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode" >
+ <argument ref="restconfapiCallNodeProvider"/>
+ </bean>
<service ref="restconfapiCallNodeProvider">
<interfaces>