Clean up logging
[netvirt.git] / plugin / src / main / java / org / opendaylight / ovsdb / plugin / impl / ConfigurationServiceImpl.java
index e1b66403f7916a9dc46e31bd818ae63c70f4637e..8a8c3d5e948e3844e983d79ea4ebad5cf6e07458 100644 (file)
@@ -16,24 +16,14 @@ import java.net.UnknownHostException;
 import java.util.AbstractMap;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ExecutionException;
 
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.eclipse.osgi.framework.console.CommandProvider;
-import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
-import org.opendaylight.controller.sal.connection.ConnectionConstants;
-import org.opendaylight.controller.sal.core.Node;
-import org.opendaylight.controller.sal.core.NodeConnector;
-import org.opendaylight.controller.sal.networkconfig.bridgedomain.ConfigConstants;
-import org.opendaylight.controller.sal.networkconfig.bridgedomain.IPluginInBridgeDomainConfigService;
-import org.opendaylight.controller.sal.utils.Status;
-import org.opendaylight.controller.sal.utils.StatusCode;
+import org.opendaylight.ovsdb.plugin.api.Status;
+import org.opendaylight.ovsdb.plugin.api.StatusCode;
 import org.opendaylight.ovsdb.lib.OvsdbClient;
 import org.opendaylight.ovsdb.lib.error.SchemaVersionMismatchException;
 import org.opendaylight.ovsdb.lib.notation.Column;
@@ -52,7 +42,6 @@ import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
 import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
 import org.opendaylight.ovsdb.lib.schema.TableSchema;
 import org.opendaylight.ovsdb.lib.schema.typed.TypedBaseTable;
-import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
 import org.opendaylight.ovsdb.plugin.api.Connection;
 import org.opendaylight.ovsdb.plugin.api.OvsVswitchdSchemaConstants;
 import org.opendaylight.ovsdb.plugin.api.OvsdbConfigurationService;
@@ -62,35 +51,25 @@ import org.opendaylight.ovsdb.plugin.api.StatusWithUuid;
 import org.opendaylight.ovsdb.plugin.error.OvsdbPluginException;
 import org.opendaylight.ovsdb.schema.openvswitch.Bridge;
 import org.opendaylight.ovsdb.schema.openvswitch.Controller;
-import org.opendaylight.ovsdb.schema.openvswitch.Interface;
-import org.opendaylight.ovsdb.schema.openvswitch.Manager;
 import org.opendaylight.ovsdb.schema.openvswitch.OpenVSwitch;
 import org.opendaylight.ovsdb.schema.openvswitch.Port;
+import org.opendaylight.ovsdb.utils.config.ConfigProperties;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import com.google.common.util.concurrent.ListenableFuture;
 
-public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigService,
-                                                 OvsdbConfigurationService,
-                                                 OvsdbConfigService,
-                                                 CommandProvider
+public class ConfigurationServiceImpl implements OvsdbConfigurationService
 {
-    private static final Logger logger = LoggerFactory
-            .getLogger(ConfigurationServiceImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ConfigurationServiceImpl.class);
 
     OvsdbConnectionService connectionService;
     OvsdbInventoryService ovsdbInventoryService;
-    boolean forceConnect = false;
-    protected static final String OPENFLOW_10 = "1.0";
     protected static final String OPENFLOW_13 = "1.3";
 
     void init() {
@@ -111,14 +90,6 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
      *
      */
     void start() {
-        registerWithOSGIConsole();
-    }
-
-    private void registerWithOSGIConsole() {
-        BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass())
-                .getBundleContext();
-        bundleContext.registerService(CommandProvider.class.getName(), this,
-                null);
     }
 
     /**
@@ -135,7 +106,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
     }
 
     public void unsetConnectionServiceInternal(OvsdbConnectionService connectionService) {
-        if (this.connectionService == connectionService) {
+        if (this.connectionService.equals(connectionService)) {
             this.connectionService = null;
         }
     }
@@ -145,23 +116,11 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
     }
 
     public void unsetInventoryServiceInternal(OvsdbInventoryService ovsdbInventoryService) {
-        if (this.ovsdbInventoryService == ovsdbInventoryService) {
+        if (this.ovsdbInventoryService.equals(ovsdbInventoryService)) {
             this.ovsdbInventoryService = null;
         }
     }
 
-    private IClusterGlobalServices clusterServices;
-
-    public void setClusterServices(IClusterGlobalServices i) {
-        this.clusterServices = i;
-    }
-
-    public void unsetClusterServices(IClusterGlobalServices i) {
-        if (this.clusterServices == i) {
-            this.clusterServices = null;
-        }
-    }
-
     private Connection getConnection (Node node) {
         Connection connection = connectionService.getConnection(node);
         if (connection == null || !connection.getClient().isActive()) {
@@ -176,7 +135,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
      * a Port row.
      */
     private void handleSpecialInsertCase(OvsdbClient client, String databaseName,
-            String tableName, String uuid, Row<GenericTableSchema> row, TransactionBuilder transactionBuilder) {
+            String tableName, Row<GenericTableSchema> row, TransactionBuilder transactionBuilder) {
         Port port = client.getTypedRowWrapper(Port.class, null);
         if (databaseName.equals(OvsVswitchdSchemaConstants.DATABASE_NAME) && tableName.equals(port.getSchema().getName())) {
             port = client.getTypedRowWrapper(Port.class, row);
@@ -211,7 +170,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
          * the older API (such as by inserting a mandatory Interface row automatically upon inserting
          * a Port row.
          */
-        handleSpecialInsertCase(client, databaseName, childTable, namedUuid, row, transactionBuilder);
+        handleSpecialInsertCase(client, databaseName, childTable, row, transactionBuilder);
     }
 
     /*
@@ -221,13 +180,17 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
      * plugin layer.
      */
     public String getSpecialCaseParentUUID(Node node, String databaseName, String childTableName) {
-        if (!databaseName.equals(OvsVswitchdSchemaConstants.DATABASE_NAME)) return null;
+        if (!databaseName.equals(OvsVswitchdSchemaConstants.DATABASE_NAME)) {
+            return null;
+        }
         String[] parentColumn = OvsVswitchdSchemaConstants.getParentColumnToMutate(childTableName);
         if (parentColumn != null && parentColumn[0].equals(OvsVswitchdSchemaConstants.DATABASE_NAME)) {
             Connection connection = connectionService.getConnection(node);
             OpenVSwitch openVSwitch = connection.getClient().getTypedRowWrapper(OpenVSwitch.class, null);
             ConcurrentMap<String, Row> row = this.getRows(node, openVSwitch.getSchema().getName());
-            if (row == null || row.size() == 0) return null;
+            if (row == null || row.size() == 0) {
+                return null;
+            }
             return (String)row.keySet().toArray()[0];
         }
         return null;
@@ -250,18 +213,19 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
         Connection connection = connectionService.getConnection(node);
         OvsdbClient client = connection.getClient();
 
-        if (parentUuid == null) {
-            parentUuid = this.getSpecialCaseParentUUID(node, OvsVswitchdSchemaConstants.DATABASE_NAME, tableName);
+        String myParentUuid = parentUuid;
+        if (myParentUuid == null) {
+            myParentUuid = this.getSpecialCaseParentUUID(node, OvsVswitchdSchemaConstants.DATABASE_NAME, tableName);
         }
-        logger.debug("insertRow Connection : {} Table : {} ParentTable : {} Parent Column: {} Parent UUID : {} Row : {}",
-                     client.getConnectionInfo(), tableName, parentColumn[0], parentColumn[1], parentUuid, row);
+        LOG.debug("insertRow Connection : {} Table : {} ParentTable : {} Parent Column: {} Parent UUID : {} Row : {}",
+                client.getConnectionInfo(), tableName, parentColumn[0], parentColumn[1], myParentUuid, row);
 
         DatabaseSchema dbSchema = client.getDatabaseSchema(OvsVswitchdSchemaConstants.DATABASE_NAME);
         TransactionBuilder transactionBuilder = client.transactBuilder(dbSchema);
 
         String namedUuid = "Transaction_"+ tableName;
         this.processTypedInsertTransaction(client, OvsVswitchdSchemaConstants.DATABASE_NAME, tableName,
-                                parentColumn[0], parentUuid, parentColumn[1], namedUuid,
+                                parentColumn[0], myParentUuid, parentColumn[1], namedUuid,
                                 row, transactionBuilder);
 
         ListenableFuture<List<OperationResult>> results = transactionBuilder.execute();
@@ -326,7 +290,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
             parentColumn = new String[]{null, null};
         }
 
-        logger.debug("deleteRow : Connection : {} databaseName : {} tableName : {} Uuid : {} ParentTable : {} ParentColumn : {}",
+        LOG.debug("deleteRow : Connection : {} databaseName : {} tableName : {} Uuid : {} ParentTable : {} ParentColumn : {}",
                 client.getConnectionInfo(), databaseName, tableName, uuid, parentColumn[0], parentColumn[1]);
 
         DatabaseSchema dbSchema = client.getDatabaseSchema(databaseName);
@@ -347,8 +311,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
                 }
             }
         } catch (InterruptedException | ExecutionException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+            LOG.error("Error in deleteRow() {} {}", node, tableName, e);
         }
 
         return new Status(StatusCode.SUCCESS);
@@ -365,7 +328,9 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
     @Deprecated
     public Row getRow(Node node, String tableName, String uuid) {
         Map<String, Row> ovsTable = ovsdbInventoryService.getTableCache(node, OvsVswitchdSchemaConstants.DATABASE_NAME,  tableName);
-        if (ovsTable == null) return null;
+        if (ovsTable == null) {
+            return null;
+        }
         return ovsTable.get(uuid);
     }
 
@@ -378,7 +343,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
     private InetAddress getControllerIPAddress(Connection connection) {
         InetAddress controllerIP = null;
 
-        String addressString = getProperty(this.getClass(), "ovsdb.controller.address");
+        String addressString = ConfigProperties.getProperty(this.getClass(), "ovsdb.controller.address");
 
         if (addressString != null) {
             try {
@@ -387,11 +352,11 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
                     return controllerIP;
                 }
             } catch (UnknownHostException e) {
-                logger.error("Host {} is invalid", addressString);
+                LOG.error("Host {} is invalid", addressString);
             }
         }
 
-        addressString = getProperty(this.getClass(), "of.address");
+        addressString = ConfigProperties.getProperty(this.getClass(), "of.address");
 
         if (addressString != null) {
             try {
@@ -400,7 +365,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
                     return controllerIP;
                 }
             } catch (UnknownHostException e) {
-                logger.error("Host {} is invalid", addressString);
+                LOG.error("Host {} is invalid", addressString);
             }
         }
 
@@ -408,7 +373,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
             controllerIP = connection.getClient().getConnectionInfo().getLocalAddress();
             return controllerIP;
         } catch (Exception e) {
-            logger.debug("Invalid connection provided to getControllerIPAddresses", e);
+            LOG.debug("Invalid connection provided to getControllerIPAddresses", e);
         }
         return controllerIP;
     }
@@ -416,35 +381,18 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
     private short getControllerOFPort() {
         Short defaultOpenFlowPort = 6633;
         Short openFlowPort = defaultOpenFlowPort;
-        String portString = getProperty(this.getClass(), "of.listenPort");
+        String portString = ConfigProperties.getProperty(this.getClass(), "of.listenPort");
         if (portString != null) {
             try {
                 openFlowPort = Short.decode(portString).shortValue();
             } catch (NumberFormatException e) {
-                logger.warn("Invalid port:{}, use default({})", portString,
+                LOG.warn("Invalid port:{}, use default({})", portString,
                         openFlowPort);
             }
         }
         return openFlowPort;
     }
 
-    // TODO: move getProperty() to a common module
-    private static String getProperty(Class<?> classParam, final String propertyStr) {
-        String value = null;
-        Bundle bundle = FrameworkUtil.getBundle(classParam);
-
-        if (bundle != null) {
-            BundleContext bundleContext = bundle.getBundleContext();
-            if (bundleContext != null) {
-                value = bundleContext.getProperty(propertyStr);
-            }
-        }
-        if (value == null) {
-            value = System.getProperty(propertyStr);
-        }
-        return value;
-    }
-
     private UUID getCurrentControllerUuid(Node node, final String controllerTableName, final String target) {
         ConcurrentMap<String, Row> rows = this.getRows(node, controllerTableName);
 
@@ -476,9 +424,6 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
 
             String ofVersion = System.getProperty("ovsdb.of.version", OPENFLOW_13);
             switch (ofVersion) {
-                case OPENFLOW_10:
-                    protocols.add("OpenFlow10");
-                    break;
                 case OPENFLOW_13:
                     //fall through
                 default:
@@ -488,11 +433,11 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
             bridge.setProtocols(protocols);
             updateOperationStatus = this.updateRow(node, bridge.getSchema().getName(),
                                                    null, bridgeUUID, bridge.getRow());
-            logger.debug("Bridge {} updated to {} with Status {}", bridgeUUID,
-                         protocols.toArray()[0],updateOperationStatus);
+            LOG.debug("Bridge {} updated to {} with Status {}", bridgeUUID,
+                    protocols.toArray()[0], updateOperationStatus);
 
         } catch (SchemaVersionMismatchException e){
-            logger.debug(e.toString());
+            LOG.debug(e.toString());
         }
 
         // If we fail to update the protocols
@@ -529,7 +474,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
 
     public Boolean setBridgeOFController(Node node, String bridgeIdentifier) {
         if (connectionService == null) {
-            logger.error("Couldn't refer to the ConnectionService");
+            LOG.error("Couldn't refer to the ConnectionService");
             return false;
         }
 
@@ -545,7 +490,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
                 }
             }
         } catch(Exception e) {
-            logger.error("Error in setBridgeOFController()",e);
+            LOG.error("Error in setBridgeOFController()", e);
         }
         return false;
     }
@@ -553,17 +498,23 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
     @Override
     public <T extends TypedBaseTable<?>> String getTableName(Node node, Class<T> typedClass) {
         Connection connection = connectionService.getConnection(node);
-        if (connection == null) return null;
+        if (connection == null) {
+            return null;
+        }
         OvsdbClient client = connection.getClient();
         TypedBaseTable<?> typedTable = client.getTypedRowWrapper(typedClass, null);
-        if (typedTable == null) return null;
+        if (typedTable == null) {
+            return null;
+        }
         return typedTable.getSchema().getName();
     }
 
     @Override
     public <T extends TypedBaseTable<?>> T getTypedRow(Node node, Class<T> typedClass, Row row) {
         Connection connection = connectionService.getConnection(node);
-        if (connection == null) return null;
+        if (connection == null) {
+            return null;
+        }
         OvsdbClient client = connection.getClient();
         return (T)client.getTypedRowWrapper(typedClass, row);
     }
@@ -571,610 +522,20 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
     @Override
     public <T extends TypedBaseTable<?>> T createTypedRow(Node node, Class<T> typedClass) {
         Connection connection = connectionService.getConnection(node);
-        if (connection == null) return null;
-        OvsdbClient client = connection.getClient();
-        return client.createTypedRowWrapper(typedClass);
-    }
-
-    public void _ovsconnect (CommandInterpreter ci) {
-        String bridgeName = ci.nextArgument();
-        if (bridgeName == null) {
-            ci.println("Please enter Bridge Name");
-            return;
-        }
-
-        String ovsdbserver = ci.nextArgument();
-        if (ovsdbserver == null) {
-            ci.println("Please enter valid IP-Address");
-            return;
-        }
-        try {
-            InetAddress.getByName(ovsdbserver);
-        }  catch (UnknownHostException e) {
-            logger.error("Unable to resolve " + ovsdbserver, e);
-            ci.println("Please enter valid IP-Address");
-            return;
-        }
-        String port = ci.nextArgument();
-        if (port == null) {
-            port = "6634";
-        }
-
-        ci.println("connecting to ovsdb server : "+ovsdbserver+":"+port+" ... ");
-        Map<ConnectionConstants, String> params = new HashMap<ConnectionConstants, String>();
-        params.put(ConnectionConstants.ADDRESS, ovsdbserver);
-        params.put(ConnectionConstants.PORT, port);
-        Node node = connectionService.connect(bridgeName, params);
-        if (node != null) ci.println("Node Name: "+node.toString());
-        else ci.println("Could not connect to Node");
-    }
-
-    public void _addBridge (CommandInterpreter ci) {
-        String nodeName = ci.nextArgument();
-        if (nodeName == null) {
-            ci.println("Please enter Node Name");
-            return;
-        }
-        String bridgeName = ci.nextArgument();
-        if (bridgeName == null) {
-            ci.println("Please enter Bridge Name");
-            return;
-        }
-        Status status;
-
-        Node node = Node.fromString(nodeName);
-        if (node == null) {
-            ci.println("Invalid Node");
-            return;
-        }
-        status = this.createBridgeDomain(node, bridgeName, null);
-        ci.println("Bridge creation status : "+status.toString());
-    }
-
-    public void _getBridgeDomains (CommandInterpreter ci) {
-        String nodeName = ci.nextArgument();
-        if (nodeName == null) {
-            ci.println("Please enter Node Name");
-            return;
-        }
-
-        List<String> brlist = new ArrayList<String>();
-        Node node = Node.fromString(nodeName);
-        brlist = this.getBridgeDomains(node);
-        if (node == null) {
-            ci.println("Invalid Node");
-            return;
-        }
-        ci.println("Existing Bridges: "+brlist.toString());
-    }
-
-    public void _deleteBridgeDomain (CommandInterpreter ci) {
-        String nodeName = ci.nextArgument();
-        if (nodeName == null) {
-            ci.println("Please enter Node Name");
-            return;
-        }
-        String bridgeName = ci.nextArgument();
-        if (bridgeName == null) {
-            ci.println("Please enter Bridge Name");
-            return;
-        }
-        Status status;
-        Node node = Node.fromString(nodeName);
-        if (node == null) {
-            ci.println("Invalid Node");
-            return;
-        }
-        status = this.deleteBridgeDomain(node, bridgeName);
-        ci.println("Bridge deletion status : "+status.toString());
-    }
-
-    public void _addPort (CommandInterpreter ci) {
-        String nodeName = ci.nextArgument();
-        if (nodeName == null) {
-            ci.println("Please enter Node Name");
-            return;
-        }
-
-        String bridgeName = ci.nextArgument();
-        if (bridgeName == null) {
-            ci.println("Please enter Bridge Name");
-            return;
-        }
-
-        String portName = ci.nextArgument();
-        if (portName == null) {
-            ci.println("Please enter Port Name");
-            return;
-        }
-
-        String type = ci.nextArgument();
-
-        Map<String, String> configs = new HashMap<String, String>();
-        while(true) {
-            String configKey = ci.nextArgument();
-            if (configKey == null) break;
-            String configValue = ci.nextArgument();
-            if (configValue == null) break;
-            configs.put(configKey, configValue);
-        }
-
-        Map<ConfigConstants, Object> customConfigs = null;
-        if (type != null) {
-            customConfigs = new HashMap<ConfigConstants, Object>();
-            customConfigs.put(ConfigConstants.TYPE, type);
-        }
-
-        if (configs.size() > 0) {
-            if (customConfigs == null) customConfigs = new HashMap<ConfigConstants, Object>();
-            customConfigs.put(ConfigConstants.CUSTOM, configs);
-            ci.println(customConfigs.toString());
-        }
-        Status status;
-        Node node = Node.fromString(nodeName);
-        if (node == null) {
-            ci.println("Invalid Node");
-            return;
-        }
-        status = this.addPort(node, bridgeName, portName, customConfigs);
-        ci.println("Port creation status : "+status.toString());
-    }
-
-    public void _deletePort (CommandInterpreter ci) {
-        String nodeName = ci.nextArgument();
-        if (nodeName == null) {
-            ci.println("Please enter Node Name");
-            return;
-        }
-
-        String bridgeName = ci.nextArgument();
-        if (bridgeName == null) {
-            ci.println("Please enter Bridge Name");
-            return;
-        }
-
-        String portName = ci.nextArgument();
-        if (portName == null) {
-            ci.println("Please enter Port Name");
-            return;
-        }
-
-        Status status;
-        Node node = Node.fromString(nodeName);
-        if (node == null) {
-            ci.println("Invalid Node");
-            return;
-        }
-        status = this.deletePort(node, bridgeName, portName);
-        ci.println("Port deletion status : "+status.toString());
-    }
-
-    public void _addPortVlan (CommandInterpreter ci) {
-        String nodeName = ci.nextArgument();
-        if (nodeName == null) {
-            ci.println("Please enter Node Name");
-            return;
-        }
-
-        String bridgeName = ci.nextArgument();
-        if (bridgeName == null) {
-            ci.println("Please enter Bridge Name");
-            return;
-        }
-
-        String portName = ci.nextArgument();
-        if (portName == null) {
-            ci.println("Please enter Port Name");
-            return;
-        }
-
-        String vlan = ci.nextArgument();
-        if (vlan == null) {
-            ci.println("Please enter Valid Vlan");
-            return;
-        } else {
-            try {
-            Integer.parseInt(vlan);
-            } catch (NumberFormatException e) {
-                ci.println("Please enter Valid Vlan");
-                return;
-            }
-        }
-
-        Map<ConfigConstants, Object> configs = new HashMap<ConfigConstants, Object>();
-        configs.put(ConfigConstants.TYPE, "VLAN");
-        configs.put(ConfigConstants.VLAN, vlan);
-
-        Status status;
-        Node node = Node.fromString(nodeName);
-        if (node == null) {
-            ci.println("Invalid Node");
-            return;
-        }
-        status = this.addPort(node, bridgeName, portName, configs);
-        ci.println("Port creation status : "+status.toString());
-    }
-
-    public void _addTunnel (CommandInterpreter ci) {
-        String nodeName = ci.nextArgument();
-        if (nodeName == null) {
-            ci.println("Please enter Node Name");
-            return;
-        }
-
-        String bridgeName = ci.nextArgument();
-        if (bridgeName == null) {
-            ci.println("Please enter Bridge Name");
-            return;
-        }
-
-        String portName = ci.nextArgument();
-        if (portName == null) {
-            ci.println("Please enter Port Name");
-            return;
-        }
-
-        String tunnelType = ci.nextArgument();
-        if (tunnelType == null) {
-            ci.println("Please enter Tunnel Type");
-            return;
-        }
-
-        String remoteIp = ci.nextArgument();
-        if (remoteIp == null) {
-            ci.println("Please enter valid Remote IP Address");
-            return;
-        }
-
-        try {
-            InetAddress.getByName(remoteIp);
-        }  catch (Exception e) {
-            logger.error("Unable to resolve " + remoteIp, e);
-            ci.println("Please enter valid Remote IP Address");
-            return;
-        }
-
-        Map<ConfigConstants, Object> configs = new HashMap<ConfigConstants, Object>();
-        configs.put(ConfigConstants.TYPE, "TUNNEL");
-        configs.put(ConfigConstants.TUNNEL_TYPE, tunnelType);
-        configs.put(ConfigConstants.DEST_IP, remoteIp);
-
-        Status status;
-        Node node = Node.fromString(nodeName);
-        if (node == null) {
-            ci.println("Invalid Node");
-            return;
-        }
-        status = this.addPort(node, bridgeName, portName, configs);
-        ci.println("Port creation status : "+status.toString());
-    }
-
-    public void _printCache (CommandInterpreter ci) {
-        String nodeName = ci.nextArgument();
-        if (nodeName == null) {
-            ci.println("Please enter Node Name");
-            return;
-        }
-        Node node = Node.fromString(nodeName);
-        if (node == null) {
-            ci.println("Invalid Node");
-            return;
-        }
-        ovsdbInventoryService.printCache(node);
-    }
-
-    public void _forceConnect (CommandInterpreter ci) {
-        String force = ci.nextArgument();
-        if (force.equalsIgnoreCase("YES")) {
-            forceConnect = true;
-        }
-        else if (force.equalsIgnoreCase("NO")) {
-            forceConnect = false;
-        }
-        else {
-            ci.println("Please enter YES or NO.");
-        }
-        ci.println("Current ForceConnect State : "+forceConnect);
-    }
-
-    @Override
-    public String getHelp() {
-        StringBuilder help = new StringBuilder();
-        help.append("---OVSDB CLI---\n");
-        help.append("\t ovsconnect <ConnectionName> <ip-address>                        - Connect to OVSDB\n");
-        help.append("\t addBridge <Node> <BridgeName>                                   - Add Bridge\n");
-        help.append("\t getBridgeDomains <Node>                                         - Get Bridges\n");
-        help.append("\t deleteBridgeDomain <Node> <BridgeName>                          - Delete a Bridge\n");
-        help.append("\t addPort <Node> <BridgeName> <PortName> <type> <options pairs>   - Add Port\n");
-        help.append("\t deletePort <Node> <BridgeName> <PortName>                       - Delete Port\n");
-        help.append("\t addPortVlan <Node> <BridgeName> <PortName> <vlan>               - Add Port, Vlan\n");
-        help.append("\t addTunnel <Node> <Bridge> <Port> <tunnel-type> <remote-ip>      - Add Tunnel\n");
-        help.append("\t printCache <Node>                                               - Prints Table Cache");
-        return help.toString();
-    }
-
-
-    /**
-     * Add a new bridge
-     * @param node Node serving this configuration service
-     * @param bridgeIdentifier String representation of a Bridge Connector
-     * @return Bridge Connector configurations
-     */
-    @Override
-    @Deprecated
-    public Status createBridgeDomain(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> configs) {
-        Connection connection = connectionService.getConnection(node);
-        OvsdbClient client = connection.getClient();
-        Bridge bridge = client.createTypedRowWrapper(Bridge.class);
-        bridge.setName(bridgeIdentifier);
-
-        String ovsTableUuid = this.getSpecialCaseParentUUID(node, OvsVswitchdSchemaConstants.DATABASE_NAME, bridge.getSchema().getName());
-        return this.insertRow(node, bridge.getSchema().getName(), ovsTableUuid, bridge.getRow());
-    }
-
-    /**
-     * Create a Port Attached to a Bridge
-     * Ex. ovs-vsctl add-port br0 vif0
-     * @param node Node serving this configuration service
-     * @param bridgeIdentifier String representation of a Bridge Domain
-     * @param portIdentifier String representation of a user defined Port Name
-     */
-    @Override
-    @Deprecated
-    public Status addPort(Node node, String bridgeIdentifier, String portIdentifier,
-                          Map<ConfigConstants, Object> configs) {
-        Connection connection = connectionService.getConnection(node);
-        OvsdbClient client = connection.getClient();
-
-        Bridge bridge = client.getTypedRowWrapper(Bridge.class, null);
-        ConcurrentMap<String, Row> rows = this.getRows(node, bridge.getSchema().getName());
-        if (rows == null || rows.size() == 0) {
-            return new Status(StatusCode.NOTFOUND);
-        }
-        for (String bridgeUuid : rows.keySet()) {
-            Row bridgeRow = rows.get(bridgeUuid);
-            bridge = client.getTypedRowWrapper(Bridge.class, bridgeRow);
-            if (bridge.getName().equals(bridgeIdentifier)) break;
-        }
-        if (bridge.getName() == null || !bridge.getName().equals(bridgeIdentifier)) {
-            return new Status(StatusCode.NOTFOUND);
-        }
-
-        Map<String, String> options = null;
-        String type = null;
-        Set<Long> tags = null;
-        if (configs != null) {
-            type = (String) configs.get(ConfigConstants.TYPE);
-            Map<String, String> customConfigs = (Map<String, String>) configs.get(ConfigConstants.CUSTOM);
-            if (customConfigs != null) {
-                options = new HashMap<String, String>();
-                for (String customConfig : customConfigs.keySet()) {
-                    options.put(customConfig, customConfigs.get(customConfig));
-                }
-            }
-        }
-
-        if (type != null) {
-            logger.debug("Port type : " + type);
-            if (type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.VLAN.name())) {
-                tags = new HashSet<Long>();
-                tags.add(Long.parseLong((String)configs.get(ConfigConstants.VLAN)));
-            }
-        }
-
-        Port port = client.createTypedRowWrapper(Port.class);
-        port.setName(portIdentifier);
-        if (tags != null) port.setTag(tags);
-        StatusWithUuid portStatus = this.insertRow(node, port.getSchema().getName(), bridge.getUuid().toString(), port.getRow());
-
-        if (!portStatus.isSuccess()) return portStatus;
-        // Ugly hack by adding a sleep for the Monitor Update to catch up.
-        // TODO : Remove this once the Select operation is in place.
-        // We are currently relying on the local Cache for any GET operation and that might fail if we try to
-        // fetch the last installed entry. Hence we need the Select operation to work.
-
-        try {
-            Thread.sleep(2000);
-        } catch (InterruptedException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-
-        Interface interfaceRow = client.createTypedRowWrapper(Interface.class);
-        ConcurrentMap<String, Row> intfRows = this.getRows(node, interfaceRow.getSchema().getName());
-        if (intfRows == null || intfRows.size() == 0) {
-            return new Status(StatusCode.NOTFOUND);
-        }
-        for (String intfUuid : intfRows.keySet()) {
-            Row intfRow = intfRows.get(intfUuid);
-            interfaceRow = client.getTypedRowWrapper(Interface.class, intfRow);
-            if (interfaceRow == null || interfaceRow.getName() == null) continue;
-            if (interfaceRow.getName().equals(portIdentifier)) break;
-        }
-        if (interfaceRow.getName() == null || !interfaceRow.getName().equals(portIdentifier)) {
-            return new Status(StatusCode.NOTFOUND);
-        }
-        Interface updateInterface = client.createTypedRowWrapper(Interface.class);
-        if (type != null) {
-            logger.debug("Interface type : " + type);
-            if (type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.TUNNEL.name())) {
-                updateInterface.setType((String)configs.get(ConfigConstants.TUNNEL_TYPE));
-                if (options == null) options = new HashMap<String, String>();
-                options.put("remote_ip", (String)configs.get(ConfigConstants.DEST_IP));
-            } else if (type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.PATCH.name()) ||
-                       type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.INTERNAL.name())) {
-                updateInterface.setType(type.toLowerCase());
-            }
-        }
-        if (options != null) {
-            updateInterface.setOptions(options);
-        }
-
-        Status intfStatus = null;
-        intfStatus = this.updateRow(node, interfaceRow.getSchema().getName(), portStatus.getUuid().toString(),
-                                    interfaceRow.getUuid().toString(), updateInterface.getRow());
-
-        if (intfStatus.isSuccess()) return portStatus;
-        return intfStatus;
-    }
-
-    /**
-     * Implements the OVS Connection for Managers
-     *
-     * @param node Node serving this configuration service
-     * @param managerip String Representing IP and connection types
-     */
-    @SuppressWarnings("unchecked")
-    @Deprecated
-    public boolean setManager(Node node, String managerip) {
-        Connection connection = connectionService.getConnection(node);
-        OvsdbClient client = connection.getClient();
-        Manager manager = client.createTypedRowWrapper(Manager.class);
-        manager.setTarget(ImmutableSet.of(managerip));
-
-        OpenVSwitch openVSwitch = connection.getClient().getTypedRowWrapper(OpenVSwitch.class, null);
-        ConcurrentMap<String, Row> row = this.getRows(node, openVSwitch.getSchema().getName());
-        if (row == null || row.size() == 0) {
-            return false;
-        }
-        String ovsTableUuid = (String)row.keySet().toArray()[0];
-
-        Status status = this.insertRow(node, manager.getSchema().getName(), ovsTableUuid, manager.getRow());
-        return status.isSuccess();
-    }
-
-    @Override
-    @Deprecated
-    public Status addBridgeDomainConfig(Node node, String bridgeIdentfier,
-            Map<ConfigConstants, Object> configs) {
-        String mgmt = (String)configs.get(ConfigConstants.MGMT);
-        if (mgmt != null) {
-            if (setManager(node, mgmt)) return new Status(StatusCode.SUCCESS);
-        }
-        return new Status(StatusCode.BADREQUEST);
-    }
-
-    @Override
-    @Deprecated
-    public Status deletePort(Node node, String bridgeIdentifier, String portIdentifier) {
-        Connection connection = connectionService.getConnection(node);
-        OvsdbClient client = connection.getClient();
-
-        Port port = client.getTypedRowWrapper(Port.class, null);
-        ConcurrentMap<String, Row> rows = this.getRows(node, port.getSchema().getName());
-        if (rows == null || rows.size() == 0) {
-            return new Status(StatusCode.NOTFOUND);
-        }
-        for (String portUuid : rows.keySet()) {
-            Row portRow = rows.get(portUuid);
-            port = client.getTypedRowWrapper(Port.class, portRow);
-            if (port.getName().equals(portIdentifier)) break;
-        }
-        if (port.getName() == null || !port.getName().equals(portIdentifier)) {
-            return new Status(StatusCode.NOTFOUND);
-        }
-        return this.deleteRow(node, port.getSchema().getName(), port.getUuid().toString());
-    }
-
-    @Override
-    @Deprecated
-    public Status deleteBridgeDomain(Node node, String bridgeIdentifier) {
-        Connection connection = connectionService.getConnection(node);
-        OvsdbClient client = connection.getClient();
-
-        Bridge bridge = client.getTypedRowWrapper(Bridge.class, null);
-        ConcurrentMap<String, Row> rows = this.getRows(node, bridge.getSchema().getName());
-        if (rows == null || rows.size() == 0) {
-            return new Status(StatusCode.NOTFOUND);
-        }
-        for (String bridgeUuid : rows.keySet()) {
-            Row bridgeRow = rows.get(bridgeUuid);
-            bridge = client.getTypedRowWrapper(Bridge.class, bridgeRow);
-            if (bridge.getName().equals(bridgeIdentifier)) break;
-        }
-        if (bridge.getName() == null || !bridge.getName().equals(bridgeIdentifier)) {
-            return new Status(StatusCode.NOTFOUND);
-        }
-        return this.deleteRow(node, bridge.getSchema().getName(), bridge.getUuid().toString());
-    }
-
-    @Override
-    public List<String> getBridgeDomains(Node node) {
-        if (connectionService == null) {
-            logger.error("Couldn't refer to the ConnectionService");
+        if (connection == null) {
             return null;
         }
-
-        Connection connection = connectionService.getConnection(node);
-        Bridge bridge = connection.getClient().getTypedRowWrapper(Bridge.class, null);
-        List<String> brlist = new ArrayList<String>();
-        Map<String, Row> brTableCache = ovsdbInventoryService.getTableCache(node, OvsVswitchdSchemaConstants.DATABASE_NAME, bridge.getSchema().getName());
-        if(brTableCache != null){
-            for (String uuid : brTableCache.keySet()) {
-                bridge = connection.getClient().getTypedRowWrapper(Bridge.class, brTableCache.get(uuid));
-                brlist.add(bridge.getName());
-            }
-        }
-        return brlist;
-    }
-
-    @Override
-    public NodeConnector getNodeConnector(Node arg0, String arg1, String arg2) {
-        return null;
-    }
-
-    @Override
-    @Deprecated
-    public Status addPortConfig(Node node, String bridgeIdentifier, String portIdentifier,
-            Map<ConfigConstants, Object> configs) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    @Deprecated
-    public Node getBridgeDomainNode(Node node, String bridgeIdentifier) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    @Deprecated
-    public Map<ConfigConstants, Object> getPortConfigs(Node node, String bridgeIdentifier,
-            String portIdentifier) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    @Deprecated
-    public Status removeBridgeDomainConfig(Node node, String bridgeIdentifier,
-            Map<ConfigConstants, Object> configs) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    @Deprecated
-    public Status removePortConfig(Node node, String bridgeIdentifier, String portIdentifier,
-            Map<ConfigConstants, Object> configs) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    @Deprecated
-    public Map<ConfigConstants, Object> getBridgeDomainConfigs(Node node, String bridgeIdentifier) {
-        // TODO Auto-generated method stub
-        return null;
+        OvsdbClient client = connection.getClient();
+        return client.createTypedRowWrapper(typedClass);
     }
 
-
     // SCHEMA-INDEPENDENT Configuration Service APIs
 
     private String getTableNameForRowUuid(Node node, String databaseName, UUID rowUuid) {
         ConcurrentMap<String, ConcurrentMap<String, Row>> cache  = ovsdbInventoryService.getCache(node, databaseName);
-        if (cache == null) return null;
+        if (cache == null) {
+            return null;
+        }
         for (String tableName : cache.keySet()) {
             ConcurrentMap<String, Row> rows = cache.get(tableName);
             if (rows.get(rowUuid.toString()) != null) {
@@ -1237,7 +598,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
      * insert a Row in a Table of a specified Database Schema.
      *
      * This method can insert just a single Row specified in the row parameter.
-     * But {@link #insertTree(Node, String, String, UUID, Row<GenericTableSchema>) insertTree}
+     * But {@link #insertTree(Node, String, String, UUID, Row) insertTree}
      * can insert a hierarchy of rows with parent-child relationship.
      *
      * @param node OVSDB Node
@@ -1267,18 +628,18 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
 
     /**
      * insert a Row in a Table of a specified Database Schema. This is a convenience method on top of
-     * {@link insertRow(Node, String, String, String, UUID, String, Row<GenericTableSchema>) insertRow}
+     * {@link insertRow(Node, String, String, String, UUID, String, Row) insertRow}
      * which assumes that OVSDB schema implementation that corresponds to the databaseName will provide
      * the necessary service to populate the Parent Table Name and Parent Column Name.
      *
      * This method can insert just a single Row specified in the row parameter.
-     * But {@link #insertTree(Node, String, String, UUID, Row<GenericTableSchema>) insertTree}
+     * But {@link #insertTree(Node, String, String, UUID, Row) insertTree}
      * can insert a hierarchy of rows with parent-child relationship.
      *
      * @param node OVSDB Node
      * @param databaseName Database Name that represents the Schema supported by the node.
      * @param tableName Table on which the row is inserted
-     * @param parentUuid UUID of the parent table to which this operation will result in attaching/mutating.
+     * @param parentRowUuid UUID of the parent table to which this operation will result in attaching/mutating.
      * @param row Row of table Content to be inserted
      * @throws OvsdbPluginException Any failure during the insert transaction will result in a specific exception.
      * @return UUID of the inserted Row
@@ -1323,8 +684,8 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
             parentColumn = this.getReferencingColumn(parentTableSchema, tableName);
         }
 
-        logger.debug("insertTree Connection : {} Table : {} ParentTable : {} Parent Column: {} Parent UUID : {} Row : {}",
-                     client.getConnectionInfo(), tableName, parentTable, parentColumn, parentUuid, row);
+        LOG.debug("insertTree Connection : {} Table : {} ParentTable : {} Parent Column: {} Parent UUID : {} Row : {}",
+                client.getConnectionInfo(), tableName, parentTable, parentColumn, parentUuid, row);
 
         Map<UUID, Map.Entry<String, Row<GenericTableSchema>>> referencedRows = Maps.newConcurrentMap();
         extractReferencedRows(node, databaseName, row, referencedRows, 0);
@@ -1366,12 +727,12 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
 
     /**
      * inserts a Tree of Rows in multiple Tables that has parent-child relationships referenced through the OVSDB schema's refTable construct.
-     * This is a convenience method on top of {@link #insertTree(Node, String, String, String, UUID, String, Row<GenericTableSchema>) insertTree}
+     * This is a convenience method on top of {@link #insertTree(Node, String, String, String, UUID, String, Row) insertTree}
      *
      * @param node OVSDB Node
      * @param databaseName Database Name that represents the Schema supported by the node.
      * @param tableName Table on which the row is inserted
-     * @param parentUuid UUID of a Row in parent table to which this operation will result in attaching/mutating.
+     * @param parentRowUuid UUID of a Row in parent table to which this operation will result in attaching/mutating.
      * @param row Row Tree with parent-child relationships via column of type refTable.
      * @throws OvsdbPluginException Any failure during the insert transaction will result in a specific exception.
      * @return Returns the row tree with the UUID of every inserted Row populated in the _uuid column of every row in the tree
@@ -1418,7 +779,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
                         referencedRows.put(refUuid, new AbstractMap.SimpleEntry<String, Row<GenericTableSchema>>(refRowObject.getRefTable(), refRow));
                         extractReferencedRows(node, dbName, refRow, referencedRows, namedUuidSuffix);
                     } catch (InterruptedException | ExecutionException e) {
-                        logger.error("Exception while extracting multi-level Row references " + e.getLocalizedMessage());
+                        LOG.error("Exception while extracting multi-level Row references " + e.getLocalizedMessage());
                     }
                 } else if (column.getData() instanceof OvsdbSet) {
                     OvsdbSet<Object> setObject = (OvsdbSet<Object>)column.getData();
@@ -1435,7 +796,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
                                 referencedRows.put(refUuid, new AbstractMap.SimpleEntry<String, Row<GenericTableSchema>>(refRowObject.getRefTable(), refRow));
                                 extractReferencedRows(node, dbName, refRow, referencedRows, namedUuidSuffix);
                             } catch (InterruptedException | ExecutionException e) {
-                                logger.error("Exception while extracting multi-level Row references " + e.getLocalizedMessage());
+                                LOG.error("Exception while extracting multi-level Row references " + e.getLocalizedMessage());
                             }
                         } else {
                             modifiedSet.add(obj);
@@ -1466,10 +827,10 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
                                                      List<OperationResult> operationResults, int referencedRowsInsertIndex) {
         UUID primaryRowUuid = operationResults.get(0).getUuid();
         TableSchema<GenericTableSchema> primaryRowTableSchema = dbSchema.table(tableName, GenericTableSchema.class);
-        ColumnSchema<GenericTableSchema, UUID> _uuid = primaryRowTableSchema.column("_uuid", UUID.class);
-        if (_uuid != null) {
-            Column<GenericTableSchema, UUID> _uuidColumn = new Column<GenericTableSchema, UUID>(_uuid, primaryRowUuid);
-            row.addColumn("_uuid", _uuidColumn);
+        ColumnSchema<GenericTableSchema, UUID> uuid = primaryRowTableSchema.column("_uuid", UUID.class);
+        if (uuid != null) {
+            Column<GenericTableSchema, UUID> uuidColumn = new Column<GenericTableSchema, UUID>(uuid, primaryRowUuid);
+            row.addColumn("_uuid", uuidColumn);
         }
 
         if (referencedRows != null) {
@@ -1497,26 +858,27 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
     @Override
     public Row<GenericTableSchema> updateRow(Node node, String databaseName,
             String tableName, UUID rowUuid, Row<GenericTableSchema> row,
-            boolean overwrite) throws OvsdbPluginException {
+            boolean overwrite) {
         Connection connection = connectionService.getConnection(node);
         OvsdbClient client = connection.getClient();
 
-        logger.debug("updateRow : Connection : {} databaseName : {} tableName : {} rowUUID : {} row : {}",
-                      client.getConnectionInfo(), databaseName, tableName, rowUuid, row.toString());
+        LOG.debug("updateRow : Connection : {} databaseName : {} tableName : {} rowUUID : {} row : {}",
+                client.getConnectionInfo(), databaseName, tableName, rowUuid, row.toString());
         try{
             DatabaseSchema dbSchema = client.getDatabaseSchema(databaseName);
             TransactionBuilder transactionBuilder = client.transactBuilder(dbSchema);
             TableSchema<GenericTableSchema> tableSchema = dbSchema.table(tableName, GenericTableSchema.class);
-            ColumnSchema<GenericTableSchema, UUID> _uuid = tableSchema.column("_uuid", UUID.class);
+            ColumnSchema<GenericTableSchema, UUID> uuid = tableSchema.column("_uuid", UUID.class);
             transactionBuilder.add(op.update(tableSchema, row)
-                                     .where(_uuid.opEqual(rowUuid))
-                                     .build());
+                    .where(uuid.opEqual(rowUuid))
+                    .build());
 
             ListenableFuture<List<OperationResult>> results = transactionBuilder.execute();
             List<OperationResult> operationResults = results.get();
             for (OperationResult result : operationResults) {
                 if (result.getError() != null) {
-                    throw new OvsdbPluginException("Error updating row : "+ result.getError());
+                    throw new OvsdbPluginException("Error updating row : " + result.getError() +
+                                                   " Details: " + result.getDetails());
                 }
             }
             if (operationResults.isEmpty() || (transactionBuilder.getOperations().size() != operationResults.size())) {
@@ -1531,7 +893,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
 
     @Override
     public void deleteRow(Node node, String databaseName, String tableName, String parentTable, UUID parentRowUuid,
-            String parentColumn, UUID rowUuid) throws OvsdbPluginException {
+            String parentColumn, UUID rowUuid) {
         Connection connection = connectionService.getConnection(node);
         OvsdbClient client = connection.getClient();
 
@@ -1539,19 +901,20 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
             parentTable = this.getTableNameForRowUuid(node, databaseName, parentRowUuid);
         }
 
-        if (parentColumn == null && parentTable != null) {
+        String myParentColumn = parentColumn;
+        if (myParentColumn == null && parentTable != null) {
             DatabaseSchema dbSchema = client.getDatabaseSchema(databaseName);
             TableSchema<GenericTableSchema> parentTableSchema = dbSchema.table(parentTable, GenericTableSchema.class);
-            parentColumn = this.getReferencingColumn(parentTableSchema, tableName);
+            myParentColumn = this.getReferencingColumn(parentTableSchema, tableName);
         }
 
-        logger.debug("deleteRow : Connection : {} databaseName : {} tableName : {} Uuid : {} ParentTable : {} ParentColumn : {}",
-                client.getConnectionInfo(), databaseName, tableName, rowUuid, parentTable, parentColumn);
+        LOG.debug("deleteRow : Connection : {} databaseName : {} tableName : {} Uuid : {} ParentTable : {} ParentColumn : {}",
+                client.getConnectionInfo(), databaseName, tableName, rowUuid, parentTable, myParentColumn);
 
         DatabaseSchema dbSchema = client.getDatabaseSchema(databaseName);
         TransactionBuilder transactionBuilder = client.transactBuilder(dbSchema);
         this.processDeleteTransaction(client, databaseName, tableName,
-                                      parentTable, parentColumn, rowUuid.toString(), transactionBuilder);
+                                      parentTable, myParentColumn, rowUuid.toString(), transactionBuilder);
 
         ListenableFuture<List<OperationResult>> results = transactionBuilder.execute();
         List<OperationResult> operationResults;
@@ -1566,19 +929,18 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
                 }
             }
         } catch (InterruptedException | ExecutionException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+            LOG.error("Error in deleteRow() {} {} {} {}", node, databaseName, tableName, parentTable, e);
         }
     }
 
     @Override
-    public void deleteRow(Node node, String databaseName, String tableName, UUID rowUuid) throws OvsdbPluginException {
+    public void deleteRow(Node node, String databaseName, String tableName, UUID rowUuid) {
         this.deleteRow(node, databaseName, tableName, null, null, null, rowUuid);
     }
 
     @Override
     public Row<GenericTableSchema> getRow(Node node, String databaseName,
-            String tableName, UUID uuid) throws OvsdbPluginException {
+            String tableName, UUID uuid) {
         ConcurrentMap<UUID, Row<GenericTableSchema>> rows = this.getRows(node, databaseName, tableName);
         if (rows != null) {
             return rows.get(uuid);
@@ -1590,7 +952,9 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
     public ConcurrentMap<UUID, Row<GenericTableSchema>> getRows(Node node,
             String databaseName, String tableName) throws OvsdbPluginException {
         ConcurrentMap<String, Row> ovsTable = ovsdbInventoryService.getTableCache(node, databaseName, tableName);
-        if (ovsTable == null) return null;
+        if (ovsTable == null) {
+            return null;
+        }
         ConcurrentMap<UUID, Row<GenericTableSchema>> tableDB = Maps.newConcurrentMap();
         for (String uuidStr : ovsTable.keySet()) {
             tableDB.put(new UUID(uuidStr), ovsTable.get(uuidStr));
@@ -1600,15 +964,17 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ
 
     @Override
     public ConcurrentMap<UUID, Row<GenericTableSchema>> getRows(Node node,
-            String databaseName, String tableName, String fiqlQuery)
-            throws OvsdbPluginException {
+            String databaseName, String tableName, String fiqlQuery) {
         return this.getRows(node, databaseName, tableName);
     }
 
     @Override
-    public List<String> getTables(Node node, String databaseName) throws OvsdbPluginException {
+    public List<String> getTables(Node node, String databaseName) {
         ConcurrentMap<String, ConcurrentMap<String, Row>> cache  = ovsdbInventoryService.getCache(node, databaseName);
-        if (cache == null) return null;
-        return new ArrayList<String>(cache.keySet());
+        if (cache == null) {
+            return null;
+        } else {
+            return new ArrayList<String>(cache.keySet());
+        }
     }
 }