X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Fnetconf%2Fsal%2FNetconfDeviceSalProvider.java;fp=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Fnetconf%2Fsal%2FNetconfDeviceSalProvider.java;h=2931468501a17d851f5629ef151f4d22bd992495;hb=ea7d04fa07f53a1355a709820d71433124ed6991;hp=3246f519042802cedd396708ed17c0db69c79301;hpb=9894db754c931c117101e0a65b369aba4975633d;p=controller.git diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/sal/NetconfDeviceSalProvider.java b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/sal/NetconfDeviceSalProvider.java index 3246f51904..2931468501 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/sal/NetconfDeviceSalProvider.java +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/sal/NetconfDeviceSalProvider.java @@ -123,11 +123,13 @@ final class NetconfDeviceSalProvider implements AutoCloseable, Provider, Binding this.notificationService = notificationService; registration = mountBuilder.register(); + logger.debug("{}: Mountpoint exposed into MD-SAL {}", id, registration); } @Deprecated synchronized void onDeviceDisconnected() { if(registration == null) { + logger.trace("{}: Not removing mountpoint from MD-SAL, mountpoint was not registered yet", id); return; } @@ -137,6 +139,7 @@ final class NetconfDeviceSalProvider implements AutoCloseable, Provider, Binding // Only log and ignore logger.warn("Unable to unregister mount instance for {}. Ignoring exception", id.getPath(), e); } finally { + logger.debug("{}: Mountpoint removed from MD-SAL {}", id, registration); registration = null; } } @@ -156,10 +159,13 @@ final class NetconfDeviceSalProvider implements AutoCloseable, Provider, Binding mountBuilder.addService(DOMNotificationService.class, notificationService); topologyRegistration = mountBuilder.register(); + logger.debug("{}: TOPOLOGY Mountpoint exposed into MD-SAL {}", id, registration); + } synchronized void onTopologyDeviceDisconnected() { if(topologyRegistration == null) { + logger.trace("{}: Not removing TOPOLOGY mountpoint from MD-SAL, mountpoint was not registered yet", id); return; } @@ -169,16 +175,15 @@ final class NetconfDeviceSalProvider implements AutoCloseable, Provider, Binding // Only log and ignore logger.warn("Unable to unregister mount instance for {}. Ignoring exception", id.getTopologyPath(), e); } finally { + logger.debug("{}: TOPOLOGY Mountpoint removed from MD-SAL {}", id, registration); topologyRegistration = null; } } @Override synchronized public void close() throws Exception { - if(registration != null) { - onDeviceDisconnected(); - onTopologyDeviceDisconnected(); - } + onDeviceDisconnected(); + onTopologyDeviceDisconnected(); mountService = null; }