From aa14e255d17b0869a1de096cb0048f3c857a4ab0 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Wed, 12 Nov 2014 18:28:38 +0100 Subject: [PATCH] BUG-2370 Reset schema context on disconnect in nc Change-Id: I64197fc4ec375a07b2f0ea1dfb1215c4e31e206c Signed-off-by: Maros Marsalek --- .../controller/sal/connect/netconf/NetconfDevice.java | 9 +++++++++ .../schema/mapping/NetconfMessageTransformer.java | 5 +---- .../sal/connect/netconf/NetconfDeviceTest.java | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDevice.java b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDevice.java index cc9eb5a851..31779a7817 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDevice.java +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDevice.java @@ -134,6 +134,14 @@ public final class NetconfDevice implements RemoteDevice sourceRegistration : sourceRegistrations) { sourceRegistration.close(); } + resetMessageTransformer(); } @Override diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/schema/mapping/NetconfMessageTransformer.java b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/schema/mapping/NetconfMessageTransformer.java index fccbd71570..02819c15c7 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/schema/mapping/NetconfMessageTransformer.java +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/schema/mapping/NetconfMessageTransformer.java @@ -8,12 +8,9 @@ package org.opendaylight.controller.sal.connect.netconf.schema.mapping; import com.google.common.base.Optional; - import java.util.List; import java.util.Set; - import javax.activation.UnsupportedDataTypeException; - import org.opendaylight.controller.netconf.api.NetconfMessage; import org.opendaylight.controller.sal.connect.api.MessageTransformer; import org.opendaylight.controller.sal.connect.netconf.util.NetconfMessageTransformUtil; @@ -134,6 +131,6 @@ public class NetconfMessageTransformer implements MessageTransformer