Refactored tunnel and interface config behavior

- Added tunnel interface configuratoin to interfaceConfig and
  deprecated tunnelConfig
- OVSDB client service provides interface create/remove APIs instead
  of tunnel interface create/remove, and this APIs can be used to
  create/remove various types of interfaces like tunnel, patch, tap and so on
- Use tunnel description when create tunnel interface so that we can extend
  more config options later
- Some cleaup OVSDB client

Change-Id: I4653595504a27b18384a92ebe4b31ce9d99237cd
diff --git a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java
index bf91497..5a0676b 100644
--- a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java
+++ b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java
@@ -16,16 +16,12 @@
 package org.onosproject.ovsdb.controller;
 
 import com.google.common.util.concurrent.ListenableFuture;
-
 import org.onlab.packet.IpAddress;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.behaviour.ControllerInfo;
 import org.onosproject.ovsdb.rfc.jsonrpc.OvsdbRpc;
-import org.onosproject.ovsdb.rfc.message.OperationResult;
 import org.onosproject.ovsdb.rfc.message.TableUpdates;
 import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.Uuid;
-import org.onosproject.ovsdb.rfc.operations.Operation;
 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
 
 import java.util.List;
@@ -46,28 +42,43 @@
     /**
      * Creates a tunnel port with given options.
      *
+     * @deprecated version 1.7.0 - Hummingbird
      * @param bridgeName bridge name
      * @param portName port name
      * @param tunnelType tunnel type
      * @param options tunnel options
      * @return true if tunnel creation is successful, false otherwise
      */
-    boolean createTunnel(String bridgeName, String portName, String tunnelType, Map<String, String> options);
+    @Deprecated
+    boolean createTunnel(String bridgeName, String portName, String tunnelType,
+                         Map<String, String> options);
 
     /**
      * Drops the configuration for tunnel.
      *
+     * @deprecated version 1.7.0 - Hummingbird
      * @param srcIp source IP address
      * @param dstIp destination IP address
      */
+    @Deprecated
     void dropTunnel(IpAddress srcIp, IpAddress dstIp);
 
     /**
-     * Gets tunnels of node.
+     * Creates an interface with a given OVSDB interface description.
      *
-     * @return set of tunnels; empty if no tunnel is find
+     * @param bridgeName bridge name
+     * @param ovsdbIface ovsdb interface description
+     * @return true if interface creation is successful, false otherwise
      */
-    Set<OvsdbTunnel> getTunnels();
+    boolean createInterface(String bridgeName, OvsdbInterface ovsdbIface);
+
+    /**
+     * Removes an interface with the supplied interface name.
+     *
+     * @param ifaceName interface name
+     * @return true if interface creation is successful, false otherwise
+     */
+    boolean dropInterface(String ifaceName);
 
     /**
      * Creates a bridge.
@@ -142,17 +153,6 @@
     ControllerInfo localController();
 
     /**
-     * Sets the Controllers for the specified bridge.
-     * <p>
-     * This method will replace the existing controller list with the new controller
-     * list.
-     *
-     * @param bridgeUuid bridge uuid
-     * @param controllers list of controllers
-     */
-    void setControllersWithUuid(Uuid bridgeUuid, List<ControllerInfo> controllers);
-
-    /**
      * Sets the Controllers for the specified device.
      * <p>
      * This method will replace the existing controller list with the new controller
@@ -211,32 +211,6 @@
     String getPortUuid(String portName, String bridgeUuid);
 
     /**
-     * Gets the Interface uuid.
-     *
-     * @param portUuid port uuid
-     * @param portName port name
-     * @return interface uuid, empty if no uuid is find
-     */
-    String getInterfaceUuid(String portUuid, String portName);
-
-    /**
-     * Gets the Controller uuid.
-     *
-     * @param controllerName   controller name
-     * @param controllerTarget controller target
-     * @return controller uuid, empty if no uuid is find
-     */
-    String getControllerUuid(String controllerName, String controllerTarget);
-
-    /**
-     * Gets the OVS uuid.
-     *
-     * @param dbName database name
-     * @return ovs uuid, empty if no uuid is find
-     */
-    String getOvsUuid(String dbName);
-
-    /**
      * Gets the OVSDB database schema.
      *
      * @param dbName database name
@@ -254,16 +228,6 @@
     ListenableFuture<TableUpdates> monitorTables(String dbName, String id);
 
     /**
-     * Gets the OVSDB config operation result.
-     *
-     * @param dbName     database name
-     * @param operations the list of operations
-     * @return operation results
-     */
-    ListenableFuture<List<OperationResult>> transactConfig(String dbName,
-                                                           List<Operation> operations);
-
-    /**
      * Gets the OVSDB database schema from local.
      *
      * @param dbName database name