From 3e390f9dbedc7ab02625e1e1ae5f4b71f3230fc5 Mon Sep 17 00:00:00 2001 From: VenkataSatya Jonnadula Date: Sat, 28 Nov 2020 23:35:02 +0530 Subject: [PATCH] odlmicro - RPC's are not supported. This issue was due to schemacontext was null in DOMRpcRouter. Fixed issue by setting the schemacontext. JIRA-ID: ODLMICRO-43 Signed-off-by: VenkataSatya Jonnadula Change-Id: I844adfe274d0036e30d920c4aab3dfe7818093e3 --- .../mdsal/micro/binding/dom/adapter/MockSchemaService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/micro-core/src/main/java/org/opendaylight/mdsal/micro/binding/dom/adapter/MockSchemaService.java b/micro-core/src/main/java/org/opendaylight/mdsal/micro/binding/dom/adapter/MockSchemaService.java index 317cefa..24472bc 100644 --- a/micro-core/src/main/java/org/opendaylight/mdsal/micro/binding/dom/adapter/MockSchemaService.java +++ b/micro-core/src/main/java/org/opendaylight/mdsal/micro/binding/dom/adapter/MockSchemaService.java @@ -22,6 +22,7 @@ import org.opendaylight.mdsal.binding.dom.codec.spi.BindingDOMCodecServices; import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeContext; import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.mdsal.dom.api.DOMSchemaServiceExtension; +import org.opendaylight.mdsal.dom.broker.DOMRpcRouter; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.util.ListenerRegistry; import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; @@ -54,7 +55,11 @@ public final class MockSchemaService implements DOMSchemaService, EffectiveModel @Override public ListenerRegistration registerSchemaContextListener( final EffectiveModelContextListener listener) { - return listeners.register(listener); + ListenerRegistration reg = listeners.register(listener); + if (listener instanceof DOMRpcRouter) { + listener.onModelContextUpdated(schemaContext); + } + return reg; } @Override -- 2.36.6