mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-02 03:28:00 +00:00
Cleanup of ActiveBSSIDs when VIFs table deleted. Fix condition for ClientSession handling
This commit is contained in:
@@ -1479,16 +1479,18 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
LOG.debug("tidStats {}", tidStats);
|
||||
}
|
||||
|
||||
try {
|
||||
if (ssidStatistics.getBssid() != null && ssidStatistics.getSsid() != null
|
||||
&& client.getMacAddress() != null) {
|
||||
handleClientSessionUpdate(customerId, equipmentId, apId, locationId,
|
||||
clientReport.getChannel(), clientReport.getBand(), clientReport.getTimestampMs(),
|
||||
client, report.getNodeID(), ssidStatistics.getBssid(), ssidStatistics.getSsid());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.debug("Unabled to update client {} session {}", client, e);
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
if (ssidStatistics.getBssid() != null && ssid != null
|
||||
&& client.getMacAddress() != null) {
|
||||
handleClientSessionUpdate(customerId, equipmentId, apId, locationId,
|
||||
clientReport.getChannel(), clientReport.getBand(), clientReport.getTimestampMs(),
|
||||
client, report.getNodeID(), ssidStatistics.getBssid(), ssid);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.debug("Unabled to update client {} session {}", client, e);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2119,8 +2121,27 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: if applicable, remove SsidProfiles related to deleted VIF rows
|
||||
// for this AP
|
||||
Status activeBssidsStatus = statusServiceInterface.getOrNull(customerId, equipmentId,
|
||||
StatusDataType.ACTIVE_BSSIDS);
|
||||
|
||||
if (activeBssidsStatus == null) {
|
||||
return; // nothing to delete
|
||||
|
||||
}
|
||||
|
||||
ActiveBSSIDs statusDetails = (ActiveBSSIDs) activeBssidsStatus.getDetails();
|
||||
|
||||
List<ActiveBSSID> bssidList = statusDetails.getActiveBSSIDs();
|
||||
|
||||
|
||||
|
||||
bssidList.clear();
|
||||
|
||||
statusDetails.setActiveBSSIDs(bssidList);
|
||||
|
||||
activeBssidsStatus.setDetails(statusDetails);
|
||||
|
||||
statusServiceInterface.update(activeBssidsStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2142,9 +2163,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: update activeBSSDs, etc based on associated clients, client
|
||||
// information, etc
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user