mirror of
				https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
				synced 2025-10-31 18:47:57 +00:00 
			
		
		
		
	Compare commits
	
		
			7 Commits
		
	
	
		
			hotfix/can
			...
			release-te
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 0fcdb7410e | ||
|   | 01fa2d3977 | ||
|   | f0daa18906 | ||
|   | d6d454bfc1 | ||
|   | f30b1ca02e | ||
|   | 84f3d4ea5d | ||
|   | a5fb061359 | 
							
								
								
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							| @@ -1,5 +1,5 @@ | ||||
| BSD 3-Clause License | ||||
|  | ||||
| #Release Testing | ||||
| Copyright (c) 2020, Telecom Infra Project | ||||
| All rights reserved. | ||||
|  | ||||
|   | ||||
| @@ -572,6 +572,7 @@ 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); | ||||
|             } | ||||
| @@ -580,6 +581,7 @@ 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,7 +39,6 @@ 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; | ||||
| @@ -74,7 +73,9 @@ 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; | ||||
| @@ -147,7 +148,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|     private CloudEventDispatcherInterface equipmentMetricsCollectorInterface; | ||||
|  | ||||
|     void processMqttMessage(String topic, WCStatsReport wcStatsReport) { | ||||
|         LOG.debug("Received WCStatsReport {}", wcStatsReport.toString()); | ||||
|         LOG.info("Received WCStatsReport {}", wcStatsReport.toString()); | ||||
|  | ||||
|         LOG.info("Received report on topic {}", topic); | ||||
|         int customerId = extractCustomerIdFromTopic(topic); | ||||
| @@ -244,7 +245,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|         } | ||||
|  | ||||
|         if (!metricRecordList.isEmpty()) { | ||||
|             LOG.debug("Publishing Metrics {}", metricRecordList); | ||||
|             LOG.info("Publishing Metrics {}", metricRecordList); | ||||
|             equipmentMetricsCollectorInterface.publishMetrics(metricRecordList); | ||||
|         } | ||||
|  | ||||
| @@ -289,7 +290,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|     } | ||||
|  | ||||
|  | ||||
|     void processEventReport(Report report, int customerId, long equipmentId, String apId, long locationId) { | ||||
|  | ||||
|         report.getEventReportList().stream().forEach(e -> { | ||||
| @@ -442,7 +442,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                 } | ||||
|                 clientSessionDetails.setAssociationState(AssociationState._802_11_Associated); | ||||
|  | ||||
|  | ||||
|                 if (clientSession.getDetails() == null) { | ||||
|                     clientSession.setDetails(clientSessionDetails); | ||||
|                 } else { | ||||
| @@ -453,7 +452,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|             } | ||||
|  | ||||
|  | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -509,7 +507,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|                 clientSessionDetails.setSessionId(apEventClientSession.getSessionId()); | ||||
|  | ||||
|  | ||||
|                 if (clientDisconnectEvent.hasLrcvUpTsInUs()) { | ||||
|                     clientSessionDetails.setLastRxTimestamp(clientDisconnectEvent.getLrcvUpTsInUs()); | ||||
|                 } | ||||
| @@ -527,7 +524,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                 } | ||||
|                 clientSessionDetails.setAssociationState(AssociationState.Disconnected); | ||||
|  | ||||
|  | ||||
|                 if (clientSession.getDetails() == null) { | ||||
|                     clientSession.setDetails(clientSessionDetails); | ||||
|                 } else { | ||||
| @@ -536,7 +532,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|                 clientSession = clientServiceInterface.updateSession(clientSession); | ||||
|  | ||||
|  | ||||
|             } else { | ||||
|                 LOG.info("Cannot update client or client session when no client mac address is present"); | ||||
|             } | ||||
| @@ -589,7 +584,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                     clientSessionDetails.setAssociationState(AssociationState._802_11_Authenticated); | ||||
|                 } | ||||
|  | ||||
|  | ||||
|                 if (clientSession.getDetails() == null) { | ||||
|                     clientSession.setDetails(clientSessionDetails); | ||||
|                 } else { | ||||
| @@ -598,7 +592,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|                 clientSession = clientServiceInterface.updateSession(clientSession); | ||||
|  | ||||
|  | ||||
|             } else { | ||||
|                 LOG.info("Cannot update client or client session when no client mac address is present"); | ||||
|             } | ||||
| @@ -709,7 +702,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                 clientSession.setLocationId(locationId); | ||||
|                 clientSession.setMacAddress(new MacAddress(clientFailureEvent.getStaMac())); | ||||
|  | ||||
|  | ||||
|                 ClientSessionDetails clientSessionDetails = new ClientSessionDetails(); | ||||
|  | ||||
|                 if (clientFailureEvent.hasSsid()) { | ||||
| @@ -772,10 +764,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                 clientSession.setLocationId(locationId); | ||||
|                 clientSession.setMacAddress(new MacAddress(clientFirstDataEvent.getStaMac())); | ||||
|  | ||||
|  | ||||
|                 ClientSessionDetails clientSessionDetails = new ClientSessionDetails(); | ||||
|  | ||||
|  | ||||
|                 if (clientFirstDataEvent.hasFdataRxUpTsInUs()) { | ||||
|                     clientSessionDetails.setFirstDataRcvdTimestamp(clientFirstDataEvent.getFdataRxUpTsInUs()); | ||||
|                 } | ||||
| @@ -833,12 +823,10 @@ 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 { | ||||
| @@ -886,10 +874,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|                 ClientSessionDetails clientSessionDetails = new ClientSessionDetails(); | ||||
|  | ||||
|  | ||||
|                 clientSessionDetails.setSessionId(apEventClientSession.getSessionId()); | ||||
|  | ||||
|  | ||||
|                 try { | ||||
|                     clientSessionDetails | ||||
|                             .setIpAddress(InetAddress.getByAddress(clientIpEvent.getIpAddr().toByteArray())); | ||||
| @@ -992,7 +978,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                 eventTimestamp = videoVoiceReport.getTimestampMs(); | ||||
|             } | ||||
|  | ||||
|             LOG.debug("Received VideoVoiceReport {} for SIP call", videoVoiceReport); | ||||
|             LOG.info("Received VideoVoiceReport {} for SIP call", videoVoiceReport); | ||||
|  | ||||
|             processRealTImeSipCallReportEvent(customerId, equipmentId, eventTimestamp, eventsList, videoVoiceReport); | ||||
|  | ||||
| @@ -1046,34 +1032,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; | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
| @@ -1101,12 +1087,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                     cloudRtpStats.setPacketLossPercentage(apRtpFlowStats.getPacketLossPercent()); | ||||
|                 } | ||||
|  | ||||
|  | ||||
|                 cloudRtpFlowStatsList.add(cloudRtpStats); | ||||
|  | ||||
|             } | ||||
|  | ||||
|  | ||||
|             RealTimeSipCallReportEvent cloudSipCallReportEvent = new RealTimeSipCallReportEvent(customerId, equipmentId, | ||||
|                     eventTimestamp); | ||||
|             cloudSipCallReportEvent.setClientMacAddress(MacAddress.valueOf(callReport.getClientMac())); | ||||
| @@ -1167,10 +1151,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|             if (apCallStop.hasCallDuration()) { | ||||
|  | ||||
|  | ||||
|                 cloudSipCallStopEvent.setCallDuration(apCallStop.getCallDuration()); | ||||
|  | ||||
|  | ||||
|             } | ||||
|  | ||||
|             if (apCallStop.hasClientMac()) { | ||||
| @@ -1182,15 +1164,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); | ||||
|                 } | ||||
|  | ||||
|             } | ||||
| @@ -1208,7 +1190,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|             eventsList.add(cloudSipCallStopEvent); | ||||
|  | ||||
|  | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -1249,7 +1230,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|             eventsList.add(rtsStartEvent); | ||||
|  | ||||
|  | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -1339,10 +1319,9 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|  | ||||
|     void populateApNodeMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId, | ||||
|             long locationId) { | ||||
|         LOG.debug("populateApNodeMetrics for Customer {} Equipment {}", customerId, equipmentId); | ||||
|         LOG.info("populateApNodeMetrics for Customer {} Equipment {}", customerId, equipmentId); | ||||
|         ApNodeMetrics apNodeMetrics = new ApNodeMetrics(); | ||||
|         ServiceMetric smr = new ServiceMetric(customerId, equipmentId); | ||||
|  | ||||
| @@ -1535,7 +1514,6 @@ 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(); | ||||
| @@ -1543,7 +1521,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                 totalDurationMs += surveySample.getDurationMs(); | ||||
|                 noiseList.add(getNegativeSignedIntFrom8BitUnsigned(surveySample.getNoise())); | ||||
|  | ||||
|  | ||||
|             } | ||||
|  | ||||
|             if (totalDurationMs > 0) { | ||||
| @@ -1593,6 +1570,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|         } | ||||
|  | ||||
|         populateNetworkProbeMetrics(report, apNodeMetrics); | ||||
|         updateNetworkAdminStatusReport(customerId, equipmentId, apNodeMetrics); | ||||
|         RadioUtilizationReport radioUtilizationReport = new RadioUtilizationReport(); | ||||
|         radioUtilizationReport.setAvgNoiseFloor(avgNoiseFloor); | ||||
|         radioUtilizationReport.setRadioUtilization(radioUtilizationDetailsMap); | ||||
| @@ -1601,9 +1579,78 @@ 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.debug( | ||||
|         LOG.info( | ||||
|                 "Processing updateDeviceStatusRadioUtilizationReport for equipmentId {} with RadioUtilizationReport {}", | ||||
|                 equipmentId, radioUtilizationReport); | ||||
|  | ||||
| @@ -1611,7 +1658,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                 StatusDataType.RADIO_UTILIZATION); | ||||
|  | ||||
|         if (radioUtilizationStatus == null) { | ||||
|             LOG.debug("Create new radioUtilizationStatus"); | ||||
|             LOG.info("Create new radioUtilizationStatus"); | ||||
|             radioUtilizationStatus = new Status(); | ||||
|             radioUtilizationStatus.setCustomerId(customerId); | ||||
|             radioUtilizationStatus.setEquipmentId(equipmentId); | ||||
| @@ -1657,7 +1704,8 @@ 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); | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
| @@ -1693,7 +1741,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                     StateUpDownError dhcpState = OvsdbToWlanCloudTypeMappingUtility | ||||
|                             .getCloudMetricsStateFromOpensyncStatsStateUpDown(vlanMetrics.getDhcpState()); | ||||
|  | ||||
|  | ||||
|                     networkProbeMetrics.setDhcpState(dhcpState); | ||||
|  | ||||
|                 } | ||||
| @@ -1722,24 +1769,23 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|         eqOsPerformance.setTotalAvailableMemoryKb(deviceReport.getMemUtil().getMemTotal()); | ||||
|         status.setDetails(eqOsPerformance); | ||||
|         status = statusServiceInterface.update(status); | ||||
|         LOG.debug("updated status {}", status); | ||||
|         LOG.info("updated status {}", status); | ||||
|     } | ||||
|  | ||||
|     void populateApClientMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId, | ||||
|             long locationId) { | ||||
|         LOG.debug("populateApClientMetrics for Customer {} Equipment {}", customerId, equipmentId); | ||||
|         LOG.info("populateApClientMetrics for Customer {} Equipment {}", customerId, equipmentId); | ||||
|  | ||||
|         for (ClientReport clReport : report.getClientsList()) { | ||||
|             for (Client cl : clReport.getClientListList()) { | ||||
|  | ||||
|                 if (cl.getMacAddress() == null) { | ||||
|                     LOG.debug( | ||||
|                             "No mac address for Client {}, cannot set device mac address for client in ClientMetrics.", | ||||
|                     LOG.info("No mac address for Client {}, cannot set device mac address for client in ClientMetrics.", | ||||
|                             cl); | ||||
|                     continue; | ||||
|                 } | ||||
|  | ||||
|                 LOG.debug("Processing ClientReport from AP {}", cl.getMacAddress()); | ||||
|                 LOG.info("Processing ClientReport from AP {}", cl.getMacAddress()); | ||||
|  | ||||
|                 ServiceMetric smr = new ServiceMetric(customerId, equipmentId, new MacAddress(cl.getMacAddress())); | ||||
|                 smr.setLocationId(locationId); | ||||
| @@ -1763,7 +1809,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                 long sessionId = WiFiSessionUtility.encodeWiFiAssociationId(clReport.getTimestampMs() / 1000L, | ||||
|                         MacAddress.convertMacStringToLongValue(cl.getMacAddress())); | ||||
|  | ||||
|                 LOG.debug("populateApClientMetrics Session Id {}", sessionId); | ||||
|                 LOG.info("populateApClientMetrics Session Id {}", sessionId); | ||||
|                 cMetrics.setSessionId(sessionId); | ||||
|  | ||||
|                 if (cl.hasStats()) { | ||||
| @@ -1821,7 +1867,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 LOG.debug("ApClientMetrics Report {}", cMetrics); | ||||
|                 LOG.info("ApClientMetrics Report {}", cMetrics); | ||||
|  | ||||
|             } | ||||
|  | ||||
| @@ -1831,7 +1877,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|     void populateNeighbourScanReports(List<ServiceMetric> metricRecordList, Report report, int customerId, | ||||
|             long equipmentId, long locationId) { | ||||
|         LOG.debug("populateNeighbourScanReports for Customer {} Equipment {}", customerId, equipmentId); | ||||
|         LOG.info("populateNeighbourScanReports for Customer {} Equipment {}", customerId, equipmentId); | ||||
|  | ||||
|         for (Neighbor neighbor : report.getNeighborsList()) { | ||||
|  | ||||
| @@ -1974,7 +2020,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                     latestClientSessionDetails.setDynamicVlan(ssidConfig.getVlanId()); | ||||
|                 } | ||||
|  | ||||
|  | ||||
|                 RadioBasedSsidConfiguration radioConfig = ssidConfig.getRadioBasedConfigs().get(radioType); | ||||
|                 latestClientSessionDetails | ||||
|                         .setIs11KUsed(radioConfig.getEnable80211k() != null ? radioConfig.getEnable80211k() : false); | ||||
| @@ -1992,7 +2037,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|             clientSession = clientServiceInterface.updateSession(clientSession); | ||||
|  | ||||
|             LOG.debug("Updated client session {}", clientSession); | ||||
|             LOG.info("Updated client session {}", clientSession); | ||||
|  | ||||
|             return clientSession; | ||||
|         } catch (Exception e) { | ||||
| @@ -2003,14 +2048,13 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|     ClientSessionMetricDetails calculateClientSessionMetricDetails(sts.OpensyncStats.Client client, long timestamp) { | ||||
|  | ||||
|         LOG.debug("calculateClientSessionMetricDetails for Client {} at timestamp {}", client.getMacAddress(), | ||||
|         LOG.info("calculateClientSessionMetricDetails for Client {} at timestamp {}", client.getMacAddress(), | ||||
|                 timestamp); | ||||
|  | ||||
|         ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails(); | ||||
|  | ||||
|  | ||||
|         if (LOG.isDebugEnabled()) | ||||
|             LOG.debug("Stats: {} DurationMs {}", client.getStats(), client.getDurationMs()); | ||||
|             LOG.info("Stats: {} DurationMs {}", client.getStats(), client.getDurationMs()); | ||||
|         int rssi = client.getStats().getRssi(); | ||||
|         metricDetails.setRssi(rssi); | ||||
|         metricDetails.setRxBytes(client.getStats().getRxBytes()); | ||||
| @@ -2028,7 +2072,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|         metricDetails.setRxRateKbps((long) client.getStats().getRxRate()); | ||||
|         metricDetails.setTxRateKbps((long) client.getStats().getTxRate()); | ||||
|         if (LOG.isDebugEnabled()) | ||||
|             LOG.debug("RxRateKbps {} TxRateKbps {}", metricDetails.getRxRateKbps(), metricDetails.getTxRateKbps()); | ||||
|             LOG.info("RxRateKbps {} TxRateKbps {}", metricDetails.getRxRateKbps(), metricDetails.getTxRateKbps()); | ||||
|  | ||||
|         // Throughput, do rate / duration | ||||
|         if (client.getDurationMs() > 1000) { | ||||
| @@ -2041,12 +2085,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|             float txBytesToMb = txBytesFv / 125000F; | ||||
|  | ||||
|             if (LOG.isDebugEnabled()) | ||||
|                 LOG.debug("rxBytesToMb {} txBytesToMb {} ", rxBytesToMb, txBytesToMb); | ||||
|                 LOG.info("rxBytesToMb {} txBytesToMb {} ", rxBytesToMb, txBytesToMb); | ||||
|  | ||||
|             metricDetails.setRxMbps(rxBytesToMb / durationSec); | ||||
|             metricDetails.setTxMbps(txBytesToMb / durationSec); | ||||
|             if (LOG.isDebugEnabled()) | ||||
|                 LOG.debug("RxMbps {} TxMbps {} ", metricDetails.getRxMbps(), metricDetails.getTxMbps()); | ||||
|                 LOG.info("RxMbps {} TxMbps {} ", metricDetails.getRxMbps(), metricDetails.getTxMbps()); | ||||
|  | ||||
|         } else { | ||||
|             LOG.info("Cannot calculate tx/rx throughput for Client {} based on duration of {} Ms", | ||||
| @@ -2060,19 +2104,17 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|     void populateApSsidMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId, | ||||
|             String apId, long locationId) { | ||||
|  | ||||
|         LOG.debug("populateApSsidMetrics for Customer {} Equipment {}", customerId, equipmentId); | ||||
|         LOG.info("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.debug("ClientReport for channel {} RadioBand {}", clientReport.getChannel(), clientReport.getBand()); | ||||
|             LOG.info("ClientReport for channel {} RadioBand {}", clientReport.getChannel(), clientReport.getBand()); | ||||
|  | ||||
|             if (smr.getCreatedTimestamp() < clientReport.getTimestampMs()) { | ||||
|                 smr.setCreatedTimestamp(clientReport.getTimestampMs()); | ||||
| @@ -2115,12 +2157,11 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             LOG.debug("Client Report Date is {}", new Date(clientReport.getTimestampMs())); | ||||
|             LOG.info("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(); | ||||
|                     } | ||||
| @@ -2145,7 +2186,8 @@ 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) { | ||||
| @@ -2155,7 +2197,8 @@ 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, | ||||
| @@ -2193,9 +2236,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                             continue; // not connected | ||||
|                         } | ||||
|  | ||||
|  | ||||
|                     } catch (Exception e) { | ||||
|                         LOG.debug("Unabled to update client {} session {}", client, e); | ||||
|                         LOG.info("Unabled to update client {} session {}", client, e); | ||||
|                     } | ||||
|  | ||||
|                 } | ||||
| @@ -2225,7 +2267,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|  | ||||
|         } | ||||
|  | ||||
|         LOG.debug("ApSsidMetrics {}", apSsidMetrics); | ||||
|         LOG.info("ApSsidMetrics {}", apSsidMetrics); | ||||
|  | ||||
|     } | ||||
|  | ||||
| @@ -2267,7 +2309,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|     void populateChannelInfoReports(List<ServiceMetric> metricRecordList, Report report, int customerId, | ||||
|             long equipmentId, long locationId, long profileId) { | ||||
|  | ||||
|         LOG.debug("populateChannelInfoReports for Customer {} Equipment {}", customerId, equipmentId); | ||||
|         LOG.info("populateChannelInfoReports for Customer {} Equipment {}", customerId, equipmentId); | ||||
|  | ||||
|         ProfileContainer profileContainer = new ProfileContainer( | ||||
|                 profileServiceInterface.getProfileWithChildren(profileId)); | ||||
| @@ -2327,20 +2369,17 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { | ||||
|                 channelInfoReports.setChannelInformationReportsPerRadio(channelInfoMap); | ||||
|             } | ||||
|  | ||||
|  | ||||
|             channelInfoReports.setChannelInformationReportsPerRadio(channelInfoMap); | ||||
|             smr.setDetails(channelInfoReports); | ||||
|             smr.setCreatedTimestamp(survey.getTimestampMs()); | ||||
|             metricRecordList.add(smr); | ||||
|  | ||||
|             LOG.debug("ChannelInfoReports {}", channelInfoReports); | ||||
|             LOG.info("ChannelInfoReports {}", channelInfoReports); | ||||
|  | ||||
|         } | ||||
|  | ||||
|  | ||||
|     } | ||||
|  | ||||
|  | ||||
|     int getNegativeSignedIntFrom8BitUnsigned(int unsignedValue) { | ||||
|         byte b = (byte) Integer.parseInt(Integer.toHexString(unsignedValue), 16); | ||||
|         return b; | ||||
|   | ||||
| @@ -10,55 +10,48 @@ | ||||
|     "countryCode" : "ca", | ||||
|     "maintenanceWindow" : null, | ||||
|     "rrmEnabled" : true, | ||||
|     "dailyRebalancingDetails" : { | ||||
|     "dailyActivityDetails" : { | ||||
|       "SUNDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "MONDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "TUESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "WEDNESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "THURSDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "FRIDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "SATURDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   | ||||
| @@ -10,55 +10,48 @@ | ||||
|     "countryCode" : "ca", | ||||
|     "maintenanceWindow" : null, | ||||
|     "rrmEnabled" : true, | ||||
|     "dailyRebalancingDetails" : { | ||||
|     "dailyActivityDetails" : { | ||||
|       "SUNDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "MONDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "TUESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "WEDNESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "THURSDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "FRIDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "SATURDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   | ||||
| @@ -10,55 +10,48 @@ | ||||
|     "countryCode" : "usa", | ||||
|     "maintenanceWindow" : null, | ||||
|     "rrmEnabled" : true, | ||||
|     "dailyRebalancingDetails" : { | ||||
|     "dailyActivityDetails" : { | ||||
|       "SUNDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "MONDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "TUESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "WEDNESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "THURSDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "FRIDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "SATURDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   | ||||
| @@ -28,7 +28,7 @@ | ||||
| 				} | ||||
| 			], | ||||
| 			"venueTypeAssignment": { | ||||
| 				"model_type": "PasspointVenueTypeAssignment", | ||||
| 				"model_type": "ProfileVenueTypeAssignment", | ||||
| 				"venueDescription": "Research and Development Facility", | ||||
| 				"venueGroupId": 2, | ||||
| 				"venueTypeId": 8 | ||||
|   | ||||
| @@ -10,55 +10,48 @@ | ||||
|     "countryCode" : "ca", | ||||
|     "maintenanceWindow" : null, | ||||
|     "rrmEnabled" : true, | ||||
|     "dailyRebalancingDetails" : { | ||||
|     "dailyActivityDetails" : { | ||||
|       "SUNDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "MONDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "TUESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "WEDNESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "THURSDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "FRIDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "SATURDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   | ||||
| @@ -10,55 +10,48 @@ | ||||
|     "countryCode" : "usa", | ||||
|     "maintenanceWindow" : null, | ||||
|     "rrmEnabled" : true, | ||||
|     "dailyRebalancingDetails" : { | ||||
|     "dailyActivityDetails" : { | ||||
|       "SUNDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "MONDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "TUESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "WEDNESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "THURSDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "FRIDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "SATURDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   | ||||
| @@ -10,55 +10,48 @@ | ||||
|     "countryCode" : "ca", | ||||
|     "maintenanceWindow" : null, | ||||
|     "rrmEnabled" : true, | ||||
|     "dailyRebalancingDetails" : { | ||||
|     "dailyActivityDetails" : { | ||||
|       "SUNDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "MONDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "TUESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "WEDNESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "THURSDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "FRIDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "SATURDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   | ||||
| @@ -10,55 +10,48 @@ | ||||
|     "countryCode" : "usa", | ||||
|     "maintenanceWindow" : null, | ||||
|     "rrmEnabled" : true, | ||||
|     "dailyRebalancingDetails" : { | ||||
|     "dailyActivityDetails" : { | ||||
|       "SUNDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "MONDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "TUESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "WEDNESDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "THURSDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "FRIDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       }, | ||||
|       "SATURDAY" : { | ||||
|         "model_type" : "LocationActivityDetails", | ||||
|         "busyTime" : "13:30", | ||||
|         "quietTime" : "3:30", | ||||
|         "timezone" : "US/Eastern", | ||||
|         "lastBusySnapshot" : 0 | ||||
|         "timezone" : "US/Eastern" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   | ||||
| @@ -196,16 +196,18 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface { | ||||
|         OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(apId); | ||||
|  | ||||
|         if (opensyncAPConfig != null) { | ||||
|             ovsdbDao.removeAllPasspointConfigs(ovsdbClient); | ||||
|             // cleanup existing | ||||
|             ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always | ||||
|             ovsdbDao.removeAllSsids(ovsdbClient, opensyncAPConfig); // always | ||||
|             ovsdbDao.removeAllPasspointConfigs(ovsdbClient); | ||||
|             ovsdbDao.removeWifiRrm(ovsdbClient); | ||||
|             ovsdbDao.removeAllSsids(ovsdbClient, opensyncAPConfig); // always | ||||
|             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); | ||||
|             } | ||||
| @@ -216,8 +218,8 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface { | ||||
|         } else { | ||||
|             ovsdbDao.removeAllPasspointConfigs(ovsdbClient); | ||||
|             ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always | ||||
|             ovsdbDao.removeAllSsids(ovsdbClient); // always | ||||
|             ovsdbDao.removeWifiRrm(ovsdbClient); | ||||
|             ovsdbDao.removeAllSsids(ovsdbClient); // always | ||||
|             ovsdbDao.removeAllGreTunnels(ovsdbClient, null); | ||||
|         } | ||||
|  | ||||
| @@ -268,18 +270,17 @@ 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,12 +104,15 @@ 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; | ||||
| @@ -2754,7 +2757,7 @@ public class OvsdbDao { | ||||
|  | ||||
|             // TODO: when AP support for Bonjour Gateway set values | ||||
|             if (bonjourServiceMap != null && bonjourServiceMap.size() > 0) { | ||||
|                 LOG.debug("SSID {} Bonjour Services per vlan {}", ssid, bonjourServiceMap); | ||||
|                 LOG.info("SSID {} Bonjour Services per vlan {}", ssid, bonjourServiceMap); | ||||
|             } | ||||
|  | ||||
|             updateColumns.put("bridge", new Atom<>(bridgeInterfaceName)); | ||||
| @@ -2832,13 +2835,13 @@ public class OvsdbDao { | ||||
|  | ||||
|             if (isUpdate) { | ||||
|                 for (OperationResult res : result) { | ||||
|                     LOG.debug("Op Result {}", res); | ||||
|                     LOG.info("Op Result {}", res); | ||||
|                 } | ||||
|                 LOG.info("Updated existing SSID {} on interface {} / {}", ssid, vifInterfaceName, radioFreqBand); | ||||
|             } else { | ||||
|                 Uuid vifConfigUuid = null; | ||||
|                 for (OperationResult res : result) { | ||||
|                     LOG.debug("Op Result {}", res); | ||||
|                     LOG.info("Op Result {}", res); | ||||
|                     if (res instanceof InsertResult) { | ||||
|                         vifConfigUuid = ((InsertResult) res).getUuid(); | ||||
|                     } | ||||
| @@ -2848,6 +2851,7 @@ public class OvsdbDao { | ||||
|                 } | ||||
|                 updateColumns.clear(); | ||||
|                 operations.clear(); | ||||
|                 updateVifConfigsSetForRadio(ovsdbClient, ssid, radioFreqBand, operations, updateColumns, vifConfigUuid); | ||||
|                 LOG.info("Provisioned SSID {} on interface {} / {}", ssid, vifInterfaceName, radioFreqBand); | ||||
|             } | ||||
|  | ||||
| @@ -2916,6 +2920,32 @@ 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; | ||||
| @@ -3444,19 +3474,18 @@ 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 {}, assume the RadiusServer {} to be providing Acct-Interim-Interval attribute in it's Access-Accept message", | ||||
|                                     "No radius_acct_interval defined for ssid {}, Setting radius_acct_interval to 0", | ||||
|                                     ssidConfig.getSsid(), rServer); | ||||
|                             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")); | ||||
|                             security.put("radius_acct_interval", | ||||
|                                     "0");                          | ||||
|                         } | ||||
|                         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")); | ||||
|  | ||||
|                     } | ||||
|  | ||||
| @@ -5082,7 +5111,7 @@ public class OvsdbDao { | ||||
|             OperationResult[] result = fResult.get(ovsdbTimeoutSec, TimeUnit.SECONDS); | ||||
|  | ||||
|             if (LOG.isDebugEnabled()) { | ||||
|                 LOG.debug("Removed rrm from {}:", wifiVifConfigDbTable); | ||||
|                 LOG.debug("Removed rrm from {}:", wifiRrmConfigDbTable); | ||||
|  | ||||
|                 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.containsKey("radius_acct_interval") == false); | ||||
|         assert (security.get("radius_acct_interval").equals("0")); | ||||
|         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