Eliminate use of SchemaService 58/73758/7
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 4 Jul 2018 17:06:54 +0000 (19:06 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 5 Jul 2018 16:42:59 +0000 (18:42 +0200)
SchemaService has been deprecated in favor of DOMSchemaService,
migrate to it.

Change-Id: If1b6d3c9d821c6c5bea1476c08a61ed0c320b8ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
26 files changed:
netconf/mdsal-netconf-connector/src/main/java/org/opendaylight/netconf/mdsal/connector/CurrentSchemaContext.java
netconf/mdsal-netconf-connector/src/main/java/org/opendaylight/netconf/mdsal/connector/MdsalNetconfOperationServiceFactory.java
netconf/mdsal-netconf-connector/src/main/resources/org/opendaylight/blueprint/mdsal-netconf-connector.xml
netconf/mdsal-netconf-connector/src/test/java/org/opendaylight/netconf/mdsal/connector/ops/AbstractNetconfOperationTest.java
netconf/mdsal-netconf-connector/src/test/java/org/opendaylight/netconf/mdsal/connector/ops/RuntimeRpcTest.java
netconf/mdsal-netconf-connector/src/test/java/org/opendaylight/netconf/mdsal/connector/ops/SchemaServiceStub.java
netconf/mdsal-netconf-yang-library/src/main/java/org/opendaylight/netconf/mdsal/yang/library/SchemaServiceToMdsalWriter.java
netconf/mdsal-netconf-yang-library/src/main/resources/org/opendaylight/blueprint/mdsal-netconf-yang-library.xml
netconf/mdsal-netconf-yang-library/src/test/java/org/opendaylight/netconf/mdsal/yang/library/SchemaServiceToMdsalWriterTest.java
netconf/netconf-console/src/test/java/org/opendaylight/netconf/console/impl/NetconfCommandsImplTest.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/sal/NetconfDeviceTopologyAdapterTest.java
netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/MdsalOperationProvider.java
restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/ControllerContext.java
restconf/restconf-nb-bierman02/src/main/resources/org/opendaylight/blueprint/restconf-config.xml
restconf/restconf-nb-bierman02/src/test/java/org/opendaylight/controller/md/sal/rest/common/TestRestconfUtils.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/ApiDocGeneratorDraftO2.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/ApiDocGeneratorRFC8040.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangSwaggerGenerator.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangSwaggerGeneratorDraft02.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangSwaggerGeneratorRFC8040.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointSwaggerGeneratorDraft02.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointSwaggerGeneratorRFC8040.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/mountpoints/MountPointSwagger.java
restconf/sal-rest-docgen/src/main/resources/org/opendaylight/blueprint/blueprint.xml
restconf/sal-rest-docgen/src/test/java/org/opendaylight/controller/sal/rest/doc/impl/DocGenTestHelper.java
restconf/sal-rest-docgen/src/test/java/org/opendaylight/controller/sal/rest/doc/impl/MountPointSwaggerTest.java

index 61a3b950a794d7b08535c7cfffe3a150677ef7ee..165f6310c7753184fa1f34cde2675ff039199199 100644 (file)
@@ -13,7 +13,7 @@ import com.google.common.collect.Sets;
 import java.util.Collections;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicReference;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.api.capability.Capability;
 import org.opendaylight.netconf.api.monitoring.CapabilityListener;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
@@ -33,7 +33,7 @@ public class CurrentSchemaContext implements SchemaContextListener, AutoCloseabl
         return currentContext.get();
     }
 
-    public CurrentSchemaContext(final SchemaService schemaService,
+    public CurrentSchemaContext(final DOMSchemaService schemaService,
                                 final SchemaSourceProvider<YangTextSchemaSource> rootSchemaSourceProvider) {
         this.rootSchemaSourceProvider = rootSchemaSourceProvider;
         schemaContextListenerListenerRegistration = schemaService.registerSchemaContextListener(this);
index 8a796bcaf6cff2f1a7b454abcdf9cdc990ae8a44..fa1b80368cae76cfa324aa60bcc7efa251761861 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.netconf.mdsal.connector;
 
 import com.google.common.base.Preconditions;
@@ -21,7 +20,8 @@ import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
+import org.opendaylight.mdsal.dom.api.DOMYangTextSourceProvider;
 import org.opendaylight.netconf.api.capability.BasicCapability;
 import org.opendaylight.netconf.api.capability.Capability;
 import org.opendaylight.netconf.api.capability.YangModuleCapability;
@@ -51,8 +51,7 @@ public class MdsalNetconfOperationServiceFactory implements NetconfOperationServ
     private final NetconfOperationServiceFactoryListener netconfOperationServiceFactoryListener;
 
     public MdsalNetconfOperationServiceFactory(
-            final SchemaService schemaService,
-            final SchemaSourceProvider<YangTextSchemaSource> rootSchemaSourceProviderDependency,
+            final DOMSchemaService schemaService,
             final NetconfOperationServiceFactoryListener netconfOperationServiceFactoryListener,
             final DOMDataBroker dataBroker,
             final DOMRpcService rpcService) {
@@ -60,7 +59,8 @@ public class MdsalNetconfOperationServiceFactory implements NetconfOperationServ
         this.dataBroker = dataBroker;
         this.rpcService = rpcService;
 
-        this.rootSchemaSourceProviderDependency = rootSchemaSourceProviderDependency;
+        this.rootSchemaSourceProviderDependency = (DOMYangTextSourceProvider) schemaService.getSupportedExtensions()
+                .get(DOMYangTextSourceProvider.class);
         this.currentSchemaContext = new CurrentSchemaContext(Preconditions.checkNotNull(schemaService),
                 rootSchemaSourceProviderDependency);
         this.netconfOperationServiceFactoryListener = netconfOperationServiceFactoryListener;
index 63505e7f4809f99d59de34399a9b62d1b178947c..d4d37cca613380ff186465bacf3f2fd86a651c24 100644 (file)
@@ -13,9 +13,7 @@
     <reference id="domDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"/>
     <reference id="domRpcService" interface="org.opendaylight.controller.md.sal.dom.api.DOMRpcService"/>
     <reference id="schemaService"
-               interface="org.opendaylight.controller.sal.core.api.model.SchemaService"/>
-    <reference id="rootSchemaSourceProviderDependency"
-               interface="org.opendaylight.controller.sal.core.api.model.YangTextSourceProvider"/>
+               interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
     <reference id="netconfOperationServiceFactoryListener"
                interface="org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactoryListener"
                odl:type="mapper-aggregator-registry"/>
@@ -24,7 +22,6 @@
           class="org.opendaylight.netconf.mdsal.connector.MdsalNetconfOperationServiceFactory"
           destroy-method="close">
         <argument ref="schemaService"/>
-        <argument ref="rootSchemaSourceProviderDependency"/>
         <argument ref="netconfOperationServiceFactoryListener"/>
         <argument ref="domDataBroker"/>
         <argument ref="domRpcService"/>
index 033c50cdadf9ea04fafad944c499d885d4238241..019a37499478eed6d79f4b58305fe38a88aa3ad5 100644 (file)
@@ -32,8 +32,8 @@ import org.mockito.MockitoAnnotations;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.controller.sal.core.spi.data.DOMStore;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.api.xml.XmlUtil;
 import org.opendaylight.netconf.mapping.api.NetconfOperation;
 import org.opendaylight.netconf.mapping.api.NetconfOperationChainedExecution;
@@ -70,14 +70,14 @@ public abstract class AbstractNetconfOperationTest {
         XMLUnit.setIgnoreAttributeOrder(true);
 
         final SchemaContext schemaContext = getSchemaContext();
-        final SchemaService schemaService = new SchemaServiceStub(schemaContext);
+        final DOMSchemaService schemaService = new SchemaServiceStub(schemaContext);
         final DOMStore operStore = InMemoryDOMDataStoreFactory.create("DOM-OPER", schemaService);
         final DOMStore configStore = InMemoryDOMDataStoreFactory.create("DOM-CFG", schemaService);
 
         currentSchemaContext = new CurrentSchemaContext(schemaService, sourceIdentifier -> {
             final YangTextSchemaSource yangTextSchemaSource =
                 YangTextSchemaSource.delegateForByteSource(sourceIdentifier, ByteSource.wrap("module test".getBytes()));
-            return Futures.immediateCheckedFuture(yangTextSchemaSource);
+            return Futures.immediateFuture(yangTextSchemaSource);
         });
 
         final EnumMap<LogicalDatastoreType, DOMStore> datastores = new EnumMap<>(LogicalDatastoreType.class);
index cc932996304c7e14c54c0cea68836fb7f9713e92..b7a1fb1ce6e2a2b9a6aa2b916615a88dae358881 100644 (file)
@@ -37,7 +37,7 @@ import org.opendaylight.controller.md.sal.dom.api.DOMRpcException;
 import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
 import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
 import org.opendaylight.controller.md.sal.dom.spi.DefaultDOMRpcResult;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.api.DocumentedException;
 import org.opendaylight.netconf.api.DocumentedException.ErrorSeverity;
 import org.opendaylight.netconf.api.DocumentedException.ErrorTag;
@@ -150,7 +150,7 @@ public class RuntimeRpcTest {
     private CurrentSchemaContext currentSchemaContext = null;
 
     @Mock
-    private SchemaService schemaService;
+    private DOMSchemaService schemaService;
     @Mock
     private SchemaContextListener listener;
     @Mock
@@ -163,8 +163,6 @@ public class RuntimeRpcTest {
         initMocks(this);
         doNothing().when(registration).close();
         doReturn(listener).when(registration).getInstance();
-        doNothing().when(schemaService).addModule(any(Module.class));
-        doNothing().when(schemaService).removeModule(any(Module.class));
         doReturn(schemaContext).when(schemaService).getGlobalContext();
         doReturn(schemaContext).when(schemaService).getSessionContext();
         doAnswer(invocationOnMock -> {
index 206beab647cf16e99dd4f449a13bac6b274ab10f..e1780478f18313a1a7d93e402f4f9bbd627ee555 100644 (file)
@@ -5,31 +5,21 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.netconf.mdsal.connector.ops;
 
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
+import org.opendaylight.yangtools.concepts.AbstractListenerRegistration;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
 
-final class SchemaServiceStub implements SchemaService {
+final class SchemaServiceStub implements DOMSchemaService {
     private final SchemaContext schemaContext;
 
     SchemaServiceStub(SchemaContext schemaContext) {
         this.schemaContext = schemaContext;
     }
 
-    @Override
-    public void addModule(final Module module) {
-    }
-
-    @Override
-    public void removeModule(final Module module) {
-
-    }
-
     @Override
     public SchemaContext getSessionContext() {
         return schemaContext;
@@ -44,14 +34,10 @@ final class SchemaServiceStub implements SchemaService {
     public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(
         final SchemaContextListener listener) {
         listener.onGlobalContextUpdated(getGlobalContext());
-        return new ListenerRegistration<SchemaContextListener>() {
-            @Override
-            public void close() {
-            }
-
+        return new AbstractListenerRegistration<SchemaContextListener>(listener) {
             @Override
-            public SchemaContextListener getInstance() {
-                return listener;
+            protected void removeRegistration() {
+                // No-op
             }
         };
     }
index 7fa35c7365a81b631370b52adffc71ba4edcee34..69296ffe1c661986cd099272c477179a08c98b43 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.netconf.mdsal.yang.library;
 
 import com.google.common.util.concurrent.FutureCallback;
@@ -17,8 +16,8 @@ import java.util.stream.Collectors;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.mdsal.common.api.CommitInfo;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160621.ModulesState;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160621.ModulesStateBuilder;
@@ -47,11 +46,11 @@ public class SchemaServiceToMdsalWriter implements SchemaContextListener, AutoCl
     private static final InstanceIdentifier<ModulesState> MODULES_STATE_INSTANCE_IDENTIFIER =
             InstanceIdentifier.create(ModulesState.class);
 
-    private final SchemaService schemaService;
+    private final DOMSchemaService schemaService;
     private final AtomicInteger moduleSetId;
     private final DataBroker dataBroker;
 
-    public SchemaServiceToMdsalWriter(final SchemaService schemaService,
+    public SchemaServiceToMdsalWriter(final DOMSchemaService schemaService,
                                       final DataBroker dataBroker) {
         this.schemaService = schemaService;
         this.dataBroker = dataBroker;
index a4a2bf1f2935bdd61805b5e2a6e2ef690371d20a..bc352b51ae9aae839c8068425b0cfd68c3c4e1c3 100755 (executable)
@@ -14,7 +14,7 @@
                interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
                odl:type="default"/>
     <reference id="schemaService"
-               interface="org.opendaylight.controller.sal.core.api.model.SchemaService" />
+               interface="org.opendaylight.mdsal.dom.api.DOMSchemaService" />
 
     <bean id="schemaServiceToMdsalWriter"
           class="org.opendaylight.netconf.mdsal.yang.library.SchemaServiceToMdsalWriter"
index 296cd3b231df69e4341af59fc172d33bdec77bb4..0df7fef0cb6a3f98d32939d1556b17d0ed695aea 100644 (file)
@@ -22,8 +22,8 @@ import org.mockito.MockitoAnnotations;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.mdsal.common.api.CommitInfo;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160621.ModulesState;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160621.ModulesStateBuilder;
@@ -48,7 +48,7 @@ public class SchemaServiceToMdsalWriterTest {
             InstanceIdentifier.create(ModulesState.class);
 
     @Mock
-    private SchemaService schemaService;
+    private DOMSchemaService schemaService;
     @Mock
     private DataBroker dataBroker;
     @Mock
index 8b1381e22ca89d68f1ebcfd0ee396c3933b9a1da..89ce7718b52f9db6b21fce792702080774eacaab 100644 (file)
@@ -36,7 +36,6 @@ import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.controller.sal.core.spi.data.DOMStore;
 import org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator;
 import org.opendaylight.mdsal.binding.dom.codec.gen.impl.StreamWriterGenerator;
@@ -45,6 +44,7 @@ import org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrate
 import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
 import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
 import org.opendaylight.mdsal.binding.generator.util.JavassistUtils;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.console.utils.NetconfConsoleConstants;
 import org.opendaylight.netconf.console.utils.NetconfConsoleUtils;
 import org.opendaylight.netconf.console.utils.NetconfIidFactory;
@@ -67,8 +67,8 @@ 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.network.topology.topology.Node;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey;
+import org.opendaylight.yangtools.concepts.AbstractListenerRegistration;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
@@ -92,7 +92,7 @@ public class NetconfCommandsImplTest {
             "/schemas/network-topology@2013-10-21.yang", "/schemas/ietf-inet-types@2013-07-15.yang",
             "/schemas/yang-ext.yang", "/schemas/netconf-node-topology.yang");
         schemaContext.getModules();
-        final SchemaService schemaService = createSchemaService();
+        final DOMSchemaService schemaService = createSchemaService();
 
         final DOMStore operStore = InMemoryDOMDataStoreFactory.create("DOM-OPER", schemaService);
         final DOMStore configStore = InMemoryDOMDataStoreFactory.create("DOM-CFG", schemaService);
@@ -289,17 +289,8 @@ public class NetconfCommandsImplTest {
         assertEquals(ImmutableList.of(CONN_STATUS.name()), mapNode.get(NetconfConsoleConstants.STATUS));
     }
 
-    private SchemaService createSchemaService() {
-        return new SchemaService() {
-
-            @Override
-            public void addModule(final Module module) {
-            }
-
-            @Override
-            public void removeModule(final Module module) {
-
-            }
+    private DOMSchemaService createSchemaService() {
+        return new DOMSchemaService() {
 
             @Override
             public SchemaContext getSessionContext() {
@@ -315,15 +306,11 @@ public class NetconfCommandsImplTest {
             public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(
                     final SchemaContextListener listener) {
                 listener.onGlobalContextUpdated(getGlobalContext());
-                return new ListenerRegistration<SchemaContextListener>() {
-                    @Override
-                    public void close() {
-
-                    }
+                return new AbstractListenerRegistration<SchemaContextListener>(listener) {
 
                     @Override
-                    public SchemaContextListener getInstance() {
-                        return listener;
+                    protected void removeRegistration() {
+                        // No-op
                     }
                 };
             }
index 3b878edda22819e8cee9c2c62bec1098ec4c44d7..2261cc363d990ac96dbeacf82f3591a9d3abdc0d 100644 (file)
@@ -39,7 +39,6 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.controller.sal.core.spi.data.DOMStore;
 import org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator;
 import org.opendaylight.mdsal.binding.dom.codec.gen.impl.StreamWriterGenerator;
@@ -48,6 +47,7 @@ import org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrate
 import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
 import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
 import org.opendaylight.mdsal.binding.generator.util.JavassistUtils;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCapabilities;
 import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
@@ -55,13 +55,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev15
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
+import org.opendaylight.yangtools.concepts.AbstractListenerRegistration;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 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.data.impl.schema.builder.impl.ImmutableLeafNodeBuilder;
-import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
@@ -107,7 +107,7 @@ public class NetconfDeviceTopologyAdapterTest {
             "/schemas/yang-ext.yang", "/schemas/netconf-node-topology.yang",
             "/schemas/network-topology-augment-test@2016-08-08.yang");
         schemaContext.getModules();
-        final SchemaService schemaService = createSchemaService();
+        final DOMSchemaService schemaService = createSchemaService();
 
         final DOMStore operStore = InMemoryDOMDataStoreFactory.create("DOM-OPER", schemaService);
         final DOMStore configStore = InMemoryDOMDataStoreFactory.create("DOM-CFG", schemaService);
@@ -225,17 +225,8 @@ public class NetconfDeviceTopologyAdapterTest {
                 dataTestId, testNode.get().getValue());
     }
 
-    private SchemaService createSchemaService() {
-        return new SchemaService() {
-
-            @Override
-            public void addModule(final Module module) {
-            }
-
-            @Override
-            public void removeModule(final Module module) {
-
-            }
+    private DOMSchemaService createSchemaService() {
+        return new DOMSchemaService() {
 
             @Override
             public SchemaContext getSessionContext() {
@@ -251,15 +242,10 @@ public class NetconfDeviceTopologyAdapterTest {
             public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(
                     final SchemaContextListener listener) {
                 listener.onGlobalContextUpdated(getGlobalContext());
-                return new ListenerRegistration<SchemaContextListener>() {
-                    @Override
-                    public void close() {
-
-                    }
-
+                return new AbstractListenerRegistration<SchemaContextListener>(listener) {
                     @Override
-                    public SchemaContextListener getInstance() {
-                        return listener;
+                    protected void removeRegistration() {
+                        // No-op
                     }
                 };
             }
index 86941020eea97323f938033252edc8f62d4e1d13..afece1b190195919783e49555ddfd40efe173e86 100644 (file)
@@ -22,8 +22,8 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.controller.sal.core.spi.data.DOMStore;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.api.capability.Capability;
 import org.opendaylight.netconf.api.monitoring.CapabilityListener;
 import org.opendaylight.netconf.impl.SessionIdProvider;
@@ -43,6 +43,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.mon
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.Yang;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.Schemas;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.schemas.Schema;
+import org.opendaylight.yangtools.concepts.AbstractListenerRegistration;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.util.concurrent.SpecialExecutors;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -54,7 +55,6 @@ import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
 import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
 import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.CollectionNodeBuilder;
-import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
 import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
@@ -103,7 +103,7 @@ class MdsalOperationProvider implements NetconfOperationServiceFactory {
         private final long currentSessionId;
         private final SchemaContext schemaContext;
         private final Set<Capability> caps;
-        private final SchemaService schemaService;
+        private final DOMSchemaService schemaService;
         private final DOMDataBroker dataBroker;
         private final SchemaSourceProvider<YangTextSchemaSource> sourceProvider;
 
@@ -208,7 +208,7 @@ class MdsalOperationProvider implements NetconfOperationServiceFactory {
                     new YangInstanceIdentifier.NodeIdentifier(NetconfState.QNAME)).withChild(schemasContainer).build();
         }
 
-        private static DOMDataBroker createDataStore(final SchemaService schemaService, final long sessionId) {
+        private static DOMDataBroker createDataStore(final DOMSchemaService schemaService, final long sessionId) {
             LOG.debug("Session {}: Creating data stores for simulated device", sessionId);
             final DOMStore operStore = InMemoryDOMDataStoreFactory
                     .create("DOM-OPER", schemaService);
@@ -225,17 +225,8 @@ class MdsalOperationProvider implements NetconfOperationServiceFactory {
             return new SerializedDOMDataBroker(datastores, MoreExecutors.listeningDecorator(listenableFutureExecutor));
         }
 
-        private SchemaService createSchemaService() {
-            return new SchemaService() {
-
-                @Override
-                public void addModule(final Module module) {
-                }
-
-                @Override
-                public void removeModule(final Module module) {
-
-                }
+        private DOMSchemaService createSchemaService() {
+            return new DOMSchemaService() {
 
                 @Override
                 public SchemaContext getSessionContext() {
@@ -251,15 +242,11 @@ class MdsalOperationProvider implements NetconfOperationServiceFactory {
                 public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(
                         final SchemaContextListener listener) {
                     listener.onGlobalContextUpdated(getGlobalContext());
-                    return new ListenerRegistration<SchemaContextListener>() {
-                        @Override
-                        public void close() {
-
-                        }
+                    return new AbstractListenerRegistration<SchemaContextListener>(listener) {
 
                         @Override
-                        public SchemaContextListener getInstance() {
-                            return listener;
+                        protected void removeRegistration() {
+                            // No-op
                         }
                     };
                 }
index c8e6adcc968f730d5f660dd90b94dfd99652e37e..bbc34cbcb52a8b2186ff442de3479384d9d7a55a 100644 (file)
@@ -37,7 +37,6 @@ import org.opendaylight.controller.md.sal.common.impl.util.compat.DataNormalizat
 import org.opendaylight.controller.md.sal.common.impl.util.compat.DataNormalizer;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.mdsal.dom.api.DOMYangTextSourceProvider;
 import org.opendaylight.netconf.sal.rest.api.Draft02;
@@ -102,7 +101,7 @@ public final class ControllerContext implements SchemaContextListener, Closeable
     private volatile SchemaContext globalSchema;
     private volatile DataNormalizer dataNormalizer;
 
-    private ControllerContext(SchemaService schemaService, DOMMountPointService mountService,
+    private ControllerContext(DOMSchemaService schemaService, DOMMountPointService mountService,
             DOMYangTextSourceProvider yangTextSourceProvider) {
         this.mountService = mountService;
         this.yangTextSourceProvider = yangTextSourceProvider;
@@ -111,7 +110,7 @@ public final class ControllerContext implements SchemaContextListener, Closeable
         listenerRegistration = schemaService.registerSchemaContextListener(this);
     }
 
-    public static ControllerContext newInstance(SchemaService schemaService, DOMMountPointService mountService,
+    public static ControllerContext newInstance(DOMSchemaService schemaService, DOMMountPointService mountService,
             DOMSchemaService domSchemaService) {
         final DOMYangTextSourceProvider yangTextSourceProvider =
             (DOMYangTextSourceProvider) domSchemaService.getSupportedExtensions().get(DOMYangTextSourceProvider.class);
index 61201af0f398a3d5fc9d3532fca656b0efe00432..f30478d08a81c4e784485001a8b8aae99543210a 100644 (file)
@@ -34,7 +34,7 @@
     </cm:default-properties>
   </cm:property-placeholder>
 
-  <reference id="schemaService" interface="org.opendaylight.controller.sal.core.api.model.SchemaService"/>
+  <reference id="schemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
   <reference id="domRpcService" interface="org.opendaylight.controller.md.sal.dom.api.DOMRpcService"/>
   <reference id="domMountPointService" interface="org.opendaylight.controller.md.sal.dom.api.DOMMountPointService"/>
   <reference id="domNotificationService" interface="org.opendaylight.controller.md.sal.dom.api.DOMNotificationService"/>
index 9c4795e2879627264bbc07e604c6dec504b6ee19..e968b710a1c9491c507b776cbc1280c1a04b408b 100644 (file)
@@ -27,7 +27,6 @@ import javax.xml.stream.XMLStreamException;
 import javax.xml.transform.dom.DOMSource;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.controller.sal.rest.impl.test.providers.TestJsonBodyWriter;
 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.sal.restconf.impl.ControllerContext;
@@ -74,7 +73,7 @@ public final class TestRestconfUtils {
         doReturn(Optional.fromNullable(mountInstance)).when(mockMountService)
             .getMountPoint(any(YangInstanceIdentifier.class));
 
-        SchemaService mockSchemaService = mock(SchemaService.class);
+        DOMSchemaService mockSchemaService = mock(DOMSchemaService.class);
         doReturn(schemaContext).when(mockSchemaService).getGlobalContext();
 
         DOMSchemaService mockDomSchemaService = mock(DOMSchemaService.class);
index 5058f7fedcf790b1729eae4eb6d1148a97baf142..f792c1ece9f7624d98dfd20c03992e9ab3ebe1e8 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.netconf.sal.rest.doc.impl;
 
 import java.util.Objects;
 import java.util.Optional;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 
 /**
  * This class gathers all YANG-defined {@link org.opendaylight.yangtools.yang.model.api.Module}s and
@@ -17,7 +17,7 @@ import org.opendaylight.controller.sal.core.api.model.SchemaService;
  */
 public class ApiDocGeneratorDraftO2 extends BaseYangSwaggerGeneratorDraft02 {
 
-    public ApiDocGeneratorDraftO2(SchemaService schemaService) {
+    public ApiDocGeneratorDraftO2(DOMSchemaService schemaService) {
         super(Optional.of(Objects.requireNonNull(schemaService)));
     }
 }
index 5edb65d5a6483e6ad97797f4d57a6fd575eaaec3..8640561b9f9425a650bd2a30ac45e76798e0b6b6 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.netconf.sal.rest.doc.impl;
 
 import java.util.Objects;
 import java.util.Optional;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 
 /**
  * This class gathers all YANG-defined {@link org.opendaylight.yangtools.yang.model.api.Module}s and
@@ -19,7 +19,7 @@ import org.opendaylight.controller.sal.core.api.model.SchemaService;
  */
 public class ApiDocGeneratorRFC8040 extends BaseYangSwaggerGeneratorRFC8040 {
 
-    public ApiDocGeneratorRFC8040(SchemaService schemaService) {
+    public ApiDocGeneratorRFC8040(DOMSchemaService schemaService) {
         super(Optional.of(Objects.requireNonNull(schemaService)));
     }
 }
index af13ffe4dbccf37430138d8723a845331e017081..1fd9ada4325d0b0cf0d7d09b339246a292533c41 100644 (file)
@@ -27,7 +27,7 @@ import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 import javax.ws.rs.core.UriInfo;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.sal.rest.doc.model.builder.OperationBuilder;
 import org.opendaylight.netconf.sal.rest.doc.model.builder.OperationBuilder.Delete;
 import org.opendaylight.netconf.sal.rest.doc.model.builder.OperationBuilder.Get;
@@ -66,14 +66,14 @@ public abstract class BaseYangSwaggerGenerator {
 
     // private Map<String, ApiDeclaration> MODULE_DOC_CACHE = new HashMap<>()
     private final ObjectMapper mapper = new ObjectMapper();
-    private final SchemaService schemaService;
+    private final DOMSchemaService schemaService;
 
-    protected BaseYangSwaggerGenerator(Optional<SchemaService> schemaService) {
+    protected BaseYangSwaggerGenerator(Optional<DOMSchemaService> schemaService) {
         this.schemaService = schemaService.orElse(null);
         this.mapper.configure(SerializationFeature.INDENT_OUTPUT, true);
     }
 
-    public SchemaService getSchemaService() {
+    public DOMSchemaService getSchemaService() {
         return schemaService;
     }
 
index fb4b04addf611dabfe91eda05ff7b13d317df108..9ad416b175700ebd0247bc8b3bcccb46b114ad0c 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.netconf.sal.rest.doc.impl;
 
 import java.util.Optional;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 
 /**
  * Base class for a bierman draft02 implementation.
@@ -18,7 +18,7 @@ import org.opendaylight.controller.sal.core.api.model.SchemaService;
 public abstract class BaseYangSwaggerGeneratorDraft02 extends BaseYangSwaggerGenerator {
     protected static final String RESTCONF_CONTEXT_ROOT = "restconf";
 
-    protected BaseYangSwaggerGeneratorDraft02(Optional<SchemaService> schemaService) {
+    protected BaseYangSwaggerGeneratorDraft02(Optional<DOMSchemaService> schemaService) {
         super(schemaService);
     }
 
index ddcd8edc4f6d44d0a74e5c015a45d7ad8b29511f..c21f9afea8609c434a5200c7c777a929c2e4fb6a 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.netconf.sal.rest.doc.impl;
 
 import java.util.Optional;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 
 /**
  * Base class for an RFC 8040 implementation.
@@ -19,7 +19,7 @@ public abstract class BaseYangSwaggerGeneratorRFC8040 extends BaseYangSwaggerGen
 
     private static final String BASE_PATH = "rests";
 
-    protected BaseYangSwaggerGeneratorRFC8040(Optional<SchemaService> schemaService) {
+    protected BaseYangSwaggerGeneratorRFC8040(Optional<DOMSchemaService> schemaService) {
         super(schemaService);
     }
 
index 43f8e8fac5e92033a2e3c7e67e88b5820d836547..f0c7d19017fb2b58ec186a1abc914daaa61e07de 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.netconf.sal.rest.doc.impl;
 import java.util.Objects;
 import java.util.Optional;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
 
 /**
@@ -22,7 +22,7 @@ public class MountPointSwaggerGeneratorDraft02 extends BaseYangSwaggerGeneratorD
 
     private final MountPointSwagger mountPointSwagger;
 
-    public MountPointSwaggerGeneratorDraft02(SchemaService schemaService, DOMMountPointService mountService) {
+    public MountPointSwaggerGeneratorDraft02(DOMSchemaService schemaService, DOMMountPointService mountService) {
         super(Optional.of(Objects.requireNonNull(schemaService)));
         mountPointSwagger = new MountPointSwagger(schemaService, mountService, this);
         mountPointSwagger.init();
index c9d944ffb21fb2c61148d3859f3a60910b5b5f8e..0eb34279057aedf79fa730b4ccdcda461a267224 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.netconf.sal.rest.doc.impl;
 import java.util.Objects;
 import java.util.Optional;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
 
 /**
@@ -21,7 +21,7 @@ import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
 public class MountPointSwaggerGeneratorRFC8040 extends BaseYangSwaggerGeneratorRFC8040 implements AutoCloseable {
     private final MountPointSwagger mountPointSwagger;
 
-    public MountPointSwaggerGeneratorRFC8040(SchemaService schemaService, DOMMountPointService mountService) {
+    public MountPointSwaggerGeneratorRFC8040(DOMSchemaService schemaService, DOMMountPointService mountService) {
         super(Optional.of(Objects.requireNonNull(schemaService)));
         mountPointSwagger = new MountPointSwagger(schemaService, mountService, this);
         mountPointSwagger.init();
index 2ba7da6af5fe14d1c910373fa8dec558dc6024a9..1ec5a2ebb2c620f3000e4ba163611be019deea7e 100644 (file)
@@ -21,8 +21,8 @@ import java.util.concurrent.atomic.AtomicLong;
 import javax.ws.rs.core.UriInfo;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.controller.sal.core.api.mount.MountProvisionListener;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.sal.rest.doc.impl.BaseYangSwaggerGenerator;
 import org.opendaylight.netconf.sal.rest.doc.swagger.Api;
 import org.opendaylight.netconf.sal.rest.doc.swagger.ApiDeclaration;
@@ -40,7 +40,7 @@ public class MountPointSwagger implements MountProvisionListener, AutoCloseable
     private static final String DATASTORES_REVISION = "-";
     private static final String DATASTORES_LABEL = "Datastores";
 
-    private final SchemaService globalSchema;
+    private final DOMSchemaService globalSchema;
     private final DOMMountPointService mountService;
     private final BaseYangSwaggerGenerator swaggerGenerator;
     private final Map<YangInstanceIdentifier, Long> instanceIdToLongId =
@@ -53,7 +53,7 @@ public class MountPointSwagger implements MountProvisionListener, AutoCloseable
 
     private ListenerRegistration<MountProvisionListener> registration;
 
-    public MountPointSwagger(SchemaService globalSchema, DOMMountPointService mountService,
+    public MountPointSwagger(DOMSchemaService globalSchema, DOMMountPointService mountService,
             BaseYangSwaggerGenerator swaggerGenerator) {
         this.globalSchema = Objects.requireNonNull(globalSchema);
         this.mountService = Objects.requireNonNull(mountService);
index 8fa2d15ce45591ea6367568882f1dc70eae04950..e9a5ecf1b29d1749de5d25f149e81383bb8a1f73 100644 (file)
@@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
            xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
            odl:use-default-for-reference-types="true">
 
-    <reference id="schemaService" interface="org.opendaylight.controller.sal.core.api.model.SchemaService"/>
+    <reference id="schemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
     <reference id="domMountPointService" interface="org.opendaylight.controller.md.sal.dom.api.DOMMountPointService"/>
     <reference id="webServer" interface="org.opendaylight.aaa.web.WebServer"/>
     <reference id="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer"/>
index 9cd7ae780de9462b8958df8cb17bd8b5321ba249..0b302547c319f93d0ac0dc622900471fb9181f92 100644 (file)
@@ -25,7 +25,7 @@ import java.util.Set;
 import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
 import org.mockito.ArgumentCaptor;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
@@ -67,12 +67,12 @@ public class DocGenTestHelper {
         return this.schemaContext;
     }
 
-    public SchemaService createMockSchemaService(SchemaContext mockContext) {
+    public DOMSchemaService createMockSchemaService(SchemaContext mockContext) {
         if (mockContext == null) {
             mockContext = createMockSchemaContext();
         }
 
-        final SchemaService mockSchemaService = mock(SchemaService.class);
+        final DOMSchemaService mockSchemaService = mock(DOMSchemaService.class);
         when(mockSchemaService.getGlobalContext()).thenReturn(mockContext);
         return mockSchemaService;
     }
index 9703c2ba5b0c61bdb3637d67f329530bc73231f3..82633e8824f8f901d722e6c0e37c748f8871a819 100644 (file)
@@ -22,7 +22,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.sal.rest.doc.impl.MountPointSwaggerGeneratorDraft02;
 import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
 import org.opendaylight.netconf.sal.rest.doc.swagger.Api;
@@ -57,7 +57,7 @@ public class MountPointSwaggerTest {
         // in our test.
         // OK for testing - real thing would have seperate instances.
         final SchemaContext context = this.helper.createMockSchemaContext();
-        final SchemaService schemaService = this.helper.createMockSchemaService(context);
+        final DOMSchemaService schemaService = this.helper.createMockSchemaService(context);
 
         final DOMMountPoint mountPoint = mock(DOMMountPoint.class);
         when(mountPoint.getSchemaContext()).thenReturn(context);