Hyunsun Moon
Committed by Gerrit Code Review

Reverted create bridge

Reverged https://gerrit.onosproject.org/#/c/6585/ due to
multiple same controllers are set.

Change-Id: I2628fccc968adfec619a61b85b7932864a837a37
...@@ -578,6 +578,11 @@ public class DefaultOvsdbClient ...@@ -578,6 +578,11 @@ public class DefaultOvsdbClient
578 return false; 578 return false;
579 } 579 }
580 580
581 + String bridgeUuid = getBridgeUuid(bridgeName);
582 + if (bridgeUuid != null) {
583 + return false;
584 + }
585 +
581 Bridge bridge = (Bridge) TableGenerator.createTable(dbSchema, OvsdbTable.BRIDGE); 586 Bridge bridge = (Bridge) TableGenerator.createTable(dbSchema, OvsdbTable.BRIDGE);
582 Set<String> failMode = new HashSet<>(Arrays.asList("secure")); 587 Set<String> failMode = new HashSet<>(Arrays.asList("secure"));
583 bridge.setFailMode(failMode); 588 bridge.setFailMode(failMode);
...@@ -589,15 +594,10 @@ public class DefaultOvsdbClient ...@@ -589,15 +594,10 @@ public class DefaultOvsdbClient
589 options.put("datapath-id", dpid); 594 options.put("datapath-id", dpid);
590 bridge.setOtherConfig(options); 595 bridge.setOtherConfig(options);
591 596
592 - String bridgeUuid = getBridgeUuid(bridgeName); 597 + bridge.setName(bridgeName);
593 - if (bridgeUuid == null) { 598 + bridgeUuid = insertConfig(OvsdbConstant.BRIDGE, "_uuid",
594 - bridge.setName(bridgeName); 599 + OvsdbConstant.DATABASENAME, "bridges",
595 - bridgeUuid = insertConfig(OvsdbConstant.BRIDGE, "_uuid", 600 + ovsUuid, bridge.getRow());
596 - OvsdbConstant.DATABASENAME, "bridges",
597 - ovsUuid, bridge.getRow());
598 - } else {
599 - updateConfig(OvsdbConstant.BRIDGE, "_uuid", bridgeUuid, bridge.getRow());
600 - }
601 601
602 if (bridgeUuid != null) { 602 if (bridgeUuid != null) {
603 createPort(bridgeName, bridgeName); 603 createPort(bridgeName, bridgeName);
......