diff options
Diffstat (limited to 'sdnr/wt/netconfnode-state-service')
5 files changed, 17 insertions, 24 deletions
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfDomAccessor.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfDomAccessor.java index 01d6659a5..aac6813f7 100644 --- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfDomAccessor.java +++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/NetconfDomAccessor.java @@ -38,7 +38,7 @@ import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; /** * Interface handling netconf connection. @@ -80,11 +80,11 @@ public interface NetconfDomAccessor extends NetconfAccessor { * * @param <T> specific child class of DOMNotificationListener * @param listener listener to be called - * @param types as list of SchemaPath + * @param types as list of Absolute * @return handler to manager registration */ <T extends DOMNotificationListener> @NonNull ListenerRegistration<DOMNotificationListener> doRegisterNotificationListener( - @NonNull T listener, Collection<SchemaPath> types); + @NonNull T listener, Collection<Absolute> types); /** * Register netconf notification listener for related mountpoint @@ -92,11 +92,11 @@ public interface NetconfDomAccessor extends NetconfAccessor { * @See <a href="https://tools.ietf.org/html/rfc5277">https://tools.ietf.org/html/rfc5277</a> * @param <T> * @param listener to be registers - * @param types as array of SchemaPath + * @param types as array of Absolute * @return Object to close and access */ <T extends DOMNotificationListener> @NonNull ListenerRegistration<DOMNotificationListener> doRegisterNotificationListener( - @NonNull T listener, SchemaPath[] types); + @NonNull T listener, Absolute[] types); /** * Register netconf notification listener for related mountpoint diff --git a/sdnr/wt/netconfnode-state-service/provider/pom.xml b/sdnr/wt/netconfnode-state-service/provider/pom.xml index 7cfa08b91..292f3a00b 100644 --- a/sdnr/wt/netconfnode-state-service/provider/pom.xml +++ b/sdnr/wt/netconfnode-state-service/provider/pom.xml @@ -102,13 +102,8 @@ </dependency> <!-- akka --> <dependency> - <groupId>com.typesafe.akka</groupId> - <artifactId>akka-actor_2.13</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.typesafe.akka</groupId> - <artifactId>akka-cluster_2.13</artifactId> + <groupId>com.typesafe</groupId> + <artifactId>config</artifactId> <scope>provided</scope> </dependency> <!-- wt --> diff --git a/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/dom/NetconfDomAccessorImpl.java b/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/dom/NetconfDomAccessorImpl.java index caf3da1a7..3212eac82 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/dom/NetconfDomAccessorImpl.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/access/dom/NetconfDomAccessorImpl.java @@ -68,7 +68,7 @@ import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,8 +77,6 @@ public class NetconfDomAccessorImpl extends NetconfAccessorImpl implements Netco private static final Logger LOG = LoggerFactory.getLogger(NetconfDomAccessorImpl.class); private static final QName CREATE_SUBSCRIPTION = QName.create(CreateSubscriptionInput.QNAME, "create-subscription"); - private static final SchemaPath RPC_PATH_CREATE_SUBSCRIPTION = - NetconfMessageTransformUtil.toPath(CREATE_SUBSCRIPTION); private static final YangInstanceIdentifier STREAMS_PATH = YangInstanceIdentifier.builder().node(Netconf.QNAME).node(Streams.QNAME).build(); @@ -174,7 +172,7 @@ public class NetconfDomAccessorImpl extends NetconfAccessorImpl implements Netco @Override public @NonNull <T extends DOMNotificationListener> ListenerRegistration<DOMNotificationListener> doRegisterNotificationListener( - @NonNull T listener, Collection<SchemaPath> types) { + @NonNull T listener, Collection<Absolute> types) { LOG.info("Begin register listener for Mountpoint {}", mountpoint.getIdentifier().toString()); final ListenerRegistration<DOMNotificationListener> ranListenerRegistration = @@ -188,14 +186,14 @@ public class NetconfDomAccessorImpl extends NetconfAccessorImpl implements Netco @Override public @NonNull <T extends DOMNotificationListener> ListenerRegistration<DOMNotificationListener> doRegisterNotificationListener( - @NonNull T listener, SchemaPath[] types) { + @NonNull T listener, Absolute[] types) { return doRegisterNotificationListener(listener, Arrays.asList(types)); } @Override public @NonNull <T extends DOMNotificationListener> ListenerRegistration<DOMNotificationListener> doRegisterNotificationListener( @NonNull T listener, QName[] types) { - List<SchemaPath> schemaPathList = Arrays.stream(types).map(qname -> NetconfMessageTransformUtil.toPath(qname)).collect(toList()); + List<Absolute> schemaPathList = Arrays.stream(types).map(qname -> Absolute.of(qname)).collect(toList()); return doRegisterNotificationListener(listener, schemaPathList); } @@ -203,7 +201,7 @@ public class NetconfDomAccessorImpl extends NetconfAccessorImpl implements Netco @Override public ListenableFuture<? extends DOMRpcResult> invokeCreateSubscription(CreateSubscriptionInput input) { final ContainerNode nnInput = serializer.toNormalizedNodeRpcData(input); - return rpcService.invokeRpc(RPC_PATH_CREATE_SUBSCRIPTION, nnInput); + return rpcService.invokeRpc(CREATE_SUBSCRIPTION, nnInput); } @Override diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfAccessorImpl.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfAccessorImpl.java index 10c3b2697..9e666431d 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfAccessorImpl.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfAccessorImpl.java @@ -57,7 +57,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; public class TestNetconfAccessorImpl extends Mockito { @@ -154,7 +154,7 @@ public class TestNetconfAccessorImpl extends Mockito { DOMMountPoint domMountPoint = mock(DOMMountPoint.class); when(domNotificationService.registerNotificationListener(any(DOMNotificationListener.class), - ArgumentMatchers.<Collection<SchemaPath>>any())) + ArgumentMatchers.<Collection<Absolute>>any())) .thenReturn(new ListenerRegistration<DOMNotificationListener>() { @Override public @NonNull DOMNotificationListener getInstance() { @@ -178,7 +178,7 @@ public class TestNetconfAccessorImpl extends Mockito { NetconfDomAccessorImpl netconfDomAccessor = new NetconfDomAccessorImpl(netconfAccessor, domDataBroker, domMountPoint, domContext); - Collection<SchemaPath> types = Arrays.asList(SchemaPath.create(false, NetworkTopology.QNAME)); + Collection<Absolute> types = Arrays.asList(Absolute.of(NetworkTopology.QNAME)); DOMNotificationListener listener = (notification) -> System.out.println("Notification: " + notification); ListenerRegistration<DOMNotificationListener> res = netconfDomAccessor.doRegisterNotificationListener(listener, types); @@ -186,7 +186,7 @@ public class TestNetconfAccessorImpl extends Mockito { //Capture parameters and assert them ArgumentCaptor<DOMNotificationListener> captor1 = ArgumentCaptor.forClass(DOMNotificationListener.class); @SuppressWarnings("unchecked") - ArgumentCaptor<Collection<SchemaPath>> captor2 = ArgumentCaptor.forClass(Collection.class); + ArgumentCaptor<Collection<Absolute>> captor2 = ArgumentCaptor.forClass(Collection.class); verify(domNotificationService).registerNotificationListener(captor1.capture(), captor2.capture()); assertEquals("Listener", listener, captor1.getValue()); diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java index f03ab90e2..46b2e769e 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java @@ -48,7 +48,7 @@ import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.impl.NetconfNodeS import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.impl.rpc.NetconfnodeStateServiceRpcApiImpl; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.example.ExampleConfig; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.example.TestNetconfHelper; -import org.opendaylight.binding.runtime.spi.BindingRuntimeHelpers; +import org.opendaylight.mdsal.binding.runtime.spi.BindingRuntimeHelpers; import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.DataObjectModification; |