mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-17 02:11:38 +02:00
Reverted create bridge
Reverged https://gerrit.onosproject.org/#/c/6585/ due to multiple same controllers are set. Change-Id: I2628fccc968adfec619a61b85b7932864a837a37
This commit is contained in:
parent
89957a38d1
commit
b73ce6c177
@ -578,6 +578,11 @@ public class DefaultOvsdbClient
|
||||
return false;
|
||||
}
|
||||
|
||||
String bridgeUuid = getBridgeUuid(bridgeName);
|
||||
if (bridgeUuid != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Bridge bridge = (Bridge) TableGenerator.createTable(dbSchema, OvsdbTable.BRIDGE);
|
||||
Set<String> failMode = new HashSet<>(Arrays.asList("secure"));
|
||||
bridge.setFailMode(failMode);
|
||||
@ -589,15 +594,10 @@ public class DefaultOvsdbClient
|
||||
options.put("datapath-id", dpid);
|
||||
bridge.setOtherConfig(options);
|
||||
|
||||
String bridgeUuid = getBridgeUuid(bridgeName);
|
||||
if (bridgeUuid == null) {
|
||||
bridge.setName(bridgeName);
|
||||
bridgeUuid = insertConfig(OvsdbConstant.BRIDGE, "_uuid",
|
||||
OvsdbConstant.DATABASENAME, "bridges",
|
||||
ovsUuid, bridge.getRow());
|
||||
} else {
|
||||
updateConfig(OvsdbConstant.BRIDGE, "_uuid", bridgeUuid, bridge.getRow());
|
||||
}
|
||||
bridge.setName(bridgeName);
|
||||
bridgeUuid = insertConfig(OvsdbConstant.BRIDGE, "_uuid",
|
||||
OvsdbConstant.DATABASENAME, "bridges",
|
||||
ovsUuid, bridge.getRow());
|
||||
|
||||
if (bridgeUuid != null) {
|
||||
createPort(bridgeName, bridgeName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user