- @Deprecated
- synchronized void onDeviceConnected(final SchemaContext initialCtx,
- final DOMDataBroker broker, final DOMRpcService rpc,
- final NetconfDeviceNotificationService notificationService) {
-
- Preconditions.checkNotNull(mountService, "Closed");
- Preconditions.checkState(registration == null, "Already initialized");
-
- final DOMMountPointService.DOMMountPointBuilder mountBuilder = mountService.createMountPoint(id.getPath());
- mountBuilder.addInitialSchemaContext(initialCtx);
-
- mountBuilder.addService(DOMDataBroker.class, broker);
- mountBuilder.addService(DOMRpcService.class, rpc);
- mountBuilder.addService(DOMNotificationService.class, notificationService);
- 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;
- }
-
- try {
- registration.close();
- } catch (final Exception e) {
- // 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;
- }
- }
-