Configuration Service's Add Bridge integrated with the new netty library. 63/2263/2
authorMadhu Venugopal <mavenugo@gmail.com>
Tue, 29 Oct 2013 22:54:32 +0000 (15:54 -0700)
committerMadhu Venugopal <mavenugo@gmail.com>
Tue, 29 Oct 2013 23:00:56 +0000 (16:00 -0700)
Signed-off-by: Madhu Venugopal <mavenugo@gmail.com>
Change-Id: I4e4e61f68f4e1a2c4a9753c4ee6f74a26018c03c

12 files changed:
ovsdb/.classpath
ovsdb/pom.xml
ovsdb/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcEndpoint.java
ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/Activator.java
ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/ConfigurationService.java
ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/ConnectionService.java
ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/IPAddressProperty.java [new file with mode: 0644]
ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/InventoryService.java
ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/InventoryServiceInternal.java
ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/L4PortProperty.java [new file with mode: 0644]
ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/NodeDB.java
ovsdb/src/test/java/org/opendaylight/ovsdb/lib/message/OVSDBNettyFactoryTest.java

index fd7ad7fbda73f2f1dd3afff62fa9abe499976bc6..24a5bdb196015a9d70f6dd55d76a140fabd1a49c 100755 (executable)
                        <attribute name="maven.pomderived" value="true"/>
                </attributes>
        </classpathentry>
+       <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index 2284aa80ac812ce5e4e97b15f415a8a32d91ed45..22b5e4ced4430ec7d7dbaddfd0a5b734bec9207b 100755 (executable)
                             javax.net.ssl,
                             *
                         </Import-Package>
-                        <Embed-Dependency>jsonrpc4j,httpclient,commons-codec,httpcore-nio,javax.servlet-api,jackson-annotations,jackson-core,jackson-databind,portlet-api;type=!pom;inline=false</Embed-Dependency>
+                        <Embed-Dependency>jsonrpc4j,httpclient,commons-codec,httpcore-nio,javax.servlet-api,jackson-annotations,jackson-core,jackson-databind,portlet-api,commons-collections;type=!pom;inline=false</Embed-Dependency>
                         <Embed-Transitive>
                             true
                         </Embed-Transitive>
                         <Bundle-Activator>
-                            org.opendaylight.ovsdb.internal.Activator
+                            org.opendaylight.ovsdb.plugin.Activator
                         </Bundle-Activator>
                     </instructions>
                     <manifestLocation>${project.basedir}/META-INF</manifestLocation>
             <artifactId>commons-lang</artifactId>
             <version>2.3</version>
         </dependency>
-
+        <dependency>
+          <groupId>commons-collections</groupId>
+          <artifactId>commons-collections</artifactId>
+          <version>1.0</version>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file
index 67f4535d5df45a6a63be7cbdeab6a57bfd16de37..b92a233b2b19d7cb32d4c9180444199be5f73b38 100644 (file)
@@ -166,6 +166,7 @@ public class JsonRpcEndpoint {
             } catch (JsonProcessingException e) {
                 e.printStackTrace();
             }
+            return;
         }
 
         logger.error("No handler for Request : {} on {}",requestJson.toString(), node);
index f308f5e327c5f84ef1c6b18a44d7b107db7cc2fb..c52c498a917513d2aa3cd91bbfe80a6109925d4c 100755 (executable)
@@ -11,7 +11,6 @@ import org.opendaylight.controller.sal.utils.INodeConnectorFactory;
 import org.opendaylight.controller.sal.utils.INodeFactory;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.core.NodeConnector;
-import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService;
 import org.opendaylight.controller.sal.inventory.IPluginInInventoryService;
 import org.opendaylight.controller.sal.utils.GlobalConstants;
 import org.slf4j.Logger;
index 4441a72987393cdf136f5d384892ef52831ceb0e..260d2f1f103f0437ee2bf23add19168c290c814d 100755 (executable)
@@ -1,7 +1,6 @@
 package org.opendaylight.ovsdb.plugin;
 
 import java.net.InetAddress;
-import java.net.UnknownHostException;
 import java.util.*;
 
 import org.eclipse.osgi.framework.console.CommandInterpreter;
@@ -9,6 +8,21 @@ import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.ovsdb.lib.database.OVSBridge;
 import org.opendaylight.ovsdb.lib.database.OVSInstance;
 import org.opendaylight.ovsdb.lib.database.OvsdbType;
+import org.opendaylight.ovsdb.lib.message.TransactBuilder;
+import org.opendaylight.ovsdb.lib.message.operations.InsertOperation;
+import org.opendaylight.ovsdb.lib.message.operations.MutateOperation;
+import org.opendaylight.ovsdb.lib.message.operations.Operation;
+import org.opendaylight.ovsdb.lib.message.operations.OperationResult;
+import org.opendaylight.ovsdb.lib.notation.Condition;
+import org.opendaylight.ovsdb.lib.notation.Function;
+import org.opendaylight.ovsdb.lib.notation.Mutation;
+import org.opendaylight.ovsdb.lib.notation.Mutator;
+import org.opendaylight.ovsdb.lib.notation.UUID;
+import org.opendaylight.ovsdb.lib.table.Bridge;
+import org.opendaylight.ovsdb.lib.table.Interface;
+import org.opendaylight.ovsdb.lib.table.Open_vSwitch;
+import org.opendaylight.ovsdb.lib.table.Port;
+import org.opendaylight.ovsdb.lib.table.internal.Table;
 import org.opendaylight.controller.sal.connection.ConnectionConstants;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.core.NodeConnector;
@@ -21,6 +35,8 @@ import org.osgi.framework.FrameworkUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.util.concurrent.ListenableFuture;
+
 public class ConfigurationService implements IPluginInBridgeDomainConfigService, CommandProvider
 {
     private static final Logger logger = LoggerFactory
@@ -115,82 +131,79 @@ public class ConfigurationService implements IPluginInBridgeDomainConfigService,
                 return new Status(StatusCode.NOSERVICE, "Connection to ovsdb-server not available");
             }
 
-            if (connection != null) {
-                String newBridge = "new_bridge";
-                String newInterface = "new_interface";
-                String newPort = "new_port";
-                String newSwitch = "new_switch";
-
-                Object addSwitchRequest;
-
-                OVSInstance instance = OVSInstance.monitorOVS(connection);
-
-                if(instance != null){
-                    List<String> bridgeUuidPair = new ArrayList<String>();
-                    bridgeUuidPair.add("named-uuid");
-                    bridgeUuidPair.add(newBridge);
-
-                    List<Object> mutation = new ArrayList<Object>();
-                    mutation.add("bridges");
-                    mutation.add("insert");
-                    mutation.add(bridgeUuidPair);
-
-                    List<Object> mutations = new ArrayList<Object>();
-                    mutations.add(mutation);
-
-                    List<String> ovsUuidPair = new ArrayList<String>();
-                    ovsUuidPair.add("uuid");
-                    ovsUuidPair.add(instance.getUuid());
-
-                    List<Object> whereInner = new ArrayList<Object>();
-                    whereInner.add("_uuid");
-                    whereInner.add("==");
-                    whereInner.add(ovsUuidPair);
-
-                    List<Object> where = new ArrayList<Object>();
-                    where.add(whereInner);
+            Map<String, Table<?>> ovsTable = inventoryServiceInternal.getTableCache(node, Open_vSwitch.NAME.getName());
+            String newBridge = "new_bridge";
+            String newInterface = "new_interface";
+            String newPort = "new_port";
+            String newSwitch = "new_switch";
+
+            Operation addSwitchRequest = null;
+
+            if(ovsTable != null){
+                String ovsTableUUID = (String) ovsTable.keySet().toArray()[0];
+                UUID bridgeUuidPair = new UUID(newBridge);
+                Mutation bm = new Mutation("bridges", Mutator.INSERT, bridgeUuidPair);
+                List<Mutation> mutations = new ArrayList<Mutation>();
+                mutations.add(bm);
+
+                UUID uuid = new UUID(ovsTableUUID);
+                Condition condition = new Condition("_uuid", Function.EQUALS, uuid);
+                List<Condition> where = new ArrayList<Condition>();
+                where.add(condition);
+                addSwitchRequest = new MutateOperation(Open_vSwitch.NAME.getName(), where, mutations);
+            }
+            else{
+                Map<String, Object> vswitchRow = new HashMap<String, Object>();
+                UUID bridgeUuidPair = new UUID(newBridge);
+                vswitchRow.put("bridges", bridgeUuidPair);
+                addSwitchRequest = new InsertOperation(Open_vSwitch.NAME.getName(), newSwitch, vswitchRow);
+            }
 
-                    addSwitchRequest = new MutateRequest("Open_vSwitch", where, mutations);
+            Map<String, Object> bridgeRow = new HashMap<String, Object>();
+            bridgeRow.put("name", bridgeIdentifier);
+            UUID ports = new UUID(newPort);
+            bridgeRow.put("ports", ports);
+            InsertOperation addBridgeRequest = new InsertOperation(Bridge.NAME.getName(), newBridge, bridgeRow);
+
+            Map<String, Object> portRow = new HashMap<String, Object>();
+            portRow.put("name", bridgeIdentifier);
+            UUID interfaces = new UUID(newInterface);
+            portRow.put("interfaces", interfaces);
+            InsertOperation addPortRequest = new InsertOperation(Port.NAME.getName(), newPort, portRow);
+
+            Map<String, Object> interfaceRow = new HashMap<String, Object>();
+            interfaceRow.put("name", bridgeIdentifier);
+            interfaceRow.put("type", "internal");
+            InsertOperation addIntfRequest = new InsertOperation(Interface.NAME.getName(), newInterface, interfaceRow);
+
+            TransactBuilder transaction = new TransactBuilder();
+            transaction.addOperations(new ArrayList<Operation>(
+                                      Arrays.asList(addSwitchRequest, addIntfRequest, addPortRequest, addBridgeRequest)));
+
+            ListenableFuture<List<OperationResult>> transResponse = connection.getRpc().transact(transaction);
+            List<OperationResult> tr = transResponse.get();
+            List<Operation> requests = transaction.getRequests();
+            Status status = new Status(StatusCode.SUCCESS);
+            for (int i = 0; i < tr.size() ; i++) {
+                if (i < requests.size()) requests.get(i).setResult(tr.get(i));
+                if (tr.get(i).getError() != null && tr.get(i).getError().trim().length() > 0) {
+                    OperationResult result = tr.get(i);
+                    status = new Status(StatusCode.BADREQUEST, result.getError() + " : " + result.getDetails());
                 }
-                else{
-                    Map<String, Object> vswitchRow = new HashMap<String, Object>();
-                    ArrayList<String> bridges = new ArrayList<String>();
-                    bridges.add("named-uuid");
-                    bridges.add(newBridge);
-                    vswitchRow.put("bridges", bridges);
-                    addSwitchRequest = new InsertRequest("insert", "Open_vSwitch", newSwitch, vswitchRow);
-                }
-
-                Map<String, Object> bridgeRow = new HashMap<String, Object>();
-                bridgeRow.put("name", bridgeIdentifier);
-                ArrayList<String> ports = new ArrayList<String>();
-                ports.add("named-uuid");
-                ports.add(newPort);
-                bridgeRow.put("ports", ports);
-                InsertRequest addBridgeRequest = new InsertRequest("insert", "Bridge", newBridge, bridgeRow);
-
-                Map<String, Object> portRow = new HashMap<String, Object>();
-                portRow.put("name", bridgeIdentifier);
-                ArrayList<String> interfaces = new ArrayList<String>();
-                interfaces.add("named-uuid");
-                interfaces.add(newInterface);
-                portRow.put("interfaces", interfaces);
-                InsertRequest addPortRequest = new InsertRequest("insert", "Port", newPort, portRow);
-
-                Map<String, Object> interfaceRow = new HashMap<String, Object>();
-                interfaceRow.put("name", bridgeIdentifier);
-                interfaceRow.put("type", "internal");
-                InsertRequest addIntfRequest = new InsertRequest("insert", "Interface", newInterface, interfaceRow);
-
-                Object[] params = {"Open_vSwitch", addSwitchRequest, addIntfRequest, addPortRequest, addBridgeRequest};
-                OvsdbMessage msg = new OvsdbMessage("transact", params);
+            }
 
-                //connection.sendMessage(msg);
+            if (tr.size() > requests.size()) {
+                OperationResult result = tr.get(tr.size()-1);
+                logger.error("Error creating Bridge : {}\n Error : {}\n Details : {}", bridgeIdentifier,
+                                                                                       result.getError(),
+                                                                                       result.getDetails());
+                status = new Status(StatusCode.BADREQUEST, result.getError() + " : " + result.getDetails());
             }
-        }catch(Exception e){
+            return status;
+        } catch(Exception e){
             e.printStackTrace();
         }
-        return new Status(StatusCode.SUCCESS);
+        return new Status(StatusCode.INTERNALERROR);
     }
 
     /**
@@ -628,6 +641,15 @@ public class ConfigurationService implements IPluginInBridgeDomainConfigService,
         }
     }
 
+    public void _printCache (CommandInterpreter ci) {
+        String nodeName = ci.nextArgument();
+        if (nodeName == null) {
+            ci.println("Please enter Node Name");
+            return;
+        }
+        inventoryServiceInternal.printCache(Node.fromString(nodeName));
+    }
+
     public void _forceConnect (CommandInterpreter ci) {
         String force = ci.nextArgument();
         if (force.equalsIgnoreCase("YES")) forceConnect = true;
@@ -646,7 +668,7 @@ public class ConfigurationService implements IPluginInBridgeDomainConfigService,
         help.append("\t addPort <Node> <BridgeName> <PortName>                          - Add 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 forceConnect <yes|no>   - Force a new OVSDB Connection for every command (Workaround)");
+        help.append("\t printCache <Node>                                               - Prints Table Cache");
         return help.toString();
     }
 }
index 28c7671d75ce5c1b982603340180b4ee6ab34eec..5237e993be581d694136fe56c3956eb131ed4249 100755 (executable)
@@ -18,22 +18,25 @@ import org.opendaylight.controller.sal.utils.StatusCode;
 import org.opendaylight.ovsdb.lib.jsonrpc.JsonRpcDecoder;
 import org.opendaylight.ovsdb.lib.jsonrpc.JsonRpcEndpoint;
 import org.opendaylight.ovsdb.lib.jsonrpc.JsonRpcServiceBinderHandler;
+import org.opendaylight.ovsdb.lib.message.MonitorRequestBuilder;
 import org.opendaylight.ovsdb.lib.message.OvsdbRPC;
+import org.opendaylight.ovsdb.lib.message.TableUpdates;
 import org.opendaylight.ovsdb.lib.message.UpdateNotification;
+import org.opendaylight.ovsdb.lib.table.internal.Table;
+import org.opendaylight.ovsdb.lib.table.internal.Tables;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.collect.Lists;
+import com.google.common.util.concurrent.ListenableFuture;
 
 import java.net.InetAddress;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutionException;
 
 
 /**
@@ -87,6 +90,9 @@ public class ConnectionService implements IPluginInConnectionService, IConnectio
      * calls
      */
     void stop() {
+        for (Connection connection : ovsdbConnections.values()) {
+            connection.disconnect();
+        }
     }
 
     @Override
@@ -161,6 +167,7 @@ public class ConnectionService implements IPluginInConnectionService, IConnectio
             connection.setRpc(ovsdb);
             ovsdb.registerCallback(this);
 
+            handleNewConnection(connection, address, port);
             ovsdbConnections.put(identifier, connection);
             return node;
         } catch (Exception e) {
@@ -192,10 +199,27 @@ public class ConnectionService implements IPluginInConnectionService, IConnectio
     public void notifyNodeDisconnectFromMaster(Node arg0) {
     }
 
+    private void handleNewConnection (Connection connection, InetAddress address, int port) throws InterruptedException, ExecutionException {
+        IPAddressProperty addressProp = new IPAddressProperty(address);
+        L4PortProperty l4Port = new L4PortProperty(port);
+        inventoryServiceInternal.addNodeProperty(connection.getNode(), addressProp);
+        inventoryServiceInternal.addNodeProperty(connection.getNode(), l4Port);
+
+        MonitorRequestBuilder monitorReq = new MonitorRequestBuilder();
+        for (Table<?> table : Tables.getTables()) {
+            monitorReq.monitor(table);
+        }
+
+        ListenableFuture<TableUpdates> monResponse = connection.getRpc().monitor(monitorReq);
+        TableUpdates updates = monResponse.get();
+        UpdateNotification monitor = new UpdateNotification();
+        monitor.setUpdate(updates);
+        this.update(connection.getNode(), monitor);
+    }
+
     @Override
     public void update(Node node, UpdateNotification updateNotification) {
         inventoryServiceInternal.processTableUpdates(node, updateNotification.getUpdate());
-        inventoryServiceInternal.printCache(node);
     }
 
     @Override
diff --git a/ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/IPAddressProperty.java b/ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/IPAddressProperty.java
new file mode 100644 (file)
index 0000000..3d3e2bc
--- /dev/null
@@ -0,0 +1,47 @@
+
+package org.opendaylight.ovsdb.plugin;
+import java.net.InetAddress;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.opendaylight.controller.sal.core.Property;
+
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.NONE)
+public class IPAddressProperty extends Property implements Cloneable {
+    private static final long serialVersionUID = 1L;
+    @XmlElement(name="value")
+    private final InetAddress address;
+    public static final String name = "IPAddress";
+
+    /*
+     * Private constructor used for JAXB mapping
+     */
+    private IPAddressProperty() {
+        super(name);
+        this.address = null;
+    }
+
+    public IPAddressProperty(InetAddress address) {
+        super(name);
+        this.address = address;
+    }
+
+    @Override
+    public String getStringValue() {
+        if (address == null) return null;
+        return this.address.getHostAddress();
+    }
+
+    @Override
+    public Property clone() {
+        return new IPAddressProperty(this.address);
+    }
+
+    public InetAddress getAddress() {
+        return address;
+    }
+}
index 710b68cc04f36884b3e42861dfb624877aabbfef..9c88bb1770d6da7664bb7120fca4d24a9c95cbd6 100755 (executable)
@@ -1,6 +1,7 @@
 package org.opendaylight.ovsdb.plugin;
 
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -138,7 +139,6 @@ public class InventoryService implements IPluginInInventoryService, InventorySer
 
         Set<Table.Name> available = tableUpdates.availableUpdates();
         for (Table.Name name : available) {
-            System.out.println(name.getName() +":"+ tableUpdates.getUpdate(name).toString());
             TableUpdate tableUpdate = tableUpdates.getUpdate(name);
             Collection<TableUpdate.Row<?>> rows = tableUpdate.getRows();
             for (Row<?> row : rows) {
@@ -159,4 +159,12 @@ public class InventoryService implements IPluginInInventoryService, InventorySer
         NodeDB<Table<?>> db = dbCache.get(n);
         if (db != null) db.printTableCache();
     }
+
+    @Override
+    public void addNodeProperty(Node n, Property prop) {
+        Map<String, Property> nProp = nodeProps.get(n);
+        if (nProp == null) nProp = new HashMap<String, Property>();
+        nProp.put(prop.getName(), prop);
+        nodeProps.put(n, nProp);
+    }
 }
index ea7587c6cca70fe07675b94038f5fc2e044b6ad5..7fd089562b4160fe07eb07b434d8a8b5152c7d3f 100644 (file)
@@ -3,6 +3,7 @@ package org.opendaylight.ovsdb.plugin;
 import java.util.Map;
 
 import org.opendaylight.controller.sal.core.Node;
+import org.opendaylight.controller.sal.core.Property;
 import org.opendaylight.ovsdb.lib.message.TableUpdates;
 import org.opendaylight.ovsdb.lib.table.internal.Table;
 
@@ -14,4 +15,6 @@ public interface InventoryServiceInternal {
     public void removeRow(Node n, String tableName, String uuid);
     public void processTableUpdates(Node n, TableUpdates tableUpdates);
     public void printCache(Node n);
-}
+
+    public void addNodeProperty(Node n, Property prop);
+}
\ No newline at end of file
diff --git a/ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/L4PortProperty.java b/ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/L4PortProperty.java
new file mode 100644 (file)
index 0000000..7e6cb31
--- /dev/null
@@ -0,0 +1,45 @@
+
+package org.opendaylight.ovsdb.plugin;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.opendaylight.controller.sal.core.Property;
+
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.NONE)
+public class L4PortProperty extends Property implements Cloneable {
+    private static final long serialVersionUID = 1L;
+    @XmlElement(name="value")
+    private final int port;
+    public static final String name = "Port";
+
+    /*
+     * Private constructor used for JAXB mapping
+     */
+    private L4PortProperty() {
+        super(name);
+        this.port = 0;
+    }
+
+    public L4PortProperty(int port) {
+        super(name);
+        this.port = port;
+    }
+
+    @Override
+    public String getStringValue() {
+        return port+"";
+    }
+
+    @Override
+    public Property clone() {
+        return new L4PortProperty(port);
+    }
+
+    public int getPort() {
+        return port;
+    }
+}
index 29ed901a97e12d6a9621e58f7e8a9ddfa001c501..e141e2519728e35489e895096820f2f05e3de52e 100644 (file)
@@ -3,6 +3,8 @@ package org.opendaylight.ovsdb.plugin;
 import java.util.Map;
 
 import com.google.common.collect.Maps;
+
+import org.apache.commons.collections.MapUtils;
 import org.opendaylight.ovsdb.lib.table.internal.Table;
 
 public class NodeDB <T extends Table<?>>{
@@ -45,6 +47,6 @@ public class NodeDB <T extends Table<?>>{
     }
 
     public void printTableCache() {
-        System.out.println(cache.toString());
+        MapUtils.debugPrint(System.out, null, cache);
     }
 }
index 2f59f9dfb6b40e983fa0eeafc9c644f8c5a544a4..8fdbe6ccfe92008d6f6dfee7549cfe26510c196e 100644 (file)
@@ -1,24 +1,10 @@
 package org.opendaylight.ovsdb.lib.message;
 
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.collect.Lists;
 import com.google.common.util.concurrent.ListenableFuture;
-
-import io.netty.channel.Channel;
-import io.netty.channel.ChannelHandler;
-import io.netty.handler.codec.string.StringEncoder;
-import io.netty.handler.logging.LogLevel;
-import io.netty.handler.logging.LoggingHandler;
-import io.netty.util.CharsetUtil;
-
 import org.junit.Test;
 import org.opendaylight.controller.sal.connection.ConnectionConstants;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.ovsdb.lib.database.DatabaseSchema;
-import org.opendaylight.ovsdb.lib.jsonrpc.JsonRpcDecoder;
-import org.opendaylight.ovsdb.lib.jsonrpc.JsonRpcEndpoint;
-import org.opendaylight.ovsdb.lib.jsonrpc.JsonRpcServiceBinderHandler;
 import org.opendaylight.ovsdb.lib.message.MonitorRequestBuilder;
 import org.opendaylight.ovsdb.lib.message.OvsdbRPC;
 import org.opendaylight.ovsdb.lib.message.TableUpdates;
@@ -40,7 +26,6 @@ import org.opendaylight.ovsdb.lib.table.internal.Tables;
 import org.opendaylight.ovsdb.plugin.Connection;
 import org.opendaylight.ovsdb.plugin.ConnectionService;
 import org.opendaylight.ovsdb.plugin.InventoryService;
-import org.opendaylight.ovsdb.plugin.InventoryServiceInternal;
 
 import java.util.ArrayList;
 import java.util.Arrays;