From: Miroslav Macko Date: Thu, 18 Jan 2018 10:24:33 +0000 (+0100) Subject: Set schemas to global context X-Git-Tag: release/nitrogen-sr2~5 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=72445906830445be9dd3a66d4ee93d83115de75d;p=netconf.git Set schemas to global context - onGlobalContextUpdated schemas need to be set to the global context Change-Id: I86c898d8b70c0f1a7fcc61be1cb0b542c8f05096 Signed-off-by: Miroslav Macko --- diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/handlers/SchemaContextHandler.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/handlers/SchemaContextHandler.java index 4d35fd92c9..62857ff8f5 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/handlers/SchemaContextHandler.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/handlers/SchemaContextHandler.java @@ -12,6 +12,7 @@ import java.util.Collection; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction; +import org.opendaylight.netconf.sal.restconf.impl.ControllerContext; import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException; import org.opendaylight.restconf.RestConnectorProvider; import org.opendaylight.restconf.Rfc8040.IetfYangLibrary; @@ -54,6 +55,7 @@ public class SchemaContextHandler implements SchemaContextListenerHandler { @Override public void onGlobalContextUpdated(final SchemaContext context) { Preconditions.checkNotNull(context); + ControllerContext.getInstance().setSchemas(context); this.context = null; this.context = context; this.moduleSetId++;