mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-03-20 20:39:19 +00:00
Compare commits
52 Commits
change_ses
...
WIFI-4340
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
999e597493 | ||
|
|
0dca8bb943 | ||
|
|
c8c7217d38 | ||
|
|
b41e35a536 | ||
|
|
64bd468ade | ||
|
|
fe488e9d5f | ||
|
|
a79778b083 | ||
|
|
d5b86d0c8d | ||
|
|
15698e99cb | ||
|
|
e06c28e85a | ||
|
|
c307f59e8a | ||
|
|
1e23a691d7 | ||
|
|
015e662e68 | ||
|
|
9f3af6773b | ||
|
|
b7eedf6b8c | ||
|
|
468e7bcddb | ||
|
|
9b712d6fb5 | ||
|
|
99475d3f2f | ||
|
|
7216b08ac7 | ||
|
|
34da98b9a8 | ||
|
|
65aeadeaa7 | ||
|
|
148a6762dc | ||
|
|
178378f8b6 | ||
|
|
d0e6866345 | ||
|
|
a2b3e711ea | ||
|
|
b5f5c6d19f | ||
|
|
a5079d04a7 | ||
|
|
35d89a1cf0 | ||
|
|
534ed3e9c0 | ||
|
|
a6ec1d6e7f | ||
|
|
a19fc425c2 | ||
|
|
fc8cab6a50 | ||
|
|
daabf38510 | ||
|
|
78c4d3a862 | ||
|
|
3f3e40d2dd | ||
|
|
91877f5305 | ||
|
|
11314e3395 | ||
|
|
fa6795369c | ||
|
|
e6e06d7b70 | ||
|
|
1e15e3cd94 | ||
|
|
02e03780db | ||
|
|
aac34150b2 | ||
|
|
3085c34cde | ||
|
|
35fd038113 | ||
|
|
7c387f1940 | ||
|
|
abb9b59659 | ||
|
|
7f0497754c | ||
|
|
82095510f7 | ||
|
|
0afd414870 | ||
|
|
41add1922b | ||
|
|
90ac57b988 | ||
|
|
0cc90764c6 |
@@ -795,7 +795,10 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
long equipmentIdPostQuery = row.getLong("equipmentId");
|
||||
int alarmCodePostQuery = row.getInt("alarmCode");
|
||||
long createdTimestampPostQuery = row.getLong("createdTimestamp");
|
||||
pageItems.add(getOrNull(customerId, equipmentIdPostQuery, AlarmCode.getById(alarmCodePostQuery), createdTimestampPostQuery));
|
||||
Alarm alarmToAdd = getOrNull(customerId, equipmentIdPostQuery, AlarmCode.getById(alarmCodePostQuery), createdTimestampPostQuery);
|
||||
if (alarmToAdd != null) {
|
||||
pageItems.add(alarmToAdd);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -259,7 +259,7 @@ public class AlarmServiceRemote extends BaseRemoteClient implements AlarmService
|
||||
|
||||
try {
|
||||
ResponseEntity<List<Alarm>> responseEntity =
|
||||
restTemplate.exchange(getBaseUrl() + "/forAlarmCode?alarmCodeSet={alarmCodeSetStr}&createdAfterTimestamp={createdAfterTimestamp}",
|
||||
restTemplate.exchange(getBaseUrl() + "/forAlarmCode?alarmCode={alarmCodeSetStr}&createdAfterTimestamp={createdAfterTimestamp}",
|
||||
HttpMethod.GET, null, Alarm_LIST_CLASS_TOKEN, alarmCodeSetStr, createdAfterTimestamp);
|
||||
|
||||
List<Alarm> result = responseEntity.getBody();
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.telecominfraproject.wlan.client.models.Client;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientDhcpDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionMetricDetails;
|
||||
import com.telecominfraproject.wlan.core.model.entity.CountryCode;
|
||||
import com.telecominfraproject.wlan.core.model.entity.MinMaxAvgValueInt;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.EquipmentType;
|
||||
@@ -829,16 +828,6 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
|
||||
sessionDetails.setDhcpDetails(dhcpDetails );
|
||||
|
||||
ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails();
|
||||
metricDetails.setRssi(getRandomInt(-60, -40));
|
||||
metricDetails.setRxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setTxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setRxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setTxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setSnr(getRandomInt(-90, -50));
|
||||
|
||||
sessionDetails.setMetricDetails(metricDetails);
|
||||
|
||||
clientSession.setDetails(sessionDetails);
|
||||
|
||||
this.clientServiceInterface.updateSession(clientSession);
|
||||
|
||||
@@ -38,7 +38,6 @@ import com.telecominfraproject.wlan.client.models.Client;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientDhcpDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionMetricDetails;
|
||||
import com.telecominfraproject.wlan.core.model.entity.CountryCode;
|
||||
import com.telecominfraproject.wlan.core.model.entity.MinMaxAvgValueInt;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.EquipmentType;
|
||||
@@ -1238,8 +1237,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
clientMetrics.setNumRxBytes(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setNumTxBytes(getRandomLong(3000000, 7000000));
|
||||
|
||||
clientMetrics.setSessionId(Long.toUnsignedString(getRandomLong(3000000, 7000000)));
|
||||
|
||||
clientMetrics.setTxRetries(getRandomInt(30, 70));
|
||||
clientMetrics.setRxDuplicatePackets(getRandomInt(30, 70));
|
||||
clientMetrics.setSnr(getRandomInt(-70, -30));
|
||||
@@ -1265,8 +1262,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
clientMetrics.setNumRxBytes(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setNumTxBytes(getRandomLong(3000000, 7000000));
|
||||
|
||||
clientMetrics.setSessionId(Long.toUnsignedString(getRandomLong(3000000, 7000000)));
|
||||
|
||||
clientMetrics.setTxRetries(getRandomInt(30, 70));
|
||||
clientMetrics.setRxDuplicatePackets(getRandomInt(30, 70));
|
||||
clientMetrics.setSnr(getRandomInt(-70, -30));
|
||||
@@ -1292,8 +1287,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
clientMetrics.setNumRxBytes(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setNumTxBytes(getRandomLong(3000000, 7000000));
|
||||
|
||||
clientMetrics.setSessionId(Long.toUnsignedString(getRandomLong(3000000, 7000000)));
|
||||
|
||||
clientMetrics.setTxRetries(getRandomInt(30, 70));
|
||||
clientMetrics.setRxDuplicatePackets(getRandomInt(30, 70));
|
||||
clientMetrics.setSnr(getRandomInt(-70, -30));
|
||||
@@ -1380,16 +1373,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
|
||||
sessionDetails.setDhcpDetails(dhcpDetails);
|
||||
|
||||
ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails();
|
||||
metricDetails.setRssi(getRandomInt(-60, -40));
|
||||
metricDetails.setRxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setTxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setRxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setTxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setSnr(getRandomInt(-90, -50));
|
||||
|
||||
sessionDetails.setMetricDetails(metricDetails);
|
||||
|
||||
clientSession.setDetails(sessionDetails);
|
||||
|
||||
this.clientServiceInterface.updateSession(clientSession);
|
||||
|
||||
@@ -42,7 +42,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
private String cpUsername;
|
||||
private ClientDhcpDetails dhcpDetails;
|
||||
private ClientEapDetails eapDetails;
|
||||
private ClientSessionMetricDetails metricDetails;
|
||||
private Boolean isReassociation;
|
||||
private Integer disconnectByApReasonCode;
|
||||
private Integer disconnectByClientReasonCode;
|
||||
@@ -54,7 +53,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
private Boolean is11VUsed;
|
||||
private SecurityType securityType;
|
||||
private SteerType steerType;
|
||||
private Long previousValidSessionId;
|
||||
private String previousValidSessionId;
|
||||
private ClientFailureDetails lastFailureDetails;
|
||||
private ClientFailureDetails firstFailureDetails;
|
||||
private Integer associationStatus;
|
||||
@@ -154,12 +153,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
}
|
||||
|
||||
public Long getLastEventTimestamp() {
|
||||
if (getMetricDetails() != null) {
|
||||
if (lastEventTimestamp != null) {
|
||||
return Math.max(getMetricDetails().getLastMetricTimestamp(), lastEventTimestamp);
|
||||
}
|
||||
return getMetricDetails().getLastMetricTimestamp();
|
||||
}
|
||||
return lastEventTimestamp;
|
||||
}
|
||||
|
||||
@@ -192,13 +185,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
}
|
||||
|
||||
public Long getLastRxTimestamp() {
|
||||
if (lastRxTimestamp != null && getMetricDetails() != null && getMetricDetails().getLastRxTimestamp() != null) {
|
||||
return Math.max(lastRxTimestamp, getMetricDetails().getLastRxTimestamp());
|
||||
} else if (lastRxTimestamp != null) {
|
||||
return lastRxTimestamp;
|
||||
}
|
||||
|
||||
return getMetricDetails() == null ? null : getMetricDetails().getLastRxTimestamp();
|
||||
return lastRxTimestamp;
|
||||
}
|
||||
|
||||
public void setLastRxTimestamp(Long lastRxTimestamp) {
|
||||
@@ -206,12 +193,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
}
|
||||
|
||||
public Long getLastTxTimestamp() {
|
||||
if (lastTxTimestamp != null && getMetricDetails() != null && getMetricDetails().getLastTxTimestamp() != null) {
|
||||
return Math.max(lastTxTimestamp, getMetricDetails().getLastTxTimestamp());
|
||||
} else if (lastTxTimestamp != null) {
|
||||
return lastTxTimestamp;
|
||||
}
|
||||
return getMetricDetails() == null ? null : getMetricDetails().getLastTxTimestamp();
|
||||
return lastTxTimestamp;
|
||||
}
|
||||
|
||||
public void setLastTxTimestamp(Long lastTxTimestamp) {
|
||||
@@ -257,14 +239,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
this.eapDetails = eapDetails;
|
||||
}
|
||||
|
||||
public ClientSessionMetricDetails getMetricDetails() {
|
||||
return metricDetails;
|
||||
}
|
||||
|
||||
public void setMetricDetails(ClientSessionMetricDetails metricDetails) {
|
||||
this.metricDetails = metricDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* RADIUS 802.1x EAP_Success timestamp
|
||||
*
|
||||
@@ -413,11 +387,11 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
this.steerType = steerType;
|
||||
}
|
||||
|
||||
public Long getPreviousValidSessionId() {
|
||||
public String getPreviousValidSessionId() {
|
||||
return previousValidSessionId;
|
||||
}
|
||||
|
||||
public void setPreviousValidSessionId(Long previousValidSessionId) {
|
||||
public void setPreviousValidSessionId(String previousValidSessionId) {
|
||||
this.previousValidSessionId = previousValidSessionId;
|
||||
}
|
||||
|
||||
@@ -514,9 +488,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
return AssociationState.Cloud_Timeout;
|
||||
|
||||
}
|
||||
if (firstDataRcvdTimestamp != null || firstDataSentTimestamp != null
|
||||
|| (getMetricDetails() != null && (getMetricDetails().getLastRxTimestamp() != null
|
||||
|| getMetricDetails().getLastTxTimestamp() != null))) {
|
||||
if (firstDataRcvdTimestamp != null || firstDataSentTimestamp != null) {
|
||||
return AssociationState.Active_Data;
|
||||
}
|
||||
if (assocTimestamp != null) {
|
||||
@@ -535,9 +507,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
if (this.eapDetails != null) {
|
||||
ret.setEapDetails(this.eapDetails.clone());
|
||||
}
|
||||
if (this.metricDetails != null) {
|
||||
ret.setMetricDetails(this.metricDetails.clone());
|
||||
}
|
||||
if (this.lastFailureDetails != null) {
|
||||
ret.setLastFailureDetails(this.lastFailureDetails.clone());
|
||||
}
|
||||
@@ -554,7 +523,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
disconnectByApTimestamp, disconnectByClientInternalReasonCode, disconnectByClientReasonCode,
|
||||
disconnectByClientTimestamp, dynamicVlan, eapDetails, firstDataRcvdTimestamp, firstDataSentTimestamp,
|
||||
firstFailureDetails, hostname, ipAddress, ipTimestamp, is11KUsed, is11RUsed, is11VUsed, isReassociation,
|
||||
lastEventTimestamp, lastFailureDetails, lastRxTimestamp, lastTxTimestamp, metricDetails,
|
||||
lastEventTimestamp, lastFailureDetails, lastRxTimestamp, lastTxTimestamp,
|
||||
portEnabledTimestamp, previousValidSessionId, priorEquipmentId, priorSessionId, radioType,
|
||||
radiusUsername, securityType, sessionId, ssid, steerType, timeoutTimestamp, userAgentStr,
|
||||
associationState);
|
||||
@@ -594,7 +563,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
&& Objects.equals(lastFailureDetails, other.lastFailureDetails)
|
||||
&& Objects.equals(lastRxTimestamp, other.lastRxTimestamp)
|
||||
&& Objects.equals(lastTxTimestamp, other.lastTxTimestamp)
|
||||
&& Objects.equals(metricDetails, other.metricDetails)
|
||||
&& Objects.equals(portEnabledTimestamp, other.portEnabledTimestamp)
|
||||
&& Objects.equals(previousValidSessionId, other.previousValidSessionId)
|
||||
&& Objects.equals(priorEquipmentId, other.priorEquipmentId)
|
||||
@@ -677,9 +645,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
} else if (latest.eapDetails != null) {
|
||||
this.eapDetails.mergeDetails(latest.eapDetails);
|
||||
}
|
||||
if (null != latest.metricDetails) {
|
||||
this.metricDetails = latest.metricDetails;
|
||||
}
|
||||
|
||||
if (null != latest.getIsReassociation()) {
|
||||
this.isReassociation = latest.getIsReassociation();
|
||||
|
||||
@@ -1,365 +0,0 @@
|
||||
package com.telecominfraproject.wlan.client.session.models;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
|
||||
/**
|
||||
* @author ekeddy
|
||||
*
|
||||
*/
|
||||
public class ClientSessionMetricDetails extends BaseJsonModel
|
||||
{
|
||||
private static final long serialVersionUID = -6626815155700131150L;
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ClientSessionMetricDetails.class);
|
||||
|
||||
private Long rxBytes;
|
||||
private Long txBytes;
|
||||
private Long totalRxPackets;
|
||||
private Long totalTxPackets;
|
||||
private Float rxMbps;
|
||||
private Float txMbps;
|
||||
private Integer rssi;
|
||||
private Integer snr;
|
||||
private Long rxRateKbps; // from MCS
|
||||
private Long txRateKbps; // from MCS
|
||||
private long lastMetricTimestamp;
|
||||
private Long lastRxTimestamp;
|
||||
private Long lastTxTimestamp;
|
||||
private String classification;
|
||||
|
||||
/**
|
||||
* The number of dataframes transmitted TO the client from the AP.
|
||||
*/
|
||||
private Integer txDataFrames;
|
||||
|
||||
/**
|
||||
* The number of data frames transmitted TO the client that were retried.
|
||||
* Note this is not the same as the number of retries.
|
||||
*/
|
||||
private Integer txDataFramesRetried;
|
||||
|
||||
/**
|
||||
* The number of dataframes transmitted FROM the client TO the AP.
|
||||
*/
|
||||
private Integer rxDataFrames;
|
||||
|
||||
|
||||
public Long getRxBytes() {
|
||||
return rxBytes;
|
||||
}
|
||||
public void setRxBytes(Long rxBytes) {
|
||||
this.rxBytes = rxBytes;
|
||||
}
|
||||
public Long getTxBytes() {
|
||||
return txBytes;
|
||||
}
|
||||
public void setTxBytes(Long txBytes) {
|
||||
this.txBytes = txBytes;
|
||||
}
|
||||
public Long getTotalRxPackets() {
|
||||
return totalRxPackets;
|
||||
}
|
||||
public void setTotalRxPackets(Long totalRxPackets) {
|
||||
this.totalRxPackets = totalRxPackets;
|
||||
}
|
||||
public Long getTotalTxPackets() {
|
||||
return totalTxPackets;
|
||||
}
|
||||
public void setTotalTxPackets(Long totalTxPackets) {
|
||||
this.totalTxPackets = totalTxPackets;
|
||||
}
|
||||
public Float getRxMbps() {
|
||||
return rxMbps;
|
||||
}
|
||||
public void setRxMbps(Float rxMbps) {
|
||||
this.rxMbps = rxMbps;
|
||||
}
|
||||
public Float getTxMbps() {
|
||||
return txMbps;
|
||||
}
|
||||
public void setTxMbps(Float txMbps) {
|
||||
this.txMbps = txMbps;
|
||||
}
|
||||
public Integer getRssi() {
|
||||
return rssi;
|
||||
}
|
||||
public void setRssi(Integer rssi) {
|
||||
this.rssi = rssi;
|
||||
}
|
||||
public Integer getSnr() {
|
||||
return snr;
|
||||
}
|
||||
public void setSnr(Integer snr) {
|
||||
this.snr = snr;
|
||||
}
|
||||
public Long getRxRateKbps() {
|
||||
return rxRateKbps;
|
||||
}
|
||||
public void setRxRateKbps(Long rxRateKbps) {
|
||||
this.rxRateKbps = rxRateKbps;
|
||||
}
|
||||
public Long getTxRateKbps() {
|
||||
return txRateKbps;
|
||||
}
|
||||
public void setTxRateKbps(Long txRateKbps) {
|
||||
this.txRateKbps = txRateKbps;
|
||||
}
|
||||
|
||||
|
||||
public Integer getTxDataFrames() {
|
||||
return txDataFrames;
|
||||
}
|
||||
public void setTxDataFrames(Integer txDataFrames) {
|
||||
this.txDataFrames = txDataFrames;
|
||||
}
|
||||
public Integer getTxDataFramesRetried() {
|
||||
return txDataFramesRetried;
|
||||
}
|
||||
public void setTxDataFramesRetried(Integer txDataFramesRetried) {
|
||||
this.txDataFramesRetried = txDataFramesRetried;
|
||||
}
|
||||
|
||||
public long getLastMetricTimestamp() {
|
||||
return lastMetricTimestamp;
|
||||
}
|
||||
public void setLastMetricTimestamp(long lastMetricTimestamp) {
|
||||
this.lastMetricTimestamp = lastMetricTimestamp;
|
||||
}
|
||||
|
||||
public Long getLastRxTimestamp() {
|
||||
return lastRxTimestamp;
|
||||
}
|
||||
public void setLastRxTimestamp(Long lastRxTimestamp) {
|
||||
this.lastRxTimestamp = lastRxTimestamp;
|
||||
}
|
||||
public Long getLastTxTimestamp() {
|
||||
return lastTxTimestamp;
|
||||
}
|
||||
public void setLastTxTimestamp(Long lastTxTimestamp) {
|
||||
this.lastTxTimestamp = lastTxTimestamp;
|
||||
}
|
||||
|
||||
|
||||
public Integer getRxDataFrames() {
|
||||
return rxDataFrames;
|
||||
}
|
||||
public void setRxDataFrames(Integer rxDataFrames) {
|
||||
this.rxDataFrames = rxDataFrames;
|
||||
}
|
||||
public String getClassification() {
|
||||
return classification;
|
||||
}
|
||||
public void setClassification(String classification) {
|
||||
this.classification = classification;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((classification == null) ? 0 : classification.hashCode());
|
||||
result = prime * result + (int) (lastMetricTimestamp ^ (lastMetricTimestamp >>> 32));
|
||||
result = prime * result + ((lastRxTimestamp == null) ? 0 : lastRxTimestamp.hashCode());
|
||||
result = prime * result + ((lastTxTimestamp == null) ? 0 : lastTxTimestamp.hashCode());
|
||||
result = prime * result + ((rssi == null) ? 0 : rssi.hashCode());
|
||||
result = prime * result + ((rxBytes == null) ? 0 : rxBytes.hashCode());
|
||||
result = prime * result + ((rxDataFrames == null) ? 0 : rxDataFrames.hashCode());
|
||||
result = prime * result + ((rxMbps == null) ? 0 : rxMbps.hashCode());
|
||||
result = prime * result + ((rxRateKbps == null) ? 0 : rxRateKbps.hashCode());
|
||||
result = prime * result + ((snr == null) ? 0 : snr.hashCode());
|
||||
result = prime * result + ((totalRxPackets == null) ? 0 : totalRxPackets.hashCode());
|
||||
result = prime * result + ((totalTxPackets == null) ? 0 : totalTxPackets.hashCode());
|
||||
result = prime * result + ((txBytes == null) ? 0 : txBytes.hashCode());
|
||||
result = prime * result + ((txDataFrames == null) ? 0 : txDataFrames.hashCode());
|
||||
result = prime * result + ((txDataFramesRetried == null) ? 0 : txDataFramesRetried.hashCode());
|
||||
result = prime * result + ((txMbps == null) ? 0 : txMbps.hashCode());
|
||||
result = prime * result + ((txRateKbps == null) ? 0 : txRateKbps.hashCode());
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ClientSessionMetricDetails other = (ClientSessionMetricDetails) obj;
|
||||
if (classification == null) {
|
||||
if (other.classification != null)
|
||||
return false;
|
||||
} else if (!classification.equals(other.classification))
|
||||
return false;
|
||||
if (lastMetricTimestamp != other.lastMetricTimestamp)
|
||||
return false;
|
||||
if (lastRxTimestamp == null) {
|
||||
if (other.lastRxTimestamp != null)
|
||||
return false;
|
||||
} else if (!lastRxTimestamp.equals(other.lastRxTimestamp))
|
||||
return false;
|
||||
if (lastTxTimestamp == null) {
|
||||
if (other.lastTxTimestamp != null)
|
||||
return false;
|
||||
} else if (!lastTxTimestamp.equals(other.lastTxTimestamp))
|
||||
return false;
|
||||
if (rssi == null) {
|
||||
if (other.rssi != null)
|
||||
return false;
|
||||
} else if (!rssi.equals(other.rssi))
|
||||
return false;
|
||||
if (rxBytes == null) {
|
||||
if (other.rxBytes != null)
|
||||
return false;
|
||||
} else if (!rxBytes.equals(other.rxBytes))
|
||||
return false;
|
||||
if (rxDataFrames == null) {
|
||||
if (other.rxDataFrames != null)
|
||||
return false;
|
||||
} else if (!rxDataFrames.equals(other.rxDataFrames))
|
||||
return false;
|
||||
if (rxMbps == null) {
|
||||
if (other.rxMbps != null)
|
||||
return false;
|
||||
} else if (!rxMbps.equals(other.rxMbps))
|
||||
return false;
|
||||
if (rxRateKbps == null) {
|
||||
if (other.rxRateKbps != null)
|
||||
return false;
|
||||
} else if (!rxRateKbps.equals(other.rxRateKbps))
|
||||
return false;
|
||||
if (snr == null) {
|
||||
if (other.snr != null)
|
||||
return false;
|
||||
} else if (!snr.equals(other.snr))
|
||||
return false;
|
||||
if (totalRxPackets == null) {
|
||||
if (other.totalRxPackets != null)
|
||||
return false;
|
||||
} else if (!totalRxPackets.equals(other.totalRxPackets))
|
||||
return false;
|
||||
if (totalTxPackets == null) {
|
||||
if (other.totalTxPackets != null)
|
||||
return false;
|
||||
} else if (!totalTxPackets.equals(other.totalTxPackets))
|
||||
return false;
|
||||
if (txBytes == null) {
|
||||
if (other.txBytes != null)
|
||||
return false;
|
||||
} else if (!txBytes.equals(other.txBytes))
|
||||
return false;
|
||||
if (txDataFrames == null) {
|
||||
if (other.txDataFrames != null)
|
||||
return false;
|
||||
} else if (!txDataFrames.equals(other.txDataFrames))
|
||||
return false;
|
||||
if (txDataFramesRetried == null) {
|
||||
if (other.txDataFramesRetried != null)
|
||||
return false;
|
||||
} else if (!txDataFramesRetried.equals(other.txDataFramesRetried))
|
||||
return false;
|
||||
if (txMbps == null) {
|
||||
if (other.txMbps != null)
|
||||
return false;
|
||||
} else if (!txMbps.equals(other.txMbps))
|
||||
return false;
|
||||
if (txRateKbps == null) {
|
||||
if (other.txRateKbps != null)
|
||||
return false;
|
||||
} else if (!txRateKbps.equals(other.txRateKbps))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ClientSessionMetricDetails clone() {
|
||||
ClientSessionMetricDetails ret = (ClientSessionMetricDetails) super.clone();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void merge(ClientSessionMetricDetails other) {
|
||||
boolean isLatestMetric = false;
|
||||
if(lastMetricTimestamp<other.lastMetricTimestamp) {
|
||||
this.setLastMetricTimestamp(other.lastMetricTimestamp);
|
||||
isLatestMetric = true;
|
||||
}
|
||||
|
||||
// These properties just take the latest value
|
||||
if(isLatestMetric) {
|
||||
if(other.rssi != null) {
|
||||
this.rssi = other.rssi;
|
||||
}
|
||||
if(other.rxMbps != null) {
|
||||
this.rxMbps = other.rxMbps;
|
||||
}
|
||||
if(other.txMbps != null) {
|
||||
this.txMbps = other.txMbps;
|
||||
}
|
||||
if(other.rxRateKbps != null) {
|
||||
this.rxRateKbps = other.rxRateKbps;
|
||||
}
|
||||
if(other.txRateKbps != null) {
|
||||
this.txRateKbps = other.txRateKbps;
|
||||
}
|
||||
if(other.totalRxPackets != null) {
|
||||
this.totalRxPackets = other.totalRxPackets;
|
||||
}
|
||||
if(other.totalTxPackets != null) {
|
||||
this.totalTxPackets = other.totalTxPackets;
|
||||
}
|
||||
if(other.lastRxTimestamp != null) {
|
||||
this.lastRxTimestamp = other.lastRxTimestamp;
|
||||
}
|
||||
if(other.lastTxTimestamp != null) {
|
||||
this.lastTxTimestamp = other.lastTxTimestamp;
|
||||
}
|
||||
}
|
||||
if(other.txDataFrames != null) {
|
||||
// this is a delta
|
||||
this.setTxDataFrames(sum(this.txDataFrames,other.txDataFrames));
|
||||
}
|
||||
if(other.txDataFramesRetried != null) {
|
||||
// this is a delta
|
||||
this.setTxDataFramesRetried(sum(this.txDataFramesRetried,other.txDataFramesRetried));
|
||||
}
|
||||
if(other.rxDataFrames != null) {
|
||||
// this is a delta
|
||||
this.setRxDataFrames(sum(this.rxDataFrames,other.rxDataFrames));
|
||||
}
|
||||
if(other.rxBytes != null)
|
||||
{
|
||||
// We keep the sum going
|
||||
LOG.trace("RxBytes: adding {} to {}", this.rxBytes, other.rxBytes);
|
||||
this.setRxBytes(sum(this.rxBytes, other.rxBytes));
|
||||
}
|
||||
if(other.txBytes != null)
|
||||
{
|
||||
// We keep the sum going
|
||||
LOG.trace("TxBytes: adding {} to {}", this.txBytes, other.txBytes);
|
||||
this.setTxBytes(sum(this.txBytes, other.txBytes));
|
||||
}
|
||||
|
||||
if(other.classification != null)
|
||||
{
|
||||
this.classification = other.classification;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static Integer sum(Integer v1, Integer v2) {
|
||||
if(v1 == null) return v2;
|
||||
if(v2 == null) return v1;
|
||||
return Integer.sum(v1, v2);
|
||||
}
|
||||
|
||||
|
||||
private static Long sum(Long v1, Long v2) {
|
||||
if(v1 == null) return v2;
|
||||
if(v2 == null) return v1;
|
||||
return Long.sum(v1, v2);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -234,8 +234,7 @@ components:
|
||||
steerType:
|
||||
$ref: '#/components/schemas/SteerType'
|
||||
previousValidSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
lastFailureDetails:
|
||||
$ref: '#/components/schemas/ClientFailureDetails'
|
||||
firstFailureDetails:
|
||||
@@ -250,8 +249,7 @@ components:
|
||||
type: integer
|
||||
format: int32
|
||||
priorSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
priorEquipmentId:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -59,11 +59,6 @@ public enum CEGWCommandType {
|
||||
WdsRequest,
|
||||
|
||||
ClientBlocklistChangeNotification,
|
||||
|
||||
/**
|
||||
* Most recent timestamp for receipt of stats data from this AP.
|
||||
*/
|
||||
MostRecentStatsTimestamp,
|
||||
|
||||
UNSUPPORTED;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ElementRadioConfiguration extends BaseJsonModel
|
||||
|
||||
if (radioType == RadioType.is5GHz) {
|
||||
returnValue.setChannelNumber(36);
|
||||
returnValue.setBackupChannelNumber(153);
|
||||
returnValue.setBackupChannelNumber(149);
|
||||
} else if (radioType == RadioType.is5GHzL) {
|
||||
returnValue.setChannelNumber(36);
|
||||
returnValue.setBackupChannelNumber(44);
|
||||
|
||||
@@ -118,33 +118,40 @@ public class EquipmentRrmBulkUpdateItem extends BaseJsonModel {
|
||||
finalDetails.getRadioMap().put(rt, erc);
|
||||
}
|
||||
|
||||
if(erc.getManualChannelNumber()== null || erc.getManualChannelNumber().intValue() != updateDetails.getChannelNumber()) {
|
||||
if(erc.getManualChannelNumber() == null
|
||||
|| erc.getManualChannelNumber().intValue() != updateDetails.getChannelNumber()) {
|
||||
erc.setManualChannelNumber(updateDetails.getChannelNumber());
|
||||
modelChanged.set(true);
|
||||
}
|
||||
|
||||
if(erc.getManualBackupChannelNumber()== null ||
|
||||
erc.getManualBackupChannelNumber().intValue() != updateDetails.getBackupChannelNumber()) {
|
||||
if(erc.getManualBackupChannelNumber() == null
|
||||
|| erc.getManualBackupChannelNumber().intValue() != updateDetails.getBackupChannelNumber()) {
|
||||
erc.setManualBackupChannelNumber(updateDetails.getBackupChannelNumber());
|
||||
modelChanged.set(true);
|
||||
}
|
||||
|
||||
if ((erc.getClientDisconnectThresholdDb() == null && updateDetails.getClientDisconnectThresholdDb() != null)
|
||||
|| !erc.getClientDisconnectThresholdDb().equals(updateDetails.getClientDisconnectThresholdDb())) {
|
||||
erc.setClientDisconnectThresholdDb(updateDetails.getClientDisconnectThresholdDb());
|
||||
modelChanged.set(true);
|
||||
if (updateDetails.getClientDisconnectThresholdDb() != null) {
|
||||
if ((erc.getClientDisconnectThresholdDb() == null && updateDetails.getClientDisconnectThresholdDb() != null)
|
||||
|| !erc.getClientDisconnectThresholdDb().equals(updateDetails.getClientDisconnectThresholdDb())) {
|
||||
erc.setClientDisconnectThresholdDb(updateDetails.getClientDisconnectThresholdDb());
|
||||
modelChanged.set(true);
|
||||
}
|
||||
}
|
||||
|
||||
if ((erc.getProbeResponseThresholdDb() == null && updateDetails.getProbeResponseThresholdDb() != null)
|
||||
|| !erc.getProbeResponseThresholdDb().equals(updateDetails.getProbeResponseThresholdDb())) {
|
||||
erc.setProbeResponseThresholdDb(updateDetails.getProbeResponseThresholdDb());
|
||||
modelChanged.set(true);
|
||||
if (updateDetails.getProbeResponseThresholdDb() != null) {
|
||||
if ((erc.getProbeResponseThresholdDb() == null && updateDetails.getProbeResponseThresholdDb() != null)
|
||||
|| !erc.getProbeResponseThresholdDb().equals(updateDetails.getProbeResponseThresholdDb())) {
|
||||
erc.setProbeResponseThresholdDb(updateDetails.getProbeResponseThresholdDb());
|
||||
modelChanged.set(true);
|
||||
}
|
||||
}
|
||||
|
||||
if ((erc.getRxCellSizeDb() == null && updateDetails.getRxCellSizeDb() != null)
|
||||
|| !erc.getRxCellSizeDb().equals(updateDetails.getRxCellSizeDb())) {
|
||||
erc.setRxCellSizeDb(updateDetails.getRxCellSizeDb());
|
||||
modelChanged.set(true);
|
||||
if (updateDetails.getRxCellSizeDb() != null) {
|
||||
if ((erc.getRxCellSizeDb() == null && updateDetails.getRxCellSizeDb() != null)
|
||||
|| !erc.getRxCellSizeDb().equals(updateDetails.getRxCellSizeDb())) {
|
||||
erc.setRxCellSizeDb(updateDetails.getRxCellSizeDb());
|
||||
modelChanged.set(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -932,9 +932,9 @@ public class EquipmentServiceRemoteTest extends BaseRemoteTest {
|
||||
assertEquals(11, radioMap.get(RadioType.is2dot4GHz).getManualBackupChannelNumber().intValue());
|
||||
|
||||
assertEquals(36, radioMap.get(RadioType.is5GHz).getChannelNumber().intValue());
|
||||
assertEquals(153, radioMap.get(RadioType.is5GHz).getBackupChannelNumber().intValue());
|
||||
assertEquals(149, radioMap.get(RadioType.is5GHz).getBackupChannelNumber().intValue());
|
||||
assertEquals(36, radioMap.get(RadioType.is5GHz).getManualChannelNumber().intValue());
|
||||
assertEquals(153, radioMap.get(RadioType.is5GHz).getManualBackupChannelNumber().intValue());
|
||||
assertEquals(149, radioMap.get(RadioType.is5GHz).getManualBackupChannelNumber().intValue());
|
||||
|
||||
Map<RadioType, Integer> primaryChannels = new EnumMap<>(RadioType.class);
|
||||
Map<RadioType, Integer> backupChannels = new EnumMap<>(RadioType.class);
|
||||
@@ -970,7 +970,7 @@ public class EquipmentServiceRemoteTest extends BaseRemoteTest {
|
||||
assertEquals(6, radioMap.get(RadioType.is2dot4GHz).getManualBackupChannelNumber().intValue());
|
||||
|
||||
assertEquals(36, radioMap.get(RadioType.is5GHz).getChannelNumber().intValue());
|
||||
assertEquals(153, radioMap.get(RadioType.is5GHz).getBackupChannelNumber().intValue());
|
||||
assertEquals(149, radioMap.get(RadioType.is5GHz).getBackupChannelNumber().intValue());
|
||||
assertEquals(40, radioMap.get(RadioType.is5GHz).getManualChannelNumber().intValue());
|
||||
assertEquals(48, radioMap.get(RadioType.is5GHz).getManualBackupChannelNumber().intValue());
|
||||
|
||||
|
||||
@@ -280,14 +280,15 @@ public class EquipmentController {
|
||||
LOG.debug("Updated Equipment {}", ret);
|
||||
|
||||
EquipmentChangedEvent event;
|
||||
if ((equipment.getProfileId() != existingEquipment.getProfileId()) || (existingApElementConfig != null && updatedApElementConfig != null &&
|
||||
if (ret.getCustomerId() != existingEquipment.getCustomerId()) {
|
||||
publishEvent(new EquipmentCustomerChangedEvent(existingEquipment, ret));
|
||||
}
|
||||
if ((ret.getProfileId() != existingEquipment.getProfileId()) || (existingApElementConfig != null && updatedApElementConfig != null &&
|
||||
updatedApElementConfig.needsToBeUpdatedOnDevice(existingApElementConfig))) {
|
||||
event = new EquipmentApImpactingChangedEvent(ret);
|
||||
} else if (existingApElementConfig != null && existingApElementConfig.isBlinkAllLEDs() != updatedApElementConfig.isBlinkAllLEDs()) {
|
||||
LOG.debug("Updated BlinkingLEDs {}", ret);
|
||||
event = new EquipmentBlinkLEDsEvent(ret);
|
||||
} else if (equipment.getCustomerId() != existingEquipment.getCustomerId()) {
|
||||
event = new EquipmentCustomerChangedEvent(existingEquipment, ret);
|
||||
} else {
|
||||
event = new EquipmentChangedEvent(ret);
|
||||
}
|
||||
@@ -296,7 +297,6 @@ public class EquipmentController {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
private void validateChannelNum(Equipment equipment) {
|
||||
if (equipment.getDetails() instanceof ApElementConfiguration) {
|
||||
ApElementConfiguration apElementConfiguration = (ApElementConfiguration) equipment.getDetails();
|
||||
|
||||
@@ -48,11 +48,12 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
* To test this method:
|
||||
* curl --digest --user user:password --request POST --insecure --header "Content-Type: application/json; charset=utf-8" --data '' https://localhost:7072/api/portFwd/createSession/inventoryId/dev-ap-0001/port/22/
|
||||
*
|
||||
* @param inventoryId
|
||||
* @param connectToPortOnEquipment
|
||||
* @param inventoryId: Equipment's AssetId
|
||||
* @param connectToPortOnEquipment: Port to connect on the AP
|
||||
* @return session id of a newly created forwarder session
|
||||
*/
|
||||
public String startForwarderSession(final String inventoryId, int connectToPortOnEquipment){
|
||||
LOG.debug("Received create Session request for inventoryId {} on port {}", inventoryId, connectToPortOnEquipment);
|
||||
//inventoryId is used to tie ForwarderSession to WebSocketSession
|
||||
|
||||
try {
|
||||
@@ -191,7 +192,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
LOG.debug("[{}] Stopped polling inputstream on local socket {}", inventoryId, localSocket.getPort());
|
||||
|
||||
} catch (IOException e) {
|
||||
LOG.error("[{}] Session {} got exception {} for the socket on port {}", inventoryId, forwarderSession.getSessionId(), e, port);
|
||||
LOG.error("[{}] Session {} got IOException {} for the socket on port {}", inventoryId, forwarderSession.getSessionId(), port, e);
|
||||
} finally {
|
||||
|
||||
//notify the other end that forwarding session is terminated
|
||||
@@ -209,7 +210,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
localSocket.close();
|
||||
forwarderSession.getServerSocket().close();
|
||||
} catch (IOException e) {
|
||||
//do nothing here
|
||||
LOG.error("IO Exception when closing socket", e);
|
||||
}
|
||||
|
||||
sessionIdToForwarderSessionMap.remove(forwarderSession.getSessionId());
|
||||
@@ -232,12 +233,12 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
socketInputStreamReaderThread.setDaemon(true);
|
||||
forwarderSession.setSocketStreamReaderThread(socketInputStreamReaderThread);
|
||||
|
||||
} catch (IOException e) {
|
||||
LOG.error("[{}] error accepting conection on port {} - closing forwarding session {}", inventoryId, listenOnLocalPort, forwarderSession.getSessionId());
|
||||
} catch (Exception e) {
|
||||
LOG.error("[{}] error accepting connection on port {} - closing forwarding session {}", inventoryId, listenOnLocalPort, forwarderSession.getSessionId(), e);
|
||||
try {
|
||||
serverSocket.close();
|
||||
} catch (IOException e1) {
|
||||
// do nothing here
|
||||
LOG.error("IO Exception when closing socket", e1);
|
||||
}
|
||||
sessionIdToForwarderSessionMap.remove(forwarderSession.getSessionId());
|
||||
}
|
||||
@@ -259,6 +260,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
}
|
||||
|
||||
public void stopForwarderSession(String sessionId){
|
||||
LOG.debug("Received stop forwarding Session request for sessionId {}", sessionId);
|
||||
ForwarderSession forwarderSession = sessionIdToForwarderSessionMap.get(sessionId);
|
||||
if(forwarderSession==null){
|
||||
LOG.info("Could not find session {}", sessionId);
|
||||
@@ -266,6 +268,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
}
|
||||
|
||||
try {
|
||||
LOG.debug("Found forwarderSession {} for sessionId {}", forwarderSession, sessionId);
|
||||
//find websocket session by inventoryId and send control messages to disconnect from target port on the client side of the port forwarder
|
||||
WebSocketSession webSocketSession = webSocketSessionMap.get(forwarderSession.getInventoryId());
|
||||
TextMessage message = new TextMessage(DISCONNECT_FROM_CE_PORT_COMMAND + forwarderSession.getConnectToPortOnEquipment());
|
||||
@@ -274,11 +277,11 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
LOG.debug("[{}] Session {} sent command {}", forwarderSession.getInventoryId(), forwarderSession.getSessionId(), message.getPayload());
|
||||
}
|
||||
|
||||
if(forwarderSession.getServerSocket()!=null){
|
||||
if(forwarderSession.getServerSocket() != null){
|
||||
forwarderSession.getServerSocket().close();
|
||||
}
|
||||
|
||||
if(forwarderSession.getLocalSocket()!=null){
|
||||
if(forwarderSession.getLocalSocket() != null){
|
||||
forwarderSession.getLocalSocket().close();
|
||||
}
|
||||
//stream reader will stop in a separate thread by themselves
|
||||
@@ -286,10 +289,9 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
sessionIdToForwarderSessionMap.remove(forwarderSession.getSessionId());
|
||||
|
||||
} catch (IOException e) {
|
||||
// do nothing here
|
||||
LOG.error("Encountered IOException when closing connection for forwarder session {}", forwarderSession, e);
|
||||
sessionIdToForwarderSessionMap.remove(forwarderSession.getSessionId());
|
||||
}
|
||||
|
||||
sessionIdToForwarderSessionMap.remove(forwarderSession.getSessionId());
|
||||
|
||||
LOG.info("[{}] Stopped forwarder session {}", forwarderSession.getInventoryId(), sessionId);
|
||||
}
|
||||
@@ -322,7 +324,6 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
if(payload.indexOf(':')>0){
|
||||
port = Integer.parseInt(payload.substring(payload.indexOf(':')+1));
|
||||
}
|
||||
|
||||
//find forwarderSession by inventoryId and CEPort
|
||||
ForwarderSession forwarderSession = null;
|
||||
for(ForwarderSession fs: sessionIdToForwarderSessionMap.values()){
|
||||
@@ -332,7 +333,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
LOG.debug("[{}] Session {} got message {}", webSocketSessionKey, session, payload);
|
||||
LOG.debug("[{}] Session {} got message {} with forwarderSession {}", webSocketSessionKey, session, payload, forwarderSession);
|
||||
|
||||
if(payload.startsWith(CONNECTED_TO_CE_PORT_MSG)){
|
||||
//start reader thread to forward packets from local socket to websocket
|
||||
@@ -371,10 +372,8 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
*/
|
||||
@Override
|
||||
protected void handleBinaryMessage(WebSocketSession session, BinaryMessage message) throws Exception {
|
||||
|
||||
//TODO: may need to have message ack for each binary packet, and do not send the next packet until previous one has been acknowledged
|
||||
//DT: this has not been an issue so far
|
||||
|
||||
String webSocketSessionKey = getWebSocketSessionKey(session);
|
||||
|
||||
ByteBuffer payload = message.getPayload();
|
||||
@@ -384,6 +383,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
|
||||
//find forwarderSession by inventoryId and CEPort
|
||||
ForwarderSession forwarderSession = null;
|
||||
|
||||
for(ForwarderSession fs: sessionIdToForwarderSessionMap.values()){
|
||||
if(fs.getInventoryId().equals(webSocketSessionKey) && fs.getConnectToPortOnEquipment()==port){
|
||||
forwarderSession = fs;
|
||||
@@ -419,6 +419,14 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
}
|
||||
} else {
|
||||
LOG.debug("[{}] Session {} received message that cannot be delivered because local socket is inoperable {}", webSocketSessionKey, session, message);
|
||||
if (forwarderSession == null) {
|
||||
LOG.debug("forwarderSession not found for webSocketSessionKey {}", webSocketSessionKey);
|
||||
} else if (forwarderSession.getLocalSocket() == null) {
|
||||
LOG.debug("forwarderSession local socket is null for webSocketSessionKey {}", webSocketSessionKey);
|
||||
} else {
|
||||
LOG.debug("forwarderSession local socket for webSocketSessionKey {} is closed = {} and connected = {} ",
|
||||
webSocketSessionKey, forwarderSession.getLocalSocket().isClosed(), forwarderSession.getLocalSocket().isConnected());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -442,28 +450,29 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception {
|
||||
LOG.info("[{}] Closed portForwarder websocket connection {} : {}", getWebSocketSessionKey(session), session, closeStatus);
|
||||
|
||||
public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) {
|
||||
String webSocketSessionKey = getWebSocketSessionKey(session);
|
||||
webSocketSessionMap.remove(webSocketSessionKey);
|
||||
|
||||
//close and remove all forwarder sessions for that CE
|
||||
LOG.info("[{}] Closed portForwarder websocket connection {} : {}", webSocketSessionKey, session, closeStatus);
|
||||
|
||||
Iterator<ForwarderSession> iter = sessionIdToForwarderSessionMap.values().iterator();
|
||||
while(iter.hasNext()){
|
||||
ForwarderSession fs = iter.next();
|
||||
if(fs.getInventoryId().equals(webSocketSessionKey) ){
|
||||
if(fs.getLocalSocket()!=null && !fs.getLocalSocket().isClosed()){
|
||||
fs.getLocalSocket().close();
|
||||
}
|
||||
if(fs.getServerSocket()!=null && !fs.getServerSocket().isClosed()){
|
||||
fs.getServerSocket().close();
|
||||
webSocketSessionMap.remove(webSocketSessionKey);
|
||||
//close and remove all forwarder sessions for that CE
|
||||
try {
|
||||
Iterator<ForwarderSession> iter = sessionIdToForwarderSessionMap.values().iterator();
|
||||
while (iter.hasNext()) {
|
||||
ForwarderSession fs = iter.next();
|
||||
if (fs.getInventoryId().equals(webSocketSessionKey)) {
|
||||
if (fs.getLocalSocket() != null && !fs.getLocalSocket().isClosed()) {
|
||||
fs.getLocalSocket().close();
|
||||
}
|
||||
if (fs.getServerSocket() != null && !fs.getServerSocket().isClosed()) {
|
||||
fs.getServerSocket().close();
|
||||
}
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
iter.remove();
|
||||
} catch (Exception ex) {
|
||||
LOG.error("Encountered exception when closing-sockets and removing sessions for Key {} ", webSocketSessionKey, ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String getWebSocketSessionKey(WebSocketSession session) {
|
||||
|
||||
@@ -16,12 +16,9 @@ import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.equipment.models.RadioChannelChangeSettings;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWBlinkRequest;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWCommandResultCode;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWCommandType;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWFirmwareDownloadRequest;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWMostRecentStatsTimestamp;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWNewChannelRequest;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWRebootRequest;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGatewayCommand;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.EquipmentCommandResponse;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.service.EquipmentGatewayServiceInterface;
|
||||
import com.telecominfraproject.wlan.firmware.FirmwareServiceInterface;
|
||||
@@ -163,17 +160,4 @@ public class EquipmentGatewayPortalController {
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/equipmentGateway/lastReceivedStatsTimestamp", method = RequestMethod.GET)
|
||||
public GenericResponse lastReceivedStatsTimestamp(@RequestParam long equipmentId) {
|
||||
Equipment equipment = equipmentServiceInterface.get(equipmentId);
|
||||
String apId = equipment.getInventoryId();
|
||||
CEGWMostRecentStatsTimestamp mostRecentStatsTimestamp = new CEGWMostRecentStatsTimestamp(CEGWCommandType.MostRecentStatsTimestamp, apId, equipmentId);
|
||||
EquipmentCommandResponse response = equipmentGatewayServiceInterface.sendCommand(mostRecentStatsTimestamp);
|
||||
LOG.debug("lastReceivedStatsTimestamp response {}", response);
|
||||
if (response.getResultCode() == CEGWCommandResultCode.Success) {
|
||||
return new GenericResponse(true, response.getResultDetail());
|
||||
} else {
|
||||
return new GenericResponse(false, response.getResultCode() + " - Failed to get last received stats timestamp for " + apId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -148,7 +148,7 @@ public class PortalUserDatastoreInMemory extends BaseInMemoryDatastore implement
|
||||
PortalUser ret = null;
|
||||
|
||||
for (PortalUser mdl : idToPortalUserMap.values()) {
|
||||
if(mdl.getCustomerId() == customerId && mdl.getUsername().equals(username)) {
|
||||
if(mdl.getCustomerId() == customerId && mdl.getUsername().toLowerCase().equals(username.toLowerCase())) {
|
||||
ret = mdl.clone();
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ public class PortalUserDatastoreInMemory extends BaseInMemoryDatastore implement
|
||||
List<PortalUser> listOfPortalUsers = new ArrayList<>();
|
||||
|
||||
for (PortalUser portalUser : idToPortalUserMap.values()) {
|
||||
if (portalUser.getUsername().equals(username)) {
|
||||
if (portalUser.getUsername().toLowerCase().equals(username.toLowerCase())) {
|
||||
listOfPortalUsers.add(portalUser);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,6 @@ public class PortalUserDAO extends BaseJdbcDao {
|
||||
|
||||
public static final Set<String> ALL_COLUMNS_LOWERCASE = new HashSet<>();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
//use this for queries where multiple tables are involved
|
||||
public static final String ALL_COLUMNS_WITH_PREFIX;
|
||||
|
||||
@@ -135,10 +134,10 @@ public class PortalUserDAO extends BaseJdbcDao {
|
||||
private static final String SQL_GET_BY_USERNAME =
|
||||
"select " + ALL_COLUMNS +
|
||||
" from " + TABLE_NAME + " " +
|
||||
" where username = ? ";
|
||||
" where lower(username) = ? ";
|
||||
|
||||
private static final String SQL_GET_BY_CUSTOMERID_AND_USERNAME = SQL_GET_BY_CUSTOMER_ID +
|
||||
" and username = ?";
|
||||
" and lower(username) = ?";
|
||||
|
||||
private static final String SQL_GET_LASTMOD_BY_ID =
|
||||
"select lastModifiedTimestamp " +
|
||||
@@ -463,7 +462,7 @@ public class PortalUserDAO extends BaseJdbcDao {
|
||||
try{
|
||||
PortalUser portalUser = this.jdbcTemplate.queryForObject(
|
||||
SQL_GET_BY_CUSTOMERID_AND_USERNAME,
|
||||
portalUserRowMapper, customerId, username);
|
||||
portalUserRowMapper, customerId, username.toLowerCase());
|
||||
|
||||
LOG.debug("Found PortalUser {}", portalUser);
|
||||
|
||||
@@ -478,7 +477,7 @@ public class PortalUserDAO extends BaseJdbcDao {
|
||||
LOG.debug("Looking up PortalUsers for username {} {}", username);
|
||||
|
||||
List<PortalUser> ret = this.jdbcTemplate.query(SQL_GET_BY_USERNAME,
|
||||
portalUserRowMapper, username);
|
||||
portalUserRowMapper, username.toLowerCase());
|
||||
|
||||
LOG.debug("Found List of Portal Users {}", ret);
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ public class PortalUserEventPayload extends BaseJsonModel implements HasCustomer
|
||||
private long createdTimestamp;
|
||||
private long lastModifiedTimestamp;
|
||||
|
||||
public PortalUserEventPayload() {}
|
||||
|
||||
public PortalUserEventPayload(PortalUser portalUser) {
|
||||
this.setId(portalUser.getId());
|
||||
this.setCustomerId(portalUser.getCustomerId());
|
||||
|
||||
@@ -4,6 +4,8 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.ChannelBandwidth;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.ChannelHopSettings;
|
||||
@@ -80,6 +82,8 @@ public class RfElementConfiguration extends BaseJsonModel {
|
||||
private Boolean useMaxTxPower;
|
||||
private Integer eirpTxPower;
|
||||
private RadioBestApSettings bestApSettings;
|
||||
|
||||
private Set<Integer> autoExclusionChannels = new TreeSet<Integer>();
|
||||
|
||||
private RfElementConfiguration() {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
@@ -362,9 +366,25 @@ public class RfElementConfiguration extends BaseJsonModel {
|
||||
this.bestApSettings = bestApSettings;
|
||||
}
|
||||
|
||||
public Set<Integer> getAutoExclusionChannels() {
|
||||
return autoExclusionChannels;
|
||||
}
|
||||
|
||||
public void setAutoExclusionChannels(Set<Integer> autoExclusionChannels) {
|
||||
if (autoExclusionChannels != null) {
|
||||
this.autoExclusionChannels.clear();
|
||||
this.autoExclusionChannels.addAll(autoExclusionChannels);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public RfElementConfiguration clone() {
|
||||
return (RfElementConfiguration) super.clone();
|
||||
RfElementConfiguration ret = (RfElementConfiguration) super.clone();
|
||||
|
||||
if (autoExclusionChannels != null) {
|
||||
ret.autoExclusionChannels = new TreeSet<>(autoExclusionChannels);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -409,7 +429,7 @@ public class RfElementConfiguration extends BaseJsonModel {
|
||||
channelBandwidth, channelHopSettings, clientDisconnectThresholdDb, eirpTxPower, forceScanDuringVoice,
|
||||
managementRate, maxNumClients, mimoMode, minAutoCellSize, multicastRate, neighbouringListApConfig,
|
||||
perimeterDetectionEnabled, probeResponseThresholdDb, radioMode, radioType, rf, rtsCtsThreshold,
|
||||
rxCellSizeDb, autoCellSizeSelection, maxAutoCellSize);
|
||||
rxCellSizeDb, autoCellSizeSelection, maxAutoCellSize, autoExclusionChannels);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -439,7 +459,8 @@ public class RfElementConfiguration extends BaseJsonModel {
|
||||
&& Objects.equals(probeResponseThresholdDb, other.probeResponseThresholdDb)
|
||||
&& radioMode == other.radioMode && radioType == other.radioType && Objects.equals(rf, other.rf)
|
||||
&& Objects.equals(rtsCtsThreshold, other.rtsCtsThreshold)
|
||||
&& Objects.equals(rxCellSizeDb, other.rxCellSizeDb);
|
||||
&& Objects.equals(rxCellSizeDb, other.rxCellSizeDb)
|
||||
&& Objects.equals(autoExclusionChannels, other.autoExclusionChannels);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
package com.telecominfraproject.wlan.profile.rf.models;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
@@ -56,4 +64,33 @@ public class RfConfigurationTests {
|
||||
rfConfig2_4.setRadioMode(RadioMode.modeGN);
|
||||
rfConfig5.setRadioMode(RadioMode.modeGN);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAutoExclusionChannels() {
|
||||
RfElementConfiguration rfConfig = RfElementConfiguration.createWithDefaults(RadioType.is5GHz);
|
||||
assertNotNull(rfConfig.getAutoExclusionChannels());
|
||||
assertTrue(rfConfig.getAutoExclusionChannels().isEmpty());
|
||||
|
||||
Set<Integer> unsortedSet = new HashSet<Integer>(Arrays.asList(1, 23, 45, 12));
|
||||
rfConfig.setAutoExclusionChannels(unsortedSet);
|
||||
|
||||
Set<Integer> sortedSet = rfConfig.getAutoExclusionChannels();
|
||||
List<Integer> list = new ArrayList<Integer>(sortedSet);
|
||||
|
||||
assertEquals(Integer.valueOf(1), list.get(0));
|
||||
assertEquals(Integer.valueOf(12), list.get(1));
|
||||
assertEquals(Integer.valueOf(23), list.get(2));
|
||||
assertEquals(Integer.valueOf(45), list.get(3));
|
||||
|
||||
Set<Integer> unsortedSet2 = new HashSet<Integer>(Arrays.asList(10, 45, 23, 12));
|
||||
rfConfig.setAutoExclusionChannels(unsortedSet2);
|
||||
|
||||
Set<Integer> sortedSet2 = rfConfig.getAutoExclusionChannels();
|
||||
List<Integer> list2 = new ArrayList<Integer>(sortedSet2);
|
||||
|
||||
assertEquals(Integer.valueOf(10), list2.get(0));
|
||||
assertEquals(Integer.valueOf(12), list2.get(1));
|
||||
assertEquals(Integer.valueOf(23), list2.get(2));
|
||||
assertEquals(Integer.valueOf(45), list2.get(3));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import com.telecominfraproject.wlan.alarm.AlarmServiceInterface;
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.client.ClientServiceInterface;
|
||||
import com.telecominfraproject.wlan.client.session.models.AssociationState;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
@@ -75,6 +78,8 @@ public class EquipmentConfigPushTrigger extends StreamProcessor {
|
||||
private StatusServiceInterface statusServiceInterface;
|
||||
@Autowired
|
||||
private AlarmServiceInterface alarmServiceInterface;
|
||||
@Autowired
|
||||
private ClientServiceInterface clientServiceInterface;
|
||||
|
||||
@Override
|
||||
protected boolean acceptMessage(QueuedStreamMessage message) {
|
||||
@@ -275,10 +280,49 @@ public class EquipmentConfigPushTrigger extends StreamProcessor {
|
||||
});
|
||||
}
|
||||
alarmServiceInterface.delete(existingEquipment.getCustomerId(), existingEquipment.getId());
|
||||
|
||||
// Disconnect all associated client devices from existing equipment
|
||||
disconnectClients(existingEquipment);
|
||||
|
||||
}
|
||||
|
||||
private void process(BaseJsonModel model) {
|
||||
LOG.warn("Unprocessed model: {}", model);
|
||||
}
|
||||
|
||||
private void disconnectClients(Equipment ce) {
|
||||
|
||||
LOG.info("EquipmentConfigPushTrigger::disconnectClients for Equipment {}", ce);
|
||||
PaginationResponse<ClientSession> clientSessions = clientServiceInterface.getSessionsForCustomer(
|
||||
ce.getCustomerId(), Set.of(ce.getId()), Set.of(ce.getLocationId()), null, null,
|
||||
new PaginationContext<ClientSession>(100));
|
||||
|
||||
if (clientSessions == null) {
|
||||
LOG.info("There are no existing client sessions to disconnect.");
|
||||
return;
|
||||
}
|
||||
|
||||
List<ClientSession> toBeDisconnected = new ArrayList<>();
|
||||
|
||||
clientSessions.getItems().stream().forEach(c -> {
|
||||
if (c.getDetails().getAssociationState() != null
|
||||
&& !c.getDetails().getAssociationState().equals(AssociationState.Disconnected)) {
|
||||
LOG.info("Change association state for client {} from {} to {}", c.getMacAddress(),
|
||||
c.getDetails().getAssociationState(), AssociationState.Disconnected);
|
||||
|
||||
c.getDetails().setAssociationState(AssociationState.Disconnected);
|
||||
toBeDisconnected.add(c);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if (!toBeDisconnected.isEmpty()) {
|
||||
LOG.info("Sending disconnect for client sessions {}", toBeDisconnected);
|
||||
List<ClientSession> disconnectedSessions = clientServiceInterface.updateSessions(toBeDisconnected);
|
||||
LOG.info("Result of client disconnect {}", disconnectedSessions);
|
||||
} else {
|
||||
LOG.info("There are no existing client sessions that are not already in Disconnected state.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,11 +15,8 @@ import org.springframework.util.CollectionUtils;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.servicemetric.models.McsStats;
|
||||
import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDataType;
|
||||
import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDetails;
|
||||
import com.telecominfraproject.wlan.servicemetric.models.WmmQueueStats;
|
||||
import com.telecominfraproject.wlan.servicemetric.models.WmmQueueStats.WmmQueueType;
|
||||
|
||||
/**
|
||||
* Node-level metric data from the Access Point.
|
||||
@@ -79,14 +76,8 @@ public class ApNodeMetrics extends ServiceMetricDetails
|
||||
|
||||
private Map<RadioType, List<RadioUtilization>> radioUtilizationPerRadio = new EnumMap<>(RadioType.class);
|
||||
|
||||
|
||||
private Map<RadioType, RadioStatistics> radioStatsPerRadio = new EnumMap<>(RadioType.class);
|
||||
|
||||
private Map<RadioType, List<McsStats>> mcsStatsPerRadio = new EnumMap<>(RadioType.class);
|
||||
|
||||
private Map<RadioType, Map<WmmQueueType, WmmQueueStats>> wmmQueuesPerRadio = new EnumMap<>(RadioType.class);
|
||||
|
||||
|
||||
public Integer getPeriodLengthSec() {
|
||||
return periodLengthSec;
|
||||
}
|
||||
@@ -262,25 +253,6 @@ public class ApNodeMetrics extends ServiceMetricDetails
|
||||
this.radioStatsPerRadio.put(radioType, radioStats);
|
||||
}
|
||||
|
||||
public List<McsStats> getMcsStats(RadioType radioType) {
|
||||
return mcsStatsPerRadio.get(radioType);
|
||||
}
|
||||
|
||||
public void setMcsStats(RadioType radioType, List<McsStats> mcsStats) {
|
||||
this.mcsStatsPerRadio.put(radioType, mcsStats);
|
||||
}
|
||||
|
||||
|
||||
public Map<WmmQueueType, WmmQueueStats> getWmmQueue(RadioType radioType) {
|
||||
return wmmQueuesPerRadio.get(radioType);
|
||||
}
|
||||
|
||||
public void setWmmQueue(RadioType radioType, Map<WmmQueueType, WmmQueueStats> wmmQueue) {
|
||||
this.wmmQueuesPerRadio.put(radioType, wmmQueue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Utility Functions
|
||||
//
|
||||
@@ -404,31 +376,14 @@ public class ApNodeMetrics extends ServiceMetricDetails
|
||||
this.radioStatsPerRadio = radioStatsPerRadio;
|
||||
}
|
||||
|
||||
public Map<RadioType, List<McsStats>> getMcsStatsPerRadio() {
|
||||
return mcsStatsPerRadio;
|
||||
}
|
||||
|
||||
public void setMcsStatsPerRadio(Map<RadioType, List<McsStats>> mcsStatsPerRadio) {
|
||||
this.mcsStatsPerRadio = mcsStatsPerRadio;
|
||||
}
|
||||
|
||||
public Map<RadioType, Map<WmmQueueType, WmmQueueStats>> getWmmQueuesPerRadio() {
|
||||
return wmmQueuesPerRadio;
|
||||
}
|
||||
|
||||
public void setWmmQueuesPerRadio(Map<RadioType, Map<WmmQueueType, WmmQueueStats>> wmmQueuesPerRadio) {
|
||||
this.wmmQueuesPerRadio = wmmQueuesPerRadio;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + Objects.hash(apPerformance, channelUtilizationPerRadio, clientMacAddressesPerRadio,
|
||||
cloudLinkAvailability, cloudLinkLatencyInMs, mcsStatsPerRadio, networkProbeMetrics, noiseFloorPerRadio,
|
||||
cloudLinkAvailability, cloudLinkLatencyInMs, networkProbeMetrics, noiseFloorPerRadio,
|
||||
periodLengthSec, radioStatsPerRadio, radioUtilizationPerRadio, radiusMetrics, rxBytesPerRadio,
|
||||
tunnelMetrics, txBytesPerRadio, vlanSubnet, wmmQueuesPerRadio);
|
||||
tunnelMetrics, txBytesPerRadio, vlanSubnet);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -449,7 +404,6 @@ public class ApNodeMetrics extends ServiceMetricDetails
|
||||
&& Objects.equals(clientMacAddressesPerRadio, other.clientMacAddressesPerRadio)
|
||||
&& Objects.equals(cloudLinkAvailability, other.cloudLinkAvailability)
|
||||
&& Objects.equals(cloudLinkLatencyInMs, other.cloudLinkLatencyInMs)
|
||||
&& Objects.equals(mcsStatsPerRadio, other.mcsStatsPerRadio)
|
||||
&& Objects.equals(networkProbeMetrics, other.networkProbeMetrics)
|
||||
&& Objects.equals(noiseFloorPerRadio, other.noiseFloorPerRadio)
|
||||
&& Objects.equals(periodLengthSec, other.periodLengthSec)
|
||||
@@ -459,8 +413,7 @@ public class ApNodeMetrics extends ServiceMetricDetails
|
||||
&& Objects.equals(rxBytesPerRadio, other.rxBytesPerRadio)
|
||||
&& Objects.equals(tunnelMetrics, other.tunnelMetrics)
|
||||
&& Objects.equals(txBytesPerRadio, other.txBytesPerRadio)
|
||||
&& Objects.equals(vlanSubnet, other.vlanSubnet)
|
||||
&& Objects.equals(wmmQueuesPerRadio, other.wmmQueuesPerRadio);
|
||||
&& Objects.equals(vlanSubnet, other.vlanSubnet);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -484,14 +437,6 @@ public class ApNodeMetrics extends ServiceMetricDetails
|
||||
radioStatsPerRadio.values().forEach(c -> { if (hasUnsupportedValue(c)) { ai.incrementAndGet();} });
|
||||
}
|
||||
|
||||
if(mcsStatsPerRadio!=null) {
|
||||
mcsStatsPerRadio.values().forEach(c -> { if (hasUnsupportedValue(c)) { ai.incrementAndGet();} });
|
||||
}
|
||||
|
||||
if(wmmQueuesPerRadio!=null) {
|
||||
wmmQueuesPerRadio.values().forEach(c -> { if (hasUnsupportedValue(c)) { ai.incrementAndGet();} });
|
||||
}
|
||||
|
||||
if(ai.get()>0) {
|
||||
return true;
|
||||
}
|
||||
@@ -518,25 +463,6 @@ public class ApNodeMetrics extends ServiceMetricDetails
|
||||
|
||||
}
|
||||
|
||||
if(this.wmmQueuesPerRadio!=null) {
|
||||
ret.wmmQueuesPerRadio = new EnumMap<>(RadioType.class);
|
||||
this.wmmQueuesPerRadio.forEach((rt, wq) -> {
|
||||
Map<WmmQueueStats.WmmQueueType, WmmQueueStats> newWm = new EnumMap<>(WmmQueueType.class);
|
||||
ret.wmmQueuesPerRadio.put(rt, newWm);
|
||||
wq.forEach((k, v) -> newWm.put(k, v.clone()));
|
||||
});
|
||||
}
|
||||
|
||||
if(this.mcsStatsPerRadio !=null) {
|
||||
ret.mcsStatsPerRadio = new EnumMap<>(RadioType.class);
|
||||
this.mcsStatsPerRadio.forEach((k, listV) -> {
|
||||
List<McsStats> newList = new ArrayList<>();
|
||||
ret.mcsStatsPerRadio.put(k, newList);
|
||||
listV.forEach(mcs -> newList.add(mcs.clone()));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if(this.networkProbeMetrics !=null) {
|
||||
ret.networkProbeMetrics = new ArrayList<>();
|
||||
for(NetworkProbeMetrics npm: this.networkProbeMetrics){
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,160 +0,0 @@
|
||||
package com.telecominfraproject.wlan.servicemetric.client.qoe.models;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDataType;
|
||||
import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDetails;
|
||||
|
||||
/**
|
||||
* QoE related metrics which is independent of RadioType
|
||||
*
|
||||
* @author yongli
|
||||
*
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class ClientQoEMetrics extends ServiceMetricDetails {
|
||||
|
||||
private static final long serialVersionUID = 5242617221447159480L;
|
||||
|
||||
/**
|
||||
* How many seconds the AP measured for the metric
|
||||
*/
|
||||
private Integer periodLengthSec = 5;
|
||||
private Integer secondsSinceLastRecv;
|
||||
|
||||
|
||||
// Connectivity QoE stats.
|
||||
private Long qoeEventualSuccessTimeTaken;
|
||||
private Long qoeNumOfAttempts;
|
||||
private Long qoeNumOfSuccess;
|
||||
private Long qoeAttemptDuration;
|
||||
private Long qoeAssociatedDuration;
|
||||
private Long qoeDeltaDuration;
|
||||
private Long qoeNumRepeatedAttempts;
|
||||
private Long qoeUserError;
|
||||
|
||||
@Override
|
||||
public ServiceMetricDataType getDataType() {
|
||||
return ServiceMetricDataType.ClientQoE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientQoEMetrics clone() {
|
||||
return (ClientQoEMetrics) super.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + Objects.hash(periodLengthSec, qoeAssociatedDuration, qoeAttemptDuration,
|
||||
qoeDeltaDuration, qoeEventualSuccessTimeTaken, qoeNumOfAttempts, qoeNumOfSuccess,
|
||||
qoeNumRepeatedAttempts, qoeUserError, secondsSinceLastRecv);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!super.equals(obj)) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof ClientQoEMetrics)) {
|
||||
return false;
|
||||
}
|
||||
ClientQoEMetrics other = (ClientQoEMetrics) obj;
|
||||
return Objects.equals(periodLengthSec, other.periodLengthSec)
|
||||
&& Objects.equals(qoeAssociatedDuration, other.qoeAssociatedDuration)
|
||||
&& Objects.equals(qoeAttemptDuration, other.qoeAttemptDuration)
|
||||
&& Objects.equals(qoeDeltaDuration, other.qoeDeltaDuration)
|
||||
&& Objects.equals(qoeEventualSuccessTimeTaken, other.qoeEventualSuccessTimeTaken)
|
||||
&& Objects.equals(qoeNumOfAttempts, other.qoeNumOfAttempts)
|
||||
&& Objects.equals(qoeNumOfSuccess, other.qoeNumOfSuccess)
|
||||
&& Objects.equals(qoeNumRepeatedAttempts, other.qoeNumRepeatedAttempts)
|
||||
&& Objects.equals(qoeUserError, other.qoeUserError)
|
||||
&& Objects.equals(secondsSinceLastRecv, other.secondsSinceLastRecv);
|
||||
}
|
||||
|
||||
public Long getQoeAssociatedDuration() {
|
||||
return qoeAssociatedDuration;
|
||||
}
|
||||
|
||||
public Long getQoeAttemptDuration() {
|
||||
return qoeAttemptDuration;
|
||||
}
|
||||
|
||||
public Long getQoeDeltaDuration() {
|
||||
return qoeDeltaDuration;
|
||||
}
|
||||
|
||||
public Long getQoeEventualSuccessTimeTaken() {
|
||||
return qoeEventualSuccessTimeTaken;
|
||||
}
|
||||
|
||||
public Long getQoeNumOfAttempts() {
|
||||
return qoeNumOfAttempts;
|
||||
}
|
||||
|
||||
public Long getQoeNumOfSuccess() {
|
||||
return qoeNumOfSuccess;
|
||||
}
|
||||
|
||||
public Long getQoeNumRepeatedAttempts() {
|
||||
return qoeNumRepeatedAttempts;
|
||||
}
|
||||
|
||||
public Long getQoeUserError() {
|
||||
return qoeUserError;
|
||||
}
|
||||
|
||||
public void setQoeAssociatedDuration(Long qoeAssociatedDuration) {
|
||||
this.qoeAssociatedDuration = qoeAssociatedDuration;
|
||||
}
|
||||
|
||||
public void setQoeAttemptDuration(Long qoeAttemptDuration) {
|
||||
this.qoeAttemptDuration = qoeAttemptDuration;
|
||||
}
|
||||
|
||||
public void setQoeDeltaDuration(Long qoeDeltaDuration) {
|
||||
this.qoeDeltaDuration = qoeDeltaDuration;
|
||||
}
|
||||
|
||||
public void setQoeEventualSuccessTimeTaken(Long qoeEventualSuccessTimeTaken) {
|
||||
this.qoeEventualSuccessTimeTaken = qoeEventualSuccessTimeTaken;
|
||||
}
|
||||
|
||||
public void setQoeNumOfAttempts(Long qoeNumOfAttempts) {
|
||||
this.qoeNumOfAttempts = qoeNumOfAttempts;
|
||||
}
|
||||
|
||||
public void setQoeNumOfSuccess(Long qoeNumOfSuccess) {
|
||||
this.qoeNumOfSuccess = qoeNumOfSuccess;
|
||||
}
|
||||
|
||||
public void setQoeNumRepeatedAttempts(Long qoeNumRepeatedAttempts) {
|
||||
this.qoeNumRepeatedAttempts = qoeNumRepeatedAttempts;
|
||||
}
|
||||
|
||||
public void setQoeUserError(Long qoeUserError) {
|
||||
this.qoeUserError = qoeUserError;
|
||||
}
|
||||
|
||||
public Integer getPeriodLengthSec() {
|
||||
return periodLengthSec;
|
||||
}
|
||||
|
||||
public void setPeriodLengthSec(Integer periodLengthSec) {
|
||||
this.periodLengthSec = periodLengthSec;
|
||||
}
|
||||
|
||||
public Integer getSecondsSinceLastRecv() {
|
||||
return secondsSinceLastRecv;
|
||||
}
|
||||
|
||||
public void setSecondsSinceLastRecv(Integer secondsSinceLastRecv) {
|
||||
this.secondsSinceLastRecv = secondsSinceLastRecv;
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
package com.telecominfraproject.wlan.servicemetric.models;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class McsStats extends BaseJsonModel
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 2366899901343104028L;
|
||||
|
||||
/**
|
||||
* The MCS number. This is table index.
|
||||
*/
|
||||
private McsType mcsNum;
|
||||
|
||||
/**
|
||||
* The number of successfully transmitted frames at this rate. Do not count failed transmission.
|
||||
*/
|
||||
private Integer txFrames;
|
||||
|
||||
/**
|
||||
* The number of received frames at this rate.
|
||||
*/
|
||||
private Integer rxFrames;
|
||||
|
||||
private Long rate;
|
||||
|
||||
|
||||
public McsStats()
|
||||
{
|
||||
// for serialization
|
||||
}
|
||||
|
||||
|
||||
public McsType getMcsNum() {
|
||||
return mcsNum;
|
||||
}
|
||||
|
||||
|
||||
public void setMcsNum(McsType mcsNum) {
|
||||
this.mcsNum = mcsNum;
|
||||
}
|
||||
|
||||
|
||||
public Integer getTxFrames() {
|
||||
return txFrames;
|
||||
}
|
||||
|
||||
|
||||
public void setTxFrames(Integer txFrames) {
|
||||
this.txFrames = txFrames;
|
||||
}
|
||||
|
||||
|
||||
public Integer getRxFrames() {
|
||||
return rxFrames;
|
||||
}
|
||||
|
||||
|
||||
public void setRxFrames(Integer rxFrames) {
|
||||
this.rxFrames = rxFrames;
|
||||
}
|
||||
|
||||
public Long getRate() {
|
||||
return rate;
|
||||
}
|
||||
|
||||
|
||||
public void setRate(Long rate) {
|
||||
this.rate = rate;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public McsStats clone() {
|
||||
McsStats ret = (McsStats) super.clone();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasUnsupportedValue() {
|
||||
if (super.hasUnsupportedValue()) {
|
||||
return true;
|
||||
}
|
||||
if (McsType.isUnsupported(mcsNum)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
package com.telecominfraproject.wlan.servicemetric.models;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.telecominfraproject.wlan.core.model.json.JsonDeserializationUtils;
|
||||
|
||||
/**
|
||||
* MCS index values
|
||||
* @author ekeddy
|
||||
*
|
||||
*/
|
||||
public enum McsType {
|
||||
|
||||
//McsType(int id, boolean isHt, boolean isVht, int numSpacialStreams, int mcsIndex)
|
||||
MCS_1 (0, false, false, 1, 1), // 2.4GHz only
|
||||
MCS_2 (1, false, false, 1, 2), // 2.4GHz only
|
||||
MCS_5dot5(2, false, false, 1, 5), // 2.4GHz only
|
||||
MCS_11 (3, false, false, 1, 11), // 2.4GHz only
|
||||
MCS_6 (4, false, false, 1, 13),
|
||||
MCS_9 (5, false, false, 1, 16),
|
||||
MCS_12 (6, false, false, 1, 5),
|
||||
MCS_18 (7, false, false, 1, 7),
|
||||
MCS_24 (8, false, false, 1, 9),
|
||||
MCS_36 (9, false, false, 1, 11),
|
||||
MCS_48 (10, false, false, 1, 1),
|
||||
MCS_54 (11, false, false, 1, 3),
|
||||
MCS_N_0 (12, true, false, 1, 0),
|
||||
MCS_N_1 (13, true, false, 1, 1),
|
||||
MCS_N_2 (14, true, false, 1, 2),
|
||||
MCS_N_3 (15, true, false, 1, 3),
|
||||
MCS_N_4 (16, true, false, 1, 4),
|
||||
MCS_N_5 (17, true, false, 1, 5),
|
||||
MCS_N_6 (18, true, false, 1, 6),
|
||||
MCS_N_7 (19, true, false, 1, 7),
|
||||
MCS_N_8 (20, true, false, 2, 8),
|
||||
MCS_N_9 (21, true, false, 2, 9),
|
||||
MCS_N_10(22, true, false, 2, 10),
|
||||
MCS_N_11(23, true, false, 2, 11),
|
||||
MCS_N_12(24, true, false, 2, 12),
|
||||
MCS_N_13(25, true, false, 2, 13),
|
||||
MCS_N_14(26, true, false, 2, 14),
|
||||
MCS_N_15(27, true, false, 2, 15),
|
||||
MCS_AC_1x1_0(28, false, true, 1, 0),
|
||||
MCS_AC_1x1_1(29, false, true, 1, 1),
|
||||
MCS_AC_1x1_2(30, false, true, 1, 2),
|
||||
MCS_AC_1x1_3(31, false, true, 1, 3),
|
||||
MCS_AC_1x1_4(32, false, true, 1, 4),
|
||||
MCS_AC_1x1_5(33, false, true, 1, 5),
|
||||
MCS_AC_1x1_6(34, false, true, 1, 6),
|
||||
MCS_AC_1x1_7(35, false, true, 1, 7),
|
||||
MCS_AC_1x1_8(36, false, true, 1, 8),
|
||||
MCS_AC_1x1_9(37, false, true, 1, 9),
|
||||
MCS_AC_2x2_0(38, false, true, 2, 0),
|
||||
MCS_AC_2x2_1(39, false, true, 2, 1),
|
||||
MCS_AC_2x2_2(40, false, true, 2, 2),
|
||||
MCS_AC_2x2_3(41, false, true, 2, 3),
|
||||
MCS_AC_2x2_4(42, false, true, 2, 4),
|
||||
MCS_AC_2x2_5(43, false, true, 2, 5),
|
||||
MCS_AC_2x2_6(44, false, true, 2, 6),
|
||||
MCS_AC_2x2_7(45, false, true, 2, 7),
|
||||
MCS_AC_2x2_8(46, false, true, 2, 8),
|
||||
MCS_AC_2x2_9(47, false, true, 2, 9),
|
||||
MCS_AC_3x3_0(48, false, true, 3, 0),
|
||||
MCS_AC_3x3_1(49, false, true, 3, 1),
|
||||
MCS_AC_3x3_2(50, false, true, 3, 2),
|
||||
MCS_AC_3x3_3(51, false, true, 3, 3),
|
||||
MCS_AC_3x3_4(52, false, true, 3, 4),
|
||||
MCS_AC_3x3_5(53, false, true, 3, 5),
|
||||
MCS_AC_3x3_6(54, false, true, 3, 6),
|
||||
MCS_AC_3x3_7(55, false, true, 3, 7),
|
||||
MCS_AC_3x3_8(56, false, true, 3, 8),
|
||||
MCS_AC_3x3_9(57, false, true, 3, 9),
|
||||
MCS_N_16(58, true, false, 3, 16),
|
||||
MCS_N_17(59, true, false, 3, 17),
|
||||
MCS_N_18(60, true, false, 3, 18),
|
||||
MCS_N_19(61, true, false, 3, 19),
|
||||
MCS_N_20(62, true, false, 3, 20),
|
||||
MCS_N_21(63, true, false, 3, 21),
|
||||
MCS_N_22(64, true, false, 3, 22),
|
||||
MCS_N_23(65, true, false, 3, 23),
|
||||
MCS_N_24(66, true, false, 4, 24),
|
||||
MCS_N_25(67, true, false, 4, 25),
|
||||
MCS_N_26(68, true, false, 4, 26),
|
||||
MCS_N_27(69, true, false, 4, 27),
|
||||
MCS_N_28(70, true, false, 4, 28),
|
||||
MCS_N_29(71, true, false, 4, 29),
|
||||
MCS_N_30(72, true, false, 4, 30),
|
||||
MCS_N_31(73, true, false, 4, 31),
|
||||
MCS_AC_4x4_0(74, false, true, 4, 0),
|
||||
MCS_AC_4x4_1(75, false, true, 4, 1),
|
||||
MCS_AC_4x4_2(76, false, true, 4, 2),
|
||||
MCS_AC_4x4_3(77, false, true, 4, 3),
|
||||
MCS_AC_4x4_4(78, false, true, 4, 4),
|
||||
MCS_AC_4x4_5(79, false, true, 4, 5),
|
||||
MCS_AC_4x4_6(80, false, true, 4, 6),
|
||||
MCS_AC_4x4_7(81, false, true, 4, 7),
|
||||
MCS_AC_4x4_8(82, false, true, 4, 8),
|
||||
MCS_AC_4x4_9(83, false, true, 4, 9),
|
||||
|
||||
//last used index 83
|
||||
|
||||
UNSUPPORTED(-1, false, false, 0, -1);
|
||||
|
||||
private final int id;
|
||||
private final boolean isHt;
|
||||
private final boolean isVht;
|
||||
private final int numSpacialStreams;
|
||||
private final int mcsIndex;
|
||||
|
||||
private static final Map<Integer, McsType> ELEMENTS = new HashMap<>();
|
||||
|
||||
private McsType(int id, boolean isHt, boolean isVht, int numSpacialStreams, int mcsIndex){
|
||||
this.id = id;
|
||||
this.isHt = isHt;
|
||||
this.isVht = isVht;
|
||||
this.numSpacialStreams = numSpacialStreams;
|
||||
this.mcsIndex = mcsIndex;
|
||||
}
|
||||
|
||||
public int getId(){
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public int getMcsIndex() {
|
||||
return mcsIndex;
|
||||
}
|
||||
|
||||
public int getNumSpacialStreams() {
|
||||
return numSpacialStreams;
|
||||
}
|
||||
|
||||
public boolean isHt() {
|
||||
return isHt;
|
||||
}
|
||||
|
||||
public boolean isVht() {
|
||||
return isVht;
|
||||
}
|
||||
|
||||
public static McsType getById(int enumId){
|
||||
if(ELEMENTS.isEmpty()){
|
||||
//initialize elements map
|
||||
for(McsType met : McsType.values()){
|
||||
ELEMENTS.put(met.getId(), met);
|
||||
}
|
||||
}
|
||||
|
||||
return ELEMENTS.get(enumId);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static McsType getByName(String value) {
|
||||
return JsonDeserializationUtils.deserializEnum(value, McsType.class, UNSUPPORTED);
|
||||
}
|
||||
|
||||
public static boolean isUnsupported(McsType value) {
|
||||
return UNSUPPORTED.equals(value);
|
||||
}
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
package com.telecominfraproject.wlan.servicemetric.models;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.core.model.json.JsonDeserializationUtils;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class WmmQueueStats extends BaseJsonModel {
|
||||
|
||||
private static final long serialVersionUID = 1784481171729854130L;
|
||||
|
||||
public static enum WmmQueueType {
|
||||
BE, BK, VI, VO, UNSUPPORTED;
|
||||
|
||||
@JsonCreator
|
||||
public static WmmQueueType getByName(String value) {
|
||||
return JsonDeserializationUtils.deserializEnum(value, WmmQueueType.class, UNSUPPORTED);
|
||||
}
|
||||
|
||||
public static boolean isUnsupported(WmmQueueType queueType) {
|
||||
return UNSUPPORTED.equals(queueType);
|
||||
}
|
||||
}
|
||||
|
||||
private WmmQueueType queueType;
|
||||
private long txFrames;
|
||||
private long txBytes;
|
||||
|
||||
private long txFailedFrames;
|
||||
private long txFailedBytes;
|
||||
|
||||
private long rxFrames;
|
||||
private long rxBytes;
|
||||
|
||||
private long rxFailedFrames;
|
||||
private long rxFailedBytes;
|
||||
|
||||
private long forwardFrames;
|
||||
private long forwardBytes;
|
||||
|
||||
private long txExpiredFrames;
|
||||
private long txExpiredBytes;
|
||||
|
||||
public WmmQueueStats() {
|
||||
// for serialization
|
||||
}
|
||||
|
||||
public WmmQueueStats(WmmQueueType queueType, long txFrames, long txBytes, long txFailedFrames, long txFailedBytes,
|
||||
long rxFrames, long rxBytes, long rxFailedFrames, long rxFailedBytes, long forwardFrames, long forwardBytes,
|
||||
long txExpiredFrames, long txExpiredBytes) {
|
||||
super();
|
||||
this.queueType = queueType;
|
||||
this.txFrames = txFrames;
|
||||
this.txBytes = txBytes;
|
||||
this.txFailedFrames = txFailedFrames;
|
||||
this.txFailedBytes = txFailedBytes;
|
||||
this.rxFrames = rxFrames;
|
||||
this.rxBytes = rxBytes;
|
||||
this.rxFailedFrames = rxFailedFrames;
|
||||
this.rxFailedBytes = rxFailedBytes;
|
||||
this.forwardFrames = forwardFrames;
|
||||
this.forwardBytes = forwardBytes;
|
||||
this.txExpiredFrames = txExpiredFrames;
|
||||
this.txExpiredBytes = txExpiredBytes;
|
||||
}
|
||||
|
||||
public WmmQueueType getQueueType() {
|
||||
return queueType;
|
||||
}
|
||||
|
||||
public void setQueueType(WmmQueueType queueType) {
|
||||
this.queueType = queueType;
|
||||
}
|
||||
|
||||
public long getTxFrames() {
|
||||
return txFrames;
|
||||
}
|
||||
|
||||
public void setTxFrames(long txFrames) {
|
||||
this.txFrames = txFrames;
|
||||
}
|
||||
|
||||
public long getTxBytes() {
|
||||
return txBytes;
|
||||
}
|
||||
|
||||
public void setTxBytes(long txBytes) {
|
||||
this.txBytes = txBytes;
|
||||
}
|
||||
|
||||
public long getTxFailedFrames() {
|
||||
return txFailedFrames;
|
||||
}
|
||||
|
||||
public void setTxFailedFrames(long txFailedFrames) {
|
||||
this.txFailedFrames = txFailedFrames;
|
||||
}
|
||||
|
||||
public long getTxFailedBytes() {
|
||||
return txFailedBytes;
|
||||
}
|
||||
|
||||
public void setTxFailedBytes(long txFailedBytes) {
|
||||
this.txFailedBytes = txFailedBytes;
|
||||
}
|
||||
|
||||
public long getRxFrames() {
|
||||
return rxFrames;
|
||||
}
|
||||
|
||||
public void setRxFrames(long rxFrames) {
|
||||
this.rxFrames = rxFrames;
|
||||
}
|
||||
|
||||
public long getRxBytes() {
|
||||
return rxBytes;
|
||||
}
|
||||
|
||||
public void setRxBytes(long rxBytes) {
|
||||
this.rxBytes = rxBytes;
|
||||
}
|
||||
|
||||
public long getRxFailedFrames() {
|
||||
return rxFailedFrames;
|
||||
}
|
||||
|
||||
public void setRxFailedFrames(long rxFailedFrames) {
|
||||
this.rxFailedFrames = rxFailedFrames;
|
||||
}
|
||||
|
||||
public long getRxFailedBytes() {
|
||||
return rxFailedBytes;
|
||||
}
|
||||
|
||||
public void setRxFailedBytes(long rxFailedBytes) {
|
||||
this.rxFailedBytes = rxFailedBytes;
|
||||
}
|
||||
|
||||
public long getForwardFrames() {
|
||||
return forwardFrames;
|
||||
}
|
||||
|
||||
public void setForwardFrames(long forwardFrames) {
|
||||
this.forwardFrames = forwardFrames;
|
||||
}
|
||||
|
||||
public long getForwardBytes() {
|
||||
return forwardBytes;
|
||||
}
|
||||
|
||||
public void setForwardBytes(long forwardBytes) {
|
||||
this.forwardBytes = forwardBytes;
|
||||
}
|
||||
|
||||
public long getTxExpiredFrames() {
|
||||
return txExpiredFrames;
|
||||
}
|
||||
|
||||
public void setTxExpiredFrames(long txExpiredFrames) {
|
||||
this.txExpiredFrames = txExpiredFrames;
|
||||
}
|
||||
|
||||
public long getTxExpiredBytes() {
|
||||
return txExpiredBytes;
|
||||
}
|
||||
|
||||
public void setTxExpiredBytes(long txExpiredBytes) {
|
||||
this.txExpiredBytes = txExpiredBytes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + (int) (forwardBytes ^ (forwardBytes >>> 32));
|
||||
result = prime * result + (int) (forwardFrames ^ (forwardFrames >>> 32));
|
||||
result = prime * result + ((queueType == null) ? 0 : queueType.hashCode());
|
||||
result = prime * result + (int) (rxBytes ^ (rxBytes >>> 32));
|
||||
result = prime * result + (int) (rxFailedBytes ^ (rxFailedBytes >>> 32));
|
||||
result = prime * result + (int) (rxFailedFrames ^ (rxFailedFrames >>> 32));
|
||||
result = prime * result + (int) (rxFrames ^ (rxFrames >>> 32));
|
||||
result = prime * result + (int) (txBytes ^ (txBytes >>> 32));
|
||||
result = prime * result + (int) (txExpiredBytes ^ (txExpiredBytes >>> 32));
|
||||
result = prime * result + (int) (txExpiredFrames ^ (txExpiredFrames >>> 32));
|
||||
result = prime * result + (int) (txFailedBytes ^ (txFailedBytes >>> 32));
|
||||
result = prime * result + (int) (txFailedFrames ^ (txFailedFrames >>> 32));
|
||||
result = prime * result + (int) (txFrames ^ (txFrames >>> 32));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
WmmQueueStats other = (WmmQueueStats) obj;
|
||||
if (forwardBytes != other.forwardBytes)
|
||||
return false;
|
||||
if (forwardFrames != other.forwardFrames)
|
||||
return false;
|
||||
if (queueType != other.queueType)
|
||||
return false;
|
||||
if (rxBytes != other.rxBytes)
|
||||
return false;
|
||||
if (rxFailedBytes != other.rxFailedBytes)
|
||||
return false;
|
||||
if (rxFailedFrames != other.rxFailedFrames)
|
||||
return false;
|
||||
if (rxFrames != other.rxFrames)
|
||||
return false;
|
||||
if (txBytes != other.txBytes)
|
||||
return false;
|
||||
if (txExpiredBytes != other.txExpiredBytes)
|
||||
return false;
|
||||
if (txExpiredFrames != other.txExpiredFrames)
|
||||
return false;
|
||||
if (txFailedBytes != other.txFailedBytes)
|
||||
return false;
|
||||
if (txFailedFrames != other.txFailedFrames)
|
||||
return false;
|
||||
if (txFrames != other.txFrames)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasUnsupportedValue() {
|
||||
if (super.hasUnsupportedValue()) {
|
||||
return true;
|
||||
}
|
||||
if (WmmQueueType.isUnsupported(queueType)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WmmQueueStats clone() {
|
||||
return (WmmQueueStats) super.clone();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -56,8 +56,7 @@ public class StatusDatastoreCassandra implements StatusDatastore {
|
||||
private static final Set<String> columnsToSkipForUpdate = new HashSet<>(Arrays.asList(
|
||||
"customerId",
|
||||
"equipmentId",
|
||||
"statusDataType",
|
||||
"createdTimestamp"));
|
||||
"statusDataType"));
|
||||
|
||||
private static final String TABLE_NAME = "status";
|
||||
private static final String ALL_COLUMNS;
|
||||
@@ -230,11 +229,14 @@ public class StatusDatastoreCassandra implements StatusDatastore {
|
||||
//This DAO does not enforce check for concurrent updates. Last one always wins.
|
||||
|
||||
long newLastModifiedTs = System.currentTimeMillis();
|
||||
boolean isCreateNotSet = status.getCreatedTimestamp() == 0;
|
||||
|
||||
|
||||
cqlSession.execute(preparedStmt_update.bind(
|
||||
|
||||
//TODO: add remaining properties from Status here
|
||||
(status.getDetails()!=null) ? ByteBuffer.wrap(status.getDetails().toZippedBytes()) : null ,
|
||||
isCreateNotSet ? newLastModifiedTs : status.getCreatedTimestamp(),
|
||||
|
||||
newLastModifiedTs,
|
||||
|
||||
@@ -253,6 +255,9 @@ public class StatusDatastoreCassandra implements StatusDatastore {
|
||||
|
||||
//make a copy so that we don't accidentally update caller's version by reference
|
||||
Status statusCopy = status.clone();
|
||||
if(isCreateNotSet) {
|
||||
statusCopy.setCreatedTimestamp(newLastModifiedTs);
|
||||
}
|
||||
statusCopy.setLastModifiedTimestamp(newLastModifiedTs);
|
||||
|
||||
LOG.debug("Updated Status {}", statusCopy);
|
||||
|
||||
@@ -1149,8 +1149,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -1168,8 +1167,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -1185,8 +1183,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -1641,8 +1638,7 @@ components:
|
||||
steerType:
|
||||
$ref: '#/components/schemas/SteerType'
|
||||
previousValidSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
lastFailureDetails:
|
||||
$ref: '#/components/schemas/ClientFailureDetails'
|
||||
firstFailureDetails:
|
||||
@@ -1657,8 +1653,7 @@ components:
|
||||
type: integer
|
||||
format: int32
|
||||
priorSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
priorEquipmentId:
|
||||
type: integer
|
||||
format: int64
|
||||
@@ -2420,8 +2415,6 @@ components:
|
||||
example:
|
||||
customerId: 2
|
||||
username: new_user
|
||||
password: pwd
|
||||
role: CustomerIT
|
||||
|
||||
PortalUserRole:
|
||||
type: string
|
||||
|
||||
Reference in New Issue
Block a user