ovsdb enable checkstyle on error
[ovsdb.git] / southbound / southbound-impl / src / main / java / org / opendaylight / ovsdb / southbound / ovsdb / transact / TerminationPointCreateCommand.java
index 1bef344ac087c91bd1249210e7a5577614f48a03..968eeaee049ba6eae5fefd313e6ea3dbfc96389d 100644 (file)
@@ -8,7 +8,11 @@
 package org.opendaylight.ovsdb.southbound.ovsdb.transact;
 
 import static org.opendaylight.ovsdb.lib.operations.Operations.op;
+import static org.opendaylight.ovsdb.southbound.SouthboundUtil.schemaMismatchLog;
 
+import com.google.common.base.Optional;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.CheckedFuture;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -16,9 +20,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.concurrent.ExecutionException;
 import java.util.Set;
-
+import java.util.concurrent.ExecutionException;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
@@ -56,10 +59,6 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Optional;
-import com.google.common.collect.Sets;
-import com.google.common.util.concurrent.CheckedFuture;
-
 public class TerminationPointCreateCommand implements TransactCommand {
 
     private static final Logger LOG = LoggerFactory.getLogger(TerminationPointCreateCommand.class);
@@ -74,7 +73,8 @@ public class TerminationPointCreateCommand implements TransactCommand {
     @Override
     public void execute(TransactionBuilder transaction, BridgeOperationalState state,
                         Collection<DataTreeModification<Node>> modifications) {
-        execute(transaction, state, TransactUtils.extractCreated(modifications, OvsdbTerminationPointAugmentation.class),
+        execute(transaction, state,
+                TransactUtils.extractCreated(modifications, OvsdbTerminationPointAugmentation.class),
                 TransactUtils.extractCreatedOrUpdated(modifications, Node.class));
     }
 
@@ -92,7 +92,7 @@ public class TerminationPointCreateCommand implements TransactCommand {
                     state.getBridgeTerminationPoint(terminationPointIid);
             if (!terminationPointOptional.isPresent()) {
                 // Configure interface
-                String interfaceUuid = "Interface_" + SouthboundMapper.getRandomUUID();
+                String interfaceUuid = "Interface_" + SouthboundMapper.getRandomUuid();
                 Interface ovsInterface =
                         TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), Interface.class);
                 createInterface(terminationPoint, ovsInterface);
@@ -101,7 +101,7 @@ public class TerminationPointCreateCommand implements TransactCommand {
                 stampInstanceIdentifier(transaction, entry.getKey(), ovsInterface.getName());
 
                 // Configure port with the above interface details
-                String portUuid = "Port_" + SouthboundMapper.getRandomUUID();
+                String portUuid = "Port_" + SouthboundMapper.getRandomUuid();
                 Port port = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), Port.class);
                 createPort(terminationPoint, port, interfaceUuid);
                 transaction.add(op.insert(port).withId(portUuid));
@@ -247,7 +247,7 @@ public class TerminationPointCreateCommand implements TransactCommand {
                 }
             }
         } catch (SchemaVersionMismatchException e) {
-            LOG.debug("lldp column for Interface Table unsupported for this version of ovsdb schema", e);
+            schemaMismatchLog("lldp", "Interface", e);
         }
     }
 
@@ -265,7 +265,7 @@ public class TerminationPointCreateCommand implements TransactCommand {
                 }
             }
         } catch (SchemaVersionMismatchException e) {
-            LOG.debug("bfd column for Interface Table unsupported for this version of ovsdb schema", e);
+            schemaMismatchLog("bfd", "Interface", e);
         }
     }
 
@@ -317,7 +317,7 @@ public class TerminationPointCreateCommand implements TransactCommand {
         if (terminationPoint.getVlanMode() != null) {
             Set<String> portVlanMode = new HashSet<>();
             VlanMode modelVlanMode = terminationPoint.getVlanMode();
-            portVlanMode.add(SouthboundConstants.VLANMODES.values()[modelVlanMode.getIntValue() - 1].getMode());
+            portVlanMode.add(SouthboundConstants.VlanModes.values()[modelVlanMode.getIntValue() - 1].getMode());
             port.setVlanMode(portVlanMode);
         }
     }