- opRouter.close();
- return document.createElement(XmlNetconfConstants.OK);
- }
-
- @Override
- public void setNetconfSession(NetconfSession s) {
- this.netconfSession = s;
- }
-
- public NetconfSession getNetconfSession() {
- return netconfSession;
+ try {
+ sessionResources.close();
+ } 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());