WIFI-551: Status API reports radiusStatus as null

This commit is contained in:
Mike Hansen
2020-11-24 12:22:47 -05:00
parent 84f3d4ea5d
commit f30b1ca02e
2 changed files with 112 additions and 70 deletions

View File

@@ -572,6 +572,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
networkAdminStatusRec = new Status(); networkAdminStatusRec = new Status();
networkAdminStatusRec.setCustomerId(ce.getCustomerId()); networkAdminStatusRec.setCustomerId(ce.getCustomerId());
networkAdminStatusRec.setEquipmentId(ce.getId()); networkAdminStatusRec.setEquipmentId(ce.getId());
networkAdminStatusRec.setStatusDataType(StatusDataType.NETWORK_ADMIN);
NetworkAdminStatusData statusData = new NetworkAdminStatusData(); NetworkAdminStatusData statusData = new NetworkAdminStatusData();
networkAdminStatusRec.setDetails(statusData); networkAdminStatusRec.setDetails(statusData);
} }
@@ -580,6 +581,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
netAdminStatusData.setDhcpStatus(StatusCode.normal); netAdminStatusData.setDhcpStatus(StatusCode.normal);
netAdminStatusData.setCloudLinkStatus(StatusCode.normal); netAdminStatusData.setCloudLinkStatus(StatusCode.normal);
netAdminStatusData.setDnsStatus(StatusCode.normal); netAdminStatusData.setDnsStatus(StatusCode.normal);
netAdminStatusData.setRadiusStatus(StatusCode.normal);
networkAdminStatusRec.setDetails(netAdminStatusData); networkAdminStatusRec.setDetails(netAdminStatusData);

View File

@@ -73,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.OperatingSystemPerformance;
import com.telecominfraproject.wlan.status.equipment.report.models.RadioUtilizationReport; import com.telecominfraproject.wlan.status.equipment.report.models.RadioUtilizationReport;
import com.telecominfraproject.wlan.status.models.Status; 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.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.RealTimeEventType;
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeSipCallReportEvent; import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeSipCallReportEvent;
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeSipCallStartEvent; import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeSipCallStartEvent;
@@ -288,7 +290,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
} }
void processEventReport(Report report, int customerId, long equipmentId, String apId, long locationId) { void processEventReport(Report report, int customerId, long equipmentId, String apId, long locationId) {
report.getEventReportList().stream().forEach(e -> { report.getEventReportList().stream().forEach(e -> {
@@ -441,7 +442,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
} }
clientSessionDetails.setAssociationState(AssociationState._802_11_Associated); clientSessionDetails.setAssociationState(AssociationState._802_11_Associated);
if (clientSession.getDetails() == null) { if (clientSession.getDetails() == null) {
clientSession.setDetails(clientSessionDetails); clientSession.setDetails(clientSessionDetails);
} else { } else {
@@ -452,7 +452,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
} }
} }
} }
@@ -508,7 +507,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
clientSessionDetails.setSessionId(apEventClientSession.getSessionId()); clientSessionDetails.setSessionId(apEventClientSession.getSessionId());
if (clientDisconnectEvent.hasLrcvUpTsInUs()) { if (clientDisconnectEvent.hasLrcvUpTsInUs()) {
clientSessionDetails.setLastRxTimestamp(clientDisconnectEvent.getLrcvUpTsInUs()); clientSessionDetails.setLastRxTimestamp(clientDisconnectEvent.getLrcvUpTsInUs());
} }
@@ -526,7 +524,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
} }
clientSessionDetails.setAssociationState(AssociationState.Disconnected); clientSessionDetails.setAssociationState(AssociationState.Disconnected);
if (clientSession.getDetails() == null) { if (clientSession.getDetails() == null) {
clientSession.setDetails(clientSessionDetails); clientSession.setDetails(clientSessionDetails);
} else { } else {
@@ -535,7 +532,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
clientSession = clientServiceInterface.updateSession(clientSession); clientSession = clientServiceInterface.updateSession(clientSession);
} else { } else {
LOG.info("Cannot update client or client session when no client mac address is present"); LOG.info("Cannot update client or client session when no client mac address is present");
} }
@@ -588,7 +584,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
clientSessionDetails.setAssociationState(AssociationState._802_11_Authenticated); clientSessionDetails.setAssociationState(AssociationState._802_11_Authenticated);
} }
if (clientSession.getDetails() == null) { if (clientSession.getDetails() == null) {
clientSession.setDetails(clientSessionDetails); clientSession.setDetails(clientSessionDetails);
} else { } else {
@@ -597,7 +592,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
clientSession = clientServiceInterface.updateSession(clientSession); clientSession = clientServiceInterface.updateSession(clientSession);
} else { } else {
LOG.info("Cannot update client or client session when no client mac address is present"); LOG.info("Cannot update client or client session when no client mac address is present");
} }
@@ -708,7 +702,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
clientSession.setLocationId(locationId); clientSession.setLocationId(locationId);
clientSession.setMacAddress(new MacAddress(clientFailureEvent.getStaMac())); clientSession.setMacAddress(new MacAddress(clientFailureEvent.getStaMac()));
ClientSessionDetails clientSessionDetails = new ClientSessionDetails(); ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
if (clientFailureEvent.hasSsid()) { if (clientFailureEvent.hasSsid()) {
@@ -771,10 +764,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
clientSession.setLocationId(locationId); clientSession.setLocationId(locationId);
clientSession.setMacAddress(new MacAddress(clientFirstDataEvent.getStaMac())); clientSession.setMacAddress(new MacAddress(clientFirstDataEvent.getStaMac()));
ClientSessionDetails clientSessionDetails = new ClientSessionDetails(); ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
if (clientFirstDataEvent.hasFdataRxUpTsInUs()) { if (clientFirstDataEvent.hasFdataRxUpTsInUs()) {
clientSessionDetails.setFirstDataRcvdTimestamp(clientFirstDataEvent.getFdataRxUpTsInUs()); clientSessionDetails.setFirstDataRcvdTimestamp(clientFirstDataEvent.getFdataRxUpTsInUs());
} }
@@ -832,12 +823,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
clientSession.setLocationId(locationId); clientSession.setLocationId(locationId);
clientSession.setMacAddress(new MacAddress(clientIdEvent.getCltMac())); clientSession.setMacAddress(new MacAddress(clientIdEvent.getCltMac()));
ClientSessionDetails clientSessionDetails = new ClientSessionDetails(); ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
clientSessionDetails.setSessionId(apEventClientSession.getSessionId()); clientSessionDetails.setSessionId(apEventClientSession.getSessionId());
if (clientSession.getDetails() == null) { if (clientSession.getDetails() == null) {
clientSession.setDetails(clientSessionDetails); clientSession.setDetails(clientSessionDetails);
} else { } else {
@@ -885,10 +874,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
ClientSessionDetails clientSessionDetails = new ClientSessionDetails(); ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
clientSessionDetails.setSessionId(apEventClientSession.getSessionId()); clientSessionDetails.setSessionId(apEventClientSession.getSessionId());
try { try {
clientSessionDetails clientSessionDetails
.setIpAddress(InetAddress.getByAddress(clientIpEvent.getIpAddr().toByteArray())); .setIpAddress(InetAddress.getByAddress(clientIpEvent.getIpAddr().toByteArray()));
@@ -1045,34 +1032,34 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
if (apRtpFlowStats.hasDirection()) { if (apRtpFlowStats.hasDirection()) {
switch (apRtpFlowStats.getDirection()) { switch (apRtpFlowStats.getDirection()) {
case RTP_DOWNSTREAM: case RTP_DOWNSTREAM:
cloudRtpStats.setDirection( cloudRtpStats.setDirection(
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.DOWNSTREAM); com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.DOWNSTREAM);
break; break;
case RTP_UPSTREAM: case RTP_UPSTREAM:
cloudRtpStats.setDirection( cloudRtpStats.setDirection(
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.UPSTREAM); com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.UPSTREAM);
break; break;
default: default:
cloudRtpStats.setDirection( cloudRtpStats.setDirection(
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.UNSUPPORTED); com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowDirection.UNSUPPORTED);
} }
} }
if (apRtpFlowStats.hasRtpFlowType()) { if (apRtpFlowStats.hasRtpFlowType()) {
switch (apRtpFlowStats.getRtpFlowType()) { switch (apRtpFlowStats.getRtpFlowType()) {
case RTP_VIDEO: case RTP_VIDEO:
cloudRtpStats.setFlowType( cloudRtpStats.setFlowType(
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.VIDEO); com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.VIDEO);
break; break;
case RTP_VOICE: case RTP_VOICE:
cloudRtpStats.setFlowType( cloudRtpStats.setFlowType(
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.VOICE); com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.VOICE);
break; break;
default: default:
cloudRtpStats.setFlowType( cloudRtpStats.setFlowType(
com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.UNSUPPORTED); com.telecominfraproject.wlan.systemevent.equipment.realtime.RtpFlowType.UNSUPPORTED);
break; break;
} }
} }
@@ -1100,12 +1087,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
cloudRtpStats.setPacketLossPercentage(apRtpFlowStats.getPacketLossPercent()); cloudRtpStats.setPacketLossPercentage(apRtpFlowStats.getPacketLossPercent());
} }
cloudRtpFlowStatsList.add(cloudRtpStats); cloudRtpFlowStatsList.add(cloudRtpStats);
} }
RealTimeSipCallReportEvent cloudSipCallReportEvent = new RealTimeSipCallReportEvent(customerId, equipmentId, RealTimeSipCallReportEvent cloudSipCallReportEvent = new RealTimeSipCallReportEvent(customerId, equipmentId,
eventTimestamp); eventTimestamp);
cloudSipCallReportEvent.setClientMacAddress(MacAddress.valueOf(callReport.getClientMac())); cloudSipCallReportEvent.setClientMacAddress(MacAddress.valueOf(callReport.getClientMac()));
@@ -1166,10 +1151,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
if (apCallStop.hasCallDuration()) { if (apCallStop.hasCallDuration()) {
cloudSipCallStopEvent.setCallDuration(apCallStop.getCallDuration()); cloudSipCallStopEvent.setCallDuration(apCallStop.getCallDuration());
} }
if (apCallStop.hasClientMac()) { if (apCallStop.hasClientMac()) {
@@ -1181,15 +1164,15 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
if (apCallStop.hasReason()) { if (apCallStop.hasReason()) {
switch (apCallStop.getReason()) { switch (apCallStop.getReason()) {
case BYE_OK: case BYE_OK:
cloudSipCallStopEvent.setReason(SipCallStopReason.BYE_OK); cloudSipCallStopEvent.setReason(SipCallStopReason.BYE_OK);
break; break;
case CALL_DROPPED: case CALL_DROPPED:
cloudSipCallStopEvent.setReason(SipCallStopReason.DROPPED); cloudSipCallStopEvent.setReason(SipCallStopReason.DROPPED);
break; break;
default: default:
cloudSipCallStopEvent.setReason(SipCallStopReason.UNSUPPORTED); cloudSipCallStopEvent.setReason(SipCallStopReason.UNSUPPORTED);
} }
} }
@@ -1207,7 +1190,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
eventsList.add(cloudSipCallStopEvent); eventsList.add(cloudSipCallStopEvent);
} }
} }
@@ -1248,7 +1230,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
eventsList.add(rtsStartEvent); eventsList.add(rtsStartEvent);
} }
} }
@@ -1338,7 +1319,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
} }
} }
void populateApNodeMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId, void populateApNodeMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId,
long locationId) { long locationId) {
LOG.info("populateApNodeMetrics for Customer {} Equipment {}", customerId, equipmentId); LOG.info("populateApNodeMetrics for Customer {} Equipment {}", customerId, equipmentId);
@@ -1534,7 +1514,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
// we need to perform a weighted average here because the // we need to perform a weighted average here because the
// samples are in percentage, and may be of different durations // samples are in percentage, and may be of different durations
busyTx += surveySample.getBusyTx() * surveySample.getDurationMs(); busyTx += surveySample.getBusyTx() * surveySample.getDurationMs();
busyRx += surveySample.getBusyRx() * surveySample.getDurationMs(); busyRx += surveySample.getBusyRx() * surveySample.getDurationMs();
busy += surveySample.getBusy() * surveySample.getDurationMs(); busy += surveySample.getBusy() * surveySample.getDurationMs();
@@ -1542,7 +1521,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
totalDurationMs += surveySample.getDurationMs(); totalDurationMs += surveySample.getDurationMs();
noiseList.add(getNegativeSignedIntFrom8BitUnsigned(surveySample.getNoise())); noiseList.add(getNegativeSignedIntFrom8BitUnsigned(surveySample.getNoise()));
} }
if (totalDurationMs > 0) { if (totalDurationMs > 0) {
@@ -1592,6 +1570,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
} }
populateNetworkProbeMetrics(report, apNodeMetrics); populateNetworkProbeMetrics(report, apNodeMetrics);
updateNetworkAdminStatusReport(customerId, equipmentId, apNodeMetrics);
RadioUtilizationReport radioUtilizationReport = new RadioUtilizationReport(); RadioUtilizationReport radioUtilizationReport = new RadioUtilizationReport();
radioUtilizationReport.setAvgNoiseFloor(avgNoiseFloor); radioUtilizationReport.setAvgNoiseFloor(avgNoiseFloor);
radioUtilizationReport.setRadioUtilization(radioUtilizationDetailsMap); radioUtilizationReport.setRadioUtilization(radioUtilizationDetailsMap);
@@ -1600,6 +1579,75 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
updateDeviceStatusRadioUtilizationReport(customerId, equipmentId, radioUtilizationReport); 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, void updateDeviceStatusRadioUtilizationReport(int customerId, long equipmentId,
RadioUtilizationReport radioUtilizationReport) { RadioUtilizationReport radioUtilizationReport) {
LOG.info( LOG.info(
@@ -1656,7 +1704,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
ipAddress = InetAddress.getByName(dnsProbeMetricFromAp.getServerIP()); ipAddress = InetAddress.getByName(dnsProbeMetricFromAp.getServerIP());
cloudDnsProbeMetric.setDnsServerIp(ipAddress); cloudDnsProbeMetric.setDnsServerIp(ipAddress);
} catch (UnknownHostException e) { } 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);
} }
} }
@@ -1692,7 +1741,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
StateUpDownError dhcpState = OvsdbToWlanCloudTypeMappingUtility StateUpDownError dhcpState = OvsdbToWlanCloudTypeMappingUtility
.getCloudMetricsStateFromOpensyncStatsStateUpDown(vlanMetrics.getDhcpState()); .getCloudMetricsStateFromOpensyncStatsStateUpDown(vlanMetrics.getDhcpState());
networkProbeMetrics.setDhcpState(dhcpState); networkProbeMetrics.setDhcpState(dhcpState);
} }
@@ -1732,8 +1780,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
for (Client cl : clReport.getClientListList()) { for (Client cl : clReport.getClientListList()) {
if (cl.getMacAddress() == null) { if (cl.getMacAddress() == null) {
LOG.info( LOG.info("No mac address for Client {}, cannot set device mac address for client in ClientMetrics.",
"No mac address for Client {}, cannot set device mac address for client in ClientMetrics.",
cl); cl);
continue; continue;
} }
@@ -1973,7 +2020,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
latestClientSessionDetails.setDynamicVlan(ssidConfig.getVlanId()); latestClientSessionDetails.setDynamicVlan(ssidConfig.getVlanId());
} }
RadioBasedSsidConfiguration radioConfig = ssidConfig.getRadioBasedConfigs().get(radioType); RadioBasedSsidConfiguration radioConfig = ssidConfig.getRadioBasedConfigs().get(radioType);
latestClientSessionDetails latestClientSessionDetails
.setIs11KUsed(radioConfig.getEnable80211k() != null ? radioConfig.getEnable80211k() : false); .setIs11KUsed(radioConfig.getEnable80211k() != null ? radioConfig.getEnable80211k() : false);
@@ -2007,7 +2053,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails(); ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails();
if (LOG.isDebugEnabled()) if (LOG.isDebugEnabled())
LOG.info("Stats: {} DurationMs {}", client.getStats(), client.getDurationMs()); LOG.info("Stats: {} DurationMs {}", client.getStats(), client.getDurationMs());
int rssi = client.getStats().getRssi(); int rssi = client.getStats().getRssi();
@@ -2064,11 +2109,9 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
smr.setLocationId(locationId); smr.setLocationId(locationId);
ApSsidMetrics apSsidMetrics = new ApSsidMetrics(); ApSsidMetrics apSsidMetrics = new ApSsidMetrics();
smr.setDetails(apSsidMetrics); smr.setDetails(apSsidMetrics);
metricRecordList.add(smr); metricRecordList.add(smr);
for (ClientReport clientReport : report.getClientsList()) { for (ClientReport clientReport : report.getClientsList()) {
LOG.info("ClientReport for channel {} RadioBand {}", clientReport.getChannel(), clientReport.getBand()); LOG.info("ClientReport for channel {} RadioBand {}", clientReport.getChannel(), clientReport.getBand());
@@ -2119,7 +2162,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
for (Client client : clientReport.getClientListList()) { for (Client client : clientReport.getClientListList()) {
if (client.hasStats()) { if (client.hasStats()) {
if (client.hasSsid()) { if (client.hasSsid()) {
ssid = client.getSsid(); ssid = client.getSsid();
} }
@@ -2144,7 +2186,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
try { try {
if (client.hasConnected() && client.getConnected() && client.hasMacAddress()) { 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, ClientSession session = handleClientSessionMetricsUpdate(customerId, equipmentId,
locationId, radioType, clientReport.getTimestampMs(), client); locationId, radioType, clientReport.getTimestampMs(), client);
if (session != null) { if (session != null) {
@@ -2154,7 +2197,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
// Make sure, if we have a session for this client, // Make sure, if we have a session for this client,
// it // it
// shows disconnected. // 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 // disconnect occured during this window
if (client.hasMacAddress()) { if (client.hasMacAddress()) {
ClientSession session = clientServiceInterface.getSessionOrNull(customerId, equipmentId, ClientSession session = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
@@ -2192,7 +2236,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
continue; // not connected continue; // not connected
} }
} catch (Exception e) { } catch (Exception e) {
LOG.info("Unabled to update client {} session {}", client, e); LOG.info("Unabled to update client {} session {}", client, e);
} }
@@ -2326,7 +2369,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
channelInfoReports.setChannelInformationReportsPerRadio(channelInfoMap); channelInfoReports.setChannelInformationReportsPerRadio(channelInfoMap);
} }
channelInfoReports.setChannelInformationReportsPerRadio(channelInfoMap); channelInfoReports.setChannelInformationReportsPerRadio(channelInfoMap);
smr.setDetails(channelInfoReports); smr.setDetails(channelInfoReports);
smr.setCreatedTimestamp(survey.getTimestampMs()); smr.setCreatedTimestamp(survey.getTimestampMs());
@@ -2336,10 +2378,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
} }
} }
int getNegativeSignedIntFrom8BitUnsigned(int unsignedValue) { int getNegativeSignedIntFrom8BitUnsigned(int unsignedValue) {
byte b = (byte) Integer.parseInt(Integer.toHexString(unsignedValue), 16); byte b = (byte) Integer.parseInt(Integer.toHexString(unsignedValue), 16);
return b; return b;