+ try {
+ sessionResources.close();
+ Preconditions.checkNotNull(session, "Session was not set").delayedClose();
+ LOG.info("Session {} closing", session.getSessionId());
+ } catch (Exception e) {
+ throw new NetconfDocumentedException("Unable to properly close session "
+ + getNetconfSessionIdForReporting(), NetconfDocumentedException.ErrorType.application,
+ NetconfDocumentedException.ErrorTag.operation_failed,
+ NetconfDocumentedException.ErrorSeverity.error, Collections.singletonMap(
+ NetconfDocumentedException.ErrorSeverity.error.toString(), e.getMessage()));
+ }
+ return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());