mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-03-20 19:39:19 +00:00
Compare commits
8 Commits
WIFI-3056-
...
change_ses
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
772beab902 | ||
|
|
4a764db007 | ||
|
|
1e277f5650 | ||
|
|
716ba7e043 | ||
|
|
3d2f4db32a | ||
|
|
c75d44ff03 | ||
|
|
f9dbe12c8c | ||
|
|
799b243cc4 |
@@ -64,20 +64,5 @@
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -1,83 +1,70 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<name>alarm-service</name>
|
||||
<description>Server side implementation of the service.</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>base-container</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<name>alarm-service</name>
|
||||
<description>Server side implementation of the service.</description>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>base-container</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -22,9 +22,6 @@ import com.telecominfraproject.wlan.equipment.EquipmentServiceLocal;
|
||||
import com.telecominfraproject.wlan.equipment.controller.EquipmentController;
|
||||
import com.telecominfraproject.wlan.equipment.datastore.inmemory.EquipmentDatastoreInMemory;
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.status.StatusServiceLocal;
|
||||
import com.telecominfraproject.wlan.status.controller.StatusController;
|
||||
import com.telecominfraproject.wlan.status.datastore.inmemory.StatusDatastoreInMemory;
|
||||
import com.telecominfraproject.wlan.alarm.datastore.inmemory.AlarmDatastoreInMemory;
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCode;
|
||||
@@ -48,10 +45,7 @@ import com.telecominfraproject.wlan.alarm.models.AlarmDetails;
|
||||
AlarmControllerTest.Config.class,
|
||||
EquipmentServiceLocal.class,
|
||||
EquipmentController.class,
|
||||
EquipmentDatastoreInMemory.class,
|
||||
StatusServiceLocal.class,
|
||||
StatusController.class,
|
||||
StatusDatastoreInMemory.class
|
||||
EquipmentDatastoreInMemory.class
|
||||
})
|
||||
public class AlarmControllerTest {
|
||||
|
||||
|
||||
@@ -811,10 +811,10 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
sessionDetails.setRadioType(radioType);
|
||||
sessionDetails.setSecurityType(SecurityType.PSK);
|
||||
sessionDetails.setSsid(ssidConfig.getSsid());
|
||||
sessionDetails.setSessionId(System.currentTimeMillis());
|
||||
sessionDetails.setSessionId(Long.toUnsignedString(System.currentTimeMillis()));
|
||||
sessionDetails.setAssocTimestamp(System.currentTimeMillis() - getRandomLong(10000, 1000000));
|
||||
|
||||
ClientDhcpDetails dhcpDetails = new ClientDhcpDetails(System.currentTimeMillis());
|
||||
ClientDhcpDetails dhcpDetails = new ClientDhcpDetails(Long.toUnsignedString(System.currentTimeMillis()));
|
||||
dhcpDetails.setLeaseStartTimestamp(System.currentTimeMillis() - getRandomLong(0, TimeUnit.HOURS.toMillis(4)));
|
||||
dhcpDetails.setLeaseTimeInSeconds((int)TimeUnit.HOURS.toSeconds(4));
|
||||
try {
|
||||
|
||||
@@ -1238,7 +1238,7 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
clientMetrics.setNumRxBytes(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setNumTxBytes(getRandomLong(3000000, 7000000));
|
||||
|
||||
clientMetrics.setSessionId(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setSessionId(Long.toUnsignedString(getRandomLong(3000000, 7000000)));
|
||||
|
||||
clientMetrics.setTxRetries(getRandomInt(30, 70));
|
||||
clientMetrics.setRxDuplicatePackets(getRandomInt(30, 70));
|
||||
@@ -1265,7 +1265,7 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
clientMetrics.setNumRxBytes(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setNumTxBytes(getRandomLong(3000000, 7000000));
|
||||
|
||||
clientMetrics.setSessionId(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setSessionId(Long.toUnsignedString(getRandomLong(3000000, 7000000)));
|
||||
|
||||
clientMetrics.setTxRetries(getRandomInt(30, 70));
|
||||
clientMetrics.setRxDuplicatePackets(getRandomInt(30, 70));
|
||||
@@ -1292,7 +1292,7 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
clientMetrics.setNumRxBytes(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setNumTxBytes(getRandomLong(3000000, 7000000));
|
||||
|
||||
clientMetrics.setSessionId(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setSessionId(Long.toUnsignedString(getRandomLong(3000000, 7000000)));
|
||||
|
||||
clientMetrics.setTxRetries(getRandomInt(30, 70));
|
||||
clientMetrics.setRxDuplicatePackets(getRandomInt(30, 70));
|
||||
@@ -1361,10 +1361,10 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
sessionDetails.setRadioType(radioType);
|
||||
sessionDetails.setSecurityType(SecurityType.PSK);
|
||||
sessionDetails.setSsid(ssidConfig.getSsid());
|
||||
sessionDetails.setSessionId(System.currentTimeMillis());
|
||||
sessionDetails.setSessionId(Long.toUnsignedString(System.currentTimeMillis()));
|
||||
sessionDetails.setAssocTimestamp(System.currentTimeMillis() - getRandomLong(10000, 1000000));
|
||||
|
||||
ClientDhcpDetails dhcpDetails = new ClientDhcpDetails(System.currentTimeMillis());
|
||||
ClientDhcpDetails dhcpDetails = new ClientDhcpDetails(Long.toUnsignedString(System.currentTimeMillis()));
|
||||
dhcpDetails
|
||||
.setLeaseStartTimestamp(System.currentTimeMillis() - getRandomLong(0, TimeUnit.HOURS.toMillis(4)));
|
||||
dhcpDetails.setLeaseTimeInSeconds((int) TimeUnit.HOURS.toSeconds(4));
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEvent
|
||||
public class ClientAssocEvent extends RealTimeEvent implements HasClientMac {
|
||||
private static final long serialVersionUID = 7015822981315570338L;
|
||||
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private String ssid;
|
||||
private MacAddress clientMacAddress;
|
||||
private RadioType radioType;
|
||||
@@ -29,7 +29,7 @@ public class ClientAssocEvent extends RealTimeEvent implements HasClientMac {
|
||||
|
||||
}
|
||||
|
||||
public ClientAssocEvent(int customerId, long locationId, long equipmentId, long timestamp, long sessionId, String ssid,
|
||||
public ClientAssocEvent(int customerId, long locationId, long equipmentId, long timestamp, String sessionId, String ssid,
|
||||
MacAddress clientMacAddress, RadioType radioType, boolean isReassociation, WlanStatusCode status,
|
||||
Integer internalSC, Integer rssi) {
|
||||
super(RealTimeEventType.STA_Client_Assoc, customerId, locationId, equipmentId, timestamp);
|
||||
@@ -50,7 +50,7 @@ public class ClientAssocEvent extends RealTimeEvent implements HasClientMac {
|
||||
/**
|
||||
* @return the sessionId
|
||||
*/
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ClientAssocEvent extends RealTimeEvent implements HasClientMac {
|
||||
* @param sessionId
|
||||
* the sessionId to set
|
||||
*/
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public class ClientAuthEvent extends RealTimeEvent implements HasClientMac {
|
||||
|
||||
private static final long serialVersionUID = 1221389696911864515L;
|
||||
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private String ssid;
|
||||
private MacAddress clientMacAddress;
|
||||
private WlanStatusCode authStatus;
|
||||
@@ -32,11 +32,11 @@ public class ClientAuthEvent extends RealTimeEvent implements HasClientMac {
|
||||
super(eventType, timestamp);
|
||||
}
|
||||
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public class ClientConnectSuccessEvent extends RealTimeEvent implements HasClien
|
||||
|
||||
private static final long serialVersionUID = -6082134146801575193L;
|
||||
private MacAddress clientMacAddress;
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private RadioType radioType;
|
||||
private boolean isReassociation;
|
||||
private String ssid;
|
||||
@@ -61,7 +61,7 @@ public class ClientConnectSuccessEvent extends RealTimeEvent implements HasClien
|
||||
/**
|
||||
* @return the sessionId
|
||||
*/
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class ClientConnectSuccessEvent extends RealTimeEvent implements HasClien
|
||||
* @param sessionId
|
||||
* the sessionId to set
|
||||
*/
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ClientDisconnectEvent extends RealTimeEvent implements HasClientMac
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = -7674230178565760938L;
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private byte[] macAddressBytes;
|
||||
private MacAddress clientMacAddress;
|
||||
private long lastRecvTime;
|
||||
@@ -104,7 +104,7 @@ public class ClientDisconnectEvent extends RealTimeEvent implements HasClientMac
|
||||
return rssi;
|
||||
}
|
||||
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ public class ClientDisconnectEvent extends RealTimeEvent implements HasClientMac
|
||||
this.rssi = rssi;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEvent
|
||||
public class ClientFailureEvent extends RealTimeEvent implements HasClientMac {
|
||||
private static final long serialVersionUID = -16021752050335131L;
|
||||
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private String ssid;
|
||||
private MacAddress clientMacAddress;
|
||||
private WlanReasonCode reasonCode;
|
||||
@@ -38,11 +38,11 @@ public class ClientFailureEvent extends RealTimeEvent implements HasClientMac {
|
||||
this.clientMacAddress = clientMacAddress;
|
||||
}
|
||||
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEvent
|
||||
public class ClientFirstDataEvent extends RealTimeEvent implements HasClientMac {
|
||||
|
||||
private static final long serialVersionUID = 298223061973506469L;
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private MacAddress clientMacAddress;
|
||||
private long firstDataRcvdTs;
|
||||
private long firstDataSentTs;
|
||||
@@ -28,11 +28,11 @@ public class ClientFirstDataEvent extends RealTimeEvent implements HasClientMac
|
||||
super(eventType, timestamp);
|
||||
}
|
||||
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.telecominfraproject.wlan.client.models.events.realtime;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.core.model.json.interfaces.HasClientMac;
|
||||
@@ -10,7 +11,7 @@ import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEvent
|
||||
public class ClientIdEvent extends RealTimeEvent implements HasClientMac {
|
||||
|
||||
private static final long serialVersionUID = 298223061973506469L;
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private byte[] macAddressBytes;
|
||||
private MacAddress clientMacAddress;
|
||||
private String userId;
|
||||
@@ -27,7 +28,7 @@ public class ClientIdEvent extends RealTimeEvent implements HasClientMac {
|
||||
/**
|
||||
* @return the sessionId
|
||||
*/
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
@@ -35,7 +36,7 @@ public class ClientIdEvent extends RealTimeEvent implements HasClientMac {
|
||||
* @param sessionId
|
||||
* the sessionId to set
|
||||
*/
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
@@ -65,58 +66,28 @@ public class ClientIdEvent extends RealTimeEvent implements HasClientMac {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + Arrays.hashCode(macAddressBytes);
|
||||
result = prime * result + (int) (sessionId ^ (sessionId >>> 32));
|
||||
result = prime * result + ((userId == null) ? 0 : userId.hashCode());
|
||||
result = prime * result + ((clientMacAddress == null) ? 0 : clientMacAddress.hashCode());
|
||||
result = prime * result + Objects.hash(clientMacAddress, sessionId, userId);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
if (!super.equals(obj))
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(obj)) {
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof ClientIdEvent)) {
|
||||
return false;
|
||||
}
|
||||
ClientIdEvent other = (ClientIdEvent) obj;
|
||||
if (!Arrays.equals(macAddressBytes, other.macAddressBytes))
|
||||
return false;
|
||||
if (sessionId != other.sessionId)
|
||||
return false;
|
||||
if (userId == null) {
|
||||
if (other.userId != null)
|
||||
return false;
|
||||
} else if (!userId.equals(other.userId))
|
||||
return false;
|
||||
if (clientMacAddress == null) {
|
||||
if (other.clientMacAddress != null)
|
||||
return false;
|
||||
} else if (!clientMacAddress.equals(other.clientMacAddress))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return Objects.equals(clientMacAddress, other.clientMacAddress) && Arrays.equals(macAddressBytes, other.macAddressBytes)
|
||||
&& Objects.equals(sessionId, other.sessionId) && Objects.equals(userId, other.userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ClientIpAddressEvent extends RealTimeEvent implements HasClientMac
|
||||
|
||||
private static final long serialVersionUID = -5332534925768685589L;
|
||||
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private MacAddress clientMacAddress;
|
||||
private InetAddress ipAddr;
|
||||
|
||||
@@ -29,11 +29,11 @@ public class ClientIpAddressEvent extends RealTimeEvent implements HasClientMac
|
||||
super(eventType, timestamp);
|
||||
}
|
||||
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ClientTimeoutEvent extends RealTimeEvent implements HasClientMac {
|
||||
}
|
||||
}
|
||||
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private MacAddress clientMacAddress;
|
||||
private long lastRecvTime;
|
||||
private long lastSentTime;
|
||||
@@ -45,11 +45,11 @@ public class ClientTimeoutEvent extends RealTimeEvent implements HasClientMac {
|
||||
super(eventType, timestamp);
|
||||
}
|
||||
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.telecominfraproject.wlan.client.session.models;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.WiFiSessionUtility;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
@@ -29,10 +30,9 @@ public class ClientDhcpDetails extends BaseJsonModel {
|
||||
/**
|
||||
* Identifies the association where DHCP last occurred.
|
||||
*/
|
||||
private long associationId;
|
||||
private String associationId;
|
||||
|
||||
|
||||
public ClientDhcpDetails(long sessionId) {
|
||||
public ClientDhcpDetails(String sessionId) {
|
||||
this.associationId = sessionId;
|
||||
}
|
||||
|
||||
@@ -101,10 +101,10 @@ public class ClientDhcpDetails extends BaseJsonModel {
|
||||
this.firstDiscoverTimestamp = firstDiscoverTimestamp;
|
||||
}
|
||||
|
||||
public long getAssociationId() {
|
||||
public String getAssociationId() {
|
||||
return associationId;
|
||||
}
|
||||
public void setAssociationId(Long associationId) {
|
||||
public void setAssociationId(String associationId) {
|
||||
this.associationId = associationId;
|
||||
}
|
||||
|
||||
@@ -116,123 +116,6 @@ public class ClientDhcpDetails extends BaseJsonModel {
|
||||
this.nakTimestamp = nakTimestamp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + (int) (associationId ^ (associationId >>> 32));
|
||||
result = prime * result + ((dhcpServerIp == null) ? 0 : dhcpServerIp.hashCode());
|
||||
result = prime * result + ((firstDiscoverTimestamp == null) ? 0 : firstDiscoverTimestamp.hashCode());
|
||||
result = prime * result + ((firstOfferTimestamp == null) ? 0 : firstOfferTimestamp.hashCode());
|
||||
result = prime * result + ((firstRequestTimestamp == null) ? 0 : firstRequestTimestamp.hashCode());
|
||||
result = prime * result + (fromInternal ? 1231 : 1237);
|
||||
result = prime * result + ((gatewayIp == null) ? 0 : gatewayIp.hashCode());
|
||||
result = prime * result + ((leaseStartTimestamp == null) ? 0 : leaseStartTimestamp.hashCode());
|
||||
result = prime * result + ((leaseTimeInSeconds == null) ? 0 : leaseTimeInSeconds.hashCode());
|
||||
result = prime * result + ((nakTimestamp == null) ? 0 : nakTimestamp.hashCode());
|
||||
result = prime * result + ((primaryDns == null) ? 0 : primaryDns.hashCode());
|
||||
result = prime * result + ((secondaryDns == null) ? 0 : secondaryDns.hashCode());
|
||||
result = prime * result + ((subnetMask == null) ? 0 : subnetMask.hashCode());
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof ClientDhcpDetails)) {
|
||||
return false;
|
||||
}
|
||||
ClientDhcpDetails other = (ClientDhcpDetails) obj;
|
||||
if (associationId != other.associationId) {
|
||||
return false;
|
||||
}
|
||||
if (dhcpServerIp == null) {
|
||||
if (other.dhcpServerIp != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!dhcpServerIp.equals(other.dhcpServerIp)) {
|
||||
return false;
|
||||
}
|
||||
if (firstDiscoverTimestamp == null) {
|
||||
if (other.firstDiscoverTimestamp != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!firstDiscoverTimestamp.equals(other.firstDiscoverTimestamp)) {
|
||||
return false;
|
||||
}
|
||||
if (firstOfferTimestamp == null) {
|
||||
if (other.firstOfferTimestamp != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!firstOfferTimestamp.equals(other.firstOfferTimestamp)) {
|
||||
return false;
|
||||
}
|
||||
if (firstRequestTimestamp == null) {
|
||||
if (other.firstRequestTimestamp != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!firstRequestTimestamp.equals(other.firstRequestTimestamp)) {
|
||||
return false;
|
||||
}
|
||||
if (fromInternal != other.fromInternal) {
|
||||
return false;
|
||||
}
|
||||
if (gatewayIp == null) {
|
||||
if (other.gatewayIp != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!gatewayIp.equals(other.gatewayIp)) {
|
||||
return false;
|
||||
}
|
||||
if (leaseStartTimestamp == null) {
|
||||
if (other.leaseStartTimestamp != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!leaseStartTimestamp.equals(other.leaseStartTimestamp)) {
|
||||
return false;
|
||||
}
|
||||
if (leaseTimeInSeconds == null) {
|
||||
if (other.leaseTimeInSeconds != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!leaseTimeInSeconds.equals(other.leaseTimeInSeconds)) {
|
||||
return false;
|
||||
}
|
||||
if (nakTimestamp == null) {
|
||||
if (other.nakTimestamp != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!nakTimestamp.equals(other.nakTimestamp)) {
|
||||
return false;
|
||||
}
|
||||
if (primaryDns == null) {
|
||||
if (other.primaryDns != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!primaryDns.equals(other.primaryDns)) {
|
||||
return false;
|
||||
}
|
||||
if (secondaryDns == null) {
|
||||
if (other.secondaryDns != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!secondaryDns.equals(other.secondaryDns)) {
|
||||
return false;
|
||||
}
|
||||
if (subnetMask == null) {
|
||||
if (other.subnetMask != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!subnetMask.equals(other.subnetMask)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientDhcpDetails clone() {
|
||||
ClientDhcpDetails ret = (ClientDhcpDetails) super.clone();
|
||||
@@ -241,8 +124,7 @@ public class ClientDhcpDetails extends BaseJsonModel {
|
||||
|
||||
public void mergeDetails(ClientDhcpDetails other) {
|
||||
if(other == null) return;
|
||||
|
||||
if(WiFiSessionUtility.decodeWiFiAssociationId(other.associationId)>WiFiSessionUtility.decodeWiFiAssociationId(associationId)) {
|
||||
if(WiFiSessionUtility.decodeWiFiAssociationId(Long.parseUnsignedLong(other.associationId))>WiFiSessionUtility.decodeWiFiAssociationId(Long.parseUnsignedLong(associationId))) {
|
||||
// The other dhcp details are from a newer session and so everything must be reset.
|
||||
this.dhcpServerIp = null;
|
||||
this.firstDiscoverTimestamp = null;
|
||||
@@ -258,8 +140,7 @@ public class ClientDhcpDetails extends BaseJsonModel {
|
||||
this.associationId = other.associationId;
|
||||
this.fromInternal = false;
|
||||
}
|
||||
else if(other.associationId != associationId) {
|
||||
// other is older, ignore it
|
||||
if(!Objects.equals(this.associationId, other.associationId)) {
|
||||
return;
|
||||
}
|
||||
dhcpServerIp = (InetAddress) assignOtherIfOtherNotNull(dhcpServerIp, other.dhcpServerIp);
|
||||
@@ -305,4 +186,28 @@ public class ClientDhcpDetails extends BaseJsonModel {
|
||||
this.fromInternal = fromInternal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(associationId, dhcpServerIp, firstDiscoverTimestamp, firstOfferTimestamp, firstRequestTimestamp, fromInternal, gatewayIp,
|
||||
leaseStartTimestamp, leaseTimeInSeconds, nakTimestamp, primaryDns, secondaryDns, subnetMask);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ClientDhcpDetails other = (ClientDhcpDetails) obj;
|
||||
return Objects.equals(associationId, other.associationId) && Objects.equals(dhcpServerIp, other.dhcpServerIp)
|
||||
&& Objects.equals(firstDiscoverTimestamp, other.firstDiscoverTimestamp) && Objects.equals(firstOfferTimestamp, other.firstOfferTimestamp)
|
||||
&& Objects.equals(firstRequestTimestamp, other.firstRequestTimestamp) && fromInternal == other.fromInternal
|
||||
&& Objects.equals(gatewayIp, other.gatewayIp) && Objects.equals(leaseStartTimestamp, other.leaseStartTimestamp)
|
||||
&& Objects.equals(leaseTimeInSeconds, other.leaseTimeInSeconds) && Objects.equals(nakTimestamp, other.nakTimestamp)
|
||||
&& Objects.equals(primaryDns, other.primaryDns) && Objects.equals(secondaryDns, other.secondaryDns)
|
||||
&& Objects.equals(subnetMask, other.subnetMask);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
|
||||
private static final long serialVersionUID = -7714023056859882994L;
|
||||
|
||||
private long sessionId;
|
||||
private String sessionId;
|
||||
private Long authTimestamp;
|
||||
private Long assocTimestamp;
|
||||
private Integer assocInternalSC;
|
||||
@@ -60,16 +60,16 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
private Integer associationStatus;
|
||||
private Integer dynamicVlan;
|
||||
private Integer assocRssi;
|
||||
private Long priorSessionId;
|
||||
private String priorSessionId;
|
||||
private Long priorEquipmentId;
|
||||
private String classificationName;
|
||||
private AssociationState associationState;
|
||||
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
@@ -821,11 +821,11 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
this.assocRssi = assocRssi;
|
||||
}
|
||||
|
||||
public Long getPriorSessionId() {
|
||||
public String getPriorSessionId() {
|
||||
return priorSessionId;
|
||||
}
|
||||
|
||||
public void setPriorSessionId(Long priorSessionId) {
|
||||
public void setPriorSessionId(String priorSessionId) {
|
||||
this.priorSessionId = priorSessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,8 +147,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
authTimestamp:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
@@ -60,21 +60,6 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<artifactId>base-stream-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
|
||||
@@ -662,8 +662,7 @@ components:
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
customerId:
|
||||
type: integer
|
||||
format: int32
|
||||
@@ -759,8 +758,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -791,8 +789,7 @@ components:
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
radioType:
|
||||
$ref: '#/components/schemas/RadioType'
|
||||
isReassociation:
|
||||
@@ -844,8 +841,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -860,8 +856,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
macAddressBytes:
|
||||
type: array
|
||||
items:
|
||||
@@ -884,8 +879,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
lastRecvTime:
|
||||
@@ -902,8 +896,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -934,8 +927,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -971,8 +963,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
firstDataRcvdTs:
|
||||
@@ -987,8 +978,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
ipAddr:
|
||||
@@ -1061,8 +1051,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
associationId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
radioType:
|
||||
@@ -1104,8 +1093,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
associationId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
macAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
radioType:
|
||||
@@ -1147,8 +1135,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMac:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
serverIp:
|
||||
@@ -1167,8 +1154,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMac:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
serverIp:
|
||||
@@ -1185,8 +1171,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMac:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
serverIp:
|
||||
@@ -1555,8 +1540,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
authTimestamp:
|
||||
type: integer
|
||||
format: int64
|
||||
@@ -5064,9 +5048,8 @@ components:
|
||||
format: int32
|
||||
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
type: string
|
||||
|
||||
classificationName:
|
||||
type: string
|
||||
|
||||
|
||||
@@ -59,6 +59,11 @@ public enum CEGWCommandType {
|
||||
WdsRequest,
|
||||
|
||||
ClientBlocklistChangeNotification,
|
||||
|
||||
/**
|
||||
* Most recent timestamp for receipt of stats data from this AP.
|
||||
*/
|
||||
MostRecentStatsTimestamp,
|
||||
|
||||
UNSUPPORTED;
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.telecominfraproject.wlan.equipmentgateway.models;
|
||||
|
||||
public class CEGWMostRecentStatsTimestamp extends CEGatewayCommand {
|
||||
|
||||
private static final long serialVersionUID = -9087897865195978158L;
|
||||
|
||||
public CEGWMostRecentStatsTimestamp() {
|
||||
}
|
||||
|
||||
public CEGWMostRecentStatsTimestamp(CEGWCommandType commandType, String inventoryId, long equipmentId) {
|
||||
super(commandType,inventoryId,equipmentId);
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import com.telecominfraproject.wlan.core.model.json.JsonDeserializationUtils;
|
||||
|
||||
public enum EquipmentChangeType {
|
||||
|
||||
All(0), ChannelsOnly(1), CellSizeAttributesOnly(2), ApImpacting(3), blinkLEDs(4), UNSUPPORTED(-1);
|
||||
All(0), ChannelsOnly(1), CellSizeAttributesOnly(2), ApImpacting(3), blinkLEDs(4), CustomerOnly(5), UNSUPPORTED(-1);
|
||||
|
||||
private final int id;
|
||||
private static final Map<Integer, EquipmentChangeType> ELEMENTS = new HashMap<>();
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.telecominfraproject.wlan.equipment.models.events;
|
||||
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
|
||||
public class EquipmentCustomerChangedEvent extends EquipmentChangedEvent {
|
||||
|
||||
private static final long serialVersionUID = 4650302079238674307L;
|
||||
private Equipment existingEquipment; // old equipment
|
||||
private Equipment equipment; // new configured equipment
|
||||
|
||||
public EquipmentCustomerChangedEvent(Equipment existingEquipment, Equipment equipment) {
|
||||
super(equipment);
|
||||
setEquipmentChangeType(EquipmentChangeType.CustomerOnly);
|
||||
this.setExistingEquipment(existingEquipment);
|
||||
this.setEquipment(equipment);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used by JSON
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private EquipmentCustomerChangedEvent() {
|
||||
super();
|
||||
}
|
||||
|
||||
public Equipment getExistingEquipment() {
|
||||
return existingEquipment;
|
||||
}
|
||||
|
||||
public void setExistingEquipment(Equipment existingEquipment) {
|
||||
this.existingEquipment = existingEquipment;
|
||||
}
|
||||
|
||||
public Equipment getEquipment() {
|
||||
return equipment;
|
||||
}
|
||||
|
||||
public void setEquipment(Equipment equipment) {
|
||||
this.equipment = equipment;
|
||||
}
|
||||
}
|
||||
@@ -1,84 +1,58 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>equipment-service-remote</artifactId>
|
||||
<name>equipment-service-remote</name>
|
||||
<description>Remote client for accessing the service, uses REST API calls.</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-interface</artifactId>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>base-client</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<!-- Dependencies for the unit tests -->
|
||||
<dependency>
|
||||
<artifactId>base-remote-tests</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<artifactId>equipment-service-remote</artifactId>
|
||||
<name>equipment-service-remote</name>
|
||||
<description>Remote client for accessing the service, uses REST API calls.</description>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>base-client</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- Dependencies for the unit tests -->
|
||||
<dependency>
|
||||
<artifactId>base-remote-tests</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<dependency>
|
||||
<artifactId>equipment-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -1,72 +1,59 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>equipment-service</artifactId>
|
||||
<name>equipment-service</name>
|
||||
<description>Server side implementation of the service.</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>base-container</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-interface</artifactId>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
</dependencies>
|
||||
<artifactId>equipment-service</artifactId>
|
||||
<name>equipment-service</name>
|
||||
<description>Server side implementation of the service.</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>alarm-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>base-container</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -51,13 +51,10 @@ import com.telecominfraproject.wlan.equipment.models.events.EquipmentBlinkLEDsEv
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentCellSizeAttributesChangedEvent;
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentChangedEvent;
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentChannelsChangedEvent;
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentCustomerChangedEvent;
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentRemovedEvent;
|
||||
import com.telecominfraproject.wlan.server.exceptions.ConfigurationException;
|
||||
import com.telecominfraproject.wlan.systemevent.models.SystemEvent;
|
||||
import com.telecominfraproject.wlan.status.StatusServiceInterface;
|
||||
import com.telecominfraproject.wlan.status.models.Status;
|
||||
import com.telecominfraproject.wlan.status.models.StatusDataType;
|
||||
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
@@ -76,8 +73,7 @@ public class EquipmentController {
|
||||
|
||||
@Autowired private EquipmentDatastore equipmentDatastore;
|
||||
@Autowired private CloudEventDispatcherInterface cloudEventDispatcher;
|
||||
@Autowired private StatusServiceInterface statusServiceInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Creates new Equipment.
|
||||
*
|
||||
@@ -290,25 +286,12 @@ public class EquipmentController {
|
||||
} else if (existingApElementConfig != null && existingApElementConfig.isBlinkAllLEDs() != updatedApElementConfig.isBlinkAllLEDs()) {
|
||||
LOG.debug("Updated BlinkingLEDs {}", ret);
|
||||
event = new EquipmentBlinkLEDsEvent(ret);
|
||||
}
|
||||
else {
|
||||
} else if (equipment.getCustomerId() != existingEquipment.getCustomerId()) {
|
||||
event = new EquipmentCustomerChangedEvent(existingEquipment, ret);
|
||||
} else {
|
||||
event = new EquipmentChangedEvent(ret);
|
||||
}
|
||||
publishEvent(event);
|
||||
|
||||
// when customerId changes, we keep the EQUIPMENT_ADMIN and PROTOCOL status of the AP (which requires the existing data)
|
||||
if (equipment.getCustomerId() != existingEquipment.getCustomerId()) {
|
||||
Status status = statusServiceInterface.getOrNull(existingEquipment.getCustomerId(), existingEquipment.getId(), StatusDataType.EQUIPMENT_ADMIN);
|
||||
if (status != null) {
|
||||
status.setCustomerId(equipment.getCustomerId());
|
||||
statusServiceInterface.update(status);
|
||||
}
|
||||
status = statusServiceInterface.getOrNull(existingEquipment.getCustomerId(), existingEquipment.getId(), StatusDataType.PROTOCOL);
|
||||
if (status != null) {
|
||||
status.setCustomerId(equipment.getCustomerId());
|
||||
statusServiceInterface.update(status);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,6 @@ import com.telecominfraproject.wlan.cloudeventdispatcher.CloudEventDispatcherEmp
|
||||
import com.telecominfraproject.wlan.core.model.equipment.EquipmentType;
|
||||
import com.telecominfraproject.wlan.equipment.datastore.inmemory.EquipmentDatastoreInMemory;
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.status.StatusServiceLocal;
|
||||
import com.telecominfraproject.wlan.status.controller.StatusController;
|
||||
import com.telecominfraproject.wlan.status.datastore.inmemory.StatusDatastoreInMemory;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
@@ -37,10 +34,7 @@ import com.telecominfraproject.wlan.status.datastore.inmemory.StatusDatastoreInM
|
||||
EquipmentController.class,
|
||||
CloudEventDispatcherEmpty.class,
|
||||
EquipmentDatastoreInMemory.class,
|
||||
EquipmentControllerTest.Config.class,
|
||||
StatusServiceLocal.class,
|
||||
StatusController.class,
|
||||
StatusDatastoreInMemory.class
|
||||
EquipmentControllerTest.Config.class
|
||||
})
|
||||
public class EquipmentControllerTest {
|
||||
|
||||
|
||||
@@ -161,20 +161,6 @@
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>status-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
|
||||
@@ -16,9 +16,12 @@ 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;
|
||||
@@ -137,11 +140,12 @@ public class EquipmentGatewayPortalController {
|
||||
return new GenericResponse(false, "Failed to trigger AP factory reset: " + response.getResultCode() + " " + response.getResultDetail());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/equipmentGateway/requestApBlinkLEDs", method = RequestMethod.POST)
|
||||
public GenericResponse requestApBlinkLEDs(@RequestParam long equipmentId, @RequestParam boolean blinkAllLEDs) {
|
||||
String action = "stop blinking LEDs on AP ";
|
||||
if (blinkAllLEDs) action = "start blinking LEDs on AP ";
|
||||
if (blinkAllLEDs)
|
||||
action = "start blinking LEDs on AP ";
|
||||
Equipment equipment = equipmentServiceInterface.get(equipmentId);
|
||||
LOG.debug("Request {} for AP {}", action, equipment.getInventoryId());
|
||||
|
||||
@@ -150,8 +154,7 @@ public class EquipmentGatewayPortalController {
|
||||
apBlinkLEDs.setBlinkAllLEDs(blinkAllLEDs);
|
||||
|
||||
EquipmentCommandResponse response = equipmentGatewayServiceInterface.sendCommand(apBlinkLEDs);
|
||||
LOG.debug("{} response {}", action,response);
|
||||
|
||||
LOG.debug("{} response {}", action, response);
|
||||
|
||||
if (response.getResultCode() == CEGWCommandResultCode.Success) {
|
||||
return new GenericResponse(true, "");
|
||||
@@ -160,4 +163,17 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4347,8 +4347,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
authTimestamp:
|
||||
type: integer
|
||||
format: int64
|
||||
@@ -5234,9 +5233,8 @@ components:
|
||||
format: int32
|
||||
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
type: string
|
||||
|
||||
classificationName:
|
||||
type: string
|
||||
|
||||
@@ -9783,8 +9781,7 @@ components:
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
customerId:
|
||||
type: integer
|
||||
format: int32
|
||||
@@ -9916,8 +9913,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -9952,8 +9948,7 @@ components:
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
radioType:
|
||||
$ref: '#/components/schemas/RadioType'
|
||||
isReassociation:
|
||||
@@ -10009,8 +10004,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -10029,8 +10023,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
macAddressBytes:
|
||||
type: array
|
||||
items:
|
||||
@@ -10057,8 +10050,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
lastRecvTime:
|
||||
@@ -10079,8 +10071,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -10115,8 +10106,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -10156,8 +10146,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
firstDataRcvdTs:
|
||||
@@ -10176,8 +10165,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
ipAddr:
|
||||
@@ -10259,8 +10247,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
associationId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
radioType:
|
||||
@@ -10302,8 +10289,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
associationId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
macAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
radioType:
|
||||
@@ -10353,8 +10339,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMac:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
serverIp:
|
||||
@@ -10377,8 +10362,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMac:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
serverIp:
|
||||
@@ -10399,8 +10383,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMac:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
serverIp:
|
||||
@@ -14290,6 +14273,31 @@ paths:
|
||||
$ref: '#/components/schemas/GenericResponse'
|
||||
500:
|
||||
$ref: '#/components/responses/GenericApiError'
|
||||
|
||||
/portal/equipmentGateway/lastReceivedStatsTimestamp:
|
||||
get:
|
||||
tags:
|
||||
- Equipment Gateway
|
||||
summary: Request to get the last received (most recent) stats received timestamp for the APs session with the gateway controller
|
||||
operationId: lastReceivedStatsTimestamp
|
||||
parameters:
|
||||
- name: equipmentId
|
||||
in: query
|
||||
description: Equipment id for AP for which last received stats timestamp is being requested.
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
200:
|
||||
description: successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GenericResponse'
|
||||
500:
|
||||
$ref: '#/components/responses/GenericApiError'
|
||||
|
||||
|
||||
/portal/equipmentGateway/requestChannelChange:
|
||||
post:
|
||||
|
||||
@@ -34,10 +34,6 @@ import com.telecominfraproject.wlan.profile.datastore.inmemory.ProfileDatastoreI
|
||||
import com.telecominfraproject.wlan.profile.models.Profile;
|
||||
import com.telecominfraproject.wlan.profile.models.ProfileByCustomerRequestFactory;
|
||||
import com.telecominfraproject.wlan.profile.models.ProfileType;
|
||||
import com.telecominfraproject.wlan.status.StatusServiceLocal;
|
||||
import com.telecominfraproject.wlan.status.controller.StatusController;
|
||||
import com.telecominfraproject.wlan.status.datastore.inmemory.StatusDatastoreInMemory;
|
||||
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@ActiveProfiles(profiles = {
|
||||
@@ -53,10 +49,7 @@ import com.telecominfraproject.wlan.status.datastore.inmemory.StatusDatastoreInM
|
||||
ProfileDatastoreInMemory.class,
|
||||
ProfileByCustomerRequestFactory.class,
|
||||
CloudEventDispatcherEmpty.class,
|
||||
ProfilePortalController.class,
|
||||
StatusServiceLocal.class,
|
||||
StatusController.class,
|
||||
StatusDatastoreInMemory.class
|
||||
ProfilePortalController.class
|
||||
})
|
||||
public class ProfilePortalControllerTest {
|
||||
private static AtomicLong profileIncrementer = new AtomicLong(1);
|
||||
|
||||
@@ -1,97 +1,111 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>provisioning-sp</artifactId>
|
||||
<name>provisioning-sp</name>
|
||||
<description>Stream Processors for provisioning events.</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>base-stream-consumer</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<artifactId>provisioning-sp</artifactId>
|
||||
<name>provisioning-sp</name>
|
||||
<description>Stream Processors for provisioning events.</description>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>base-stream-consumer</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>service-metric-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>base-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-gateway-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>system-event-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>base-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>routing-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- models used by the application logic of the stream processor -->
|
||||
<dependency>
|
||||
<artifactId>equipment-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-gateway-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<dependency>
|
||||
<artifactId>location-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- models used by the application logic of the stream processor -->
|
||||
<dependency>
|
||||
<artifactId>equipment-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.telecominfraproject.wlan.alarm.AlarmServiceInterface;
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
@@ -25,6 +27,7 @@ import com.telecominfraproject.wlan.equipment.models.events.EquipmentApImpacting
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentBlinkLEDsEvent;
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentCellSizeAttributesChangedEvent;
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentChannelsChangedEvent;
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentCustomerChangedEvent;
|
||||
import com.telecominfraproject.wlan.equipment.models.events.EquipmentRemovedEvent;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWBaseCommand;
|
||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWBlinkRequest;
|
||||
@@ -39,6 +42,9 @@ import com.telecominfraproject.wlan.profile.models.Profile;
|
||||
import com.telecominfraproject.wlan.profile.models.events.ProfileAddedEvent;
|
||||
import com.telecominfraproject.wlan.profile.models.events.ProfileChangedEvent;
|
||||
import com.telecominfraproject.wlan.profile.models.events.ProfileRemovedEvent;
|
||||
import com.telecominfraproject.wlan.status.StatusServiceInterface;
|
||||
import com.telecominfraproject.wlan.status.models.Status;
|
||||
import com.telecominfraproject.wlan.status.models.StatusDataType;
|
||||
import com.telecominfraproject.wlan.stream.StreamProcessor;
|
||||
import com.telecominfraproject.wlan.systemevent.models.SystemEvent;
|
||||
import com.telecominfraproject.wlan.systemevent.models.SystemEventRecord;
|
||||
@@ -65,6 +71,10 @@ public class EquipmentConfigPushTrigger extends StreamProcessor {
|
||||
private ProfileServiceInterface profileServiceInterface;
|
||||
@Autowired
|
||||
private EquipmentServiceInterface equipmentServiceInterface;
|
||||
@Autowired
|
||||
private StatusServiceInterface statusServiceInterface;
|
||||
@Autowired
|
||||
private AlarmServiceInterface alarmServiceInterface;
|
||||
|
||||
@Override
|
||||
protected boolean acceptMessage(QueuedStreamMessage message) {
|
||||
@@ -77,7 +87,7 @@ public class EquipmentConfigPushTrigger extends StreamProcessor {
|
||||
|| ser.getDetails() instanceof EquipmentChannelsChangedEvent || ser.getDetails() instanceof EquipmentCellSizeAttributesChangedEvent
|
||||
|| ser.getDetails() instanceof EquipmentRemovedEvent || ser.getDetails() instanceof ProfileAddedEvent
|
||||
|| ser.getDetails() instanceof ProfileChangedEvent || ser.getDetails() instanceof ProfileRemovedEvent
|
||||
|| ser.getDetails() instanceof LocationChangedApImpactingEvent);
|
||||
|| ser.getDetails() instanceof LocationChangedApImpactingEvent || ser.getDetails() instanceof EquipmentCustomerChangedEvent);
|
||||
} else {
|
||||
ret = false;
|
||||
}
|
||||
@@ -121,6 +131,8 @@ public class EquipmentConfigPushTrigger extends StreamProcessor {
|
||||
case "LocationChangedApImpactingEvent":
|
||||
process((LocationChangedApImpactingEvent) se);
|
||||
break;
|
||||
case "EquipmentCustomerChangedEvent":
|
||||
process((EquipmentCustomerChangedEvent) se);
|
||||
default:
|
||||
process(mdl);
|
||||
}
|
||||
@@ -235,6 +247,36 @@ public class EquipmentConfigPushTrigger extends StreamProcessor {
|
||||
|
||||
}
|
||||
|
||||
private void process(EquipmentCustomerChangedEvent model) {
|
||||
LOG.info("Processing EquipmentCustomerChangedEvent {}", model.getPayload().getId());
|
||||
|
||||
Equipment existingEquipment = model.getExistingEquipment();
|
||||
Equipment equipment = model.getEquipment();
|
||||
|
||||
// when customerId changes, we keep the EQUIPMENT_ADMIN and PROTOCOL status of the AP
|
||||
Status status = statusServiceInterface.getOrNull(existingEquipment.getCustomerId(), existingEquipment.getId(), StatusDataType.EQUIPMENT_ADMIN);
|
||||
if (status != null) {
|
||||
status.setCustomerId(equipment.getCustomerId());
|
||||
statusServiceInterface.update(status);
|
||||
}
|
||||
status = statusServiceInterface.getOrNull(existingEquipment.getCustomerId(), existingEquipment.getId(), StatusDataType.PROTOCOL);
|
||||
if (status != null) {
|
||||
status.setCustomerId(equipment.getCustomerId());
|
||||
statusServiceInterface.update(status);
|
||||
}
|
||||
|
||||
// Alarms has to move to new customerId as well
|
||||
List<Alarm> oldCustomerAlarms = alarmServiceInterface.get(existingEquipment.getCustomerId(), Set.of(existingEquipment.getId()), null);
|
||||
if (!oldCustomerAlarms.isEmpty()) {
|
||||
oldCustomerAlarms.stream().forEach(a -> {
|
||||
a.setCustomerId(equipment.getCustomerId());
|
||||
Alarm alarm = alarmServiceInterface.create(a);
|
||||
LOG.debug("Move an alarm to new customer {}", alarm);
|
||||
});
|
||||
}
|
||||
alarmServiceInterface.delete(existingEquipment.getCustomerId(), existingEquipment.getId());
|
||||
}
|
||||
|
||||
private void process(BaseJsonModel model) {
|
||||
LOG.warn("Unprocessed model: {}", model);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ClientMetrics extends ServiceMetricDetails {
|
||||
private Integer vhtMcs;
|
||||
private Integer snr;
|
||||
private Integer rssi;
|
||||
private Long sessionId;
|
||||
private String sessionId;
|
||||
private String classificationName;
|
||||
ChannelBandwidth channelBandWidth;
|
||||
GuardInterval guardInterval;
|
||||
@@ -1191,7 +1191,7 @@ public class ClientMetrics extends ServiceMetricDetails {
|
||||
return rxLastRssi;
|
||||
}
|
||||
|
||||
public Long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
@@ -1537,7 +1537,7 @@ public class ClientMetrics extends ServiceMetricDetails {
|
||||
this.rxLastRssi = rxLastRssi;
|
||||
}
|
||||
|
||||
public void setSessionId(Long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -270,8 +270,7 @@ components:
|
||||
format: int32
|
||||
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
|
||||
classificationName:
|
||||
type: string
|
||||
|
||||
@@ -20,12 +20,12 @@ public abstract class BaseDhcpEvent extends SystemEvent implements HasClientMac,
|
||||
private InetAddress clientIp;
|
||||
private InetAddress relayIp;
|
||||
private MacAddress clientMacAddress;
|
||||
private long sessionId; // association sessionid
|
||||
private String sessionId; // association sessionid
|
||||
private int customerId;
|
||||
private long equipmentId;
|
||||
private long locationId;
|
||||
|
||||
public BaseDhcpEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, long sessionId) {
|
||||
public BaseDhcpEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, String sessionId) {
|
||||
super(eventTimestamp);
|
||||
this.customerId = customerId;
|
||||
this.locationId = locationId;
|
||||
@@ -113,11 +113,11 @@ public abstract class BaseDhcpEvent extends SystemEvent implements HasClientMac,
|
||||
this.relayIp = relayIp;
|
||||
}
|
||||
|
||||
public long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ public class DhcpAckEvent extends BaseDhcpEvent {
|
||||
*/
|
||||
private boolean fromInternal = false;
|
||||
|
||||
public DhcpAckEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, long sessionId) {
|
||||
public DhcpAckEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, String sessionId) {
|
||||
super(customerId, locationId, equipmentId, eventTimestamp, sessionId);
|
||||
}
|
||||
|
||||
public DhcpAckEvent() {
|
||||
super(0, 0L,0L,0L,0L);
|
||||
super(0, 0L,0L,0L,"0");
|
||||
}
|
||||
|
||||
public InetAddress getGatewayIp() {
|
||||
|
||||
@@ -10,12 +10,12 @@ package com.telecominfraproject.wlan.systemevent.equipment;
|
||||
public class DhcpDeclineEvent extends BaseDhcpEvent {
|
||||
private static final long serialVersionUID = -7745659083975485467L;
|
||||
|
||||
public DhcpDeclineEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, long sessionId){
|
||||
public DhcpDeclineEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, String sessionId){
|
||||
super(customerId, locationId, equipmentId,eventTimestamp, sessionId);
|
||||
}
|
||||
|
||||
public DhcpDeclineEvent() {
|
||||
super(0,0L, 0L,0L,0L);
|
||||
super(0,0L, 0L,0L,"0");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,12 +9,12 @@ public class DhcpDiscoverEvent extends BaseDhcpEvent {
|
||||
private static final long serialVersionUID = -8290687227649478971L;
|
||||
private String hostName;
|
||||
|
||||
public DhcpDiscoverEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, long sessionId){
|
||||
public DhcpDiscoverEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, String sessionId){
|
||||
super(customerId, locationId,equipmentId,eventTimestamp,sessionId);
|
||||
}
|
||||
|
||||
public DhcpDiscoverEvent() {
|
||||
super(0, 0L,0L,0L,0L);
|
||||
super(0, 0L,0L,0L,"0");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,12 +10,12 @@ package com.telecominfraproject.wlan.systemevent.equipment;
|
||||
public class DhcpInformEvent extends BaseDhcpEvent {
|
||||
private static final long serialVersionUID = 7053813308222200205L;
|
||||
|
||||
public DhcpInformEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, long sessionId){
|
||||
public DhcpInformEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, String sessionId){
|
||||
super(customerId, locationId,equipmentId,eventTimestamp, sessionId);
|
||||
}
|
||||
|
||||
public DhcpInformEvent() {
|
||||
super(0, 0L,0L,0L,0L);
|
||||
super(0, 0L,0L,0L,"0");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,12 +9,12 @@ public class DhcpNakEvent extends BaseDhcpEvent {
|
||||
private static final long serialVersionUID = -8648265834227002667L;
|
||||
private boolean fromInternal = false;
|
||||
|
||||
public DhcpNakEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, long sessionId) {
|
||||
public DhcpNakEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, String sessionId) {
|
||||
super(customerId, locationId, equipmentId, eventTimestamp, sessionId);
|
||||
}
|
||||
|
||||
public DhcpNakEvent() {
|
||||
super(0, 0L,0L,0L,0L);
|
||||
super(0, 0L,0L,0L,"0");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,12 +10,12 @@ public class DhcpOfferEvent extends BaseDhcpEvent {
|
||||
*/
|
||||
private boolean fromInternal = false;
|
||||
|
||||
public DhcpOfferEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, long sessionId) {
|
||||
public DhcpOfferEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, String sessionId) {
|
||||
super(customerId, locationId, equipmentId, eventTimestamp, sessionId);
|
||||
}
|
||||
|
||||
public DhcpOfferEvent() {
|
||||
super(0, 0L,0L,0L,0L);
|
||||
super(0, 0L,0L,0L,"0");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,12 +9,12 @@ public class DhcpRequestEvent extends BaseDhcpEvent {
|
||||
private static final long serialVersionUID = 906425685437156761L;
|
||||
private String hostName;
|
||||
|
||||
public DhcpRequestEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, long sessionId){
|
||||
public DhcpRequestEvent(int customerId, long locationId, long equipmentId, long eventTimestamp, String sessionId){
|
||||
super(customerId, locationId,equipmentId,eventTimestamp, sessionId);
|
||||
}
|
||||
|
||||
public DhcpRequestEvent() {
|
||||
super(0, 0L,0L,0L,0L);
|
||||
super(0, 0L,0L,0L,"0");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ public abstract class RealTimeSipCallEventWithStats extends RealTimeEvent
|
||||
private static final long serialVersionUID = -8908272967317508366L;
|
||||
|
||||
private Long sipCallId;
|
||||
private Long associationId;
|
||||
private String associationId;
|
||||
private MacAddress clientMacAddress;
|
||||
private List<RtpFlowStats> statuses;
|
||||
private int channel;
|
||||
@@ -49,12 +49,12 @@ public abstract class RealTimeSipCallEventWithStats extends RealTimeEvent
|
||||
this.sipCallId = sipCallId;
|
||||
}
|
||||
|
||||
public Long getAssociationId() {
|
||||
public String getAssociationId() {
|
||||
return associationId;
|
||||
}
|
||||
|
||||
public void setAssociationId(Long associationId) {
|
||||
this.associationId = associationId;
|
||||
public void setAssociationId(String string) {
|
||||
this.associationId = string;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,7 +79,7 @@ public abstract class RealTimeSipCallEventWithStats extends RealTimeEvent
|
||||
}
|
||||
|
||||
public boolean hasValidAssociationId() {
|
||||
return (associationId != null) && (associationId != 0);
|
||||
return (associationId != null) && (!associationId.equals("0"));
|
||||
}
|
||||
|
||||
public int getChannel() {
|
||||
|
||||
@@ -18,7 +18,7 @@ public class RealTimeSipCallStartEvent extends RealTimeEvent
|
||||
*/
|
||||
private static final long serialVersionUID = -7289926906539107435L;
|
||||
private Long sipCallId;
|
||||
private Long associationId;
|
||||
private String associationId;
|
||||
private MacAddress macAddress;
|
||||
private List<String> codecs;
|
||||
private String providerDomain;
|
||||
@@ -52,7 +52,7 @@ public class RealTimeSipCallStartEvent extends RealTimeEvent
|
||||
&& Objects.equals(channel, other.channel) && Objects.equals(radioType, other.radioType);
|
||||
}
|
||||
|
||||
public Long getAssociationId() {
|
||||
public String getAssociationId() {
|
||||
return associationId;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class RealTimeSipCallStartEvent extends RealTimeEvent
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setAssociationId(Long associationId) {
|
||||
public void setAssociationId(String associationId) {
|
||||
this.associationId = associationId;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ public class RealTimeSipCallStartEvent extends RealTimeEvent
|
||||
}
|
||||
|
||||
public boolean hasValidAssociationId() {
|
||||
return (associationId != null) && (associationId != 0);
|
||||
return (associationId != null) && (!associationId.equals("0"));
|
||||
}
|
||||
|
||||
public int getChannel() {
|
||||
|
||||
@@ -13,8 +13,8 @@ public class RealTimeStreamingStartEvent extends RealTimeEvent
|
||||
implements HasCustomerId, HasEquipmentId, HasClientMac, HasProducedTimestamp {
|
||||
|
||||
private static final long serialVersionUID = -591221857158333271L;
|
||||
private Long videoSessionId;
|
||||
private Long sessionId;
|
||||
private String videoSessionId;
|
||||
private String sessionId;
|
||||
private MacAddress clientMac;
|
||||
private InetAddress serverIp;
|
||||
private String serverDnsName;
|
||||
@@ -40,19 +40,19 @@ public class RealTimeStreamingStartEvent extends RealTimeEvent
|
||||
this.serverDnsName = serverDnsName;
|
||||
}
|
||||
|
||||
public Long getVideoSessionId() {
|
||||
public String getVideoSessionId() {
|
||||
return videoSessionId;
|
||||
}
|
||||
|
||||
public void setVideoSessionId(Long videoSessionId) {
|
||||
public void setVideoSessionId(String videoSessionId) {
|
||||
this.videoSessionId = videoSessionId;
|
||||
}
|
||||
|
||||
public Long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(Long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ public class RealTimeStreamingStartSessionEvent extends RealTimeEvent
|
||||
implements HasCustomerId, HasEquipmentId, HasClientMac, HasProducedTimestamp {
|
||||
|
||||
private static final long serialVersionUID = 4395850344272425198L;
|
||||
private Long videoSessionId;
|
||||
private Long sessionId;
|
||||
private String videoSessionId;
|
||||
private String sessionId;
|
||||
private MacAddress clientMac;
|
||||
private InetAddress serverIp;
|
||||
private StreamingVideoType type;
|
||||
@@ -31,19 +31,19 @@ public class RealTimeStreamingStartSessionEvent extends RealTimeEvent
|
||||
super(RealTimeEventType.VideoStreamDebugStart, customerId, locationId, equipmentId, eventTimestamp);
|
||||
}
|
||||
|
||||
public Long getVideoSessionId() {
|
||||
public String getVideoSessionId() {
|
||||
return videoSessionId;
|
||||
}
|
||||
|
||||
public void setVideoSessionId(Long videoSessionId) {
|
||||
public void setVideoSessionId(String videoSessionId) {
|
||||
this.videoSessionId = videoSessionId;
|
||||
}
|
||||
|
||||
public Long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(Long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ public class RealTimeStreamingStopEvent extends RealTimeEvent
|
||||
implements HasCustomerId, HasEquipmentId, HasClientMac, HasProducedTimestamp {
|
||||
|
||||
private static final long serialVersionUID = 6433913573274597688L;
|
||||
private Long videoSessionId;
|
||||
private Long sessionId;
|
||||
private String videoSessionId;
|
||||
private String sessionId;
|
||||
private MacAddress clientMac;
|
||||
private InetAddress serverIp;
|
||||
private Long totalBytes;
|
||||
@@ -33,19 +33,19 @@ public class RealTimeStreamingStopEvent extends RealTimeEvent
|
||||
super(RealTimeEventType.VideoStreamStop, customerId, locationId, equipmentId, eventTimestamp);
|
||||
}
|
||||
|
||||
public Long getVideoSessionId() {
|
||||
public String getVideoSessionId() {
|
||||
return videoSessionId;
|
||||
}
|
||||
|
||||
public void setVideoSessionId(Long videoSessionId) {
|
||||
public void setVideoSessionId(String videoSessionId) {
|
||||
this.videoSessionId = videoSessionId;
|
||||
}
|
||||
|
||||
public Long getSessionId() {
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(Long sessionId) {
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -679,8 +679,7 @@ components:
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
customerId:
|
||||
type: integer
|
||||
format: int32
|
||||
@@ -776,8 +775,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -808,8 +806,7 @@ components:
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
radioType:
|
||||
$ref: '#/components/schemas/RadioType'
|
||||
isReassociation:
|
||||
@@ -861,8 +858,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -877,8 +873,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
macAddressBytes:
|
||||
type: array
|
||||
items:
|
||||
@@ -901,8 +896,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
lastRecvTime:
|
||||
@@ -919,8 +913,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -951,8 +944,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
clientMacAddress:
|
||||
@@ -988,8 +980,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
firstDataRcvdTs:
|
||||
@@ -1004,8 +995,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
ipAddr:
|
||||
@@ -1078,8 +1068,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
associationId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMacAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
radioType:
|
||||
@@ -1121,8 +1110,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
associationId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
macAddress:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
radioType:
|
||||
@@ -1164,8 +1152,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMac:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
serverIp:
|
||||
@@ -1184,8 +1171,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMac:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
serverIp:
|
||||
@@ -1202,8 +1188,7 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
clientMac:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
serverIp:
|
||||
@@ -1569,8 +1554,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
sessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
authTimestamp:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
Reference in New Issue
Block a user