Status status = this.addInternalBridge(node, brInt, patchTun, patchInt);
if (!status.isSuccess()) logger.debug("Integration Bridge Creation Status : "+status.toString());
- status = this.addInternalBridge(node, brTun, patchInt, patchTun);
- if (!status.isSuccess()) logger.debug("Tunnel Bridge Creation Status : "+status.toString());
+ if (ProviderNetworkManager.getManager().hasPerTenantTunneling()) {
+ status = this.addInternalBridge(node, brTun, patchInt, patchTun);
+ if (!status.isSuccess()) logger.debug("Tunnel Bridge Creation Status : "+status.toString());
+ }
}
/*
OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
String bridgeUUID = this.getInternalBridgeUUID(node, bridgeName);
+ Bridge bridge = new Bridge();
+ OvsDBSet<String> failMode = new OvsDBSet<String>();
+ failMode.add("secure");
+ bridge.setFail_mode(failMode);
+
+ OvsDBSet<String> protocols = new OvsDBSet<String>();
+ if (!ProviderNetworkManager.getManager().hasPerTenantTunneling()) {
+ protocols.add("OpenFlow13");
+ } else {
+ protocols.add("OpenFlow10");
+ }
+ bridge.setProtocols(protocols);
+
if (bridgeUUID == null) {
- Bridge bridge = new Bridge();
bridge.setName(bridgeName);
StatusWithUuid statusWithUuid = ovsdbTable.insertRow(node, Bridge.NAME.getName(), null, bridge);
Port port = new Port();
port.setName(bridgeName);
ovsdbTable.insertRow(node, Port.NAME.getName(), bridgeUUID, port);
+ } else {
+ ovsdbTable.updateRow(node, Bridge.NAME.getName(), null, bridgeUUID, bridge);
}
IConnectionServiceInternal connectionService = (IConnectionServiceInternal)ServiceHelper.getGlobalInstance(IConnectionServiceInternal.class, this);
connectionService.setOFController(node, bridgeUUID);
- if (localPathName != null && remotePatchName != null) {
+ if (localPathName != null && remotePatchName != null && ProviderNetworkManager.getManager().hasPerTenantTunneling()) {
return addPatchPort(node, bridgeUUID, localPathName, remotePatchName);
}
return new Status(StatusCode.SUCCESS);