X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2FNetconfUtil.java;h=40b894fc75d0331d64e0ca55d0134d45e4bebf15;hb=refs%2Fchanges%2F13%2F23413%2F26;hp=640596d93078b86b356bc18c19d318bab89a62c6;hpb=c3108b4e80ec9f6ee6c8cf96df3009bb91dc8bc0;p=controller.git diff --git a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/NetconfUtil.java b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/NetconfUtil.java index 640596d930..40b894fc75 100644 --- a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/NetconfUtil.java +++ b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/NetconfUtil.java @@ -8,28 +8,29 @@ package org.opendaylight.controller.netconf.util; import com.google.common.base.Preconditions; -import org.opendaylight.controller.netconf.api.NetconfDocumentedException; -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.opendaylight.controller.config.util.xml.DocumentedException; +import org.opendaylight.controller.config.util.xml.XmlElement; +import org.opendaylight.controller.config.util.xml.XmlMappingConstants; +import org.opendaylight.controller.config.util.xml.XmlUtil; +import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; public final class NetconfUtil { - private static final Logger logger = LoggerFactory.getLogger(NetconfUtil.class); + private static final Logger LOG = LoggerFactory.getLogger(NetconfUtil.class); private NetconfUtil() {} - public static Document checkIsMessageOk(Document response) throws NetconfDocumentedException { + public static Document checkIsMessageOk(Document response) throws DocumentedException { XmlElement element = XmlElement.fromDomDocument(response); - Preconditions.checkState(element.getName().equals(XmlNetconfConstants.RPC_REPLY_KEY)); + Preconditions.checkState(element.getName().equals(XmlMappingConstants.RPC_REPLY_KEY)); element = element.getOnlyChildElement(); if (element.getName().equals(XmlNetconfConstants.OK)) { return response; } - logger.warn("Can not load last configuration. Operation failed."); + LOG.warn("Can not load last configuration. Operation failed."); throw new IllegalStateException("Can not load last configuration. Operation failed: " + XmlUtil.toString(response)); }