Merge changes Ic434bf4a,I05a3fb18,I47a3783d,I8234bbfd
authorTony Tkacik <ttkacik@cisco.com>
Thu, 20 Nov 2014 09:05:53 +0000 (09:05 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 20 Nov 2014 09:05:53 +0000 (09:05 +0000)
* changes:
  Fix checkstyle warnings in netconf-cli
  Fix checkstyle warnings ietf-netconf-monitoring
  Fix checkstyle warnings for netconf-testtool
  Fix checkstyle warnings for config-netconf-connector

93 files changed:
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/exception/NetconfConfigHandlingException.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/exception/NoTransactionFoundException.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/exception/OperationNotPermittedException.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/AttributeIfcSwitchStatement.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/AbstractAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/ArrayAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/AttributeConfigElement.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/AttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/CompositeAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/ObjectNameAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/ObjectXmlReader.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/SimpleBinaryAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/SimpleCompositeAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/SimpleIdentityRefAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/SimpleUnionAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/mapping/ArrayAttributeMappingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/mapping/AttributeMappingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/mapping/CompositeAttributeMappingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/mapping/SimpleAttributeMappingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/mapping/UnionCompositeAttributeMappingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/resolving/ArrayAttributeResolvingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/resolving/AttributeResolvingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/resolving/CompositeAttributeResolvingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/resolving/ObjectNameAttributeResolvingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/resolving/ObjectResolver.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/resolving/SimpleAttributeResolvingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/resolving/UnionCompositeAttributeResolvingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/ArrayAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/CompositeAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/ObjectNameAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/ObjectXmlWriter.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/RuntimeBeanEntryWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/SimpleAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/SimpleBinaryAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/SimpleCompositeAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/SimpleIdentityRefAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/SimpleUnionAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/Config.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/InstanceConfig.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/ModuleConfig.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/ModuleElementDefinition.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/Services.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/rpc/InstanceRuntimeRpc.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/rpc/ModuleRpcs.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/rpc/Rpcs.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/runtime/InstanceRuntime.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/runtime/Runtime.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/Commit.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/DiscardChanges.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/Validate.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/AbstractEditConfigStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/DeleteEditConfigStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfig.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfigStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfigXmlParser.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/MergeEditConfigStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/MissingInstanceHandlingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/NoneEditConfigStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/RemoveEditConfigStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/ReplaceEditConfigStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/get/Get.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/getconfig/CandidateDatastoreQueryStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/getconfig/DatastoreQueryStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/getconfig/GetConfig.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/getconfig/RunningDatastoreQueryStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/runtimerpc/RuntimeRpc.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/runtimerpc/RuntimeRpcElementResolved.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/Activator.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/NetconfOperationProvider.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/NetconfOperationServiceFactoryImpl.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/NetconfOperationServiceImpl.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/YangStoreServiceImpl.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/YangStoreSnapshot.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/YangStoreSnapshotImpl.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/transactions/TransactionProvider.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/util/Util.java
opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java
opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/ServiceTrackerTest.java
opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/ValidateTest.java
opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfigTest.java
opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/NetconfOperationServiceImplTest.java
opendaylight/netconf/ietf-netconf-monitoring/src/main/yang/ietf-netconf-monitoring.yang
opendaylight/netconf/netconf-cli/src/main/java/org/opendaylight/controller/netconf/cli/Main.java
opendaylight/netconf/netconf-cli/src/main/java/org/opendaylight/controller/netconf/cli/commands/local/Disconnect.java
opendaylight/netconf/netconf-cli/src/main/java/org/opendaylight/controller/netconf/cli/reader/impl/BasicDataHolderReader.java
opendaylight/netconf/netconf-cli/src/main/java/org/opendaylight/controller/netconf/cli/reader/impl/LeafListEntryReader.java
opendaylight/netconf/netconf-cli/src/main/java/org/opendaylight/controller/netconf/cli/writer/impl/NormalizedNodeWriter.java
opendaylight/netconf/netconf-cli/src/test/java/org/opendaylight/controller/netconf/cli/ConsoleIOTestImpl.java
opendaylight/netconf/netconf-cli/src/test/java/org/opendaylight/controller/netconf/cli/NetconfCliTest.java
opendaylight/netconf/netconf-cli/src/test/java/org/opendaylight/controller/netconf/cli/io/IOUtilTest.java
opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java
opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/SimulatedEditConfig.java
opendaylight/netconf/pom.xml

index c08be06..4d55119 100644 (file)
@@ -12,7 +12,6 @@ import javax.management.openmbean.ArrayType;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.OpenType;
 import javax.management.openmbean.SimpleType;
-
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.DependencyAttribute;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
index 701e96e..cf42686 100644 (file)
@@ -8,11 +8,10 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
 
+import java.util.List;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
 
-import java.util.List;
-
 public abstract class AbstractAttributeReadingStrategy implements AttributeReadingStrategy {
 
     private final String nullableDefault;
index 1b74d49..a25a038 100644 (file)
@@ -9,11 +9,10 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
 
 import com.google.common.collect.Lists;
+import java.util.List;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
 
-import java.util.List;
-
 public class ArrayAttributeReadingStrategy extends AbstractAttributeReadingStrategy {
 
     private final AttributeReadingStrategy innerStrategy;
index 2b08125..2d5a72b 100644 (file)
@@ -9,11 +9,10 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
 
 import com.google.common.base.Optional;
+import javax.management.openmbean.OpenType;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.resolving.AttributeResolvingStrategy;
 
-import javax.management.openmbean.OpenType;
-
 /**
  * Parsed xml element containing configuration for one attribute of an instance
  * of some module. Contains default value extracted from yang file.
index d06e55d..99c8ef5 100644 (file)
@@ -11,13 +11,11 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
-
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
-import org.opendaylight.controller.netconf.util.xml.XmlElement;
-
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
+import org.opendaylight.controller.netconf.util.xml.XmlElement;
 
 public class CompositeAttributeReadingStrategy extends AbstractAttributeReadingStrategy {
 
index 1d12292..f85fe29 100644 (file)
@@ -8,11 +8,9 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
 
 import com.google.common.base.Preconditions;
-
 import com.google.common.base.Strings;
 import java.util.List;
 import java.util.Map;
-
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.mapping.ObjectNameAttributeMappingStrategy;
index e690840..15d4d08 100644 (file)
@@ -10,6 +10,14 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
+import java.util.Date;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import javax.management.openmbean.ArrayType;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.SimpleType;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.ListAttribute;
@@ -18,15 +26,6 @@ import org.opendaylight.controller.config.yangjmxgenerator.attribute.TOAttribute
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.AttributeIfcSwitchStatement;
 import org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig;
 
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenType;
-import javax.management.openmbean.SimpleType;
-import java.util.Date;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
 public class ObjectXmlReader extends AttributeIfcSwitchStatement<AttributeReadingStrategy> {
 
     private String key;
index 94a90a7..23e67b3 100644 (file)
@@ -8,13 +8,12 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
 
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Maps;
 import java.net.URI;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Maps;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
index 54ffe08..a4eeb0c 100644 (file)
@@ -8,16 +8,14 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.mapping;
 
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
 import java.lang.reflect.Array;
 import java.util.List;
-
 import javax.management.openmbean.ArrayType;
 import javax.management.openmbean.OpenType;
 
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-
 public class ArrayAttributeMappingStrategy extends AbstractAttributeMappingStrategy<List<Object>, ArrayType<?>> {
 
     private final AttributeMappingStrategy<?, ? extends OpenType<?>> innerElementStrategy;
index 594953e..16421d5 100644 (file)
@@ -11,13 +11,12 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
-import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
-
+import java.util.Map;
+import java.util.Set;
 import javax.management.openmbean.CompositeDataSupport;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.OpenType;
-import java.util.Map;
-import java.util.Set;
+import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
 
 public class CompositeAttributeMappingStrategy extends
         AbstractAttributeMappingStrategy<Map<String, Object>, CompositeType> {
index 7dbf4f4..101649e 100644 (file)
@@ -11,11 +11,10 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
-import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
-
-import javax.management.openmbean.SimpleType;
 import java.util.Date;
 import java.util.Map;
+import javax.management.openmbean.SimpleType;
+import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
 
 public class SimpleAttributeMappingStrategy extends AbstractAttributeMappingStrategy<String, SimpleType<?>> {
 
index 1754fc7..033ab43 100644 (file)
@@ -9,12 +9,11 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.mapping;
 
 import com.google.common.base.Optional;
-import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
-
+import java.util.Map;
 import javax.management.openmbean.CompositeDataSupport;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.OpenType;
-import java.util.Map;
+import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
 
 public class UnionCompositeAttributeMappingStrategy extends
         CompositeAttributeMappingStrategy {
index f0d7960..a6a521a 100644 (file)
@@ -9,23 +9,22 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.resolving;
 
 import com.google.common.base.Optional;
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
-import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
+import java.lang.reflect.Array;
+import java.util.List;
 import javax.management.openmbean.ArrayType;
 import javax.management.openmbean.CompositeDataSupport;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.OpenType;
-import java.lang.reflect.Array;
-import java.util.List;
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
+import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 final class ArrayAttributeResolvingStrategy extends AbstractAttributeResolvingStrategy<Object, ArrayType<?>> {
 
     private final AttributeResolvingStrategy<?, ? extends OpenType<?>> innerTypeResolvingStrategy;
 
-    private static final Logger logger = LoggerFactory.getLogger(ArrayAttributeResolvingStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ArrayAttributeResolvingStrategy.class);
 
     public ArrayAttributeResolvingStrategy(AttributeResolvingStrategy<?, ? extends OpenType<?>> innerTypeResolved,
             ArrayType<?> openType) {
@@ -74,7 +73,7 @@ final class ArrayAttributeResolvingStrategy extends AbstractAttributeResolvingSt
             i++;
         }
 
-        logger.debug("Attribute {} : {} parsed to type {} as {}", attrName, value, getOpenType(),
+        LOG.debug("Attribute {} : {} parsed to type {} as {}", attrName, value, getOpenType(),
                 toStringArray(parsedArray));
 
         return Optional.of(parsedArray);
index 83ebf65..9cd2eec 100644 (file)
@@ -11,23 +11,22 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
-import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
+import java.util.Map;
 import javax.management.openmbean.CompositeDataSupport;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.OpenDataException;
 import javax.management.openmbean.OpenType;
-import java.util.Map;
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
+import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 class CompositeAttributeResolvingStrategy extends
         AbstractAttributeResolvingStrategy<CompositeDataSupport, CompositeType> {
     private final Map<String, AttributeResolvingStrategy<?, ? extends OpenType<?>>> innerTypes;
     private final Map<String, String> yangToJavaAttrMapping;
 
-    private static final Logger logger = LoggerFactory.getLogger(CompositeAttributeResolvingStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(CompositeAttributeResolvingStrategy.class);
 
     CompositeAttributeResolvingStrategy(Map<String, AttributeResolvingStrategy<?, ? extends OpenType<?>>> innerTypes,
             CompositeType openType, Map<String, String> yangToJavaAttrMapping) {
@@ -80,7 +79,7 @@ class CompositeAttributeResolvingStrategy extends
                     + " for attribute " + attrName + " from value " + value, e);
         }
 
-        logger.debug("Attribute {} : {} parsed to type {} as {}", attrName, value, getOpenType(), parsedValue);
+        LOG.debug("Attribute {} : {} parsed to type {} as {}", attrName, value, getOpenType(), parsedValue);
 
         return Optional.of(parsedValue);
     }
index 57a44d8..34b4a8e 100644 (file)
@@ -9,19 +9,18 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.resolving;
 
 import com.google.common.base.Optional;
+import javax.management.ObjectName;
+import javax.management.openmbean.SimpleType;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.mapping.ObjectNameAttributeMappingStrategy;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ServiceRegistryWrapper;
 import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.management.ObjectName;
-import javax.management.openmbean.SimpleType;
-
 public class ObjectNameAttributeResolvingStrategy extends AbstractAttributeResolvingStrategy<ObjectName, SimpleType<?>> {
 
     private final ServiceRegistryWrapper serviceTracker;
-    private static final Logger logger = LoggerFactory.getLogger(ObjectNameAttributeResolvingStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ObjectNameAttributeResolvingStrategy.class);
 
     ObjectNameAttributeResolvingStrategy(ServiceRegistryWrapper serviceTracker) {
         super(SimpleType.OBJECTNAME);
@@ -40,11 +39,11 @@ public class ObjectNameAttributeResolvingStrategy extends AbstractAttributeResol
         String serviceName = mappedDep.getServiceName();
         String refName = mappedDep.getRefName();
         String namespace = mappedDep.getNamespace();
-        logger.trace("Getting service instance by service name {} : {} and ref name {}", namespace, serviceName, refName);
+        LOG.trace("Getting service instance by service name {} : {} and ref name {}", namespace, serviceName, refName);
 
         ObjectName on = serviceTracker.getByServiceAndRefName(namespace, serviceName, refName);
 
-        logger.debug("Attribute {} : {} parsed to type {}", attrName, value, getOpenType());
+        LOG.debug("Attribute {} : {} parsed to type {}", attrName, value, getOpenType());
         return Optional.of(on);
     }
 
index 4a4281a..b231cf8 100644 (file)
@@ -10,6 +10,12 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
+import java.util.Map;
+import java.util.Map.Entry;
+import javax.management.openmbean.ArrayType;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.SimpleType;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.ListAttribute;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.ListDependenciesAttribute;
@@ -17,13 +23,6 @@ import org.opendaylight.controller.config.yangjmxgenerator.attribute.TOAttribute
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.AttributeIfcSwitchStatement;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ServiceRegistryWrapper;
 
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenType;
-import javax.management.openmbean.SimpleType;
-import java.util.Map;
-import java.util.Map.Entry;
-
 public class ObjectResolver extends AttributeIfcSwitchStatement<AttributeResolvingStrategy<?, ? extends OpenType<?>>> {
 
     private final ServiceRegistryWrapper serviceTracker;
index 962d459..f1e603c 100644 (file)
@@ -11,22 +11,21 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 import com.google.common.base.Optional;
 import com.google.common.collect.Maps;
 import java.lang.reflect.InvocationTargetException;
-import java.text.ParseException;
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
-import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.management.openmbean.SimpleType;
 import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.text.ParseException;
 import java.util.Date;
 import java.util.Map;
+import javax.management.openmbean.SimpleType;
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
+import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 final class SimpleAttributeResolvingStrategy extends AbstractAttributeResolvingStrategy<Object, SimpleType<?>> {
 
-    private static final Logger logger = LoggerFactory.getLogger(SimpleAttributeResolvingStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleAttributeResolvingStrategy.class);
 
     SimpleAttributeResolvingStrategy(SimpleType<?> simpleType) {
         super(simpleType);
@@ -56,7 +55,7 @@ final class SimpleAttributeResolvingStrategy extends AbstractAttributeResolvingS
         prefferedPlugin = prefferedPlugin == null ? resolverPlugins.get(DEFAULT_RESOLVERS) : prefferedPlugin;
 
         Object parsedValue = prefferedPlugin.resolveObject(cls, attrName, (String) value);
-        logger.debug("Attribute {} : {} parsed to type {} with value {}", attrName, value, getOpenType(), parsedValue);
+        LOG.debug("Attribute {} : {} parsed to type {} with value {}", attrName, value, getOpenType(), parsedValue);
         return Optional.of(parsedValue);
     }
 
@@ -96,7 +95,7 @@ final class SimpleAttributeResolvingStrategy extends AbstractAttributeResolvingS
                 method = type.getMethod("valueOf", String.class);
                 return method.invoke(null, value);
             } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
-                logger.trace("Error parsing object {}",e);
+                LOG.trace("Error parsing object ",e);
                 throw new NetconfDocumentedException("Error parsing object.",
                         NetconfDocumentedException.ErrorType.application,
                         NetconfDocumentedException.ErrorTag.operation_failed,
@@ -143,7 +142,7 @@ final class SimpleAttributeResolvingStrategy extends AbstractAttributeResolvingS
             try {
                 return Util.readDate(value);
             } catch (ParseException e) {
-                logger.trace("Unable parse value {} due to  {}",value, e);
+                LOG.trace("Unable parse value {} due to ",value, e);
                 throw new NetconfDocumentedException("Unable to parse value "+value+" as date.",
                         NetconfDocumentedException.ErrorType.application,
                         NetconfDocumentedException.ErrorTag.operation_failed,
index cdebcfa..4cab995 100644 (file)
@@ -10,11 +10,10 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
-import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
-
+import java.util.Map;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.OpenType;
-import java.util.Map;
+import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
 
 final class UnionCompositeAttributeResolvingStrategy extends CompositeAttributeResolvingStrategy {
 
index b17842b..11cb35c 100644 (file)
@@ -8,16 +8,14 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.toxml;
 
+import com.google.common.base.Optional;
 import java.util.Map;
 import java.util.Map.Entry;
-
 import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import com.google.common.base.Optional;
-
 public class CompositeAttributeWritingStrategy implements AttributeWritingStrategy {
 
     private final String key;
index 5d5721a..043aec6 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.toxml;
 
+import com.google.common.base.Optional;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.mapping.ObjectNameAttributeMappingStrategy;
 import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
@@ -15,8 +16,6 @@ import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import com.google.common.base.Optional;
-
 public class ObjectNameAttributeWritingStrategy implements AttributeWritingStrategy {
 
     private final Document document;
index 4e07ec8..fcbb3a5 100644 (file)
@@ -10,6 +10,12 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
+import java.util.Map;
+import java.util.Map.Entry;
+import javax.management.openmbean.ArrayType;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.SimpleType;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.ListAttribute;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.ListDependenciesAttribute;
@@ -17,13 +23,6 @@ import org.opendaylight.controller.config.yangjmxgenerator.attribute.TOAttribute
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.AttributeIfcSwitchStatement;
 import org.w3c.dom.Document;
 
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenType;
-import javax.management.openmbean.SimpleType;
-import java.util.Map;
-import java.util.Map.Entry;
-
 public class ObjectXmlWriter extends AttributeIfcSwitchStatement<AttributeWritingStrategy> {
 
     private Document document;
index 644df0a..ea53467 100644 (file)
@@ -9,14 +9,13 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.toxml;
 
 import com.google.common.base.Optional;
+import java.util.Map;
+import java.util.Map.Entry;
 import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import java.util.Map;
-import java.util.Map.Entry;
-
 public class RuntimeBeanEntryWritingStrategy extends CompositeAttributeWritingStrategy {
 
     public RuntimeBeanEntryWritingStrategy(Document document, String key,
index 1298807..4b68b9a 100644 (file)
@@ -8,13 +8,12 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.toxml;
 
+import com.google.common.base.Optional;
 import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import com.google.common.base.Optional;
-
 public class SimpleAttributeWritingStrategy implements AttributeWritingStrategy {
 
     private final Document document;
index 4e92c26..8407ded 100644 (file)
@@ -10,11 +10,10 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attri
 
 import com.google.common.base.Preconditions;
 import com.google.common.io.BaseEncoding;
+import java.util.List;
 import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
 import org.w3c.dom.Document;
 
-import java.util.List;
-
 public class SimpleBinaryAttributeWritingStrategy extends SimpleAttributeWritingStrategy {
 
     /**
index 1e5d2bb..069ccc1 100644 (file)
@@ -8,17 +8,15 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.toxml;
 
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
 import java.util.Map;
-
 import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-
 public class SimpleIdentityRefAttributeWritingStrategy extends SimpleAttributeWritingStrategy {
 
     private static final String PREFIX = "prefix";
index 4802cba..ee97b27 100644 (file)
@@ -9,11 +9,10 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.toxml;
 
 import com.google.common.base.Preconditions;
-import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
-import org.w3c.dom.Document;
-
 import java.util.List;
 import java.util.Map;
+import org.opendaylight.controller.netconf.confignetconfconnector.util.Util;
+import org.w3c.dom.Document;
 
 public class SimpleUnionAttributeWritingStrategy extends SimpleAttributeWritingStrategy {
 
index 773e4ee..6931893 100644 (file)
@@ -16,7 +16,6 @@ import com.google.common.collect.HashMultimap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Multimap;
-
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Date;
@@ -24,9 +23,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
-
 import javax.management.ObjectName;
-
 import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
index 0b33b55..4ae4de1 100644 (file)
@@ -11,15 +11,12 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.confi
 import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
-
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
-
 import javax.management.ObjectName;
 import javax.management.openmbean.OpenType;
-
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
 import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
@@ -44,7 +41,7 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 public final class InstanceConfig {
-    private static final Logger logger = LoggerFactory.getLogger(InstanceConfig.class);
+    private static final Logger LOG = LoggerFactory.getLogger(InstanceConfig.class);
 
     private final Map<String, AttributeIfc> yangToAttrConfig;
     private final String nullableDummyContainerName;
@@ -124,7 +121,7 @@ public final class InstanceConfig {
             try {
                 AttributeResolvingStrategy<?, ? extends OpenType<?>> attributeResolvingStrategy = resolvingStrategies
                         .get(attributeName);
-                logger.trace("Trying to set value {} of attribute {} with {}", value, attributeName, attributeResolvingStrategy);
+                LOG.trace("Trying to set value {} of attribute {} with {}", value, attributeName, attributeResolvingStrategy);
 
                 value.resolveValue(attributeResolvingStrategy, attributeName);
                 value.setJmxName(
@@ -199,8 +196,8 @@ public final class InstanceConfig {
             List<XmlElement> recognisedChildren, List<XmlElement> typeAndName) throws NetconfDocumentedException {
         List<XmlElement> foundConfigNodes = moduleElement.getChildElementsWithinNamespace(name, moduleNamespace);
         if (foundConfigNodes.isEmpty()) {
-            logger.debug("No config nodes {}:{} found in {}", moduleNamespace, name, moduleElement);
-            logger.debug("Trying lookup of config nodes without specified namespace");
+            LOG.debug("No config nodes {}:{} found in {}", moduleNamespace, name, moduleElement);
+            LOG.debug("Trying lookup of config nodes without specified namespace");
             foundConfigNodes = moduleElement.getChildElementsWithinNamespace(name,
                     XmlNetconfConstants.URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG);
             // In case module type or name element is not present in config it
@@ -208,7 +205,7 @@ public final class InstanceConfig {
             // We need to remove config type and name from available module
             // config elements
             foundConfigNodes.removeAll(typeAndName);
-            logger.debug("Found {} config nodes {} without specified namespace in {}", foundConfigNodes.size(), name,
+            LOG.debug("Found {} config nodes {} without specified namespace in {}", foundConfigNodes.size(), name,
                     moduleElement);
         } else {
             List<XmlElement> foundWithoutNamespaceNodes = moduleElement.getChildElementsWithinNamespace(name,
index eaab30b..7dfe0cd 100644 (file)
@@ -9,12 +9,9 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.config;
 
 import com.google.common.base.Optional;
-
 import java.util.Date;
 import java.util.Map;
-
 import javax.management.ObjectName;
-
 import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
index 92b7a48..88a18ad 100644 (file)
@@ -23,7 +23,7 @@ public class ModuleElementDefinition {
 
     private final String instanceName;
     private final EditStrategyType editStrategy;
-    private static final Logger logger = LoggerFactory.getLogger(ModuleElementDefinition.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ModuleElementDefinition.class);
 
     public ModuleElementDefinition(String instanceName, String currentStrategy, EditStrategyType defaultStrategy) {
         this.instanceName = instanceName;
@@ -35,7 +35,7 @@ public class ModuleElementDefinition {
                 _edStrategy = InstanceConfigElementResolved.parseStrategy(currentStrategy, defaultStrategy);
             } catch (OperationNotPermittedException e) {
                 _edStrategy = defaultStrategy;
-                logger.warn("Operation not permitted on current strategy {} while default strategy is {}. Element definition strategy set to default.",
+                LOG.warn("Operation not permitted on current strategy {} while default strategy is {}. Element definition strategy set to default.",
                         currentStrategy,
                         defaultStrategy,
                         e);
@@ -51,10 +51,12 @@ public class ModuleElementDefinition {
 
     public EditConfigStrategy getEditStrategy() {
         switch (editStrategy) {
-            case delete :
-            case remove :
-            case none : return NONE_EDIT_CONFIG_STRATEGY;
-            default : return MISSING_INSTANCE_HANDLING_STRATEGY;
+        case delete :
+        case remove :
+        case none :
+            return NONE_EDIT_CONFIG_STRATEGY;
+        default :
+            return MISSING_INSTANCE_HANDLING_STRATEGY;
         }
     }
 }
index bdb4c1b..a49eda3 100644 (file)
@@ -11,7 +11,12 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.confi
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
-
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.management.ObjectName;
 import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
@@ -21,14 +26,6 @@ import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import javax.management.ObjectName;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 public final class Services {
 
     private static final String PROVIDER_KEY = "provider";
index d63d8a1..e870731 100644 (file)
@@ -9,6 +9,12 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.rpc;
 
 import com.google.common.collect.Maps;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import javax.management.openmbean.OpenType;
 import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry.Rpc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
@@ -21,13 +27,6 @@ import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attrib
 import org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
 
-import javax.management.openmbean.OpenType;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
 public final class InstanceRuntimeRpc {
 
     private final Map<String, AttributeIfc> yangToAttrConfig;
index 67c178e..0722555 100644 (file)
@@ -10,11 +10,10 @@ package org.opendaylight.controller.netconf.confignetconfconnector.mapping.rpc;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
+import java.util.Map;
 import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry;
 import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry.Rpc;
 
-import java.util.Map;
-
 public final class ModuleRpcs {
 
     private final Map<String, String> yangToJavaNames = Maps.newHashMap();
index ef286ac..2eef2a6 100644 (file)
@@ -9,9 +9,8 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.rpc;
 
 import com.google.common.base.Preconditions;
-import org.opendaylight.controller.netconf.confignetconfconnector.operations.runtimerpc.RuntimeRpcElementResolved;
-
 import java.util.Map;
+import org.opendaylight.controller.netconf.confignetconfconnector.operations.runtimerpc.RuntimeRpcElementResolved;
 
 public class Rpcs {
     private final Map<String, Map<String, ModuleRpcs>> mappedRpcs;
index 350b0aa..e6102cf 100644 (file)
@@ -12,16 +12,15 @@ import com.google.common.base.Optional;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Collections2;
 import com.google.common.collect.Sets;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import javax.management.ObjectName;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.InstanceConfig;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import javax.management.ObjectName;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
 public class InstanceRuntime {
 
     /**
index b1df316..4a6c0eb 100644 (file)
@@ -12,13 +12,10 @@ import com.google.common.base.Optional;
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Multimap;
-
 import java.util.Collection;
 import java.util.Map;
 import java.util.Set;
-
 import javax.management.ObjectName;
-
 import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config;
index 8eaaecf..8a0830e 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations;
 
+import com.google.common.base.Optional;
 import org.opendaylight.controller.config.api.ConflictingVersionException;
 import org.opendaylight.controller.config.api.ValidationException;
 import org.opendaylight.controller.config.api.jmx.CommitStatus;
@@ -22,11 +23,9 @@ import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import com.google.common.base.Optional;
-
 public class Commit extends AbstractConfigNetconfOperation {
 
-    private static final Logger logger = LoggerFactory.getLogger(Commit.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Commit.class);
 
     private final TransactionProvider transactionProvider;
 
@@ -53,11 +52,11 @@ public class Commit extends AbstractConfigNetconfOperation {
         CommitStatus status;
         try {
             status = this.transactionProvider.commitTransaction();
-            logger.trace("Datastore {} committed successfully: {}", Datastore.candidate, status);
+            LOG.trace("Datastore {} committed successfully: {}", Datastore.candidate, status);
         } catch (ConflictingVersionException | ValidationException e) {
             throw NetconfDocumentedException.wrap(e);
         }
-        logger.trace("Datastore {} committed successfully: {}", Datastore.candidate, status);
+        LOG.trace("Datastore {} committed successfully: {}", Datastore.candidate, status);
 
         return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
     }
index 3cf702e..dd2ceae 100644 (file)
@@ -6,10 +6,11 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-    package org.opendaylight.controller.netconf.confignetconfconnector.operations;
+package org.opendaylight.controller.netconf.confignetconfconnector.operations;
 
 import com.google.common.base.Optional;
-
+import java.util.HashMap;
+import java.util.Map;
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorSeverity;
@@ -24,15 +25,12 @@ import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import java.util.HashMap;
-import java.util.Map;
-
 
 public class DiscardChanges extends AbstractConfigNetconfOperation {
 
     public static final String DISCARD = "discard-changes";
 
-    private static final Logger logger = LoggerFactory.getLogger(DiscardChanges.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DiscardChanges.class);
 
     private final TransactionProvider transactionProvider;
 
@@ -58,7 +56,7 @@ public class DiscardChanges extends AbstractConfigNetconfOperation {
         try {
             this.transactionProvider.abortTransaction();
         } catch (final IllegalStateException e) {
-            logger.warn("Abort failed: ", e);
+            LOG.warn("Abort failed: ", e);
             final Map<String, String> errorInfo = new HashMap<>();
             errorInfo
                     .put(ErrorTag.operation_failed.name(),
@@ -66,7 +64,7 @@ public class DiscardChanges extends AbstractConfigNetconfOperation {
             throw new NetconfDocumentedException(e.getMessage(), e, ErrorType.application, ErrorTag.operation_failed,
                     ErrorSeverity.error, errorInfo);
         }
-        logger.trace("Changes discarded successfully from datastore {}", Datastore.candidate);
+        LOG.trace("Changes discarded successfully from datastore {}", Datastore.candidate);
 
 
         return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
index f443111..6fc7165 100644 (file)
@@ -9,7 +9,8 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.operations;
 
 import com.google.common.base.Optional;
-
+import java.util.HashMap;
+import java.util.Map;
 import org.opendaylight.controller.config.api.ValidationException;
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
@@ -25,14 +26,11 @@ import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import java.util.HashMap;
-import java.util.Map;
-
 public class Validate extends AbstractConfigNetconfOperation {
 
     public static final String VALIDATE = "validate";
 
-    private static final Logger logger = LoggerFactory.getLogger(Validate.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Validate.class);
 
     private final TransactionProvider transactionProvider;
 
@@ -71,10 +69,10 @@ public class Validate extends AbstractConfigNetconfOperation {
         try {
             transactionProvider.validateTransaction();
         } catch (ValidationException e) {
-            logger.warn("Validation failed", e);
+            LOG.warn("Validation failed", e);
             throw NetconfDocumentedException.wrap(e);
         } catch (IllegalStateException e) {
-            logger.warn("Validation failed", e);
+            LOG.warn("Validation failed", e);
             final Map<String, String> errorInfo = new HashMap<>();
             errorInfo
                     .put(ErrorTag.operation_failed.name(),
@@ -84,7 +82,7 @@ public class Validate extends AbstractConfigNetconfOperation {
 
         }
 
-        logger.trace("Datastore {} validated successfully", Datastore.candidate);
+        LOG.trace("Datastore {} validated successfully", Datastore.candidate);
 
         return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
     }
index 820f8ff..df46713 100644 (file)
@@ -8,6 +8,9 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig;
 
+import java.util.Map;
+import javax.management.InstanceNotFoundException;
+import javax.management.ObjectName;
 import org.opendaylight.controller.config.util.ConfigTransactionClient;
 import org.opendaylight.controller.netconf.confignetconfconnector.exception.NetconfConfigHandlingException;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml.AttributeConfigElement;
@@ -15,13 +18,9 @@ import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.management.InstanceNotFoundException;
-import javax.management.ObjectName;
-import java.util.Map;
-
 public abstract class AbstractEditConfigStrategy implements EditConfigStrategy {
 
-    private static final Logger logger = LoggerFactory.getLogger(AbstractEditConfigStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(AbstractEditConfigStrategy.class);
 
     @Override
     public void executeConfiguration(String module, String instance, Map<String, AttributeConfigElement> configuration,
@@ -29,7 +28,7 @@ public abstract class AbstractEditConfigStrategy implements EditConfigStrategy {
 
         try {
             ObjectName on = ta.lookupConfigBean(module, instance);
-            logger.debug("ServiceInstance for {} {} located successfully under {}", module, instance, on);
+            LOG.debug("ServiceInstance for {} {} located successfully under {}", module, instance, on);
             executeStrategy(configuration, ta, on, services);
         } catch (InstanceNotFoundException e) {
             handleMissingInstance(configuration, ta, module, instance, services);
index c5fadb0..0155d59 100644 (file)
@@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory;
 
 public class DeleteEditConfigStrategy extends AbstractEditConfigStrategy {
 
-    private static final Logger logger = LoggerFactory.getLogger(DeleteEditConfigStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DeleteEditConfigStrategy.class);
 
 
     @Override
@@ -37,7 +37,7 @@ public class DeleteEditConfigStrategy extends AbstractEditConfigStrategy {
     void executeStrategy(Map<String, AttributeConfigElement> configuration, ConfigTransactionClient ta, ObjectName on, ServiceRegistryWrapper services) throws NetconfConfigHandlingException {
         try {
             ta.destroyModule(on);
-            logger.debug("ServiceInstance {} deleted successfully", on);
+            LOG.debug("ServiceInstance {} deleted successfully", on);
         } catch (InstanceNotFoundException e) {
             throw new NetconfConfigHandlingException(
                     String.format("Unable to delete %s because of exception %s" + on, e.getMessage()),
index c22dcfe..f526d92 100644 (file)
@@ -13,15 +13,12 @@ import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Multimap;
-
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
-
 import javax.management.InstanceNotFoundException;
 import javax.management.ObjectName;
-
 import org.opendaylight.controller.config.api.ValidationException;
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
 import org.opendaylight.controller.config.util.ConfigTransactionClient;
@@ -53,7 +50,7 @@ import org.w3c.dom.Element;
 
 public class EditConfig extends AbstractConfigNetconfOperation {
 
-    private static final Logger logger = LoggerFactory.getLogger(EditConfig.class);
+    private static final Logger LOG = LoggerFactory.getLogger(EditConfig.class);
 
     private final YangStoreSnapshot yangStoreSnapshot;
 
@@ -80,7 +77,7 @@ public class EditConfig extends AbstractConfigNetconfOperation {
             executeSet(getConfigRegistryClient(), editConfigExecution);
         }
 
-        logger.trace("Operation {} successful", EditConfigXmlParser.EDIT_CONFIG);
+        LOG.trace("Operation {} successful", EditConfigXmlParser.EDIT_CONFIG);
 
         return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
     }
@@ -88,7 +85,7 @@ public class EditConfig extends AbstractConfigNetconfOperation {
     private void executeSet(ConfigRegistryClient configRegistryClient,
             EditConfigXmlParser.EditConfigExecution editConfigExecution) throws NetconfDocumentedException {
         set(configRegistryClient, editConfigExecution);
-        logger.debug("Set phase for {} operation successful", EditConfigXmlParser.EDIT_CONFIG);
+        LOG.debug("Set phase for {} operation successful", EditConfigXmlParser.EDIT_CONFIG);
     }
 
     private void executeTests(ConfigRegistryClient configRegistryClient,
@@ -96,13 +93,13 @@ public class EditConfig extends AbstractConfigNetconfOperation {
         try {
             test(configRegistryClient, editConfigExecution, editConfigExecution.getDefaultStrategy());
         } catch (final ValidationException e) {
-            logger.warn("Test phase for {} failed", EditConfigXmlParser.EDIT_CONFIG, e);
+            LOG.warn("Test phase for {} failed", EditConfigXmlParser.EDIT_CONFIG, e);
             final Map<String, String> errorInfo = new HashMap<>();
             errorInfo.put(ErrorTag.operation_failed.name(), e.getMessage());
             throw new NetconfDocumentedException("Test phase: " + e.getMessage(), e, ErrorType.application,
                     ErrorTag.operation_failed, ErrorSeverity.error, errorInfo);
         }
-        logger.debug("Test phase for {} operation successful", EditConfigXmlParser.EDIT_CONFIG);
+        LOG.debug("Test phase for {} operation successful", EditConfigXmlParser.EDIT_CONFIG);
     }
 
     private void test(ConfigRegistryClient configRegistryClient, EditConfigExecution execution,
@@ -158,7 +155,7 @@ public class EditConfig extends AbstractConfigNetconfOperation {
                     ObjectName on = refNameToServiceEntry.getValue().getObjectName(ta.getTransactionName());
                     try {
                         ObjectName saved = ta.saveServiceReference(qnameOfService, refNameToServiceEntry.getKey(), on);
-                        logger.debug("Saving service {} with on {} under name {} with service on {}", qnameOfService,
+                        LOG.debug("Saving service {} with on {} under name {} with service on {}", qnameOfService,
                                 on, refNameToServiceEntry.getKey(), saved);
                     } catch (InstanceNotFoundException e) {
                         throw new NetconfDocumentedException(String.format("Unable to save ref name " + refNameToServiceEntry.getKey() + " for instance " + on, e),
@@ -265,7 +262,7 @@ public class EditConfig extends AbstractConfigNetconfOperation {
 
     public static Map<String/* Namespace from yang file */,
             Map<String /* Name of module entry from yang file */, ModuleConfig>> transformMbeToModuleConfigs
-            (final ConfigRegistryClient configRegistryClient, Map<String/* Namespace from yang file */,
+    (final ConfigRegistryClient configRegistryClient, Map<String/* Namespace from yang file */,
                     Map<String /* Name of module entry from yang file */, ModuleMXBeanEntry>> mBeanEntries) {
 
         Map<String, Map<String, ModuleConfig>> namespaceToModuleNameToModuleConfig = Maps.newHashMap();
index 8538e40..9c78457 100644 (file)
@@ -8,13 +8,12 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig;
 
+import java.util.Map;
 import org.opendaylight.controller.config.util.ConfigTransactionClient;
 import org.opendaylight.controller.netconf.confignetconfconnector.exception.NetconfConfigHandlingException;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml.AttributeConfigElement;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ServiceRegistryWrapper;
 
-import java.util.Map;
-
 public interface EditConfigStrategy {
 
     void executeConfiguration(String module, String instance, Map<String, AttributeConfigElement> configuration,
index a3d97b1..99c0a2f 100644 (file)
@@ -11,10 +11,8 @@ package org.opendaylight.controller.netconf.confignetconfconnector.operations.ed
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Optional;
 import com.google.common.collect.Multimap;
-
 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;
@@ -32,7 +30,7 @@ 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";
@@ -61,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){
@@ -89,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<XmlElement> errorOptionElement = xml
@@ -107,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);
         }
 
@@ -115,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);
         }
 
index d8ceb31..d3d5bd9 100644 (file)
@@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory;
 
 public class MergeEditConfigStrategy extends AbstractEditConfigStrategy {
 
-    private static final Logger logger = LoggerFactory.getLogger(MergeEditConfigStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MergeEditConfigStrategy.class);
 
     public MergeEditConfigStrategy() {
 
@@ -52,7 +52,7 @@ public class MergeEditConfigStrategy extends AbstractEditConfigStrategy {
                 AttributeConfigElement ace = configAttributeEntry.getValue();
 
                 if (!ace.getResolvedValue().isPresent()) {
-                    logger.debug("Skipping attribute {} for {}", configAttributeEntry.getKey(), on);
+                    LOG.debug("Skipping attribute {} for {}", configAttributeEntry.getKey(), on);
                     continue;
                 }
 
@@ -63,9 +63,9 @@ public class MergeEditConfigStrategy extends AbstractEditConfigStrategy {
                 // Merge value with currentValue
                 toBeMergedIn = merge(oldValue, toBeMergedIn);
                 ta.setAttribute(on, ace.getJmxName(), new Attribute(ace.getJmxName(), toBeMergedIn));
-                logger.debug("Attribute {} set to {} for {}", configAttributeEntry.getKey(), toBeMergedIn, on);
+                LOG.debug("Attribute {} set to {} for {}", configAttributeEntry.getKey(), toBeMergedIn, on);
             } catch (Exception e) {
-                logger.error("Error while merging objectnames of {}", on, e);
+                LOG.error("Error while merging objectnames of {}", on, e);
                 throw new NetconfConfigHandlingException(String.format("Unable to set attributes for %s, Error with attribute %s : %s ",
                         on,
                         configAttributeEntry.getKey(),
index c8adb2e..1eb4c83 100644 (file)
@@ -8,6 +8,9 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig;
 
+import java.util.Map;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.ObjectName;
 import org.opendaylight.controller.config.util.ConfigTransactionClient;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.confignetconfconnector.exception.NetconfConfigHandlingException;
@@ -16,20 +19,16 @@ import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.ObjectName;
-import java.util.Map;
-
 public class MissingInstanceHandlingStrategy extends AbstractEditConfigStrategy {
 
-    private static final Logger logger = LoggerFactory.getLogger(MissingInstanceHandlingStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MissingInstanceHandlingStrategy.class);
 
     @Override
     void handleMissingInstance(Map<String, AttributeConfigElement> configuration, ConfigTransactionClient ta,
             String module, String instance, ServiceRegistryWrapper services) throws NetconfConfigHandlingException {
         try {
             ObjectName on = ta.createModule(module, instance);
-            logger.trace("New instance for {} {} created under name {}", module, instance, on);
+            LOG.trace("New instance for {} {} created under name {}", module, instance, on);
         } catch (InstanceAlreadyExistsException e1) {
             throw new NetconfConfigHandlingException(String.format("Unable to create instance for %s : %s.", module, instance),
                     NetconfDocumentedException.ErrorType.application,
index bd182a4..87e64c3 100644 (file)
@@ -8,22 +8,21 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig;
 
+import java.util.Map;
 import org.opendaylight.controller.config.util.ConfigTransactionClient;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml.AttributeConfigElement;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ServiceRegistryWrapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Map;
-
 public class NoneEditConfigStrategy implements EditConfigStrategy {
 
-    private static final Logger logger = LoggerFactory.getLogger(NoneEditConfigStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NoneEditConfigStrategy.class);
 
     @Override
     public void executeConfiguration(String module, String instance, Map<String, AttributeConfigElement> configuration,
                                      ConfigTransactionClient ta, ServiceRegistryWrapper services) {
-        logger.debug("Skipping configuration element for {}:{}", module, instance);
+        LOG.debug("Skipping configuration element for {}:{}", module, instance);
     }
 
 }
index df1f653..55040d7 100644 (file)
@@ -8,21 +8,20 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig;
 
+import java.util.Map;
 import org.opendaylight.controller.config.util.ConfigTransactionClient;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml.AttributeConfigElement;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ServiceRegistryWrapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Map;
-
 public class RemoveEditConfigStrategy extends DeleteEditConfigStrategy {
 
-    private static final Logger logger = LoggerFactory.getLogger(RemoveEditConfigStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(RemoveEditConfigStrategy.class);
 
     @Override
     void handleMissingInstance(Map<String, AttributeConfigElement> configuration, ConfigTransactionClient ta,
                                String module, String instance, ServiceRegistryWrapper services) {
-        logger.warn("Unable to delete {}:{}, ServiceInstance not found", module, instance);
+        LOG.warn("Unable to delete {}:{}, ServiceInstance not found", module, instance);
     }
 }
index ab993c5..8d786d2 100644 (file)
@@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory;
 
 public class ReplaceEditConfigStrategy extends AbstractEditConfigStrategy {
 
-    private static final Logger logger = LoggerFactory.getLogger(ReplaceEditConfigStrategy.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ReplaceEditConfigStrategy.class);
 
     @Override
     void handleMissingInstance(Map<String, AttributeConfigElement> configuration, ConfigTransactionClient ta,
@@ -45,12 +45,12 @@ public class ReplaceEditConfigStrategy extends AbstractEditConfigStrategy {
                 if (!ace.getResolvedValue().isPresent()) {
                     Object value = ace.getResolvedDefaultValue();
                     ta.setAttribute(on, ace.getJmxName(), new Attribute(ace.getJmxName(), value));
-                    logger.debug("Attribute {} set to default value {} for {}", configAttributeEntry.getKey(), value,
+                    LOG.debug("Attribute {} set to default value {} for {}", configAttributeEntry.getKey(), value,
                             on);
                 } else {
                     Object value = ace.getResolvedValue().get();
                     ta.setAttribute(on, ace.getJmxName(), new Attribute(ace.getJmxName(), value));
-                    logger.debug("Attribute {} set to value {} for {}", configAttributeEntry.getKey(), value, on);
+                    LOG.debug("Attribute {} set to value {} for {}", configAttributeEntry.getKey(), value, on);
                 }
 
             } catch (Exception e) {
index 9155bb9..b504cbf 100644 (file)
@@ -9,13 +9,10 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.get;
 
 import com.google.common.collect.Maps;
-
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import javax.management.ObjectName;
-
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
 import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
 import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry;
@@ -42,7 +39,7 @@ import org.w3c.dom.Element;
 public class Get extends AbstractConfigNetconfOperation {
 
     private final YangStoreSnapshot yangStoreSnapshot;
-    private static final Logger logger = LoggerFactory.getLogger(Get.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Get.class);
 
     public Get(YangStoreSnapshot yangStoreSnapshot, ConfigRegistryClient configRegistryClient,
                String netconfSessionIdForReporting) {
@@ -133,7 +130,7 @@ public class Get extends AbstractConfigNetconfOperation {
 
         final Element element = runtime.toXml(runtimeBeans, configBeans, document);
 
-        logger.trace("{} operation successful", XmlNetconfConstants.GET);
+        LOG.trace("{} operation successful", XmlNetconfConstants.GET);
 
         return element;
     }
index fee3036..2ff4dd6 100644 (file)
@@ -41,7 +41,7 @@ public class GetConfig extends AbstractConfigNetconfOperation {
 
     private final TransactionProvider transactionProvider;
 
-    private static final Logger logger = LoggerFactory.getLogger(GetConfig.class);
+    private static final Logger LOG = LoggerFactory.getLogger(GetConfig.class);
 
     public GetConfig(YangStoreSnapshot yangStoreSnapshot, Optional<String> maybeNamespace,
             TransactionProvider transactionProvider, ConfigRegistryClient configRegistryClient,
@@ -61,7 +61,7 @@ public class GetConfig extends AbstractConfigNetconfOperation {
                 XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
         XmlElement sourceNode = sourceElement.getOnlyChildElement();
         String sourceParsed = sourceNode.getName();
-        logger.debug("Setting source datastore to '{}'", sourceParsed);
+        LOG.debug("Setting source datastore to '{}'", sourceParsed);
         Datastore sourceDatastore = Datastore.valueOf(sourceParsed);
 
         // Filter option: ignore for now, TODO only load modules specified by the filter
@@ -86,7 +86,7 @@ public class GetConfig extends AbstractConfigNetconfOperation {
         ServiceRegistryWrapper serviceTracker = new ServiceRegistryWrapper(ta);
         dataElement = configMapping.toXml(instances, this.maybeNamespace, document, dataElement, serviceTracker);
 
-        logger.trace("{} operation successful", GET_CONFIG);
+        LOG.trace("{} operation successful", GET_CONFIG);
 
         return dataElement;
     }
index 0d9c61b..937a2ad 100644 (file)
@@ -11,7 +11,9 @@ package org.opendaylight.controller.netconf.confignetconfconnector.operations.ru
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
-
+import java.util.Map;
+import javax.management.ObjectName;
+import javax.management.openmbean.OpenType;
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
 import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
 import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry;
@@ -28,7 +30,6 @@ import org.opendaylight.controller.netconf.confignetconfconnector.mapping.rpc.In
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.rpc.ModuleRpcs;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.rpc.Rpcs;
 import org.opendaylight.controller.netconf.confignetconfconnector.operations.AbstractConfigNetconfOperation;
-import org.opendaylight.controller.netconf.confignetconfconnector.operations.Commit;
 import org.opendaylight.controller.netconf.confignetconfconnector.osgi.YangStoreSnapshot;
 import org.opendaylight.controller.netconf.mapping.api.HandlingPriority;
 import org.opendaylight.controller.netconf.util.exception.MissingNameSpaceException;
@@ -39,14 +40,9 @@ import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import javax.management.ObjectName;
-import javax.management.openmbean.OpenType;
-
-import java.util.Map;
-
 public class RuntimeRpc extends AbstractConfigNetconfOperation {
 
-    private static final Logger logger = LoggerFactory.getLogger(Commit.class);
+    private static final Logger LOG = LoggerFactory.getLogger(RuntimeRpc.class);
     public static final String CONTEXT_INSTANCE = "context-instance";
 
     private final YangStoreSnapshot yangStoreSnapshot;
@@ -98,7 +94,7 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation {
         try {
             namespace = xml.getNamespace();
         } catch (MissingNameSpaceException e) {
-            logger.trace("Can't get namespace from xml element due to {}",e);
+            LOG.trace("Can't get namespace from xml element due to ",e);
             throw NetconfDocumentedException.wrap(e);
         }
         final XmlElement contextInstanceElement = xml.getOnlyChildElement(CONTEXT_INSTANCE);
@@ -133,7 +129,7 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation {
         try {
             netconfOperationNamespace = operationElement.getNamespace();
         } catch (MissingNameSpaceException e) {
-            logger.debug("Cannot retrieve netconf operation namespace from message due to {}", e);
+            LOG.debug("Cannot retrieve netconf operation namespace from message due to ", e);
             return HandlingPriority.CANNOT_HANDLE;
         }
 
@@ -159,7 +155,7 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation {
                     netconfOperationName);
 
         } catch (IllegalStateException e) {
-            logger.debug("Cannot handle runtime operation {}:{}", netconfOperationNamespace, netconfOperationName, e);
+            LOG.debug("Cannot handle runtime operation {}:{}", netconfOperationNamespace, netconfOperationName, e);
             return HandlingPriority.CANNOT_HANDLE;
         }
 
@@ -182,12 +178,12 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation {
         // TODO check for namespaces and unknown elements
         final NetconfOperationExecution execution = fromXml(xml);
 
-        logger.debug("Invoking operation {} on {} with arguments {}", execution.operationName, execution.on,
+        LOG.debug("Invoking operation {} on {} with arguments {}", execution.operationName, execution.on,
                 execution.attributes);
         final Object result = executeOperation(getConfigRegistryClient(), execution.on, execution.operationName,
                 execution.attributes);
 
-        logger.trace("Operation {} called successfully on {} with arguments {} with result {}", execution.operationName,
+        LOG.trace("Operation {} called successfully on {} with arguments {} with result {}", execution.operationName,
                 execution.on, execution.attributes, result);
 
         if (execution.isVoid()) {
index 551da72..4bf469d 100644 (file)
@@ -8,24 +8,21 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.runtimerpc;
 
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import com.google.common.collect.Maps;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-
 import javax.management.ObjectName;
-
 import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
 import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.rpc.ModuleRpcs;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.Modules;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.modules.Module;
 
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Preconditions;
-import com.google.common.base.Strings;
-import com.google.common.collect.Maps;
-
 /**
  * Represents parsed xpath to runtime bean instance
  */
index 99f9c04..faaa17d 100644 (file)
@@ -8,6 +8,10 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.osgi;
 
+import static com.google.common.base.Preconditions.checkState;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceFactory;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
 import org.osgi.framework.BundleActivator;
@@ -19,14 +23,9 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import static com.google.common.base.Preconditions.checkState;
-
 public class Activator implements BundleActivator {
 
-    private static final Logger logger = LoggerFactory.getLogger(Activator.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
 
     private BundleContext context;
     private ServiceRegistration<?> osgiRegistration;
@@ -39,7 +38,7 @@ public class Activator implements BundleActivator {
         ServiceTrackerCustomizer<SchemaContextProvider, ConfigRegistryLookupThread> customizer = new ServiceTrackerCustomizer<SchemaContextProvider, ConfigRegistryLookupThread>() {
             @Override
             public ConfigRegistryLookupThread addingService(ServiceReference<SchemaContextProvider> reference) {
-                logger.debug("Got addingService(SchemaContextProvider) event, starting ConfigRegistryLookupThread");
+                LOG.debug("Got addingService(SchemaContextProvider) event, starting ConfigRegistryLookupThread");
                 checkState(configRegistryLookup == null, "More than one onYangStoreAdded received");
 
                 SchemaContextProvider schemaContextProvider = reference.getBundle().getBundleContext().getService(reference);
@@ -52,7 +51,7 @@ public class Activator implements BundleActivator {
 
             @Override
             public void modifiedService(ServiceReference<SchemaContextProvider> reference, ConfigRegistryLookupThread configRegistryLookup) {
-                logger.debug("Got modifiedService(SchemaContextProvider) event");
+                LOG.debug("Got modifiedService(SchemaContextProvider) event");
                 configRegistryLookup.yangStoreService.refresh();
 
             }
@@ -90,7 +89,7 @@ public class Activator implements BundleActivator {
         @Override
         public void run() {
             NetconfOperationServiceFactoryImpl factory = new NetconfOperationServiceFactoryImpl(yangStoreService);
-            logger.debug("Registering into OSGi");
+            LOG.debug("Registering into OSGi");
             Dictionary<String, String> properties = new Hashtable<>();
             properties.put("name", "config-netconf-connector");
             osgiRegistration = context.registerService(NetconfOperationServiceFactory.class, factory, properties);
index 30873d9..294e0c8 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.netconf.confignetconfconnector.osgi;
 
 import com.google.common.base.Optional;
 import com.google.common.collect.Sets;
+import java.util.Set;
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
 import org.opendaylight.controller.netconf.confignetconfconnector.operations.Commit;
 import org.opendaylight.controller.netconf.confignetconfconnector.operations.DiscardChanges;
@@ -21,8 +22,6 @@ import org.opendaylight.controller.netconf.confignetconfconnector.operations.run
 import org.opendaylight.controller.netconf.confignetconfconnector.transactions.TransactionProvider;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperation;
 
-import java.util.Set;
-
 final class NetconfOperationProvider {
     private final Set<NetconfOperation> operations;
 
index 12469f6..b5ae66d 100644 (file)
@@ -8,14 +8,13 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.osgi;
 
+import java.lang.management.ManagementFactory;
+import javax.management.MBeanServer;
 import org.opendaylight.controller.config.util.ConfigRegistryJMXClient;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.management.MBeanServer;
-import java.lang.management.ManagementFactory;
-
 public class NetconfOperationServiceFactoryImpl implements NetconfOperationServiceFactory {
 
     public static final int ATTEMPT_TIMEOUT_MS = 1000;
@@ -24,7 +23,7 @@ public class NetconfOperationServiceFactoryImpl implements NetconfOperationServi
     private final YangStoreService yangStoreService;
     private final ConfigRegistryJMXClient jmxClient;
 
-    private static final Logger logger = LoggerFactory.getLogger(NetconfOperationServiceFactoryImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfOperationServiceFactoryImpl.class);
 
     public NetconfOperationServiceFactoryImpl(YangStoreService yangStoreService) {
         this(yangStoreService, ManagementFactory.getPlatformMBeanServer());
@@ -44,9 +43,9 @@ public class NetconfOperationServiceFactoryImpl implements NetconfOperationServi
             } catch (IllegalStateException e) {
                 ++i;
                 if (i > SILENT_ATTEMPTS) {
-                    logger.info("JMX client not created after {} attempts, still trying", i, e);
+                    LOG.info("JMX client not created after {} attempts, still trying", i, e);
                 } else {
-                    logger.debug("JMX client could not be created, reattempting, try {}", i, e);
+                    LOG.debug("JMX client could not be created, reattempting, try {}", i, e);
                 }
                 try {
                     Thread.sleep(ATTEMPT_TIMEOUT_MS);
@@ -59,9 +58,9 @@ public class NetconfOperationServiceFactoryImpl implements NetconfOperationServi
 
         jmxClient = configRegistryJMXClient;
         if (i > SILENT_ATTEMPTS) {
-            logger.info("Created JMX client after {} attempts", i);
+            LOG.info("Created JMX client after {} attempts", i);
         } else {
-            logger.debug("Created JMX client after {} attempts", i);
+            LOG.debug("Created JMX client after {} attempts", i);
         }
     }
 
index f5fe089..7008879 100644 (file)
@@ -8,11 +8,14 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.osgi;
 
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.opendaylight.controller.config.api.LookupRegistry;
 import org.opendaylight.controller.config.util.ConfigRegistryJMXClient;
 import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
@@ -23,11 +26,6 @@ import org.opendaylight.controller.netconf.mapping.api.NetconfOperation;
 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationService;
 import org.opendaylight.yangtools.yang.model.api.Module;
 
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Sets;
-
 /**
  * Manages life cycle of {@link YangStoreSnapshot}.
  */
index 0454bad..8ec4fdd 100644 (file)
@@ -7,14 +7,13 @@
  */
 package org.opendaylight.controller.netconf.confignetconfconnector.osgi;
 
+import java.util.Map;
+import java.util.Set;
 import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.ModuleIdentifier;
 
-import java.util.Map;
-import java.util.Set;
-
 public interface YangStoreSnapshot extends AutoCloseable {
 
     /**
index 827708f..075ae63 100644 (file)
@@ -9,13 +9,11 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.osgi;
 
 import com.google.common.collect.Maps;
-
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
-
 import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
 import org.opendaylight.controller.config.yangjmxgenerator.PackageTranslator;
 import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry;
@@ -29,7 +27,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class YangStoreSnapshotImpl implements YangStoreSnapshot {
-    private static final Logger logger = LoggerFactory.getLogger(YangStoreSnapshotImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(YangStoreSnapshotImpl.class);
 
 
     private final Map<String /* Namespace from yang file */,
@@ -42,7 +40,7 @@ public class YangStoreSnapshotImpl implements YangStoreSnapshot {
 
 
     public YangStoreSnapshotImpl(final SchemaContext resolveSchemaContext) {
-        logger.trace("Resolved modules:{}", resolveSchemaContext.getModules());
+        LOG.trace("Resolved modules:{}", resolveSchemaContext.getModules());
         this.schemaContext = resolveSchemaContext;
         // JMX generator
 
index 11d2e74..2967cf0 100644 (file)
@@ -10,6 +10,11 @@ package org.opendaylight.controller.netconf.confignetconfconnector.transactions;
 
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import javax.management.InstanceNotFoundException;
+import javax.management.ObjectName;
 import org.opendaylight.controller.config.api.ConflictingVersionException;
 import org.opendaylight.controller.config.api.ValidationException;
 import org.opendaylight.controller.config.api.jmx.CommitStatus;
@@ -20,14 +25,8 @@ import org.opendaylight.controller.netconf.confignetconfconnector.exception.NoTr
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.management.InstanceNotFoundException;
-import javax.management.ObjectName;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
 public class TransactionProvider implements AutoCloseable {
-    private static final Logger logger = LoggerFactory.getLogger(TransactionProvider.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TransactionProvider.class);
 
     private final ConfigRegistryClient configRegistryClient;
 
@@ -49,7 +48,7 @@ public class TransactionProvider implements AutoCloseable {
                     configRegistryClient.getConfigTransactionClient(tx).abortConfig();
                 }
             } catch (Exception e) {
-                logger.debug("Ignoring exception while closing transaction {}", tx, e);
+                LOG.debug("Ignoring exception while closing transaction {}", tx, e);
             }
         }
         allOpenedTransactions.clear();
@@ -63,7 +62,7 @@ public class TransactionProvider implements AutoCloseable {
 
         // Transaction was already closed somehow
         if (!isStillOpenTransaction(transaction)) {
-            logger.warn("Fixing illegal state: transaction {} was closed in {}", transaction,
+            LOG.warn("Fixing illegal state: transaction {} was closed in {}", transaction,
                     netconfSessionIdForReporting);
             transaction = null;
             return Optional.absent();
@@ -114,10 +113,10 @@ public class TransactionProvider implements AutoCloseable {
             return status;
         } catch (ValidationException validationException) {
             // no clean up: user can reconfigure and recover this transaction
-            logger.warn("Transaction {} failed on {}", taON, validationException.toString());
+            LOG.warn("Transaction {} failed on {}", taON, validationException.toString());
             throw validationException;
         } catch (ConflictingVersionException e) {
-            logger.error("Exception while commit of {}, aborting transaction", taON, e);
+            LOG.error("Exception while commit of {}, aborting transaction", taON, e);
             // clean up
             abortTransaction();
             throw e;
@@ -125,7 +124,7 @@ public class TransactionProvider implements AutoCloseable {
     }
 
     public synchronized void abortTransaction() {
-        logger.debug("Aborting current transaction");
+        LOG.debug("Aborting current transaction");
         Optional<ObjectName> taON = getTransaction();
         Preconditions.checkState(taON.isPresent(), NO_TRANSACTION_FOUND_FOR_SESSION + netconfSessionIdForReporting);
 
@@ -136,7 +135,7 @@ public class TransactionProvider implements AutoCloseable {
     }
 
     public synchronized void abortTestTransaction(ObjectName testTx) {
-        logger.debug("Aborting transaction {}", testTx);
+        LOG.debug("Aborting transaction {}", testTx);
         ConfigTransactionClient transactionClient = configRegistryClient.getConfigTransactionClient(testTx);
         allOpenedTransactions.remove(testTx);
         transactionClient.abortConfig();
@@ -172,18 +171,18 @@ public class TransactionProvider implements AutoCloseable {
                 transactionClient.destroyModule(instance);
             } catch (InstanceNotFoundException e) {
                 if (isTest){
-                    logger.debug("Unable to clean configuration in transactiom {}", taON, e);
+                    LOG.debug("Unable to clean configuration in transactiom {}", taON, e);
                 } else {
-                    logger.warn("Unable to clean configuration in transactiom {}", taON, e);
+                    LOG.warn("Unable to clean configuration in transactiom {}", taON, e);
                 }
 
                 throw new IllegalStateException("Unable to clean configuration in transactiom " + taON, e);
             }
         }
-        logger.debug("Transaction {} wiped clean of {} config beans", taON, i);
+        LOG.debug("Transaction {} wiped clean of {} config beans", taON, i);
 
         transactionClient.removeAllServiceReferences();
-        logger.debug("Transaction {} wiped clean of all service references", taON);
+        LOG.debug("Transaction {} wiped clean of all service references", taON);
     }
 
     public void wipeTransaction() {
index d7f352a..7b286df 100644 (file)
@@ -8,13 +8,12 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.util;
 
-import com.google.common.base.Preconditions;
+import static org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil.getRevisionFormat;
 
+import com.google.common.base.Preconditions;
 import java.text.ParseException;
 import java.util.Date;
 
-import static org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil.getRevisionFormat;
-
 public final class Util {
 
     public static String writeDate(final Date date) {
index 28849d0..5ed528e 100644 (file)
@@ -28,7 +28,6 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
-
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
@@ -43,12 +42,10 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
-
 import javax.management.InstanceAlreadyExistsException;
 import javax.management.InstanceNotFoundException;
 import javax.management.ObjectName;
 import javax.xml.parsers.ParserConfigurationException;
-
 import org.custommonkey.xmlunit.AbstractNodeTester;
 import org.custommonkey.xmlunit.NodeTest;
 import org.custommonkey.xmlunit.NodeTestException;
@@ -121,7 +118,7 @@ import org.xml.sax.SAXException;
 
 
 public class NetconfMappingTest extends AbstractConfigTest {
-    private static final Logger logger = LoggerFactory.getLogger(NetconfMappingTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfMappingTest.class);
 
     private static final String INSTANCE_NAME = "instance-from-code";
     private static final String NETCONF_SESSION_ID = "foo";
@@ -498,7 +495,7 @@ public class NetconfMappingTest extends AbstractConfigTest {
 
         for (int i = 0; i < TESTS_COUNT; i++) {
             String file = String.format(format, i + 1);
-            logger.info("Reading {}", file);
+            LOG.info("Reading {}", file);
             try {
                 edit(file);
             } catch (NetconfDocumentedException e) {
@@ -702,13 +699,13 @@ public class NetconfMappingTest extends AbstractConfigTest {
 
         final Document request = XmlFileLoader.xmlFileToDocument(filename);
 
-        logger.debug("Executing netconf operation\n{}", XmlUtil.toString(request));
+        LOG.debug("Executing netconf operation\n{}", XmlUtil.toString(request));
         HandlingPriority priority = op.canHandle(request);
 
         Preconditions.checkState(priority != HandlingPriority.CANNOT_HANDLE);
 
         final Document response = op.handle(request, NetconfOperationChainedExecution.EXECUTION_TERMINATION_POINT);
-        logger.debug("Got response\n{}", XmlUtil.toString(response));
+        LOG.debug("Got response\n{}", XmlUtil.toString(response));
         return response;
     }
 
index d5ba976..0d830c2 100644 (file)
@@ -8,12 +8,12 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector;
 
+import static org.junit.Assert.assertEquals;
+
 import org.junit.Test;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Services;
 import org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Services.ServiceInstance;
 
-import static org.junit.Assert.assertEquals;
-
 public class ServiceTrackerTest {
 
     @Test
index b5c5dd3..89d9061 100644 (file)
@@ -8,6 +8,11 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations;
 
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+
 import org.junit.Test;
 import org.opendaylight.controller.config.api.ValidationException;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
@@ -17,11 +22,6 @@ import org.opendaylight.controller.netconf.util.xml.XmlElement;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Element;
 
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
-
 public class ValidateTest {
 
     public static final String NETCONF_SESSION_ID_FOR_REPORTING = "foo";
index 4d9935e..817bedf 100644 (file)
@@ -8,10 +8,22 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig;
 
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyMapOf;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
 import com.google.common.base.Optional;
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Multimap;
+import java.util.Collections;
+import java.util.Map;
+import javax.management.ObjectName;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
@@ -33,19 +45,6 @@ import org.opendaylight.controller.netconf.confignetconfconnector.osgi.YangStore
 import org.opendaylight.controller.netconf.confignetconfconnector.transactions.TransactionProvider;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 
-import javax.management.ObjectName;
-import java.util.Collections;
-import java.util.Map;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyMapOf;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
 public class EditConfigTest {
 
     @Mock
index b051c6c..03bf4e3 100644 (file)
@@ -14,14 +14,12 @@ import static org.mockito.Mockito.mock;
 
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
-
 import java.net.URI;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Map;
 import java.util.Set;
-
 import org.junit.Assert;
 import org.junit.Test;
 import org.hamcrest.CoreMatchers;
index 391edd0..b4ad89b 100644 (file)
@@ -88,7 +88,7 @@ module ietf-netconf-monitoring {
         "NETCONF over Secure Shell (SSH).";
       reference
         "RFC 4742: Using the NETCONF Configuration Protocol
-                 over Secure SHell (SSH)";
+              over Secure SHell (SSH)";
 
     }
 
@@ -99,7 +99,7 @@ module ietf-netconf-monitoring {
        Blocks Extensible Exchange Protocol (BEEP).";
       reference
         "RFC 4743: Using NETCONF over the Simple Object
-                 Access Protocol (SOAP)";
+              Access Protocol (SOAP)";
 
     }
 
@@ -110,7 +110,7 @@ module ietf-netconf-monitoring {
       over Hypertext Transfer Protocol Secure (HTTPS).";
       reference
         "RFC 4743: Using NETCONF over the Simple Object
-                 Access Protocol (SOAP)";
+              Access Protocol (SOAP)";
 
     }
 
@@ -120,7 +120,7 @@ module ietf-netconf-monitoring {
         "NETCONF over Blocks Extensible Exchange Protocol (BEEP).";
       reference
         "RFC 4744: Using the NETCONF Protocol over the
-                 Blocks Extensible Exchange Protocol (BEEP)";
+              Blocks Extensible Exchange Protocol (BEEP)";
 
     }
 
@@ -154,7 +154,7 @@ module ietf-netconf-monitoring {
         "The YANG data modeling language for NETCONF.";
       reference
         "RFC 6020:  YANG - A Data Modeling Language for the
-                  Network Configuration Protocol (NETCONF)";
+               Network Configuration Protocol (NETCONF)";
 
     }
 
@@ -163,7 +163,7 @@ module ietf-netconf-monitoring {
       description "The YIN syntax for YANG.";
       reference
         "RFC 6020:  YANG - A Data Modeling Language for the
-                  Network Configuration Protocol (NETCONF)";
+               Network Configuration Protocol (NETCONF)";
 
     }
 
@@ -305,7 +305,7 @@ module ietf-netconf-monitoring {
                   "List of partial locks.";
                 reference
                   "RFC 5717: Partial Lock Remote Procedure Call (RPC) for
-                         NETCONF";
+                      NETCONF";
 
                 leaf lock-id {
                   type uint32;
index 8605501..79c083c 100644 (file)
@@ -105,8 +105,7 @@ public class Main {
     }
 
     private static void handleException(final Exception e, final String message) {
-        System.err.println(message);
-        e.printStackTrace(System.err);
+        // FIXME syserr the exception and stacktrace
     }
 
     private static void writeStatus(final ConsoleIO io, final String blueprint, final Object... args) {
index e938388..73088b4 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.controller.netconf.cli.commands.local;
 
+import com.google.common.collect.Lists;
 import org.opendaylight.controller.netconf.cli.NetconfDeviceConnectionManager;
 import org.opendaylight.controller.netconf.cli.commands.AbstractCommand;
 import org.opendaylight.controller.netconf.cli.commands.Command;
@@ -20,8 +21,6 @@ import org.opendaylight.yangtools.yang.data.impl.CompositeNodeTOImpl;
 import org.opendaylight.yangtools.yang.data.impl.SimpleNodeTOImpl;
 import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
 
-import com.google.common.collect.Lists;
-
 /**
  * Local disconnect command
  */
index ef41e7f..b44ec41 100644 (file)
@@ -245,11 +245,11 @@ public abstract class BasicDataHolderReader<T extends DataSchemaNode> extends Ab
 
             return new StringsCompleter(Collections2.transform(((IdentityrefTypeDefinition) getType()).getIdentity()
                     .getDerivedIdentities(), new Function<IdentitySchemaNode, String>() {
-                @Override
-                public String apply(final IdentitySchemaNode input) {
-                    return identityMap.inverse().get(input.getQName());
-                }
-            })).complete(buffer, cursor, candidates);
+                        @Override
+                        public String apply(final IdentitySchemaNode input) {
+                            return identityMap.inverse().get(input.getQName());
+                        }
+                    })).complete(buffer, cursor, candidates);
         }
     }
 }
index a05a169..2a00101 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.netconf.cli.reader.impl;
 
 import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
+import java.util.List;
 import jline.console.completer.Completer;
 import org.opendaylight.controller.netconf.cli.io.BaseConsoleContext;
 import org.opendaylight.controller.netconf.cli.io.ConsoleContext;
@@ -19,8 +20,6 @@ import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
 
-import java.util.List;
-
 class LeafListEntryReader extends BasicDataHolderReader<LeafListSchemaNode> implements
         GenericListEntryReader<LeafListSchemaNode> {
 
index ef29a76..2c7c23e 100644 (file)
@@ -13,12 +13,12 @@ import java.util.List;
 import org.opendaylight.controller.netconf.cli.io.ConsoleIO;
 import org.opendaylight.controller.netconf.cli.writer.OutFormatter;
 import org.opendaylight.controller.netconf.cli.writer.WriteException;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.Node;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
+import org.opendaylight.yangtools.yang.data.composite.node.schema.cnsn.parser.CnSnToNormalizedNodeParserFactory;
 import org.opendaylight.yangtools.yang.data.impl.schema.transform.base.serializer.NodeSerializerDispatcher;
 import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.DomUtils;
-import org.opendaylight.yangtools.yang.data.composite.node.schema.cnsn.parser.CnSnToNormalizedNodeParserFactory;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
 import org.opendaylight.yangtools.yang.model.api.ChoiceNode;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
index 29d7abd..368e942 100644 (file)
@@ -33,7 +33,7 @@ public class ConsoleIOTestImpl extends ConsoleIOImpl {
     public String read() throws IOException {
         final String prompt = buildPrompt();
         output.append(prompt);
-        System.out.print(prompt);
+        System.console().writer().print(prompt);
 
         String value = inputValues.get(prompt).pollFirst();
         if (value == null) {
@@ -43,7 +43,7 @@ public class ConsoleIOTestImpl extends ConsoleIOImpl {
         value = value != null ? value : "****NO VALUE****";
 
         output.append(value + "\n");
-        System.out.print(value + "\n");
+        System.console().writer().println(value + "\n");
         return value;
     }
 
@@ -69,14 +69,14 @@ public class ConsoleIOTestImpl extends ConsoleIOImpl {
     public void write(final CharSequence data) throws IOException {
         output.append(data);
         lastMessage = (String) data;
-        System.out.print(data);
+        System.console().writer().print(data);
     }
 
     @Override
     public void writeLn(final CharSequence data) throws IOException {
         write(data);
         output.append("\n");
-        System.out.print("\n");
+        System.console().writer().print("\n");
     }
 
     public String getConsoleOutput() {
index 7d85aa4..874669e 100644 (file)
@@ -61,7 +61,6 @@ public class NetconfCliTest {
         return parser.parseFiles(testFiles);
     }
 
-    // @Ignore
     @Test
     public void cliTest() throws ReadingException, IOException, WriteException, URISyntaxException {
 
@@ -112,12 +111,11 @@ public class NetconfCliTest {
         final List<Node<?>> redData = new GenericReader(console, new CommandArgHandlerRegistry(console,
                 new SchemaContextRegistry(schemaContext)), schemaContext).read(cont1);
         assertNotNull(redData);
-       assertEquals(1, redData.size());
+        assertEquals(1, redData.size());
 
         assertTrue(redData.get(0) instanceof CompositeNode);
         final CompositeNode redTopLevelNode = (CompositeNode) redData.get(0);
 
-        System.out.println("============================");
         new NormalizedNodeWriter(console, new OutFormatter()).write(cont1, redData);
 
     }
index 5a24452..d6dabb9 100644 (file)
@@ -7,16 +7,13 @@
  */
 package org.opendaylight.controller.netconf.cli.io;
 
+import com.google.common.collect.Maps;
 import java.util.Map;
-
 import junit.framework.Assert;
-
 import org.junit.Test;
 import org.opendaylight.controller.netconf.cli.commands.CommandConstants;
 import org.opendaylight.yangtools.yang.common.QName;
 
-import com.google.common.collect.Maps;
-
 public class IOUtilTest {
 
     @Test
index de68c31..adcdea6 100644 (file)
@@ -304,15 +304,15 @@ public class NetconfDeviceSimulator implements Closeable {
 
         final Map<SourceIdentifier, Map.Entry<ASTSchemaSource, YangTextSchemaSource>> asts = Maps.newHashMap();
         for (final SourceIdentifier loadedSource : loadedSources) {
-                try {
-                    final CheckedFuture<ASTSchemaSource, SchemaSourceException> ast = consumer.getSchemaSource(loadedSource, ASTSchemaSource.class);
-                    final CheckedFuture<YangTextSchemaSource, SchemaSourceException> text = consumer.getSchemaSource(loadedSource, YangTextSchemaSource.class);
-                    asts.put(loadedSource, new AbstractMap.SimpleEntry<>(ast.get(), text.get()));
-                } catch (final InterruptedException e) {
-                    throw new RuntimeException(e);
-                } catch (final ExecutionException e) {
-                    throw new RuntimeException("Cannot parse schema context", e);
-                }
+            try {
+                final CheckedFuture<ASTSchemaSource, SchemaSourceException> ast = consumer.getSchemaSource(loadedSource, ASTSchemaSource.class);
+                final CheckedFuture<YangTextSchemaSource, SchemaSourceException> text = consumer.getSchemaSource(loadedSource, YangTextSchemaSource.class);
+                asts.put(loadedSource, new AbstractMap.SimpleEntry<>(ast.get(), text.get()));
+            } catch (final InterruptedException e) {
+                throw new RuntimeException(e);
+            } catch (final ExecutionException e) {
+                throw new RuntimeException("Cannot parse schema context", e);
+            }
         }
         return toModuleBuilders(asts);
     }
index e5d068d..fd4cd13 100644 (file)
@@ -45,7 +45,7 @@ class SimulatedEditConfig extends AbstractConfigNetconfOperation {
     }
 
     @Override
-      protected String getOperationName() {
+    protected String getOperationName() {
         return EditConfigXmlParser.EDIT_CONFIG;
     }
 
index 0a3a77c..885bdb4 100644 (file)
           <includeTestSourceDirectory>true</includeTestSourceDirectory>
           <sourceDirectory>${project.basedir}</sourceDirectory>
           <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
-          <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/${jmxGeneratorPath}\/,**\/${salGeneratorPath}\/</excludes>
+          <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/${jmxGeneratorPath}\/,**\/${salGeneratorPath}\/,**\/netconf\/test\/tool\/Main.java</excludes>
         </configuration>
         <dependencies>
           <dependency>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.