Delete bridge controller API implementation,which is needed for certain use cases of ovsdb switch configuration process
Change-Id: If5f86d8b0bff95ac718556e688313e4988fdbfd6
diff --git a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbConstant.java b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbConstant.java
index cb2a31e..03321da 100644
--- a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbConstant.java
+++ b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbConstant.java
@@ -103,4 +103,7 @@
/** Ovsdb port. */
public static final int OVSDBPORT = 6640;
+
+ /** Ovsdb Bridge table, Controller column name. */
+ public static final String BRIDGE_CONTROLLER = "controller";
}
diff --git a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
index 0ed4663..5523b81 100644
--- a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
+++ b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
@@ -121,6 +121,7 @@
import static org.onosproject.ovsdb.controller.OvsdbConstant.QUEUE_EXTERNAL_ID_KEY;
import static org.onosproject.ovsdb.controller.OvsdbConstant.TYPEVXLAN;
import static org.onosproject.ovsdb.controller.OvsdbConstant.UUID;
+import static org.onosproject.ovsdb.controller.OvsdbConstant.BRIDGE_CONTROLLER;
/**
* An representation of an ovsdb client.
@@ -563,14 +564,14 @@
}
removeControllers.forEach(c -> deleteConfig(CONTROLLER, UUID, c.getRow().uuid().value(),
- BRIDGE, "controller", c.getRow().uuid()));
+ BRIDGE, BRIDGE_CONTROLLER, c.getRow().uuid()));
newControllers.stream().map(c -> {
Controller controller = (Controller) TableGenerator
.createTable(dbSchema, OvsdbTable.CONTROLLER);
controller.setTarget(c.target());
return controller;
}).forEach(c -> {
- String uuid = insertConfig(CONTROLLER, UUID, BRIDGE, "controller", bridgeUuid.value(),
+ String uuid = insertConfig(CONTROLLER, UUID, BRIDGE, BRIDGE_CONTROLLER, bridgeUuid.value(),
c.getRow());
newControllerUuids.add(Uuid.uuid(uuid));