X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fconfig-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fconfignetconfconnector%2Foperations%2Feditconfig%2FEditConfigXmlParser.java;h=99c0a2ff0d719865b7d39cc22143e563ce99c0fc;hb=250542ef463f05ba5c871c128afeb33c7af93ea8;hp=47220f18571a275641a7f0671cfe6da9e0e2ff1d;hpb=f2b0b8646e5e8060dbb1a8278ddaf0f4b2a422c0;p=controller.git diff --git a/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfigXmlParser.java b/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfigXmlParser.java index 47220f1857..99c0a2ff0d 100644 --- a/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfigXmlParser.java +++ b/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfigXmlParser.java @@ -15,6 +15,7 @@ import java.util.Arrays; import java.util.Map; import org.opendaylight.controller.config.api.ServiceReferenceReadableRegistry; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; +import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config; import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ModuleElementDefinition; import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ModuleElementResolved; @@ -24,13 +25,12 @@ import org.opendaylight.controller.netconf.confignetconfconnector.operations.Dat import org.opendaylight.controller.netconf.util.exception.MissingNameSpaceException; import org.opendaylight.controller.netconf.util.exception.UnexpectedNamespaceException; import org.opendaylight.controller.netconf.util.xml.XmlElement; -import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class EditConfigXmlParser { - private static final Logger logger = LoggerFactory.getLogger(EditConfigXmlParser.class); + private static final Logger LOG = LoggerFactory.getLogger(EditConfigXmlParser.class); public static final String EDIT_CONFIG = "edit-config"; public static final String DEFAULT_OPERATION_KEY = "default-operation"; @@ -59,12 +59,12 @@ public class EditConfigXmlParser { targetElement = xml.getOnlyChildElementWithSameNamespace(EditConfigXmlParser.TARGET_KEY); targetChildNode = targetElement.getOnlyChildElementWithSameNamespace(); } catch (final MissingNameSpaceException | UnexpectedNamespaceException e) { - logger.trace("Can't get only child element with same namespace due to {}",e); + LOG.trace("Can't get only child element with same namespace", e); throw NetconfDocumentedException.wrap(e); } String datastoreValue = targetChildNode.getName(); Datastore targetDatastore = Datastore.valueOf(datastoreValue); - logger.debug("Setting {} to '{}'", EditConfigXmlParser.TARGET_KEY, targetDatastore); + LOG.debug("Setting {} to '{}'", EditConfigXmlParser.TARGET_KEY, targetDatastore); // check target if (targetDatastore != Datastore.candidate){ @@ -87,7 +87,7 @@ public class EditConfigXmlParser { } else { testOption = EditConfigXmlParser.TestOption.getDefault(); } - logger.debug("Setting {} to '{}'", EditConfigXmlParser.TEST_OPTION_KEY, testOption); + LOG.debug("Setting {} to '{}'", EditConfigXmlParser.TEST_OPTION_KEY, testOption); // Error option Optional errorOptionElement = xml @@ -105,7 +105,7 @@ public class EditConfigXmlParser { .getOnlyChildElementWithSameNamespaceOptionally(EditConfigXmlParser.DEFAULT_OPERATION_KEY); if (defaultContent.isPresent()) { String mergeStrategyString = defaultContent.get().getTextContent(); - logger.trace("Setting merge strategy to {}", mergeStrategyString); + LOG.trace("Setting merge strategy to {}", mergeStrategyString); editStrategyType = EditStrategyType.valueOf(mergeStrategyString); } @@ -113,7 +113,7 @@ public class EditConfigXmlParser { try { configElement = xml.getOnlyChildElementWithSameNamespace(XmlNetconfConstants.CONFIG_KEY); } catch (MissingNameSpaceException e) { - logger.trace("Can't get only child element with same namespace due to {}",e); + LOG.trace("Can't get only child element with same namespace due to ",e); throw NetconfDocumentedException.wrap(e); }