X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fmapping%2Foperations%2FDefaultCloseSession.java;h=8c7465b02961197e4a1bc5c836d10d00c0441be5;hb=ee0877c07ff700157dd9fc2e445df095c88f79bc;hp=af19335389fb03dc5c78ecf51a5007205c2151c2;hpb=b66923141fce710094cb8e61bf794f9f0e678f50;p=controller.git diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java index af19335389..8c7465b029 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java @@ -8,15 +8,16 @@ package org.opendaylight.controller.netconf.impl.mapping.operations; +import com.google.common.base.Optional; +import java.util.Collections; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; +import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation; import org.opendaylight.controller.netconf.util.xml.XmlElement; -import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants; +import org.opendaylight.controller.netconf.util.xml.XmlUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; -import java.util.Collections; - public class DefaultCloseSession extends AbstractSingletonNetconfOperation { public static final String CLOSE_SESSION = "close-session"; private final AutoCloseable sessionResources; @@ -46,8 +47,8 @@ public class DefaultCloseSession extends AbstractSingletonNetconfOperation { + getNetconfSessionIdForReporting(), NetconfDocumentedException.ErrorType.application, NetconfDocumentedException.ErrorTag.operation_failed, NetconfDocumentedException.ErrorSeverity.error, Collections.singletonMap( - NetconfDocumentedException.ErrorSeverity.error.toString(), e.getMessage())); + NetconfDocumentedException.ErrorSeverity.error.toString(), e.getMessage())); } - return document.createElement(XmlNetconfConstants.OK); + return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent()); } }