- NorthboundUtils.auditlog("Subnet Gateway", username, "modified", subnetName, containerName);
+ Set<NodeConnector> existingNCList = existingConf.getNodeConnectors();
+
+ if (existingNCList == null) {
+ existingNCList = new HashSet<NodeConnector>(0);
+ }
+ if (subnetConfigData.getNodeConnectors() != null) {
+ for (NodeConnector port : subnetConfigData.getNodeConnectors()) {
+ if (!existingNCList.contains(port)) {
+ NorthboundUtils.auditlog("Port", getUserName(), "added",
+ NorthboundUtils.getPortName(port, switchManager) + " to Subnet Gateway "
+ + subnetName, containerName);
+ }
+ }
+ }
+ for (NodeConnector port : existingNCList) {
+ if (!subnetConfigData.getNodeConnectors().contains(port)) {
+ NorthboundUtils
+ .auditlog("Port", getUserName(), "removed",
+ NorthboundUtils.getPortName(port, switchManager) + " from Subnet Gateway "
+ + subnetName, containerName);
+ }
+ }