mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-01 19:17:52 +00:00
set createTimestamp in status
This commit is contained in:
@@ -1224,12 +1224,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
Status protocolStatus = null;
|
||||
|
||||
Status channelStatus = statusServiceInterface.getOrNull(customerId, equipmentId, StatusDataType.RADIO_CHANNEL);
|
||||
Status channelStatusClone = null;
|
||||
if (channelStatus != null) {
|
||||
channelStatusClone = channelStatus.clone();
|
||||
}
|
||||
|
||||
Status currentChannelStatus = statusServiceInterface.getOrNull(customerId, equipmentId, StatusDataType.RADIO_CHANNEL);
|
||||
Status newChannelStatus = null;
|
||||
|
||||
for (OpensyncAPRadioState radioState : radioStateTables) {
|
||||
LOG.debug("Processing Wifi_Radio_State table update for AP {} Radio {}", apId, radioState.freqBand);
|
||||
|
||||
@@ -1241,16 +1238,16 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
protocolStatus = updateProtocolStatus(customerId, equipmentId, radioState);
|
||||
|
||||
channelStatus = updateChannelStatus(customerId, equipmentId, channelStatus, radioState);
|
||||
newChannelStatus = updateChannelStatus(customerId, equipmentId, currentChannelStatus, radioState);
|
||||
}
|
||||
|
||||
if (protocolStatus != null) {
|
||||
statusServiceInterface.update(protocolStatus);
|
||||
}
|
||||
|
||||
if (channelStatus != null && !Objects.equals(channelStatus, channelStatusClone)) {
|
||||
LOG.debug("wifiRadioStatusDbTableUpdate update Channel Status before {} after {}", channelStatusClone, channelStatus);
|
||||
statusServiceInterface.update(channelStatus);
|
||||
if (newChannelStatus != null && !Objects.equals(newChannelStatus, currentChannelStatus)) {
|
||||
LOG.info("wifiRadioStatusDbTableUpdate update Channel Status before {} after {}", currentChannelStatus, newChannelStatus);
|
||||
statusServiceInterface.update(newChannelStatus);
|
||||
}
|
||||
|
||||
if (configStateMismatch) {
|
||||
@@ -1310,9 +1307,11 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
channelStatus.setStatusDataType(StatusDataType.RADIO_CHANNEL);
|
||||
EquipmentChannelStatusData channelStatusData = new EquipmentChannelStatusData();
|
||||
channelStatus.setDetails(channelStatusData);
|
||||
channelStatus.setCreatedTimestamp(System.currentTimeMillis());
|
||||
}
|
||||
((EquipmentChannelStatusData) channelStatus.getDetails()).getChannelNumberStatusDataMap().put(radioState.getFreqBand(), radioState.getChannel());
|
||||
((EquipmentChannelStatusData) channelStatus.getDetails()).getTxPowerDataMap().put(radioState.getFreqBand(), radioState.getTxPower());
|
||||
|
||||
return channelStatus;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user