mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-01 19:17:52 +00:00
Compare commits
1 Commits
release-te
...
hotfix/can
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ff8476a3a |
2
LICENSE
2
LICENSE
@@ -1,5 +1,5 @@
|
||||
BSD 3-Clause License
|
||||
#Release Testing
|
||||
|
||||
Copyright (c) 2020, Telecom Infra Project
|
||||
All rights reserved.
|
||||
|
||||
|
||||
@@ -572,7 +572,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
networkAdminStatusRec = new Status();
|
||||
networkAdminStatusRec.setCustomerId(ce.getCustomerId());
|
||||
networkAdminStatusRec.setEquipmentId(ce.getId());
|
||||
networkAdminStatusRec.setStatusDataType(StatusDataType.NETWORK_ADMIN);
|
||||
NetworkAdminStatusData statusData = new NetworkAdminStatusData();
|
||||
networkAdminStatusRec.setDetails(statusData);
|
||||
}
|
||||
@@ -581,7 +580,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
netAdminStatusData.setDhcpStatus(StatusCode.normal);
|
||||
netAdminStatusData.setCloudLinkStatus(StatusCode.normal);
|
||||
netAdminStatusData.setDnsStatus(StatusCode.normal);
|
||||
netAdminStatusData.setRadiusStatus(StatusCode.normal);
|
||||
|
||||
networkAdminStatusRec.setDetails(netAdminStatusData);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ import com.telecominfraproject.wlan.core.model.equipment.SecurityType;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.WiFiSessionUtility;
|
||||
import com.telecominfraproject.wlan.core.model.utils.DecibelUtils;
|
||||
import com.telecominfraproject.wlan.equipment.EquipmentServiceInterface;
|
||||
import com.telecominfraproject.wlan.equipment.models.ApElementConfiguration;
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.opensync.ovsdb.dao.utilities.OvsdbToWlanCloudTypeMappingUtility;
|
||||
import com.telecominfraproject.wlan.profile.ProfileServiceInterface;
|
||||
@@ -73,9 +74,7 @@ import com.telecominfraproject.wlan.status.equipment.report.models.EquipmentPerR
|
||||
import com.telecominfraproject.wlan.status.equipment.report.models.OperatingSystemPerformance;
|
||||
import com.telecominfraproject.wlan.status.equipment.report.models.RadioUtilizationReport;
|
||||
import com.telecominfraproject.wlan.status.models.Status;
|
||||
import com.telecominfraproject.wlan.status.models.StatusCode;
|
||||
import com.telecominfraproject.wlan.status.models.StatusDataType;
|
||||
import com.telecominfraproject.wlan.status.network.models.NetworkAdminStatusData;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEventType;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeSipCallReportEvent;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeSipCallStartEvent;
|
||||
@@ -148,7 +147,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
private CloudEventDispatcherInterface equipmentMetricsCollectorInterface;
|
||||
|
||||
void processMqttMessage(String topic, WCStatsReport wcStatsReport) {
|
||||
LOG.info("Received WCStatsReport {}", wcStatsReport.toString());
|
||||
LOG.debug("Received WCStatsReport {}", wcStatsReport.toString());
|
||||
|
||||
LOG.info("Received report on topic {}", topic);
|
||||
int customerId = extractCustomerIdFromTopic(topic);
|
||||
@@ -245,7 +244,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
}
|
||||
|
||||
if (!metricRecordList.isEmpty()) {
|
||||
LOG.info("Publishing Metrics {}", metricRecordList);
|
||||
LOG.debug("Publishing Metrics {}", metricRecordList);
|
||||
equipmentMetricsCollectorInterface.publishMetrics(metricRecordList);
|
||||
}
|
||||
|
||||
@@ -290,6 +289,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void processEventReport(Report report, int customerId, long equipmentId, String apId, long locationId) {
|
||||
|
||||
report.getEventReportList().stream().forEach(e -> {
|
||||
@@ -442,6 +442,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
}
|
||||
clientSessionDetails.setAssociationState(AssociationState._802_11_Associated);
|
||||
|
||||
|
||||
if (clientSession.getDetails() == null) {
|
||||
clientSession.setDetails(clientSessionDetails);
|
||||
} else {
|
||||
@@ -452,6 +453,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,6 +509,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
clientSessionDetails.setSessionId(apEventClientSession.getSessionId());
|
||||
|
||||
|
||||
if (clientDisconnectEvent.hasLrcvUpTsInUs()) {
|
||||
clientSessionDetails.setLastRxTimestamp(clientDisconnectEvent.getLrcvUpTsInUs());
|
||||
}
|
||||
@@ -524,6 +527,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
}
|
||||
clientSessionDetails.setAssociationState(AssociationState.Disconnected);
|
||||
|
||||
|
||||
if (clientSession.getDetails() == null) {
|
||||
clientSession.setDetails(clientSessionDetails);
|
||||
} else {
|
||||
@@ -532,6 +536,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
clientSession = clientServiceInterface.updateSession(clientSession);
|
||||
|
||||
|
||||
} else {
|
||||
LOG.info("Cannot update client or client session when no client mac address is present");
|
||||
}
|
||||
@@ -584,6 +589,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
clientSessionDetails.setAssociationState(AssociationState._802_11_Authenticated);
|
||||
}
|
||||
|
||||
|
||||
if (clientSession.getDetails() == null) {
|
||||
clientSession.setDetails(clientSessionDetails);
|
||||
} else {
|
||||
@@ -592,6 +598,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
clientSession = clientServiceInterface.updateSession(clientSession);
|
||||
|
||||
|
||||
} else {
|
||||
LOG.info("Cannot update client or client session when no client mac address is present");
|
||||
}
|
||||
@@ -702,6 +709,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
clientSession.setLocationId(locationId);
|
||||
clientSession.setMacAddress(new MacAddress(clientFailureEvent.getStaMac()));
|
||||
|
||||
|
||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||
|
||||
if (clientFailureEvent.hasSsid()) {
|
||||
@@ -764,8 +772,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
clientSession.setLocationId(locationId);
|
||||
clientSession.setMacAddress(new MacAddress(clientFirstDataEvent.getStaMac()));
|
||||
|
||||
|
||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||
|
||||
|
||||
if (clientFirstDataEvent.hasFdataRxUpTsInUs()) {
|
||||
clientSessionDetails.setFirstDataRcvdTimestamp(clientFirstDataEvent.getFdataRxUpTsInUs());
|
||||
}
|
||||
@@ -823,10 +833,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
clientSession.setLocationId(locationId);
|
||||
clientSession.setMacAddress(new MacAddress(clientIdEvent.getCltMac()));
|
||||
|
||||
|
||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||
|
||||
clientSessionDetails.setSessionId(apEventClientSession.getSessionId());
|
||||
|
||||
|
||||
if (clientSession.getDetails() == null) {
|
||||
clientSession.setDetails(clientSessionDetails);
|
||||
} else {
|
||||
@@ -874,8 +886,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||
|
||||
|
||||
clientSessionDetails.setSessionId(apEventClientSession.getSessionId());
|
||||
|
||||
|
||||
try {
|
||||
clientSessionDetails
|
||||
.setIpAddress(InetAddress.getByAddress(clientIpEvent.getIpAddr().toByteArray()));
|
||||
@@ -978,7 +992,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
eventTimestamp = videoVoiceReport.getTimestampMs();
|
||||
}
|
||||
|
||||
LOG.info("Received VideoVoiceReport {} for SIP call", videoVoiceReport);
|
||||
LOG.debug("Received VideoVoiceReport {} for SIP call", videoVoiceReport);
|
||||
|
||||
processRealTImeSipCallReportEvent(customerId, equipmentId, eventTimestamp, eventsList, videoVoiceReport);
|
||||
|
||||
@@ -1032,34 +1046,34 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
if (apRtpFlowStats.hasDirection()) {
|
||||
switch (apRtpFlowStats.getDirection()) {
|
||||
case RTP_DOWNSTREAM:
|
||||
cloudRtpStats.setDirection(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.DOWNSTREAM);
|
||||
break;
|
||||
case RTP_UPSTREAM:
|
||||
cloudRtpStats.setDirection(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.UPSTREAM);
|
||||
break;
|
||||
default:
|
||||
cloudRtpStats.setDirection(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.UNSUPPORTED);
|
||||
case RTP_DOWNSTREAM:
|
||||
cloudRtpStats.setDirection(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.DOWNSTREAM);
|
||||
break;
|
||||
case RTP_UPSTREAM:
|
||||
cloudRtpStats.setDirection(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.UPSTREAM);
|
||||
break;
|
||||
default:
|
||||
cloudRtpStats.setDirection(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.UNSUPPORTED);
|
||||
}
|
||||
}
|
||||
|
||||
if (apRtpFlowStats.hasRtpFlowType()) {
|
||||
switch (apRtpFlowStats.getRtpFlowType()) {
|
||||
case RTP_VIDEO:
|
||||
cloudRtpStats.setFlowType(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.VIDEO);
|
||||
break;
|
||||
case RTP_VOICE:
|
||||
cloudRtpStats.setFlowType(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.VOICE);
|
||||
break;
|
||||
default:
|
||||
cloudRtpStats.setFlowType(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.UNSUPPORTED);
|
||||
break;
|
||||
case RTP_VIDEO:
|
||||
cloudRtpStats.setFlowType(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.VIDEO);
|
||||
break;
|
||||
case RTP_VOICE:
|
||||
cloudRtpStats.setFlowType(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.VOICE);
|
||||
break;
|
||||
default:
|
||||
cloudRtpStats.setFlowType(
|
||||
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.UNSUPPORTED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1087,10 +1101,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
cloudRtpStats.setPacketLossPercentage(apRtpFlowStats.getPacketLossPercent());
|
||||
}
|
||||
|
||||
|
||||
cloudRtpFlowStatsList.add(cloudRtpStats);
|
||||
|
||||
}
|
||||
|
||||
|
||||
RealTimeSipCallReportEvent cloudSipCallReportEvent = new RealTimeSipCallReportEvent(customerId, equipmentId,
|
||||
eventTimestamp);
|
||||
cloudSipCallReportEvent.setClientMacAddress(MacAddress.valueOf(callReport.getClientMac()));
|
||||
@@ -1151,8 +1167,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
if (apCallStop.hasCallDuration()) {
|
||||
|
||||
|
||||
cloudSipCallStopEvent.setCallDuration(apCallStop.getCallDuration());
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (apCallStop.hasClientMac()) {
|
||||
@@ -1164,15 +1182,15 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
if (apCallStop.hasReason()) {
|
||||
|
||||
switch (apCallStop.getReason()) {
|
||||
case BYE_OK:
|
||||
cloudSipCallStopEvent.setReason(SipCallStopReason.BYE_OK);
|
||||
break;
|
||||
case CALL_DROPPED:
|
||||
cloudSipCallStopEvent.setReason(SipCallStopReason.DROPPED);
|
||||
break;
|
||||
case BYE_OK:
|
||||
cloudSipCallStopEvent.setReason(SipCallStopReason.BYE_OK);
|
||||
break;
|
||||
case CALL_DROPPED:
|
||||
cloudSipCallStopEvent.setReason(SipCallStopReason.DROPPED);
|
||||
break;
|
||||
|
||||
default:
|
||||
cloudSipCallStopEvent.setReason(SipCallStopReason.UNSUPPORTED);
|
||||
default:
|
||||
cloudSipCallStopEvent.setReason(SipCallStopReason.UNSUPPORTED);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1190,6 +1208,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
eventsList.add(cloudSipCallStopEvent);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1230,6 +1249,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
eventsList.add(rtsStartEvent);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1319,9 +1339,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void populateApNodeMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId,
|
||||
long locationId) {
|
||||
LOG.info("populateApNodeMetrics for Customer {} Equipment {}", customerId, equipmentId);
|
||||
LOG.debug("populateApNodeMetrics for Customer {} Equipment {}", customerId, equipmentId);
|
||||
ApNodeMetrics apNodeMetrics = new ApNodeMetrics();
|
||||
ServiceMetric smr = new ServiceMetric(customerId, equipmentId);
|
||||
|
||||
@@ -1514,6 +1535,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
// we need to perform a weighted average here because the
|
||||
// samples are in percentage, and may be of different durations
|
||||
|
||||
|
||||
busyTx += surveySample.getBusyTx() * surveySample.getDurationMs();
|
||||
busyRx += surveySample.getBusyRx() * surveySample.getDurationMs();
|
||||
busy += surveySample.getBusy() * surveySample.getDurationMs();
|
||||
@@ -1521,6 +1543,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
totalDurationMs += surveySample.getDurationMs();
|
||||
noiseList.add(getNegativeSignedIntFrom8BitUnsigned(surveySample.getNoise()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (totalDurationMs > 0) {
|
||||
@@ -1570,7 +1593,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
}
|
||||
|
||||
populateNetworkProbeMetrics(report, apNodeMetrics);
|
||||
updateNetworkAdminStatusReport(customerId, equipmentId, apNodeMetrics);
|
||||
RadioUtilizationReport radioUtilizationReport = new RadioUtilizationReport();
|
||||
radioUtilizationReport.setAvgNoiseFloor(avgNoiseFloor);
|
||||
radioUtilizationReport.setRadioUtilization(radioUtilizationDetailsMap);
|
||||
@@ -1579,78 +1601,9 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
updateDeviceStatusRadioUtilizationReport(customerId, equipmentId, radioUtilizationReport);
|
||||
}
|
||||
|
||||
private void updateNetworkAdminStatusReport(int customerId, long equipmentId, ApNodeMetrics apNodeMetrics) {
|
||||
apNodeMetrics.getNetworkProbeMetrics().forEach(n -> {
|
||||
|
||||
|
||||
LOG.info("Update NetworkAdminStatusReport for NetworkProbeMetrics {}", n.toString());
|
||||
|
||||
Status networkAdminStatus = statusServiceInterface.getOrNull(customerId, equipmentId,
|
||||
StatusDataType.NETWORK_ADMIN);
|
||||
|
||||
if (networkAdminStatus == null) {
|
||||
networkAdminStatus = new Status();
|
||||
networkAdminStatus.setCustomerId(customerId);
|
||||
networkAdminStatus.setEquipmentId(equipmentId);
|
||||
networkAdminStatus.setCreatedTimestamp(System.currentTimeMillis());
|
||||
networkAdminStatus.setStatusDataType(StatusDataType.NETWORK_ADMIN);
|
||||
networkAdminStatus.setDetails(new NetworkAdminStatusData());
|
||||
networkAdminStatus = statusServiceInterface.update(networkAdminStatus);
|
||||
}
|
||||
|
||||
NetworkAdminStatusData statusData = (NetworkAdminStatusData) networkAdminStatus.getDetails();
|
||||
|
||||
if (n.getDnsState() == null) {
|
||||
LOG.info("No DnsState present in networkProbeMetrics, DnsState and CloudLinkStatus set to 'normal");
|
||||
statusData.setDnsStatus(StatusCode.normal);
|
||||
statusData.setCloudLinkStatus(StatusCode.normal);
|
||||
} else {
|
||||
statusData.setDnsStatus(stateUpDownErrorToStatusCode(n.getDnsState()));
|
||||
statusData.setCloudLinkStatus(stateUpDownErrorToStatusCode(n.getDnsState()));
|
||||
}
|
||||
if (n.getDhcpState() == null) {
|
||||
LOG.info("No DhcpState present in networkProbeMetrics, set to 'normal");
|
||||
statusData.setDhcpStatus(StatusCode.normal);
|
||||
} else {
|
||||
statusData.setDhcpStatus(stateUpDownErrorToStatusCode(n.getDhcpState()));
|
||||
}
|
||||
if (n.getRadiusState() == null) {
|
||||
LOG.info("No RadiusState present in networkProbeMetrics, set to 'normal");
|
||||
statusData.setRadiusStatus(StatusCode.normal);
|
||||
} else {
|
||||
statusData.setRadiusStatus(stateUpDownErrorToStatusCode(n.getRadiusState()));
|
||||
}
|
||||
|
||||
networkAdminStatus.setDetails(statusData);
|
||||
|
||||
networkAdminStatus = statusServiceInterface.update(networkAdminStatus);
|
||||
|
||||
LOG.info("Updated NetworkAdminStatus {}", networkAdminStatus);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private static StatusCode stateUpDownErrorToStatusCode(StateUpDownError state) {
|
||||
|
||||
switch (state) {
|
||||
case enabled:
|
||||
return StatusCode.normal;
|
||||
case error:
|
||||
return StatusCode.error;
|
||||
case disabled:
|
||||
return StatusCode.disabled;
|
||||
case UNSUPPORTED:
|
||||
return StatusCode.requiresAttention;
|
||||
default:
|
||||
return StatusCode.normal;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void updateDeviceStatusRadioUtilizationReport(int customerId, long equipmentId,
|
||||
RadioUtilizationReport radioUtilizationReport) {
|
||||
LOG.info(
|
||||
LOG.debug(
|
||||
"Processing updateDeviceStatusRadioUtilizationReport for equipmentId {} with RadioUtilizationReport {}",
|
||||
equipmentId, radioUtilizationReport);
|
||||
|
||||
@@ -1658,7 +1611,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
StatusDataType.RADIO_UTILIZATION);
|
||||
|
||||
if (radioUtilizationStatus == null) {
|
||||
LOG.info("Create new radioUtilizationStatus");
|
||||
LOG.debug("Create new radioUtilizationStatus");
|
||||
radioUtilizationStatus = new Status();
|
||||
radioUtilizationStatus.setCustomerId(customerId);
|
||||
radioUtilizationStatus.setEquipmentId(equipmentId);
|
||||
@@ -1704,8 +1657,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
ipAddress = InetAddress.getByName(dnsProbeMetricFromAp.getServerIP());
|
||||
cloudDnsProbeMetric.setDnsServerIp(ipAddress);
|
||||
} catch (UnknownHostException e) {
|
||||
LOG.error("Could not get DNS Server IP from network_probe service_metrics_collection_config",
|
||||
e);
|
||||
LOG.error("Could not get DNS Server IP from network_probe service_metrics_collection_config", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1741,6 +1693,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
StateUpDownError dhcpState = OvsdbToWlanCloudTypeMappingUtility
|
||||
.getCloudMetricsStateFromOpensyncStatsStateUpDown(vlanMetrics.getDhcpState());
|
||||
|
||||
|
||||
networkProbeMetrics.setDhcpState(dhcpState);
|
||||
|
||||
}
|
||||
@@ -1769,23 +1722,24 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
eqOsPerformance.setTotalAvailableMemoryKb(deviceReport.getMemUtil().getMemTotal());
|
||||
status.setDetails(eqOsPerformance);
|
||||
status = statusServiceInterface.update(status);
|
||||
LOG.info("updated status {}", status);
|
||||
LOG.debug("updated status {}", status);
|
||||
}
|
||||
|
||||
void populateApClientMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId,
|
||||
long locationId) {
|
||||
LOG.info("populateApClientMetrics for Customer {} Equipment {}", customerId, equipmentId);
|
||||
LOG.debug("populateApClientMetrics for Customer {} Equipment {}", customerId, equipmentId);
|
||||
|
||||
for (ClientReport clReport : report.getClientsList()) {
|
||||
for (Client cl : clReport.getClientListList()) {
|
||||
|
||||
if (cl.getMacAddress() == null) {
|
||||
LOG.info("No mac address for Client {}, cannot set device mac address for client in ClientMetrics.",
|
||||
LOG.debug(
|
||||
"No mac address for Client {}, cannot set device mac address for client in ClientMetrics.",
|
||||
cl);
|
||||
continue;
|
||||
}
|
||||
|
||||
LOG.info("Processing ClientReport from AP {}", cl.getMacAddress());
|
||||
LOG.debug("Processing ClientReport from AP {}", cl.getMacAddress());
|
||||
|
||||
ServiceMetric smr = new ServiceMetric(customerId, equipmentId, new MacAddress(cl.getMacAddress()));
|
||||
smr.setLocationId(locationId);
|
||||
@@ -1809,7 +1763,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
long sessionId = WiFiSessionUtility.encodeWiFiAssociationId(clReport.getTimestampMs() / 1000L,
|
||||
MacAddress.convertMacStringToLongValue(cl.getMacAddress()));
|
||||
|
||||
LOG.info("populateApClientMetrics Session Id {}", sessionId);
|
||||
LOG.debug("populateApClientMetrics Session Id {}", sessionId);
|
||||
cMetrics.setSessionId(sessionId);
|
||||
|
||||
if (cl.hasStats()) {
|
||||
@@ -1867,7 +1821,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
LOG.info("ApClientMetrics Report {}", cMetrics);
|
||||
LOG.debug("ApClientMetrics Report {}", cMetrics);
|
||||
|
||||
}
|
||||
|
||||
@@ -1877,7 +1831,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
void populateNeighbourScanReports(List<ServiceMetric> metricRecordList, Report report, int customerId,
|
||||
long equipmentId, long locationId) {
|
||||
LOG.info("populateNeighbourScanReports for Customer {} Equipment {}", customerId, equipmentId);
|
||||
LOG.debug("populateNeighbourScanReports for Customer {} Equipment {}", customerId, equipmentId);
|
||||
|
||||
for (Neighbor neighbor : report.getNeighborsList()) {
|
||||
|
||||
@@ -2020,6 +1974,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
latestClientSessionDetails.setDynamicVlan(ssidConfig.getVlanId());
|
||||
}
|
||||
|
||||
|
||||
RadioBasedSsidConfiguration radioConfig = ssidConfig.getRadioBasedConfigs().get(radioType);
|
||||
latestClientSessionDetails
|
||||
.setIs11KUsed(radioConfig.getEnable80211k() != null ? radioConfig.getEnable80211k() : false);
|
||||
@@ -2037,7 +1992,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
clientSession = clientServiceInterface.updateSession(clientSession);
|
||||
|
||||
LOG.info("Updated client session {}", clientSession);
|
||||
LOG.debug("Updated client session {}", clientSession);
|
||||
|
||||
return clientSession;
|
||||
} catch (Exception e) {
|
||||
@@ -2048,13 +2003,14 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
ClientSessionMetricDetails calculateClientSessionMetricDetails(sts.OpensyncStats.Client client, long timestamp) {
|
||||
|
||||
LOG.info("calculateClientSessionMetricDetails for Client {} at timestamp {}", client.getMacAddress(),
|
||||
LOG.debug("calculateClientSessionMetricDetails for Client {} at timestamp {}", client.getMacAddress(),
|
||||
timestamp);
|
||||
|
||||
ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails();
|
||||
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.info("Stats: {} DurationMs {}", client.getStats(), client.getDurationMs());
|
||||
LOG.debug("Stats: {} DurationMs {}", client.getStats(), client.getDurationMs());
|
||||
int rssi = client.getStats().getRssi();
|
||||
metricDetails.setRssi(rssi);
|
||||
metricDetails.setRxBytes(client.getStats().getRxBytes());
|
||||
@@ -2072,7 +2028,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
metricDetails.setRxRateKbps((long) client.getStats().getRxRate());
|
||||
metricDetails.setTxRateKbps((long) client.getStats().getTxRate());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.info("RxRateKbps {} TxRateKbps {}", metricDetails.getRxRateKbps(), metricDetails.getTxRateKbps());
|
||||
LOG.debug("RxRateKbps {} TxRateKbps {}", metricDetails.getRxRateKbps(), metricDetails.getTxRateKbps());
|
||||
|
||||
// Throughput, do rate / duration
|
||||
if (client.getDurationMs() > 1000) {
|
||||
@@ -2085,12 +2041,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
float txBytesToMb = txBytesFv / 125000F;
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.info("rxBytesToMb {} txBytesToMb {} ", rxBytesToMb, txBytesToMb);
|
||||
LOG.debug("rxBytesToMb {} txBytesToMb {} ", rxBytesToMb, txBytesToMb);
|
||||
|
||||
metricDetails.setRxMbps(rxBytesToMb / durationSec);
|
||||
metricDetails.setTxMbps(txBytesToMb / durationSec);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.info("RxMbps {} TxMbps {} ", metricDetails.getRxMbps(), metricDetails.getTxMbps());
|
||||
LOG.debug("RxMbps {} TxMbps {} ", metricDetails.getRxMbps(), metricDetails.getTxMbps());
|
||||
|
||||
} else {
|
||||
LOG.info("Cannot calculate tx/rx throughput for Client {} based on duration of {} Ms",
|
||||
@@ -2104,17 +2060,19 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
void populateApSsidMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId,
|
||||
String apId, long locationId) {
|
||||
|
||||
LOG.info("populateApSsidMetrics for Customer {} Equipment {}", customerId, equipmentId);
|
||||
LOG.debug("populateApSsidMetrics for Customer {} Equipment {}", customerId, equipmentId);
|
||||
ServiceMetric smr = new ServiceMetric(customerId, equipmentId);
|
||||
smr.setLocationId(locationId);
|
||||
ApSsidMetrics apSsidMetrics = new ApSsidMetrics();
|
||||
|
||||
|
||||
smr.setDetails(apSsidMetrics);
|
||||
metricRecordList.add(smr);
|
||||
|
||||
|
||||
for (ClientReport clientReport : report.getClientsList()) {
|
||||
|
||||
LOG.info("ClientReport for channel {} RadioBand {}", clientReport.getChannel(), clientReport.getBand());
|
||||
LOG.debug("ClientReport for channel {} RadioBand {}", clientReport.getChannel(), clientReport.getBand());
|
||||
|
||||
if (smr.getCreatedTimestamp() < clientReport.getTimestampMs()) {
|
||||
smr.setCreatedTimestamp(clientReport.getTimestampMs());
|
||||
@@ -2157,11 +2115,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
}
|
||||
}
|
||||
}
|
||||
LOG.info("Client Report Date is {}", new Date(clientReport.getTimestampMs()));
|
||||
LOG.debug("Client Report Date is {}", new Date(clientReport.getTimestampMs()));
|
||||
int numConnectedClients = 0;
|
||||
for (Client client : clientReport.getClientListList()) {
|
||||
if (client.hasStats()) {
|
||||
|
||||
|
||||
if (client.hasSsid()) {
|
||||
ssid = client.getSsid();
|
||||
}
|
||||
@@ -2186,8 +2145,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
try {
|
||||
|
||||
if (client.hasConnected() && client.getConnected() && client.hasMacAddress()) {
|
||||
// update service_metrics_collection_config for
|
||||
// connected client
|
||||
// update service_metrics_collection_config for connected client
|
||||
ClientSession session = handleClientSessionMetricsUpdate(customerId, equipmentId,
|
||||
locationId, radioType, clientReport.getTimestampMs(), client);
|
||||
if (session != null) {
|
||||
@@ -2197,8 +2155,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
// Make sure, if we have a session for this client,
|
||||
// it
|
||||
// shows disconnected.
|
||||
// update any service_metrics_collection_config that
|
||||
// need update if the
|
||||
// update any service_metrics_collection_config that need update if the
|
||||
// disconnect occured during this window
|
||||
if (client.hasMacAddress()) {
|
||||
ClientSession session = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||
@@ -2236,8 +2193,9 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
continue; // not connected
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
LOG.info("Unabled to update client {} session {}", client, e);
|
||||
LOG.debug("Unabled to update client {} session {}", client, e);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2267,7 +2225,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
}
|
||||
|
||||
LOG.info("ApSsidMetrics {}", apSsidMetrics);
|
||||
LOG.debug("ApSsidMetrics {}", apSsidMetrics);
|
||||
|
||||
}
|
||||
|
||||
@@ -2309,7 +2267,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
void populateChannelInfoReports(List<ServiceMetric> metricRecordList, Report report, int customerId,
|
||||
long equipmentId, long locationId, long profileId) {
|
||||
|
||||
LOG.info("populateChannelInfoReports for Customer {} Equipment {}", customerId, equipmentId);
|
||||
LOG.debug("populateChannelInfoReports for Customer {} Equipment {}", customerId, equipmentId);
|
||||
|
||||
ProfileContainer profileContainer = new ProfileContainer(
|
||||
profileServiceInterface.getProfileWithChildren(profileId));
|
||||
@@ -2369,17 +2327,20 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
channelInfoReports.setChannelInformationReportsPerRadio(channelInfoMap);
|
||||
}
|
||||
|
||||
|
||||
channelInfoReports.setChannelInformationReportsPerRadio(channelInfoMap);
|
||||
smr.setDetails(channelInfoReports);
|
||||
smr.setCreatedTimestamp(survey.getTimestampMs());
|
||||
metricRecordList.add(smr);
|
||||
|
||||
LOG.info("ChannelInfoReports {}", channelInfoReports);
|
||||
LOG.debug("ChannelInfoReports {}", channelInfoReports);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int getNegativeSignedIntFrom8BitUnsigned(int unsignedValue) {
|
||||
byte b = (byte) Integer.parseInt(Integer.toHexString(unsignedValue), 16);
|
||||
return b;
|
||||
|
||||
@@ -10,48 +10,55 @@
|
||||
"countryCode" : "ca",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyActivityDetails" : {
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,48 +10,55 @@
|
||||
"countryCode" : "ca",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyActivityDetails" : {
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,48 +10,55 @@
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyActivityDetails" : {
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
}
|
||||
],
|
||||
"venueTypeAssignment": {
|
||||
"model_type": "ProfileVenueTypeAssignment",
|
||||
"model_type": "PasspointVenueTypeAssignment",
|
||||
"venueDescription": "Research and Development Facility",
|
||||
"venueGroupId": 2,
|
||||
"venueTypeId": 8
|
||||
|
||||
@@ -10,48 +10,55 @@
|
||||
"countryCode" : "ca",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyActivityDetails" : {
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,48 +10,55 @@
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyActivityDetails" : {
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,48 +10,55 @@
|
||||
"countryCode" : "ca",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyActivityDetails" : {
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,48 +10,55 @@
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyActivityDetails" : {
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -196,18 +196,16 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(apId);
|
||||
|
||||
if (opensyncAPConfig != null) {
|
||||
// cleanup existing
|
||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||
ovsdbDao.removeAllPasspointConfigs(ovsdbClient);
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||
ovsdbDao.removeAllSsids(ovsdbClient, opensyncAPConfig); // always
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
ovsdbDao.removeAllGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
// reconfigure
|
||||
ovsdbDao.configureWifiRadios(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureInterfaces(ovsdbClient);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureWifiRrm(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
if (opensyncAPConfig.getHotspotConfig() != null) {
|
||||
ovsdbDao.configureHotspots(ovsdbClient, opensyncAPConfig);
|
||||
}
|
||||
@@ -218,8 +216,8 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
} else {
|
||||
ovsdbDao.removeAllPasspointConfigs(ovsdbClient);
|
||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
ovsdbDao.removeAllSsids(ovsdbClient); // always
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
ovsdbDao.removeAllGreTunnels(ovsdbClient, null);
|
||||
}
|
||||
|
||||
@@ -270,17 +268,18 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
LOG.warn("AP with id " + apId + " does not have a config to apply.");
|
||||
return;
|
||||
}
|
||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||
|
||||
ovsdbDao.removeAllPasspointConfigs(ovsdbClient);
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
ovsdbDao.removeAllSsids(ovsdbClient, opensyncAPConfig); // always
|
||||
ovsdbDao.removeAllGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||
|
||||
ovsdbDao.configureWifiRadios(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureInterfaces(ovsdbClient);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureWifiRrm(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
if (opensyncAPConfig.getHotspotConfig() != null) {
|
||||
ovsdbDao.configureHotspots(ovsdbClient, opensyncAPConfig);
|
||||
}
|
||||
|
||||
@@ -104,15 +104,12 @@ import com.vmware.ovsdb.protocol.methods.TableUpdate;
|
||||
import com.vmware.ovsdb.protocol.methods.TableUpdates;
|
||||
import com.vmware.ovsdb.protocol.operation.Delete;
|
||||
import com.vmware.ovsdb.protocol.operation.Insert;
|
||||
import com.vmware.ovsdb.protocol.operation.Mutate;
|
||||
import com.vmware.ovsdb.protocol.operation.Operation;
|
||||
import com.vmware.ovsdb.protocol.operation.Select;
|
||||
import com.vmware.ovsdb.protocol.operation.Update;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Atom;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Condition;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Function;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Mutation;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Mutator;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Row;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Uuid;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Value;
|
||||
@@ -2757,7 +2754,7 @@ public class OvsdbDao {
|
||||
|
||||
// TODO: when AP support for Bonjour Gateway set values
|
||||
if (bonjourServiceMap != null && bonjourServiceMap.size() > 0) {
|
||||
LOG.info("SSID {} Bonjour Services per vlan {}", ssid, bonjourServiceMap);
|
||||
LOG.debug("SSID {} Bonjour Services per vlan {}", ssid, bonjourServiceMap);
|
||||
}
|
||||
|
||||
updateColumns.put("bridge", new Atom<>(bridgeInterfaceName));
|
||||
@@ -2835,13 +2832,13 @@ public class OvsdbDao {
|
||||
|
||||
if (isUpdate) {
|
||||
for (OperationResult res : result) {
|
||||
LOG.info("Op Result {}", res);
|
||||
LOG.debug("Op Result {}", res);
|
||||
}
|
||||
LOG.info("Updated existing SSID {} on interface {} / {}", ssid, vifInterfaceName, radioFreqBand);
|
||||
} else {
|
||||
Uuid vifConfigUuid = null;
|
||||
for (OperationResult res : result) {
|
||||
LOG.info("Op Result {}", res);
|
||||
LOG.debug("Op Result {}", res);
|
||||
if (res instanceof InsertResult) {
|
||||
vifConfigUuid = ((InsertResult) res).getUuid();
|
||||
}
|
||||
@@ -2851,7 +2848,6 @@ public class OvsdbDao {
|
||||
}
|
||||
updateColumns.clear();
|
||||
operations.clear();
|
||||
updateVifConfigsSetForRadio(ovsdbClient, ssid, radioFreqBand, operations, updateColumns, vifConfigUuid);
|
||||
LOG.info("Provisioned SSID {} on interface {} / {}", ssid, vifInterfaceName, radioFreqBand);
|
||||
}
|
||||
|
||||
@@ -2920,32 +2916,6 @@ public class OvsdbDao {
|
||||
}
|
||||
}
|
||||
|
||||
private void updateVifConfigsSetForRadio(OvsdbClient ovsdbClient, String ssid, String radioFreqBand,
|
||||
List<Operation> operations, Map<String, Value> updateColumns, Uuid vifConfigUuid)
|
||||
throws OvsdbClientException, InterruptedException, ExecutionException, TimeoutException {
|
||||
|
||||
List<Condition> conditions = new ArrayList<>();
|
||||
conditions.add(new Condition("freq_band", Function.EQUALS, new Atom<>(radioFreqBand)));
|
||||
|
||||
List<Mutation> mutations = new ArrayList<>();
|
||||
Mutation mutation = new Mutation("vif_configs", Mutator.INSERT, new Atom<>(vifConfigUuid));
|
||||
mutations.add(mutation);
|
||||
operations.add(new Mutate(wifiRadioConfigDbTable, conditions, mutations));
|
||||
|
||||
LOG.info("Sending batch of operations : {} ", operations);
|
||||
|
||||
CompletableFuture<OperationResult[]> fResult = ovsdbClient.transact(ovsdbName, operations);
|
||||
OperationResult[] result = fResult.get(ovsdbTimeoutSec, TimeUnit.SECONDS);
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.info("Updated WifiRadioConfig {} for SSID {}:", radioFreqBand, ssid);
|
||||
|
||||
for (OperationResult res : result) {
|
||||
LOG.info("Op Result {}", res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void configureSsids(OvsdbClient ovsdbClient, OpensyncAPConfig opensyncApConfig) {
|
||||
|
||||
boolean rrmEnabled = false;
|
||||
@@ -3474,18 +3444,19 @@ public class OvsdbDao {
|
||||
// radius_acct_interval
|
||||
security.put("radius_acct_interval",
|
||||
ssidConfig.getRadiusAcountingServiceInterval().toString());
|
||||
|
||||
LOG.info(
|
||||
"set Radius Accounting server attributes radius_acct_ip {} radius_acct_port {} radius_acct_secret {} radius_acct_interval {}",
|
||||
security.get("radius_acct_ip"), security.get("radius_acct_port"),
|
||||
security.get("radius_acct_secret"), security.get("radius_acct_interval"));
|
||||
} else {
|
||||
LOG.info(
|
||||
"No radius_acct_interval defined for ssid {}, Setting radius_acct_interval to 0",
|
||||
"No radius_acct_interval defined for ssid {}, assume the RadiusServer {} to be providing Acct-Interim-Interval attribute in it's Access-Accept message",
|
||||
ssidConfig.getSsid(), rServer);
|
||||
security.put("radius_acct_interval",
|
||||
"0");
|
||||
LOG.info(
|
||||
"set Radius Accounting server attributes radius_acct_ip {} radius_acct_port {} radius_acct_secret {}",
|
||||
security.get("radius_acct_ip"), security.get("radius_acct_port"),
|
||||
security.get("radius_acct_secret"));
|
||||
}
|
||||
LOG.info(
|
||||
"set Radius Accounting server attributes radius_acct_ip {} radius_acct_port {} radius_acct_secret {} radius_acct_interval {}",
|
||||
security.get("radius_acct_ip"), security.get("radius_acct_port"),
|
||||
security.get("radius_acct_secret"), security.get("radius_acct_interval"));
|
||||
|
||||
}
|
||||
|
||||
@@ -5111,7 +5082,7 @@ public class OvsdbDao {
|
||||
OperationResult[] result = fResult.get(ovsdbTimeoutSec, TimeUnit.SECONDS);
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Removed rrm from {}:", wifiRrmConfigDbTable);
|
||||
LOG.debug("Removed rrm from {}:", wifiVifConfigDbTable);
|
||||
|
||||
for (OperationResult res : result) {
|
||||
LOG.debug("Op Result {}", res);
|
||||
|
||||
@@ -262,7 +262,7 @@ public class OvsdbDaoTest {
|
||||
location.setName("Ottawa");
|
||||
apConfig.setEquipmentLocation(location);
|
||||
ovsdbDao.getRadiusAccountingConfiguration(apConfig, ssidConfig, security);
|
||||
assert (security.get("radius_acct_interval").equals("0"));
|
||||
assert (security.containsKey("radius_acct_interval") == false);
|
||||
assert (security.get("radius_acct_ip").equals("192.168.0.1"));
|
||||
assert (security.get("radius_acct_port").equals("1812"));
|
||||
assert (security.get("radius_acct_secret").equals("testing123"));
|
||||
|
||||
Reference in New Issue
Block a user