X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Fnetconf%2Futil%2FNetconfMessageTransformUtil.java;h=893a45aaa2df41eadc71a1a62215493fda3d4a04;hb=7feea9765c299cae1a462a5e21aee4ecd6144528;hp=1e3cf4b6fce9f30917ef4c3bc3c19a61bf9b7d64;hpb=c74d5c2399e500fe3e690edc8cee497b1cb6f867;p=controller.git diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/NetconfMessageTransformUtil.java b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/NetconfMessageTransformUtil.java index 1e3cf4b6fc..893a45aaa2 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/NetconfMessageTransformUtil.java +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/NetconfMessageTransformUtil.java @@ -49,6 +49,8 @@ import org.w3c.dom.Element; public class NetconfMessageTransformUtil { + public static final String MESSAGE_ID_ATTR = "message-id"; + private NetconfMessageTransformUtil() {} public static final QName IETF_NETCONF_MONITORING = QName.create(NetconfState.QNAME, "ietf-netconf-monitoring"); @@ -125,8 +127,8 @@ public class NetconfMessageTransformUtil { public static void checkValidReply(final NetconfMessage input, final NetconfMessage output) throws NetconfDocumentedException { - final String inputMsgId = input.getDocument().getDocumentElement().getAttribute("message-id"); - final String outputMsgId = output.getDocument().getDocumentElement().getAttribute("message-id"); + final String inputMsgId = input.getDocument().getDocumentElement().getAttribute(MESSAGE_ID_ATTR); + final String outputMsgId = output.getDocument().getDocumentElement().getAttribute(MESSAGE_ID_ATTR); if(inputMsgId.equals(outputMsgId) == false) { Map errorInfo = ImmutableMap.builder()