ONOS-3786 deletePort from specific bridge method and correct bridge name retrivial call in old add and delete ports of OsvdbBridgeConfig

Change-Id: Ib23b90f7793f3afc5d62250b9f1f318b8042ad77
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/BridgeConfig.java b/core/api/src/main/java/org/onosproject/net/behaviour/BridgeConfig.java
index 44855f2..232f4b2 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/BridgeConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/BridgeConfig.java
@@ -71,6 +71,7 @@
 
     /**
      * Add a logical/virtual port.
+     * @deprecated version 1.5.0 - Falcon.
      *
      * @param port port number
      */
@@ -87,12 +88,22 @@
 
     /**
      * Delete a logical/virtual port.
+     * @deprecated version 1.5.0 - Falcon.
      *
      * @param port port number
      */
+    @Deprecated
     void deletePort(PortDescription port);
 
     /**
+     * Removes a port from a given bridge.
+     *
+     * @param bridgeName bridge name
+     * @param portName port name
+     */
+    void deletePort(BridgeName bridgeName, String portName);
+
+    /**
      * Delete a logical/virtual port.
      *
      * @return collection of port
diff --git a/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbBridgeConfig.java b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbBridgeConfig.java
index e692eeb..304886a 100644
--- a/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbBridgeConfig.java
+++ b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbBridgeConfig.java
@@ -16,6 +16,7 @@
 
 package org.onosproject.drivers.ovsdb;
 
+
 import org.onlab.packet.IpAddress;
 import org.onosproject.net.DefaultAnnotations;
 import org.onosproject.net.DeviceId;
@@ -41,6 +42,7 @@
 import java.util.Set;
 import java.util.stream.Collectors;
 
+
 /**
  * The implementation of BridageConfig.
  */
@@ -92,6 +94,8 @@
                 .collect(Collectors.toSet());
     }
 
+    //Deprecated from version 1.5.0 - Falcon
+    @Deprecated
     @Override
     public void addPort(PortDescription port) {
         DriverHandler handler = handler();
@@ -99,7 +103,7 @@
         Set<OvsdbBridge> ovsdbSet = clientService.getBridges();
         if (ovsdbSet != null && ovsdbSet.size() > 0) {
             OvsdbBridge bridge = ovsdbSet.iterator().next();
-            clientService.createPort(bridge.bridgeName().toString(), port
+            clientService.createPort(bridge.bridgeName().value(), port
                     .portNumber().toString());
         }
     }
@@ -111,6 +115,8 @@
         clientService.createPort(bridgeName.name(), portName);
     }
 
+    //Deprecated from version 1.5.0 - Falcon
+    @Deprecated
     @Override
     public void deletePort(PortDescription port) {
         DriverHandler handler = handler();
@@ -118,12 +124,19 @@
         Set<OvsdbBridge> ovsdbSet = clientService.getBridges();
         if (ovsdbSet != null && ovsdbSet.size() > 0) {
             OvsdbBridge bridge = ovsdbSet.iterator().next();
-            clientService.dropPort(bridge.bridgeName().toString(), port
+            clientService.dropPort(bridge.bridgeName().value(), port
                     .portNumber().toString());
         }
     }
 
     @Override
+    public void deletePort(BridgeName bridgeName, String portName) {
+        DriverHandler handler = handler();
+        OvsdbClientService clientService = getOvsdbClientService(handler);
+        clientService.dropPort(bridgeName.name(), portName);
+    }
+
+    @Override
     public Collection<PortDescription> getPorts() {
         DriverHandler handler = handler();
         OvsdbClientService clientService = getOvsdbClientService(handler);