X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fbase%2Fservices%2Fimpl%2FRestconfOperationsServiceImpl.java;h=62fc11e92bb0be7c5ad86d151be35057d0b79294;hb=4048ef98e8c5a115307f53c7f314d945f2c76653;hp=612b03bdec1b96b477ca68f00a936fc78797a305;hpb=2436ec5e97f51fdaf38d4024acfd2794ba8eb653;p=netconf.git diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/base/services/impl/RestconfOperationsServiceImpl.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/base/services/impl/RestconfOperationsServiceImpl.java index 612b03bdec..62fc11e92b 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/base/services/impl/RestconfOperationsServiceImpl.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/base/services/impl/RestconfOperationsServiceImpl.java @@ -35,12 +35,12 @@ import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode; import org.opendaylight.yangtools.yang.model.api.Module; import org.opendaylight.yangtools.yang.model.api.RpcDefinition; import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.EffectiveSchemaContext; +import org.opendaylight.yangtools.yang.parser.stmt.reactor.EffectiveSchemaContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Implementation of {@link RestconfOperationsService} + * Implementation of {@link RestconfOperationsService}. * */ public class RestconfOperationsServiceImpl implements RestconfOperationsService { @@ -51,12 +51,12 @@ public class RestconfOperationsServiceImpl implements RestconfOperationsService private final DOMMountPointServiceHandler domMountPointServiceHandler; /** - * Set {@link SchemaContextHandler} for getting actual {@link SchemaContext} + * Set {@link SchemaContextHandler} for getting actual {@link SchemaContext}. * * @param schemaContextHandler - * - handling schema context + * handling schema context * @param domMountPointServiceHandler - * - handling dom mount point service + * handling dom mount point service */ public RestconfOperationsServiceImpl(final SchemaContextHandler schemaContextHandler, final DOMMountPointServiceHandler domMountPointServiceHandler) { @@ -80,7 +80,6 @@ public class RestconfOperationsServiceImpl implements RestconfOperationsService ref.get(), Optional.of(this.domMountPointServiceHandler.get())); mountPoint = mountPointIdentifier.getMountPoint(); modules = ref.getModules(mountPoint); - } else { final String errMsg = "URI has bad format. If operations behind mount point should be showed, URI has to end with "; @@ -99,9 +98,9 @@ public class RestconfOperationsServiceImpl implements RestconfOperationsService * of schema nodes and module. * * @param modules - * - set of modules for get RPCs from every module + * set of modules for get RPCs from every module * @param mountPoint - * - mount point, if in use otherwise null + * mount point, if in use otherwise null * @return {@link NormalizedNodeContext} */ private static NormalizedNodeContext getOperations(final Set modules, final DOMMountPoint mountPoint) { @@ -130,6 +129,7 @@ public class RestconfOperationsServiceImpl implements RestconfOperationsService neededModules.forEach(imp -> fakeModules.add(new FakeImportedModule(imp))); fakeModules.add(new FakeRestconfModule(neededModules, fakeCont)); + // FIXME: use a separate sublcass of AbstractSchemaContext final SchemaContext fakeSchemaCtx = EffectiveSchemaContext.resolveSchemaContext(ImmutableSet.copyOf(fakeModules)); final InstanceIdentifierContext instanceIdentifierContext =