summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichael DÜrre <michael.duerre@highstreet-technologies.com>2021-01-18 05:41:16 +0100
committerDan Timoney <dtimoney@att.com>2021-01-27 15:56:35 -0500
commitce4e5f9a00d2677495240ad367b9bfc4b74752d0 (patch)
tree71292f2ce0a2f8549f1583c712412f43757454f5 /plugins
parent5de81966f5574ae83e85aa7d5aa8865ea5deef24 (diff)
migrate sli to alu-SR1
migrate ODL interfaces and fix code for changes in alu-SR1 Issue-ID: CCSDK-3089 Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com> Change-Id: Iad824627c581c902b639a2f0246e3133d4e38c48
Diffstat (limited to 'plugins')
-rw-r--r--plugins/features/ccsdk-restconf-client/pom.xml7
-rwxr-xr-xplugins/grToolkit/provider/pom.xml33
-rwxr-xr-xplugins/grToolkit/provider/src/main/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProvider.java34
-rw-r--r--plugins/grToolkit/provider/src/main/resources/org/opendaylight/blueprint/GrToolkit.xml9
-rw-r--r--plugins/grToolkit/provider/src/test/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProviderTest.java68
-rwxr-xr-xplugins/properties-node/provider/src/main/resources/OSGI-INF/blueprint/properties-node-blueprint.xml16
-rwxr-xr-xplugins/restapi-call-node/provider/pom.xml7
-rwxr-xr-xplugins/restapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/restapi-call-node-blueprint.xml16
-rwxr-xr-xplugins/restconf-client/provider/pom.xml13
-rw-r--r--plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java80
-rw-r--r--plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java18
-rw-r--r--plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java42
-rw-r--r--plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java26
-rw-r--r--plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java37
-rwxr-xr-xplugins/restconf-client/provider/src/main/resources/OSGI-INF/blueprint/restconf-client-blueprint.xml51
-rw-r--r--plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java14
-rwxr-xr-xplugins/sshapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/sshapi-call-node-blueprint.xml16
17 files changed, 189 insertions, 298 deletions
diff --git a/plugins/features/ccsdk-restconf-client/pom.xml b/plugins/features/ccsdk-restconf-client/pom.xml
index bf4994b33..cf1678eb8 100644
--- a/plugins/features/ccsdk-restconf-client/pom.xml
+++ b/plugins/features/ccsdk-restconf-client/pom.xml
@@ -27,6 +27,13 @@
<groupId>${project.groupId}</groupId>
<artifactId>restconf-client-provider</artifactId>
<version>${project.version}</version>
+ <exclusions>
+ <!-- let the filter module start and manage the common code -->
+ <exclusion>
+ <groupId>org.onap.logging-analytics</groupId>
+ <artifactId>logging-filter-base</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
</project>
diff --git a/plugins/grToolkit/provider/pom.xml b/plugins/grToolkit/provider/pom.xml
index 3bdecd54f..5c77331c0 100755
--- a/plugins/grToolkit/provider/pom.xml
+++ b/plugins/grToolkit/provider/pom.xml
@@ -23,8 +23,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-api</artifactId>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-binding-api</artifactId>
</dependency>
<dependency>
<groupId>org.onap.ccsdk.sli.core</groupId>
@@ -49,22 +49,22 @@
<artifactId>annotations</artifactId>
</dependency>
<dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-test-model</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-broker-impl</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-broker-impl</artifactId>
- <type>test-jar</type>
- <classifier>tests</classifier>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-binding-test-model</artifactId>
<scope>test</scope>
</dependency>
+<!-- <dependency> -->
+<!-- <groupId>org.opendaylight.controller</groupId> -->
+<!-- <artifactId>sal-binding-broker-impl</artifactId> -->
+<!-- <scope>test</scope> -->
+<!-- </dependency> -->
+<!-- <dependency> -->
+<!-- <groupId>org.opendaylight.controller</groupId> -->
+<!-- <artifactId>sal-binding-broker-impl</artifactId> -->
+<!-- <type>test-jar</type> -->
+<!-- <classifier>tests</classifier> -->
+<!-- <scope>test</scope> -->
+<!-- </dependency> -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -100,6 +100,7 @@
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
+ <version>1.19.0</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/plugins/grToolkit/provider/src/main/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProvider.java b/plugins/grToolkit/provider/src/main/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProvider.java
index 7a8b3deb0..5a8730bff 100755
--- a/plugins/grToolkit/provider/src/main/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProvider.java
+++ b/plugins/grToolkit/provider/src/main/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProvider.java
@@ -21,6 +21,8 @@
package org.onap.ccsdk.sli.plugins.grtoolkit;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -33,18 +35,15 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.annotation.Nonnull;
-
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
-
import org.apache.commons.lang.StringUtils;
-
+import org.json.JSONArray;
+import org.json.JSONObject;
import org.onap.ccsdk.sli.core.dblib.DbLibService;
import org.onap.ccsdk.sli.plugins.grtoolkit.connection.ConnectionManager;
import org.onap.ccsdk.sli.plugins.grtoolkit.connection.ConnectionResponse;
@@ -60,16 +59,11 @@ import org.onap.ccsdk.sli.plugins.grtoolkit.resolver.HealthResolver;
import org.onap.ccsdk.sli.plugins.grtoolkit.resolver.SingleNodeHealthResolver;
import org.onap.ccsdk.sli.plugins.grtoolkit.resolver.SixNodeHealthResolver;
import org.onap.ccsdk.sli.plugins.grtoolkit.resolver.ThreeNodeHealthResolver;
-
-import org.json.JSONArray;
-import org.json.JSONObject;
-
import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
-import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataTreeChangeListener;
+import org.opendaylight.mdsal.binding.api.NotificationPublishService;
+import org.opendaylight.mdsal.binding.api.RpcProviderService;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.AdminHealthInput;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.AdminHealthOutput;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.AdminHealthOutputBuilder;
@@ -98,9 +92,9 @@ import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.SiteIdentifierOutput;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.SiteIdentifierOutputBuilder;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.site.health.output.SitesBuilder;
+import org.opendaylight.yangtools.concepts.ObjectRegistration;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -133,8 +127,8 @@ public class GrToolkitProvider implements AutoCloseable, GrToolkitService, DataT
private final ExecutorService executor;
protected DataBroker dataBroker;
protected NotificationPublishService notificationService;
- protected RpcProviderRegistry rpcRegistry;
- protected BindingAwareBroker.RpcRegistration<GrToolkitService> rpcRegistration;
+ protected RpcProviderService rpcRegistry;
+ protected ObjectRegistration<GrToolkitService> rpcRegistration;
protected DbLibService dbLib;
private String member;
private ClusterActor self;
@@ -155,7 +149,7 @@ public class GrToolkitProvider implements AutoCloseable, GrToolkitService, DataT
*/
public GrToolkitProvider(DataBroker dataBroker,
NotificationPublishService notificationProviderService,
- RpcProviderRegistry rpcProviderRegistry,
+ RpcProviderService rpcProviderRegistry,
DistributedDataStoreInterface configDatastore,
DbLibService dbLibService) {
log.info("Creating provider for {}", APP_NAME);
@@ -177,7 +171,7 @@ public class GrToolkitProvider implements AutoCloseable, GrToolkitService, DataT
createContainers();
setProperties();
defineMembers();
- rpcRegistration = rpcRegistry.addRpcImplementation(GrToolkitService.class, this);
+ rpcRegistration = rpcRegistry.registerRpcImplementation(GrToolkitService.class, this);
log.info("Initialization complete for {}", APP_NAME);
}
diff --git a/plugins/grToolkit/provider/src/main/resources/org/opendaylight/blueprint/GrToolkit.xml b/plugins/grToolkit/provider/src/main/resources/org/opendaylight/blueprint/GrToolkit.xml
index 5a4492c56..300c1cc75 100644
--- a/plugins/grToolkit/provider/src/main/resources/org/opendaylight/blueprint/GrToolkit.xml
+++ b/plugins/grToolkit/provider/src/main/resources/org/opendaylight/blueprint/GrToolkit.xml
@@ -4,16 +4,13 @@
odl:use-default-for-reference-types="true">
<reference id="dataBroker"
- interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
- odl:type="default" />
+ interface="org.opendaylight.controller.md.sal.binding.api.DataBroker" />
<reference id="notificationService"
- interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"
- odl:type="default" />
+ interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService" />
<reference id="rpcRegistry"
- interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
- odl:type="default" />
+ interface="org.opendaylight.mdsal.binding.api.RpcProviderService" />
<reference id="dbLib"
interface="org.onap.ccsdk.sli.core.dblib.DbLibService" />
diff --git a/plugins/grToolkit/provider/src/test/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProviderTest.java b/plugins/grToolkit/provider/src/test/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProviderTest.java
index edd6d1b8d..6495c89cf 100644
--- a/plugins/grToolkit/provider/src/test/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProviderTest.java
+++ b/plugins/grToolkit/provider/src/test/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProviderTest.java
@@ -20,25 +20,42 @@
*/
package org.onap.ccsdk.sli.plugins.grtoolkit;
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
import com.github.tomakehurst.wiremock.junit.WireMockRule;
-
import com.google.common.util.concurrent.ListenableFuture;
-
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Properties;
+import java.util.concurrent.ExecutionException;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.EnvironmentVariables;
-
import org.onap.ccsdk.sli.core.dblib.DBLibConnection;
import org.onap.ccsdk.sli.core.dblib.DbLibService;
import org.onap.ccsdk.sli.plugins.grtoolkit.data.ClusterActor;
-
import org.opendaylight.controller.cluster.access.concepts.MemberName;
import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface;
import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.NotificationPublishService;
+import org.opendaylight.mdsal.binding.api.RpcProviderService;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.AdminHealthOutput;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.ClusterHealthOutput;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.DatabaseHealthOutput;
@@ -49,38 +66,15 @@ import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.ResumeAkkaTrafficOutput;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.SiteHealthOutput;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.SiteIdentifierOutput;
+import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.resume.akka.traffic.input.NodeInfoBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.concurrent.ExecutionException;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.when;
-
public class GrToolkitProviderTest {
GrToolkitProvider provider;
GrToolkitProvider providerSpy;
DataBroker dataBroker;
NotificationPublishService notificationProviderService;
- RpcProviderRegistry rpcProviderRegistry;
+ RpcProviderService rpcProviderRegistry;
DistributedDataStoreInterface configDatastore;
DbLibService dbLibService;
DBLibConnection connection;
@@ -96,7 +90,7 @@ public class GrToolkitProviderTest {
environmentVariables.set("SDNC_CONFIG_DIR","src/test/resources");
dataBroker = mock(DataBroker.class);
notificationProviderService = mock(NotificationPublishService.class);
- rpcProviderRegistry = mock(RpcProviderRegistry.class);
+ rpcProviderRegistry = mock(RpcProviderService.class);
configDatastore = mock(DistributedDataStoreInterface.class);
dbLibService = mock(DbLibService.class);
connection = mock(DBLibConnection.class);
@@ -266,11 +260,13 @@ public class GrToolkitProviderTest {
@Test
public void haltTrafficTest() {
HaltAkkaTrafficInputBuilder builder = new HaltAkkaTrafficInputBuilder();
- builder.setNodeInfo(new ArrayList<>());
+ builder.setNodeInfo(Arrays.asList(
+ new org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.plugins.gr.toolkit.rev180926.halt.akka.traffic.
+ input.NodeInfoBuilder().build()));
ListenableFuture<RpcResult<HaltAkkaTrafficOutput>> result = provider.haltAkkaTraffic(builder.build());
try {
assertEquals("200", result.get().getResult().getStatus());
- } catch(InterruptedException | ExecutionException e) {
+ } catch (InterruptedException | ExecutionException e) {
fail();
}
}
@@ -278,7 +274,7 @@ public class GrToolkitProviderTest {
@Test
public void resumeTrafficTest() {
ResumeAkkaTrafficInputBuilder builder = new ResumeAkkaTrafficInputBuilder();
- builder.setNodeInfo(new ArrayList<>());
+ builder.setNodeInfo(Arrays.asList(new NodeInfoBuilder().build()));
ListenableFuture<RpcResult<ResumeAkkaTrafficOutput>> result = provider.resumeAkkaTraffic(builder.build());
try {
assertEquals("200", result.get().getResult().getStatus());
diff --git a/plugins/properties-node/provider/src/main/resources/OSGI-INF/blueprint/properties-node-blueprint.xml b/plugins/properties-node/provider/src/main/resources/OSGI-INF/blueprint/properties-node-blueprint.xml
deleted file mode 100755
index 6e1d48efd..000000000
--- a/plugins/properties-node/provider/src/main/resources/OSGI-INF/blueprint/properties-node-blueprint.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
- odl:use-default-for-reference-types="true">
-
- <bean id="propNodeProvider" class="org.onap.ccsdk.sli.plugins.prop.PropertiesNode" />
-
-
-
- <service ref="propNodeProvider">
- <interfaces>
- <value>org.onap.ccsdk.sli.plugins.prop.PropertiesNode</value>
- </interfaces>
- </service>
-
-</blueprint> \ No newline at end of file
diff --git a/plugins/restapi-call-node/provider/pom.xml b/plugins/restapi-call-node/provider/pom.xml
index a2ee45161..3b06d720f 100755
--- a/plugins/restapi-call-node/provider/pom.xml
+++ b/plugins/restapi-call-node/provider/pom.xml
@@ -24,6 +24,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey</groupId>
+ <artifactId>jersey-bom</artifactId>
+ <version>2.27</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
diff --git a/plugins/restapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/restapi-call-node-blueprint.xml b/plugins/restapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/restapi-call-node-blueprint.xml
deleted file mode 100755
index 390bb0a35..000000000
--- a/plugins/restapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/restapi-call-node-blueprint.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
- odl:use-default-for-reference-types="true">
-
- <bean id="restapiCallNodeProvider" class="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" />
-
-
-
- <service ref="restapiCallNodeProvider">
- <interfaces>
- <value>org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode</value>
- </interfaces>
- </service>
-
-</blueprint> \ No newline at end of file
diff --git a/plugins/restconf-client/provider/pom.xml b/plugins/restconf-client/provider/pom.xml
index dbe16754f..58aa4219b 100755
--- a/plugins/restconf-client/provider/pom.xml
+++ b/plugins/restconf-client/provider/pom.xml
@@ -24,6 +24,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey</groupId>
+ <artifactId>jersey-bom</artifactId>
+ <version>2.27</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
@@ -31,6 +38,7 @@
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-sse</artifactId>
</dependency>
+
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
@@ -114,6 +122,11 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
diff --git a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java
index 620df282f..679ba57b7 100644
--- a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java
+++ b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java
@@ -20,23 +20,48 @@
package org.onap.ccsdk.sli.plugins.restconfapicall;
+import static com.google.common.base.Strings.repeat;
+import static java.lang.String.format;
+import static java.lang.String.valueOf;
+import static org.apache.commons.lang3.StringUtils.join;
+import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.DELETE;
+import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.GET;
+import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PATCH;
+import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PUT;
+import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.parseParam;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COLON;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COMMA;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HEADER;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HTTP_REQ;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HTTP_RES;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.REQ_ERR;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_CODE;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_MSG;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_PRE;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getSchemaCtxFromDir;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getUpdatedXmlReq;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getYangParameters;
+import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.parseUrl;
+import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfListenerFactory.instance;
+import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.FORMAT_ERR;
+import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.UTF_HEADER;
+import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.XML_TREE_ERR;
+import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.getXmlWriter;
+import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getModuleNamespace;
+import static org.osgi.framework.FrameworkUtil.getBundle;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.stream.JsonWriter;
-
-import javax.ws.rs.core.UriBuilder;
import java.io.StringWriter;
import java.io.Writer;
import java.net.SocketException;
import java.net.URI;
-import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
@@ -59,6 +84,7 @@ import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.Namespace;
import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeSerializer;
import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaNode;
import org.osgi.framework.BundleContext;
@@ -66,44 +92,6 @@ import org.osgi.framework.ServiceReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static com.google.common.base.Strings.repeat;
-import static java.lang.String.format;
-import static java.lang.String.valueOf;
-import static org.apache.commons.lang3.StringUtils.join;
-import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.DELETE;
-import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.GET;
-import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PATCH;
-import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PUT;
-import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.parseParam;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.ATTEMPTS_MSG;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COLON;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COMMA;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COMM_FAIL;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HEADER;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HTTP_REQ;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HTTP_RES;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.MAX_RETRY_ERR;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.NO_MORE_RETRY;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.REQ_ERR;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.REST_API_URL;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_CODE;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_MSG;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_PRE;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RETRY_COUNT;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RETRY_FAIL;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.UPDATED_URL;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getSchemaCtxFromDir;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getUpdatedXmlReq;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getYangParameters;
-import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.parseUrl;
-import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfListenerFactory.instance;
-import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.FORMAT_ERR;
-import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.UTF_HEADER;
-import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.XML_TREE_ERR;
-import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.getXmlWriter;
-import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getModuleNamespace;
-import static org.osgi.framework.FrameworkUtil.getBundle;
-
/**
* Representation of a plugin to enable RESTCONF based CRUD operations from DG.
*/
@@ -299,7 +287,7 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin {
private InstanceIdentifierContext<?> getInsIdCtx(YangParameters params,
String uri)
throws SvcLogicException {
- SchemaContext context = getSchemaContext(params);
+ EffectiveModelContext context = getSchemaContext(params);
return ParserIdentifier.toInstanceIdentifier(uri, context, null);
}
@@ -311,18 +299,18 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin {
* @return schema context
* @throws SvcLogicException when schema context fetching fails
*/
- private SchemaContext getSchemaContext(YangParameters params)
+ private EffectiveModelContext getSchemaContext(YangParameters params)
throws SvcLogicException {
if (params.dirPath != null) {
return getSchemaCtxFromDir(params.dirPath);
}
BundleContext bc = getBundle(SchemaContext.class).getBundleContext();
- SchemaContext schemaContext = null;
+ EffectiveModelContext schemaContext = null;
if (bc != null) {
ServiceReference reference = bc.getServiceReference(
SchemaContext.class);
if (reference != null) {
- schemaContext = (SchemaContext) bc.getService(reference);
+ schemaContext = (EffectiveModelContext) bc.getService(reference);
}
}
return schemaContext;
diff --git a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java
index 1309102b3..d22c3707a 100644
--- a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java
+++ b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java
@@ -22,6 +22,12 @@
package org.onap.ccsdk.sli.plugins.restconfapicall;
+import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.getParameters;
+import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.parseParam;
+import static org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode.DEFAULT_MODE;
+import static org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource.forFile;
+import static org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors.defaultReactor;
+import static org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource.create;
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@ -33,23 +39,15 @@ import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.onap.ccsdk.sli.plugins.restapicall.HttpMethod;
import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.YangParameters;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException;
import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource;
import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor;
-import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.getParameters;
-import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.parseParam;
-import static org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode.DEFAULT_MODE;
-import static org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource.forFile;
-import static org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors.defaultReactor;
-import static org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource.create;
-
/**
* Utilities for restconf api call node.
*/
@@ -190,7 +188,7 @@ public final class RestconfApiUtils {
* @return YANG schema context
* @throws SvcLogicException when YANG file reading fails
*/
- static SchemaContext getSchemaCtxFromDir(String di)
+ static EffectiveModelContext getSchemaCtxFromDir(String di)
throws SvcLogicException {
Path d = Paths.get(di);
File dir = d.toFile();
diff --git a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java
index 707c29444..14824f51e 100644
--- a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java
+++ b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java
@@ -20,6 +20,25 @@
package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer;
+import static javax.xml.transform.OutputKeys.INDENT;
+import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.XmlNodeType.OBJECT_NODE;
+import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.XmlNodeType.TEXT_NODE;
+import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getRevision;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Iterator;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
import org.dom4j.Element;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.Namespace;
@@ -31,27 +50,6 @@ import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import java.io.IOException;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Iterator;
-
-import static javax.xml.transform.OutputKeys.INDENT;
-import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.XmlNodeType.OBJECT_NODE;
-import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.XmlNodeType.TEXT_NODE;
-import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getRevision;
-
/**
* Utilities for data format serializer.
*/
@@ -179,7 +177,7 @@ public final class DfSerializerUtil {
parentNs.revision());
}
- Iterator<Module> it;
+ Iterator<? extends Module> it;
Module mod;
if (mName != null) {
it = ctx.findModules(mName).iterator();
diff --git a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java
index 8a6e75668..8fd7a12bc 100644
--- a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java
+++ b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java
@@ -20,18 +20,6 @@
package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.onap.ccsdk.sli.core.sli.SvcLogicException;
-import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
-import org.opendaylight.yangtools.yang.model.api.Module;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.api.SchemaNode;
-import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.DOT_REGEX;
import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.SLASH;
import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getChildSchemaNode;
@@ -49,11 +37,21 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.M
import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_NODE;
import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_LEAF_NODE;
import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_NODE;
+import java.util.HashMap;
+import java.util.Map;
+import org.onap.ccsdk.sli.core.sli.SvcLogicException;
+import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
+import org.opendaylight.yangtools.yang.model.api.Module;
+import org.opendaylight.yangtools.yang.model.api.SchemaNode;
+import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Representation of mdsal based properties node serializer implementation.
*/
-public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer<SchemaNode, SchemaContext> {
+public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer<SchemaNode, EffectiveModelContext> {
private static final Logger log = LoggerFactory.getLogger(
MdsalPropertiesNodeSerializer.class);
@@ -68,7 +66,7 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer<Sche
* @param uri URL of the request
*/
public MdsalPropertiesNodeSerializer(SchemaNode schemaNode,
- SchemaContext schemaCtx, String uri) {
+ EffectiveModelContext schemaCtx, String uri) {
super(schemaNode, schemaCtx, uri);
}
diff --git a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java
index e6fa064f5..331f01cb7 100644
--- a/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java
+++ b/plugins/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java
@@ -20,11 +20,14 @@
package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer;
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.lang.String.format;
+import static java.util.regex.Pattern.quote;
+import static org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier.toInstanceIdentifier;
import java.util.Collection;
import java.util.Deque;
import java.util.Iterator;
import java.util.Optional;
-
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
@@ -33,10 +36,11 @@ import org.opendaylight.yangtools.yang.common.Revision;
import org.opendaylight.yangtools.yang.data.impl.schema.SchemaUtils;
import org.opendaylight.yangtools.yang.data.util.ParserStreamUtils;
import org.opendaylight.yangtools.yang.data.util.codec.IdentityCodecUtil;
-import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.AnyxmlSchemaNode;
import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode;
import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
@@ -44,11 +48,6 @@ import org.opendaylight.yangtools.yang.model.api.SchemaNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static com.google.common.base.Preconditions.checkArgument;
-import static java.lang.String.format;
-import static java.util.regex.Pattern.quote;
-import static org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier.toInstanceIdentifier;
-
/**
* Represents utilities for properties node tree.
*/
@@ -262,12 +261,12 @@ public final class MdsalPropertiesNodeUtils {
* @return schema path holder
*/
public static SchemaPathHolder getProcessedPath(String uri,
- SchemaContext context) {
+ EffectiveModelContext context) {
String uri1 = uri.replaceAll(UNDERSCORE, COLON);
try {
InstanceIdentifierContext<?> id = toInstanceIdentifier(
- uri1, context, null);
+ uri1, context, Optional.ofNullable(null));
return new SchemaPathHolder(id, uri1);
} catch (IllegalArgumentException | RestconfDocumentedException
| NullPointerException e) {
@@ -289,7 +288,7 @@ public final class MdsalPropertiesNodeUtils {
* @return schema and path holder
*/
private static SchemaPathHolder processNodesAndAppendPath(String uri,
- SchemaContext context) {
+ EffectiveModelContext context) {
String actPath = "";
SchemaPathHolder id = new SchemaPathHolder(null, "");
@@ -330,9 +329,7 @@ public final class MdsalPropertiesNodeUtils {
* @param prefix prefix for the node in the path
* @return schema and path holder
*/
- private static SchemaPathHolder processIdentifier(String node,
- SchemaContext context,
- String prefix) {
+ private static SchemaPathHolder processIdentifier(String node, EffectiveModelContext context, String prefix) {
String[] values = node.split(UNDERSCORE);
String val = values[0];
@@ -378,7 +375,7 @@ public final class MdsalPropertiesNodeUtils {
* @param curSchema current schema
* @return namespace of the given node
*/
- static Namespace getNamespace(String childName, SchemaContext ctx,
+ static Namespace getNamespace(String childName, EffectiveModelContext ctx,
PropertiesNode parent, SchemaNode curSchema) {
Namespace parentNs = parent.namespace();
@@ -425,8 +422,8 @@ public final class MdsalPropertiesNodeUtils {
* @param ctx schema context
* @return namespace of the given node name
*/
- private static Namespace getNs(String modName, SchemaContext ctx) {
- Iterator<Module> it = ctx.findModules(modName).iterator();
+ private static Namespace getNs(String modName, EffectiveModelContext ctx) {
+ Iterator<? extends Module> it = ctx.findModules(modName).iterator();
if (it.hasNext()) {
Module m = it.next();
return new Namespace(modName, m.getQNameModule().getNamespace(),
@@ -488,7 +485,7 @@ public final class MdsalPropertiesNodeUtils {
public static NodeType getNodeType(int index, int length, String name,
SchemaNode schema) {
if (index == length-1) {
- if (schema instanceof AnyXmlSchemaNode){
+ if (schema instanceof AnyxmlSchemaNode) {
return NodeType.ANY_XML_NODE;
}
return (isListEntry(name) ? NodeType.MULTI_INSTANCE_LEAF_NODE :
@@ -517,9 +514,7 @@ public final class MdsalPropertiesNodeUtils {
* @return value namespace
* @throws SvcLogicException if identity/module could not be found
*/
- static Namespace getValueNamespace(String value,
- SchemaContext ctx)
- throws SvcLogicException {
+ static Namespace getValueNamespace(String value, EffectiveModelContext ctx) throws SvcLogicException {
String prefix = getPrefixFromValue(value);
if (prefix == null) {
return null;
@@ -528,7 +523,7 @@ public final class MdsalPropertiesNodeUtils {
IdentitySchemaNode id = IdentityCodecUtil.parseIdentity(value,
ctx,
prefixToModule -> {
- final Iterator<Module> modules = ctx.findModules(prefix).iterator();
+ final Iterator<? extends Module> modules = ctx.findModules(prefix).iterator();
checkArgument(modules.hasNext(), "Could not find " +
"module %s", prefix);
return modules.next().getQNameModule();
diff --git a/plugins/restconf-client/provider/src/main/resources/OSGI-INF/blueprint/restconf-client-blueprint.xml b/plugins/restconf-client/provider/src/main/resources/OSGI-INF/blueprint/restconf-client-blueprint.xml
deleted file mode 100755
index 45c335b13..000000000
--- a/plugins/restconf-client/provider/src/main/resources/OSGI-INF/blueprint/restconf-client-blueprint.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * ============LICENSE_START=======================================================
- * ONAP - CCSDK
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- -->
-
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
- odl:use-default-for-reference-types="true">
-
- <reference xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
- id="restapiCallNodeProvider"
- interface="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode"
- ext:proxy-method="classes"/>
-
- <bean id="restconfapiCallNodeProvider" class="org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode" >
- <argument ref="restapiCallNodeProvider"/>
- </bean>
-
- <bean id="restconfDiscoveryNodeProvider" class="org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode" >
- <argument ref="restconfapiCallNodeProvider"/>
- </bean>
-
- <service ref="restconfapiCallNodeProvider">
- <interfaces>
- <value>org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode</value>
- </interfaces>
- </service>
-
- <service ref="restconfDiscoveryNodeProvider">
- <interfaces>
- <value>org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode</value>
- </interfaces>
- </service>
-
-</blueprint> \ No newline at end of file
diff --git a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java
index c3a6b4ea8..2bcd45e2b 100644
--- a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java
+++ b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java
@@ -19,6 +19,9 @@
*/
package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
@@ -27,21 +30,16 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-
import org.junit.Before;
import org.junit.Test;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertTrue;
-
public final class PropertiesSerializerTest {
- private SchemaContext context;
+ private EffectiveModelContext context;
@Before
public void initialization() throws FileNotFoundException {
@@ -1125,7 +1123,7 @@ public final class PropertiesSerializerTest {
assertThat(l.valueNs().moduleNs().toString(), is("identity:list:second:ns:test:json:ser"));
}
- public static SchemaContext compileYangFile() throws FileNotFoundException {
+ public static EffectiveModelContext compileYangFile() throws FileNotFoundException {
String path = PropertiesSerializerTest.class.getResource("/yang").getPath();
File dir = new File(path);
String[] fileList = dir.list();
diff --git a/plugins/sshapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/sshapi-call-node-blueprint.xml b/plugins/sshapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/sshapi-call-node-blueprint.xml
deleted file mode 100755
index 7a5424329..000000000
--- a/plugins/sshapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/sshapi-call-node-blueprint.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
- odl:use-default-for-reference-types="true">
-
- <bean id="sshapiCallNodeProvider" class="org.onap.ccsdk.sli.plugins.sshapicall.SshApiCallNode" />
-
-
-
- <service ref="sshapiCallNodeProvider">
- <interfaces>
- <value>org.onap.ccsdk.sli.plugins.sshapicall.SshApiCallNode</value>
- </interfaces>
- </service>
-
-</blueprint> \ No newline at end of file