mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-03 20:17:53 +00:00
TW-20 - code hardening
This commit is contained in:
@@ -870,7 +870,10 @@ public class OvsdbDao {
|
|||||||
|
|
||||||
conditions.add(new Condition("name", Function.EQUALS, new Atom<>(interfaceName) ));
|
conditions.add(new Condition("name", Function.EQUALS, new Atom<>(interfaceName) ));
|
||||||
|
|
||||||
Set<Uuid> portInterfacesSet = new HashSet<>(existingPort.interfaceUuids);
|
Set<Uuid> portInterfacesSet = new HashSet<>();
|
||||||
|
if(existingPort.interfaceUuids!=null) {
|
||||||
|
portInterfacesSet.addAll(existingPort.interfaceUuids);
|
||||||
|
}
|
||||||
portInterfacesSet.add(interfaceUuid);
|
portInterfacesSet.add(interfaceUuid);
|
||||||
com.vmware.ovsdb.protocol.operation.notation.Set portInterfaces = com.vmware.ovsdb.protocol.operation.notation.Set.of(portInterfacesSet);
|
com.vmware.ovsdb.protocol.operation.notation.Set portInterfaces = com.vmware.ovsdb.protocol.operation.notation.Set.of(portInterfacesSet);
|
||||||
updateColumns.put("interfaces", portInterfaces );
|
updateColumns.put("interfaces", portInterfaces );
|
||||||
@@ -901,14 +904,19 @@ public class OvsdbDao {
|
|||||||
|
|
||||||
//link the port to the bridge
|
//link the port to the bridge
|
||||||
if(provisionedBridges.containsKey(bridgeName)) {
|
if(provisionedBridges.containsKey(bridgeName)) {
|
||||||
BridgeInfo existingBridge = provisionedBridges.get(brHome);
|
BridgeInfo existingBridge = provisionedBridges.get(bridgeName);
|
||||||
|
|
||||||
conditions = new ArrayList<>();
|
conditions = new ArrayList<>();
|
||||||
updateColumns = new HashMap<>();
|
updateColumns = new HashMap<>();
|
||||||
|
|
||||||
conditions.add(new Condition("name", Function.EQUALS, new Atom<>(bridgeName) ));
|
conditions.add(new Condition("name", Function.EQUALS, new Atom<>(bridgeName) ));
|
||||||
|
|
||||||
Set<Uuid> bridgePortsSet = new HashSet<>(existingBridge.portUuids);
|
|
||||||
|
Set<Uuid> bridgePortsSet = new HashSet<>();
|
||||||
|
if(existingBridge.portUuids!=null) {
|
||||||
|
bridgePortsSet.addAll(existingBridge.portUuids);
|
||||||
|
}
|
||||||
|
|
||||||
bridgePortsSet.add(portUuid);
|
bridgePortsSet.add(portUuid);
|
||||||
com.vmware.ovsdb.protocol.operation.notation.Set bridgePorts = com.vmware.ovsdb.protocol.operation.notation.Set.of(bridgePortsSet);
|
com.vmware.ovsdb.protocol.operation.notation.Set bridgePorts = com.vmware.ovsdb.protocol.operation.notation.Set.of(bridgePortsSet);
|
||||||
updateColumns.put("ports", bridgePorts );
|
updateColumns.put("ports", bridgePorts );
|
||||||
|
|||||||
Reference in New Issue
Block a user