mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-03-20 19:39:19 +00:00
Compare commits
135 Commits
20201203-1
...
release/v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a66ac7ff8a | ||
|
|
beb9692bf5 | ||
|
|
bf445ba787 | ||
|
|
88de7ebee1 | ||
|
|
373a146105 | ||
|
|
763183e8a1 | ||
|
|
fdc12b641d | ||
|
|
8b25a31db4 | ||
|
|
f0ee2750a7 | ||
|
|
142d919e42 | ||
|
|
804a3435c0 | ||
|
|
87e48b862b | ||
|
|
c2200c8598 | ||
|
|
5eb5991fa7 | ||
|
|
75a2c4ae89 | ||
|
|
bc6b144dcc | ||
|
|
5e1859161f | ||
|
|
1391f26384 | ||
|
|
462b5643dd | ||
|
|
266dbeac28 | ||
|
|
a282bed451 | ||
|
|
d77624a6cb | ||
|
|
4431503454 | ||
|
|
7ab22093bf | ||
|
|
e93ee9fba6 | ||
|
|
cf3dbb848a | ||
|
|
99a09ed29f | ||
|
|
afa16186ca | ||
|
|
4c5404de62 | ||
|
|
aca6b145ec | ||
|
|
a726be1417 | ||
|
|
70a4b2cbad | ||
|
|
ef027e4915 | ||
|
|
9a074390e7 | ||
|
|
ea098d9c22 | ||
|
|
d46c4f1d6b | ||
|
|
c40bec4c2d | ||
|
|
8b4ca25cf4 | ||
|
|
8e1824b626 | ||
|
|
7bd40b8217 | ||
|
|
6586911e76 | ||
|
|
c8f216d297 | ||
|
|
27a8d522aa | ||
|
|
280eb7fb5a | ||
|
|
db1b0f6a0c | ||
|
|
88f2d5298b | ||
|
|
92a3002539 | ||
|
|
f5af298f43 | ||
|
|
6f2cfac4aa | ||
|
|
8caac2a527 | ||
|
|
032aae0e8c | ||
|
|
4a5d7e6b78 | ||
|
|
c9d325772e | ||
|
|
49aada0892 | ||
|
|
dc88d3ff6c | ||
|
|
bde9751311 | ||
|
|
49d5f31d70 | ||
|
|
c1f953517d | ||
|
|
f52d055867 | ||
|
|
b54aae71d6 | ||
|
|
9e41ec0c33 | ||
|
|
69ca9b830b | ||
|
|
404aa89fb0 | ||
|
|
a6b5764b86 | ||
|
|
448dc881ac | ||
|
|
da9db6df2c | ||
|
|
c0338474b0 | ||
|
|
6652298f73 | ||
|
|
1323c24ced | ||
|
|
c2004bbbdf | ||
|
|
6514c355cd | ||
|
|
591cd70d64 | ||
|
|
22a2fd1a34 | ||
|
|
7a5566c1e8 | ||
|
|
f391f5783f | ||
|
|
f2d71d3b18 | ||
|
|
16abb2cec7 | ||
|
|
32d56b4b86 | ||
|
|
88b01d20ee | ||
|
|
4963657411 | ||
|
|
8d3fed3679 | ||
|
|
0cd682d68f | ||
|
|
2af8e2f61e | ||
|
|
48531113f6 | ||
|
|
42f595b1eb | ||
|
|
88e72fdd46 | ||
|
|
853675f92f | ||
|
|
6f1b1ec320 | ||
|
|
0d28951b84 | ||
|
|
2ab9ed828c | ||
|
|
973c8b5040 | ||
|
|
eed84e235a | ||
|
|
d43fe794db | ||
|
|
a8a915aed5 | ||
|
|
05386b01c6 | ||
|
|
15bb034a2c | ||
|
|
d4d2e87756 | ||
|
|
4281d0cab8 | ||
|
|
d008e5984b | ||
|
|
e8e6703c31 | ||
|
|
174f5f9aea | ||
|
|
2b4926b375 | ||
|
|
125cb3dc54 | ||
|
|
0c8abbcbad | ||
|
|
7b28e8769c | ||
|
|
8d4a982de4 | ||
|
|
6560a69694 | ||
|
|
b8f2cdc888 | ||
|
|
e0543becc3 | ||
|
|
d4bcc04930 | ||
|
|
70edd65ed3 | ||
|
|
bce44cba3c | ||
|
|
d19f7d9127 | ||
|
|
79ab2c35fb | ||
|
|
926f38964c | ||
|
|
20e999019a | ||
|
|
e271b7e98e | ||
|
|
c89d773221 | ||
|
|
0e0b1274ed | ||
|
|
6b3515fe2c | ||
|
|
db2f7e347e | ||
|
|
41510995cf | ||
|
|
af5de7d294 | ||
|
|
3c9e75ed52 | ||
|
|
118ee15f0f | ||
|
|
a96ab204bb | ||
|
|
0910fb1025 | ||
|
|
350c170fa6 | ||
|
|
7513d24832 | ||
|
|
5ff4126595 | ||
|
|
74c3ccaace | ||
|
|
0935520339 | ||
|
|
eea4b16973 | ||
|
|
600d334ad1 | ||
|
|
dde55102dd |
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>adoption-metrics-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,21 +15,21 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-datastore-inmemory</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>adoption-metrics-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>adoption-metrics-datastore-common-test</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,12 +15,12 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>adoption-metrics-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-exceptions</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,26 +15,26 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-jdbc</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>adoption-metrics-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-jdbc-tests</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>adoption-metrics-datastore-common-test</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,41 +15,41 @@
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>base-client</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Dependencies for the unit tests -->
|
||||
<dependency>
|
||||
<artifactId>base-remote-tests</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,29 +15,29 @@
|
||||
<dependency>
|
||||
<artifactId>base-container</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-datastore-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,25 +15,25 @@
|
||||
<dependency>
|
||||
<artifactId>base-stream-consumer</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,26 +15,26 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-cassandra</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-cassandra-tests</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-common-test</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.telecominfraproject.wlan.alarm.models.AlarmCounts;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.ColumnAndSort;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
import com.telecominfraproject.wlan.core.server.cassandra.CassandraUtils;
|
||||
import com.telecominfraproject.wlan.core.server.cassandra.RowMapper;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsConcurrentModificationException;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsEntityNotFoundException;
|
||||
@@ -154,6 +155,18 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
private static final String CQL_COUNTS_BY_EQUIPMENT_AND_ALARM_CODE_HEADER = "select equipmentId, alarmCode, count(1) from alarm where customerId = ? ";
|
||||
private static final String CQL_COUNTS_BY_EQUIPMENT_AND_ALARM_CODE_FOOTER = " group by equipmentId, alarmCode";
|
||||
|
||||
private static final String CQL_INSERT_INTO_BY_ACKNOWLEDGED_TABLE = "insert into alarm_by_acknowledged(customerId, equipmentId, alarmCode, createdTimestamp, acknowledged) values ( ?, ?, ?, ?, ?) ";
|
||||
private static final String CQL_DELETE_FROM_BY_ACKNOWLEDGED_TABLE = "delete from alarm_by_acknowledged where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ? and acknowledged = ? ";
|
||||
|
||||
private static final String CQL_INSERT_INTO_BY_ACKNOWLEDGED_EQUIPMENTID_TABLE = "insert into alarm_by_acknowledged_equipmentId(customerId, equipmentId, alarmCode, createdTimestamp, acknowledged) values ( ?, ?, ?, ?, ?) ";
|
||||
private static final String CQL_DELETE_FROM_BY_ACKNOWLEDGED_EQUIPMENTID_TABLE = "delete from alarm_by_acknowledged_equipmentId where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ? and acknowledged = ? ";
|
||||
|
||||
private static final String CQL_INSERT_INTO_BY_ACKNOWLEDGED_ALARMCODE_TABLE = "insert into alarm_by_acknowledged_alarmCode(customerId, equipmentId, alarmCode, createdTimestamp, acknowledged) values ( ?, ?, ?, ?, ?) ";
|
||||
private static final String CQL_DELETE_FROM_BY_ACKNOWLEDGED_ALARMCODE_TABLE = "delete from alarm_by_acknowledged_alarmCode where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ? and acknowledged = ? ";
|
||||
|
||||
private static final String CQL_INSERT_INTO_BY_ACKNOWLEDGED_TIMESTAMP_TABLE = "insert into alarm_by_acknowledged_timestamp(customerId, equipmentId, alarmCode, createdTimestamp, acknowledged) values ( ?, ?, ?, ?, ?) ";
|
||||
private static final String CQL_DELETE_FROM_BY_ACKNOWLEDGED_TIMESTAMP_TABLE = "delete from alarm_by_acknowledged_timestamp where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ? and acknowledged = ? ";
|
||||
|
||||
//Cassandra has a difficulty running this:
|
||||
// message="Group by currently only support groups of columns following their declared order in the PRIMARY KEY"
|
||||
//private static final String CQL_COUNTS_BY_ALARM_CODE_HEADER = "select alarmCode, count(1) from alarm where customerId = ? ";
|
||||
@@ -193,7 +206,18 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
|
||||
private PreparedStatement preparedStmt_updateAlarmCountByEquipment;
|
||||
private PreparedStatement preparedStmt_updateAlarmCountByCustomer;
|
||||
|
||||
private PreparedStatement preparedStmt_insertIntoAlarmByAcknowledged;
|
||||
private PreparedStatement preparedStmt_deleteFromAlarmByAcknowledged;
|
||||
|
||||
private PreparedStatement preparedStmt_insertIntoAlarmByAcknowledgedEquipmentId;
|
||||
private PreparedStatement preparedStmt_deleteFromAlarmByAcknowledgedEquipmentId;
|
||||
|
||||
private PreparedStatement preparedStmt_insertIntoAlarmByAcknowledgedAlarmCode;
|
||||
private PreparedStatement preparedStmt_deleteFromAlarmByAcknowledgedAlarmCode;
|
||||
|
||||
private PreparedStatement preparedStmt_insertIntoAlarmByAcknowledgedTimestamp;
|
||||
private PreparedStatement preparedStmt_deleteFromAlarmByAcknowledgedTimestamp;
|
||||
|
||||
@PostConstruct
|
||||
private void postConstruct(){
|
||||
@@ -211,6 +235,18 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
|
||||
preparedStmt_updateAlarmCountByEquipment = cqlSession.prepare(CQL_UPDATE_EQUIPMENT_ALARM_COUNT);
|
||||
preparedStmt_updateAlarmCountByCustomer= cqlSession.prepare(CQL_UPDATE_CUSTOMER_ALARM_COUNT);
|
||||
|
||||
preparedStmt_insertIntoAlarmByAcknowledged = cqlSession.prepare(CQL_INSERT_INTO_BY_ACKNOWLEDGED_TABLE);
|
||||
preparedStmt_deleteFromAlarmByAcknowledged = cqlSession.prepare(CQL_DELETE_FROM_BY_ACKNOWLEDGED_TABLE);
|
||||
|
||||
preparedStmt_insertIntoAlarmByAcknowledgedEquipmentId = cqlSession.prepare(CQL_INSERT_INTO_BY_ACKNOWLEDGED_EQUIPMENTID_TABLE);
|
||||
preparedStmt_deleteFromAlarmByAcknowledgedEquipmentId = cqlSession.prepare(CQL_DELETE_FROM_BY_ACKNOWLEDGED_EQUIPMENTID_TABLE);
|
||||
|
||||
preparedStmt_insertIntoAlarmByAcknowledgedAlarmCode = cqlSession.prepare(CQL_INSERT_INTO_BY_ACKNOWLEDGED_ALARMCODE_TABLE);
|
||||
preparedStmt_deleteFromAlarmByAcknowledgedAlarmCode = cqlSession.prepare(CQL_DELETE_FROM_BY_ACKNOWLEDGED_ALARMCODE_TABLE);
|
||||
|
||||
preparedStmt_insertIntoAlarmByAcknowledgedTimestamp = cqlSession.prepare(CQL_INSERT_INTO_BY_ACKNOWLEDGED_TIMESTAMP_TABLE);
|
||||
preparedStmt_deleteFromAlarmByAcknowledgedTimestamp = cqlSession.prepare(CQL_DELETE_FROM_BY_ACKNOWLEDGED_TIMESTAMP_TABLE);
|
||||
|
||||
}
|
||||
|
||||
@@ -256,6 +292,39 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
alarm.getCustomerId(),
|
||||
alarm.getAlarmCode().getId()
|
||||
));
|
||||
|
||||
//insert entry into acknowledged tables
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledged.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
alarm.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledgedEquipmentId.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
alarm.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledgedAlarmCode.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
alarm.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledgedTimestamp.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
alarm.isAcknowledged()
|
||||
));
|
||||
|
||||
return alarm.clone();
|
||||
}
|
||||
@@ -309,6 +378,8 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
|
||||
@Override
|
||||
public Alarm update(Alarm alarm) {
|
||||
Alarm original = getOrNull(alarm.getCustomerId(), alarm.getEquipmentId(), alarm.getAlarmCode(), alarm.getCreatedTimestamp());
|
||||
|
||||
long newLastModifiedTs = System.currentTimeMillis();
|
||||
long incomingLastModifiedTs = alarm.getLastModifiedTimestamp();
|
||||
|
||||
@@ -378,6 +449,78 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
}
|
||||
}
|
||||
|
||||
// if the acknowledged boolean value has been updated (typically false -> true, but opposite could happen too)
|
||||
// then we need to update the values in the supporting acknowledged tables as well.
|
||||
// Since they are part of the primary key to properly filter, we cannot simply update the acknowledged value in these tables.
|
||||
// We need to delete those rows (in acknowledged tables) and recreate them with the new acknowledged value (in alarm)
|
||||
if (original.isAcknowledged() != alarm.isAcknowledged()) {
|
||||
//delete entry into acknowledged tables
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledged.bind(
|
||||
original.getCustomerId(),
|
||||
original.getEquipmentId(),
|
||||
original.getAlarmCode().getId(),
|
||||
original.getCreatedTimestamp(),
|
||||
original.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedEquipmentId.bind(
|
||||
original.getCustomerId(),
|
||||
original.getEquipmentId(),
|
||||
original.getAlarmCode().getId(),
|
||||
original.getCreatedTimestamp(),
|
||||
original.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedAlarmCode.bind(
|
||||
original.getCustomerId(),
|
||||
original.getEquipmentId(),
|
||||
original.getAlarmCode().getId(),
|
||||
original.getCreatedTimestamp(),
|
||||
original.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedTimestamp.bind(
|
||||
original.getCustomerId(),
|
||||
original.getEquipmentId(),
|
||||
original.getAlarmCode().getId(),
|
||||
original.getCreatedTimestamp(),
|
||||
original.isAcknowledged()
|
||||
));
|
||||
|
||||
// recreate rows in supporting acknowledged tables with the new acknowledged value
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledged.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
alarm.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledgedEquipmentId.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
alarm.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledgedAlarmCode.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
alarm.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledgedTimestamp.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
alarm.isAcknowledged()
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
//make a copy so that we don't accidentally update caller's version by reference
|
||||
Alarm alarmCopy = alarm.clone();
|
||||
@@ -410,6 +553,39 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
ret.getCustomerId(),
|
||||
ret.getAlarmCode().getId()
|
||||
));
|
||||
|
||||
//delete entry into acknowledged tables
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledged.bind(
|
||||
ret.getCustomerId(),
|
||||
ret.getEquipmentId(),
|
||||
ret.getAlarmCode().getId(),
|
||||
ret.getCreatedTimestamp(),
|
||||
ret.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedEquipmentId.bind(
|
||||
ret.getCustomerId(),
|
||||
ret.getEquipmentId(),
|
||||
ret.getAlarmCode().getId(),
|
||||
ret.getCreatedTimestamp(),
|
||||
ret.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedAlarmCode.bind(
|
||||
ret.getCustomerId(),
|
||||
ret.getEquipmentId(),
|
||||
ret.getAlarmCode().getId(),
|
||||
ret.getCreatedTimestamp(),
|
||||
ret.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedTimestamp.bind(
|
||||
ret.getCustomerId(),
|
||||
ret.getEquipmentId(),
|
||||
ret.getAlarmCode().getId(),
|
||||
ret.getCreatedTimestamp(),
|
||||
ret.isAcknowledged()
|
||||
));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -435,7 +611,40 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
cqlSession.execute(preparedStmt_decrementAlarmCountByCustomer.bind(
|
||||
al.getCustomerId(),
|
||||
al.getAlarmCode().getId()
|
||||
));
|
||||
));
|
||||
|
||||
//delete entry into acknowledged tables
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledged.bind(
|
||||
al.getCustomerId(),
|
||||
al.getEquipmentId(),
|
||||
al.getAlarmCode().getId(),
|
||||
al.getCreatedTimestamp(),
|
||||
al.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedEquipmentId.bind(
|
||||
al.getCustomerId(),
|
||||
al.getEquipmentId(),
|
||||
al.getAlarmCode().getId(),
|
||||
al.getCreatedTimestamp(),
|
||||
al.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedAlarmCode.bind(
|
||||
al.getCustomerId(),
|
||||
al.getEquipmentId(),
|
||||
al.getAlarmCode().getId(),
|
||||
al.getCreatedTimestamp(),
|
||||
al.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedTimestamp.bind(
|
||||
al.getCustomerId(),
|
||||
al.getEquipmentId(),
|
||||
al.getAlarmCode().getId(),
|
||||
al.getCreatedTimestamp(),
|
||||
al.isAcknowledged()
|
||||
));
|
||||
|
||||
});
|
||||
|
||||
@@ -651,11 +860,12 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static enum FilterOptions{ customer_only, customer_and_equipment, customer_and_alarmCode, customer_and_timestamp, customer_and_acknowledged }
|
||||
|
||||
@Override
|
||||
public PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIds,
|
||||
Set<AlarmCode> alarmCodes, long createdAfterTimestamp, List<ColumnAndSort> sortBy,
|
||||
Set<AlarmCode> alarmCodes, long createdAfterTimestamp, Boolean acknowledged, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<Alarm> context) {
|
||||
PaginationResponse<Alarm> ret = new PaginationResponse<>();
|
||||
ret.setContext(context.clone());
|
||||
@@ -671,7 +881,8 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
LOG.debug("Looking up Alarms for customer {} with last returned page number {}",
|
||||
customerId, context.getLastReturnedPageNumber());
|
||||
|
||||
String query = CQL_GET_BY_CUSTOMER_ID;
|
||||
String query_head = CQL_GET_BY_CUSTOMER_ID;
|
||||
String query = "";
|
||||
|
||||
if((alarmCodes==null || alarmCodes.isEmpty()) && createdAfterTimestamp>0) {
|
||||
//if alarm codes not specified (means all) - explicitly list all of them, otherwise the following exception if thrown:
|
||||
@@ -680,6 +891,8 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
alarmCodes = new HashSet<>(Arrays.asList(AlarmCode.validValues()));
|
||||
}
|
||||
|
||||
FilterOptions filterOptions = FilterOptions.customer_only;
|
||||
|
||||
// add filters for the query
|
||||
ArrayList<Object> queryArgs = new ArrayList<>();
|
||||
queryArgs.add(customerId);
|
||||
@@ -688,39 +901,52 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
if (equipmentIds != null && !equipmentIds.isEmpty()) {
|
||||
queryArgs.addAll(equipmentIds);
|
||||
|
||||
StringBuilder strb = new StringBuilder(100);
|
||||
strb.append("and equipmentId in (");
|
||||
for (int i = 0; i < equipmentIds.size(); i++) {
|
||||
strb.append("?");
|
||||
if (i < equipmentIds.size() - 1) {
|
||||
strb.append(",");
|
||||
}
|
||||
}
|
||||
strb.append(") ");
|
||||
query += " and equipmentId in" + CassandraUtils.getBindPlaceholders(equipmentIds);
|
||||
|
||||
query += strb.toString();
|
||||
filterOptions = FilterOptions.customer_and_equipment;
|
||||
}
|
||||
|
||||
//add alarmCodes filters
|
||||
if (alarmCodes != null && !alarmCodes.isEmpty()) {
|
||||
alarmCodes.forEach(ac -> queryArgs.add(ac.getId()));
|
||||
|
||||
StringBuilder strb = new StringBuilder(100);
|
||||
strb.append("and alarmCode in (");
|
||||
for (int i = 0; i < alarmCodes.size(); i++) {
|
||||
strb.append("?");
|
||||
if (i < alarmCodes.size() - 1) {
|
||||
strb.append(",");
|
||||
}
|
||||
}
|
||||
strb.append(") ");
|
||||
query += " and alarmCode in" + CassandraUtils.getBindPlaceholders(alarmCodes);
|
||||
|
||||
query += strb.toString();
|
||||
filterOptions = FilterOptions.customer_and_alarmCode;
|
||||
}
|
||||
|
||||
if(createdAfterTimestamp > 0) {
|
||||
query += " and createdTimestamp > ?" ;
|
||||
queryArgs.add(createdAfterTimestamp);
|
||||
filterOptions = FilterOptions.customer_and_timestamp;
|
||||
}
|
||||
|
||||
if (acknowledged != null) {
|
||||
queryArgs.clear();
|
||||
queryArgs.add(customerId);
|
||||
queryArgs.add(acknowledged);
|
||||
query_head = "select customerId, equipmentId, alarmCode, createdTimestamp from alarm_by_acknowledged where customerId = ? ";
|
||||
|
||||
if (equipmentIds != null && !equipmentIds.isEmpty()) {
|
||||
query_head = "select customerId, equipmentId, alarmCode, createdTimestamp from alarm_by_acknowledged_equipmentId where customerId = ? ";
|
||||
queryArgs.addAll(equipmentIds);
|
||||
}
|
||||
if (alarmCodes != null && !alarmCodes.isEmpty()) {
|
||||
query_head = "select customerId, equipmentId, alarmCode, createdTimestamp from alarm_by_acknowledged_alarmCode where customerId = ? ";
|
||||
alarmCodes.forEach(ac -> queryArgs.add(ac.getId()));
|
||||
}
|
||||
if (createdAfterTimestamp > 0) {
|
||||
query_head = "select customerId, equipmentId, alarmCode, createdTimestamp from alarm_by_acknowledged_timestamp where customerId = ? ";
|
||||
queryArgs.add(createdAfterTimestamp);
|
||||
|
||||
if (equipmentIds != null && !equipmentIds.isEmpty()) {
|
||||
query_head = "select customerId, equipmentId, alarmCode, createdTimestamp from alarm_by_acknowledged where customerId = ? ";
|
||||
}
|
||||
}
|
||||
|
||||
query = " and acknowledged = ? " + query;
|
||||
|
||||
filterOptions = FilterOptions.customer_and_acknowledged;
|
||||
}
|
||||
|
||||
// add sorting options for the query
|
||||
@@ -734,7 +960,7 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
//TODO: create a cache of these prepared statements, keyed by the numberOfEquipmentIds_numberOfAlarmCodes
|
||||
PreparedStatement preparedStmt_getPageForCustomer;
|
||||
try {
|
||||
preparedStmt_getPageForCustomer = cqlSession.prepare(query);
|
||||
preparedStmt_getPageForCustomer = cqlSession.prepare(query_head + query);
|
||||
} catch(InvalidQueryException e) {
|
||||
LOG.error("Cannot prepare cassandra query '{}'", query, e);
|
||||
throw e;
|
||||
@@ -755,10 +981,30 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
|
||||
List<Alarm> pageItems = new ArrayList<>();
|
||||
|
||||
// iterate through the current page
|
||||
while (rs.getAvailableWithoutFetching() > 0) {
|
||||
pageItems.add(alarmRowMapper.mapRow(rs.one()));
|
||||
switch(filterOptions) {
|
||||
case customer_only:
|
||||
case customer_and_equipment:
|
||||
case customer_and_alarmCode:
|
||||
case customer_and_timestamp:
|
||||
// iterate through the current page
|
||||
while (rs.getAvailableWithoutFetching() > 0) {
|
||||
pageItems.add(alarmRowMapper.mapRow(rs.one()));
|
||||
}
|
||||
break;
|
||||
case customer_and_acknowledged:
|
||||
while (rs.getAvailableWithoutFetching() > 0) {
|
||||
Row row = rs.one();
|
||||
long equipmentIdPostQuery = row.getLong("equipmentId");
|
||||
int alarmCodePostQuery = row.getInt("alarmCode");
|
||||
long createdTimestampPostQuery = row.getLong("createdTimestamp");
|
||||
pageItems.add(getOrNull(customerId, equipmentIdPostQuery, AlarmCode.getById(alarmCodePostQuery), createdTimestampPostQuery));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG.warn("Unknown filter option:", filterOptions);
|
||||
throw new IllegalArgumentException("Unknown filter option " + filterOptions);
|
||||
}
|
||||
|
||||
|
||||
if (pageItems.isEmpty()) {
|
||||
LOG.debug("Cannot find Alarms for customer {} with last returned page number {}",
|
||||
@@ -782,6 +1028,15 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
// startAfterItem is not used in Cassandra datastores, set it to null
|
||||
ret.getContext().setStartAfterItem(null);
|
||||
|
||||
//in cassandra we will rely only on nextPagingState to set the lastPage indicator
|
||||
ret.getContext().setLastPage(false);
|
||||
|
||||
if(nextPagingState == null) {
|
||||
//in cassandra, if there are no more pages available, the pagingState is returned as null by the driver
|
||||
//this overrides all other heuristics related to guessing the indication of the last page
|
||||
ret.getContext().setLastPage(true);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,54 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.alarm (
|
||||
-- this is needed to support retrieval of all alarms for a customer
|
||||
CREATE INDEX IF NOT EXISTS idx_alarm_customerId ON tip_wlan_keyspace.alarm (customerId);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.alarm_by_acknowledged (
|
||||
customerId int,
|
||||
equipmentId bigint,
|
||||
alarmCode int,
|
||||
createdTimestamp bigint,
|
||||
acknowledged boolean,
|
||||
|
||||
PRIMARY KEY ((customerId, acknowledged), equipmentId, alarmCode, createdTimestamp)
|
||||
) WITH comment='Index Table to look up alarms by acknowledged used by TIP WLAN CloudSDK';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.alarm_by_acknowledged_equipmentId (
|
||||
customerId int,
|
||||
equipmentId bigint,
|
||||
alarmCode int,
|
||||
createdTimestamp bigint,
|
||||
acknowledged boolean,
|
||||
|
||||
PRIMARY KEY ((customerId, acknowledged, equipmentId), alarmCode, createdTimestamp)
|
||||
) WITH comment='Index Table to look up alarms by acknowledged and equipmentId used by TIP WLAN CloudSDK';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.alarm_by_acknowledged_alarmCode (
|
||||
customerId int,
|
||||
equipmentId bigint,
|
||||
alarmCode int,
|
||||
createdTimestamp bigint,
|
||||
acknowledged boolean,
|
||||
|
||||
PRIMARY KEY ((customerId, acknowledged, alarmCode), equipmentId, createdTimestamp)
|
||||
) WITH comment='Index Table to look up alarms by acknowledged and alarmCode used by TIP WLAN CloudSDK';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.alarm_by_acknowledged_timestamp (
|
||||
customerId int,
|
||||
equipmentId bigint,
|
||||
alarmCode int,
|
||||
createdTimestamp bigint,
|
||||
acknowledged boolean,
|
||||
|
||||
PRIMARY KEY ((customerId, acknowledged), alarmCode, createdTimestamp, equipmentId)
|
||||
) WITH comment='Index Table to look up alarms by acknowledged and createdTimestamp used by TIP WLAN CloudSDK';
|
||||
|
||||
/*
|
||||
# COPY tip_wlan_keyspace.alarm(customerId, equipmentId, alarmCode, createdTimestamp, acknowledged) TO 'alarmToAcknowledgedTable.csv';
|
||||
# COPY tip_wlan_keyspace.alarm_by_acknowledged(customerId, equipmentId, alarmCode, createdTimestamp, acknowledged) FROM 'alarmToAcknowledgedTable.csv';
|
||||
# COPY tip_wlan_keyspace.alarm_by_acknowledged_equipmentId(customerId, equipmentId, alarmCode, createdTimestamp, acknowledged) FROM 'alarmToAcknowledgedTable.csv';
|
||||
# COPY tip_wlan_keyspace.alarm_by_acknowledged_alarmCode(customerId, equipmentId, alarmCode, createdTimestamp, acknowledged) FROM 'alarmToAcknowledgedTable.csv';
|
||||
# COPY tip_wlan_keyspace.alarm_by_acknowledged_timestamp(customerId, equipmentId, alarmCode, createdTimestamp, acknowledged) FROM 'alarmToAcknowledgedTable.csv';
|
||||
*/
|
||||
|
||||
/*
|
||||
# Experiment with a separate alarm_counts table because raw alarms table generates warnings like these:
|
||||
# Query '[5 values] select equipmentId, alarmCode, count(1) from alarm where customerId = ? and equipmentId in (?,?,?,?) group by equipmentId, alarmCode [customerid=2, equipmentid=4, equipmentid=6, equipmentid=8, equipmentid=10]' generated server side warning(s): Aggregation query used on multiple partition keys (IN restriction)
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
package com.telecominfraproject.wlan.alarm.datastore.cassandra;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
@@ -20,12 +11,6 @@ import org.springframework.context.annotation.Import;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.telecominfraproject.wlan.alarm.datastore.BaseAlarmDatastoreTest;
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCode;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.ColumnAndSort;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.SortOrder;
|
||||
import com.telecominfraproject.wlan.core.server.cassandra.BaseCassandraDataSource;
|
||||
import com.telecominfraproject.wlan.core.server.cassandra.test.BaseCassandraTest;
|
||||
|
||||
@@ -40,181 +25,21 @@ import com.telecominfraproject.wlan.core.server.cassandra.test.BaseCassandraTest
|
||||
@Ignore("Ignore Cassandra Tests until we can set up a cassandra cluster for the integration testing")
|
||||
public class AlarmDatastoreCassandraTests extends BaseAlarmDatastoreTest {
|
||||
|
||||
@Test
|
||||
@Override
|
||||
//Cassandra has some limitations for sorting and filtering vs other data store types,
|
||||
// that's why this method is adjusted for cassandra datastore specifically
|
||||
public void testAlarmPagination()
|
||||
{
|
||||
//create 100 Alarms
|
||||
Alarm mdl;
|
||||
int customerId_1 = (int) testSequence.incrementAndGet();
|
||||
int customerId_2 = (int) testSequence.incrementAndGet();
|
||||
|
||||
int apNameIdx = 0;
|
||||
Set<Long> equipmentIds = new HashSet<>();
|
||||
Set<AlarmCode> alarmCodes = new HashSet<>(Arrays.asList(AlarmCode.AccessPointIsUnreachable, AlarmCode.AssocFailure));
|
||||
long pastTimestamp = 0;
|
||||
Set<Long> equipmentIds_c2 = new HashSet<>();
|
||||
|
||||
testInterface.resetAlarmCounters();
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_1);
|
||||
mdl.setScopeId("qr_"+apNameIdx);
|
||||
equipmentIds.add(mdl.getEquipmentId());
|
||||
|
||||
if(i == 8) {
|
||||
//create one record for the time of 10 sec ago
|
||||
mdl.setCreatedTimestamp(mdl.getCreatedTimestamp() - 10000);
|
||||
pastTimestamp = mdl.getCreatedTimestamp();
|
||||
}
|
||||
|
||||
apNameIdx++;
|
||||
testInterface.create(mdl);
|
||||
}
|
||||
|
||||
testInterface.resetAlarmCounters();
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_2);
|
||||
mdl.setScopeId("qr_"+apNameIdx);
|
||||
equipmentIds_c2.add(mdl.getEquipmentId());
|
||||
apNameIdx++;
|
||||
testInterface.create(mdl);
|
||||
}
|
||||
|
||||
//paginate over Alarms
|
||||
|
||||
List<ColumnAndSort> sortBy = new ArrayList<>();
|
||||
//In Cassandra the support for pagination order is very limited fixed at table creation, supplied sortBy options will be ignored.
|
||||
//sortBy.addAll(Arrays.asList(new ColumnAndSort("equipmentId")));
|
||||
|
||||
//get active alarms for all equipment and all alarmCodes for the customer since the beginning of time
|
||||
PaginationContext<Alarm> context = new PaginationContext<>(10);
|
||||
PaginationResponse<Alarm> page1 = null;
|
||||
PaginationResponse<Alarm> page2 = null;
|
||||
PaginationResponse<Alarm> page3 = null;
|
||||
PaginationResponse<Alarm> page4 = null;
|
||||
PaginationResponse<Alarm> page5 = null;
|
||||
PaginationResponse<Alarm> page6 = null;
|
||||
PaginationResponse<Alarm> page7 = null;
|
||||
|
||||
|
||||
page1 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, context);
|
||||
page2 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page1.getContext());
|
||||
page3 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page2.getContext());
|
||||
page4 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page3.getContext());
|
||||
page5 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page4.getContext());
|
||||
page6 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page5.getContext());
|
||||
page7 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
assertEquals(10, page2.getItems().size());
|
||||
assertEquals(10, page3.getItems().size());
|
||||
assertEquals(10, page4.getItems().size());
|
||||
assertEquals(10, page5.getItems().size());
|
||||
|
||||
page1.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page2.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page3.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page4.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page5.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
|
||||
assertEquals(0, page6.getItems().size());
|
||||
assertEquals(0, page7.getItems().size());
|
||||
|
||||
assertFalse(page1.getContext().isLastPage());
|
||||
assertFalse(page2.getContext().isLastPage());
|
||||
assertFalse(page3.getContext().isLastPage());
|
||||
assertFalse(page4.getContext().isLastPage());
|
||||
assertFalse(page5.getContext().isLastPage());
|
||||
|
||||
assertTrue(page6.getContext().isLastPage());
|
||||
assertTrue(page7.getContext().isLastPage());
|
||||
|
||||
//the order is weird, but consistent
|
||||
List<String> expectedPage3Strings = new ArrayList< >(Arrays.asList(new String[]{"qr_49", "qr_45", "qr_8", "qr_33", "qr_7", "qr_35", "qr_22", "qr_11", "qr_16", "qr_1" }));
|
||||
List<String> actualPage3Strings = new ArrayList<>();
|
||||
page3.getItems().stream().forEach( ce -> actualPage3Strings.add(ce.getScopeId()) );
|
||||
|
||||
assertEquals(expectedPage3Strings, actualPage3Strings);
|
||||
|
||||
|
||||
List<String> expectedPage1Strings = Arrays.asList(new String[]{"qr_3", "qr_13", "qr_38", "qr_40", "qr_44", "qr_17", "qr_41", "qr_39", "qr_19", "qr_34" });
|
||||
|
||||
//test first page of the results with empty sort order -> ignored by cassandra datastore - the order is weird, but consistent
|
||||
PaginationResponse<Alarm> page1EmptySort = testInterface.getForCustomer(customerId_1, null, null, -1, Collections.emptyList(), context);
|
||||
assertEquals(10, page1EmptySort.getItems().size());
|
||||
|
||||
List<String> expectedPage1EmptySortStrings = new ArrayList<>(expectedPage1Strings);
|
||||
List<String> actualPage1EmptySortStrings = new ArrayList<>();
|
||||
page1EmptySort.getItems().stream().forEach( ce -> actualPage1EmptySortStrings.add(ce.getScopeId()) );
|
||||
|
||||
assertEquals(expectedPage1EmptySortStrings, actualPage1EmptySortStrings);
|
||||
|
||||
//test first page of the results with null sort order -> ignored by cassandra datastore - the order is weird, but consistent
|
||||
PaginationResponse<Alarm> page1NullSort = testInterface.getForCustomer(customerId_1, null, null, -1, null, context);
|
||||
assertEquals(10, page1NullSort.getItems().size());
|
||||
|
||||
List<String> expectedPage1NullSortStrings = new ArrayList<>(expectedPage1Strings);
|
||||
List<String> actualPage1NullSortStrings = new ArrayList<>();
|
||||
page1NullSort.getItems().stream().forEach( ce -> actualPage1NullSortStrings.add(ce.getScopeId()) );
|
||||
|
||||
assertEquals(expectedPage1NullSortStrings, actualPage1NullSortStrings);
|
||||
|
||||
|
||||
//test first page of the results with sort descending order by a equipmentId property -> ignored by cassandra datastore - the order is weird, but consistent
|
||||
PaginationResponse<Alarm> page1SingleSortDesc = testInterface.getForCustomer(customerId_1, null, null, -1, Collections.singletonList(new ColumnAndSort("equipmentId", SortOrder.desc)), context);
|
||||
assertEquals(10, page1SingleSortDesc.getItems().size());
|
||||
|
||||
List<String> expectedPage1SingleSortDescStrings = new ArrayList<>(expectedPage1Strings);
|
||||
List<String> actualPage1SingleSortDescStrings = new ArrayList<>();
|
||||
page1SingleSortDesc.getItems().stream().forEach( ce -> actualPage1SingleSortDescStrings.add(ce.getScopeId()) );
|
||||
|
||||
assertEquals(expectedPage1SingleSortDescStrings, actualPage1SingleSortDescStrings);
|
||||
|
||||
//test with explicit list of equipmentIds and explicit list of AlarmCodes
|
||||
long createdAfterTs = pastTimestamp + 10;
|
||||
context = new PaginationContext<>(10);
|
||||
page1 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, context);
|
||||
page2 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page1.getContext());
|
||||
page3 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page2.getContext());
|
||||
page4 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page3.getContext());
|
||||
page5 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page4.getContext());
|
||||
page6 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page5.getContext());
|
||||
page7 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
assertEquals(10, page2.getItems().size());
|
||||
assertEquals(10, page3.getItems().size());
|
||||
assertEquals(10, page4.getItems().size());
|
||||
assertEquals(9, page5.getItems().size());
|
||||
assertEquals(0, page6.getItems().size());
|
||||
|
||||
page1.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page2.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page3.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page4.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page5.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
|
||||
//test with explicit list of equipmentIds of one element and explicit list of AlarmCodes of one element
|
||||
context = new PaginationContext<>(10);
|
||||
page1 = testInterface.getForCustomer(customerId_1, Collections.singleton(equipmentIds.iterator().next()), Collections.singleton(AlarmCode.AccessPointIsUnreachable), -1, sortBy, context);
|
||||
assertEquals(1, page1.getItems().size());
|
||||
|
||||
testInterface.resetAlarmCounters();
|
||||
|
||||
//clean up after the test
|
||||
equipmentIds.forEach(eqId -> testInterface.delete(customerId_1, eqId));
|
||||
equipmentIds_c2.forEach(eqId -> testInterface.delete(customerId_2, eqId));
|
||||
|
||||
testInterface.resetAlarmCounters();
|
||||
|
||||
protected List<String> getAlarmPagination_expectedPage3Strings(){
|
||||
//in cassandra the sort order is weird but consistent - although it may change on the cassandra server restart
|
||||
return Arrays.asList(new String[]{"qr_9", "qr_40", "qr_3", "qr_32", "qr_31", "qr_2", "qr_39", "qr_35", "qr_38", "qr_48" });
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected List<String> getAlarmPagination_expectedPage1EmptySortStrings() {
|
||||
return Arrays.asList(new String[]{"qr_28", "qr_21", "qr_46", "qr_20", "qr_22", "qr_15", "qr_49", "qr_45", "qr_43", "qr_42" });
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getAlarmPagination_expectedPage1SingleSortDescStrings(){
|
||||
return getAlarmPagination_expectedPage1EmptySortStrings();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
||||
@@ -19,6 +19,10 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCode;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCounts;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmDetails;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.ColumnAndSort;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
@@ -27,11 +31,6 @@ import com.telecominfraproject.wlan.core.model.pagination.SortOrder;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsConcurrentModificationException;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsEntityNotFoundException;
|
||||
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCode;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCounts;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmDetails;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
@@ -209,6 +208,9 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
Set<Long> equipmentIds = new HashSet<>();
|
||||
Set<AlarmCode> alarmCodes = new HashSet<>(Arrays.asList(AlarmCode.AccessPointIsUnreachable, AlarmCode.AssocFailure));
|
||||
long pastTimestamp = 0;
|
||||
Set<Long> equipmentIds_c2 = new HashSet<>();
|
||||
|
||||
testInterface.resetAlarmCounters();
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = createAlarmObject();
|
||||
@@ -221,15 +223,23 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
mdl.setCreatedTimestamp(mdl.getCreatedTimestamp() - 10000);
|
||||
pastTimestamp = mdl.getCreatedTimestamp();
|
||||
}
|
||||
if (i < 20) {
|
||||
mdl.setAcknowledged(true);
|
||||
} else {
|
||||
mdl.setAcknowledged(false);
|
||||
}
|
||||
|
||||
apNameIdx++;
|
||||
testInterface.create(mdl);
|
||||
}
|
||||
|
||||
testInterface.resetAlarmCounters();
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_2);
|
||||
mdl.setScopeId("qr_"+apNameIdx);
|
||||
mdl.setScopeId("qr_"+apNameIdx);
|
||||
equipmentIds_c2.add(mdl.getEquipmentId());
|
||||
apNameIdx++;
|
||||
testInterface.create(mdl);
|
||||
}
|
||||
@@ -241,13 +251,13 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
|
||||
//get active alarms for all equipment and all alarmCodes for the customer since the beginning of time
|
||||
PaginationContext<Alarm> context = new PaginationContext<>(10);
|
||||
PaginationResponse<Alarm> page1 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, context);
|
||||
PaginationResponse<Alarm> page2 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page1.getContext());
|
||||
PaginationResponse<Alarm> page3 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page2.getContext());
|
||||
PaginationResponse<Alarm> page4 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page3.getContext());
|
||||
PaginationResponse<Alarm> page5 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page4.getContext());
|
||||
PaginationResponse<Alarm> page6 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page5.getContext());
|
||||
PaginationResponse<Alarm> page7 = testInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page6.getContext());
|
||||
PaginationResponse<Alarm> page1 = testInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, context);
|
||||
PaginationResponse<Alarm> page2 = testInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page1.getContext());
|
||||
PaginationResponse<Alarm> page3 = testInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page2.getContext());
|
||||
PaginationResponse<Alarm> page4 = testInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page3.getContext());
|
||||
PaginationResponse<Alarm> page5 = testInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page4.getContext());
|
||||
PaginationResponse<Alarm> page6 = testInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page5.getContext());
|
||||
PaginationResponse<Alarm> page7 = testInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
@@ -274,28 +284,118 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
assertTrue(page6.getContext().isLastPage());
|
||||
assertTrue(page7.getContext().isLastPage());
|
||||
|
||||
List<String> expectedPage3Strings = new ArrayList< >(Arrays.asList(new String[]{"qr_20", "qr_21", "qr_22", "qr_23", "qr_24", "qr_25", "qr_26", "qr_27", "qr_28", "qr_29" }));
|
||||
List<String> expectedPage3Strings = getAlarmPagination_expectedPage3Strings();
|
||||
List<String> actualPage3Strings = new ArrayList<>();
|
||||
page3.getItems().stream().forEach( ce -> actualPage3Strings.add(ce.getScopeId()) );
|
||||
|
||||
assertEquals(expectedPage3Strings, actualPage3Strings);
|
||||
|
||||
// testing Acknowledged filter (alarm_by_acknowledged)
|
||||
PaginationResponse<Alarm> page1Acknowledged = testInterface.getForCustomer(customerId_1, null, null, -1, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2Acknowledged = testInterface.getForCustomer(customerId_1, null, null, -1, true, sortBy, page1Acknowledged.getContext());
|
||||
PaginationResponse<Alarm> page3Acknowledged = testInterface.getForCustomer(customerId_1, null, null, -1, true, sortBy, page2Acknowledged.getContext());
|
||||
PaginationResponse<Alarm> page4Acknowledged = testInterface.getForCustomer(customerId_1, null, null, -1, true, sortBy, page3Acknowledged.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1Acknowledged.getItems().size());
|
||||
assertEquals(10, page2Acknowledged.getItems().size());
|
||||
assertEquals(0, page3Acknowledged.getItems().size());
|
||||
assertEquals(0, page4Acknowledged.getItems().size());
|
||||
|
||||
// testing Acknowledged filter with equipmentIds (alarm_by_acknowledged_equipmentId)
|
||||
PaginationResponse<Alarm> page1AcknowledgedAndEquipment = testInterface.getForCustomer(customerId_1, equipmentIds, null, -1, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2AcknowledgedAndEquipment = testInterface.getForCustomer(customerId_1, equipmentIds, null, -1, true, sortBy, page1AcknowledgedAndEquipment.getContext());
|
||||
PaginationResponse<Alarm> page3AcknowledgedAndEquipment = testInterface.getForCustomer(customerId_1, equipmentIds, null, -1, true, sortBy, page2AcknowledgedAndEquipment.getContext());
|
||||
PaginationResponse<Alarm> page4AcknowledgedAndEquipment = testInterface.getForCustomer(customerId_1, equipmentIds, null, -1, true, sortBy, page3AcknowledgedAndEquipment.getContext());
|
||||
|
||||
page1AcknowledgedAndEquipment.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
page2AcknowledgedAndEquipment.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
|
||||
page1AcknowledgedAndEquipment.getItems().forEach(e -> assertTrue(equipmentIds.contains(e.getEquipmentId())));
|
||||
page2AcknowledgedAndEquipment.getItems().forEach(e -> assertTrue(equipmentIds.contains(e.getEquipmentId())));
|
||||
|
||||
assertTrue(page3AcknowledgedAndEquipment.getContext().isLastPage());
|
||||
assertTrue(page4AcknowledgedAndEquipment.getContext().isLastPage());
|
||||
|
||||
// testing Acknowledged filter with alarmCodes (alarm_by_acknowledged_alarmCode)
|
||||
PaginationResponse<Alarm> page1AcknowledgedAndAlarmCode = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, -1, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2AcknowledgedAndAlarmCode = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, -1, true, sortBy, page1AcknowledgedAndAlarmCode.getContext());
|
||||
PaginationResponse<Alarm> page3AcknowledgedAndAlarmCode = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, -1, true, sortBy, page2AcknowledgedAndAlarmCode.getContext());
|
||||
PaginationResponse<Alarm> page4AcknowledgedAndAlarmCode = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, -1, true, sortBy, page3AcknowledgedAndAlarmCode.getContext());
|
||||
|
||||
page1AcknowledgedAndAlarmCode.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
page2AcknowledgedAndAlarmCode.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
|
||||
page1AcknowledgedAndAlarmCode.getItems().forEach(e -> assertEquals(AlarmCode.AccessPointIsUnreachable, e.getAlarmCode()));
|
||||
page2AcknowledgedAndAlarmCode.getItems().forEach(e -> assertEquals(AlarmCode.AccessPointIsUnreachable, e.getAlarmCode()));
|
||||
|
||||
assertTrue(page3AcknowledgedAndAlarmCode.getContext().isLastPage());
|
||||
assertTrue(page4AcknowledgedAndAlarmCode.getContext().isLastPage());
|
||||
|
||||
// testing Acknowledged filter with failure alarm code (no alarms initialized with failure code, should return empty page)
|
||||
PaginationResponse<Alarm> page1AcknowledgedAndAlarmCodeFailure = testInterface.getForCustomer(customerId_1, equipmentIds, Collections.singleton(AlarmCode.AssocFailure), -1, true, sortBy, context);
|
||||
|
||||
assertTrue(page1AcknowledgedAndAlarmCodeFailure.getContext().isLastPage());
|
||||
|
||||
long checkTimestamp = pastTimestamp;
|
||||
|
||||
// testing Acknowledged filter with timestamp (alarm_by_acknowledged_timestamp)
|
||||
PaginationResponse<Alarm> page1AcknowledgedAndTimestamp = testInterface.getForCustomer(customerId_1, null, null, pastTimestamp, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2AcknowledgedAndTimestamp = testInterface.getForCustomer(customerId_1, null, null, pastTimestamp, true, sortBy, page1AcknowledgedAndTimestamp.getContext());
|
||||
PaginationResponse<Alarm> page3AcknowledgedAndTimestamp = testInterface.getForCustomer(customerId_1, null, null, pastTimestamp, true, sortBy, page2AcknowledgedAndTimestamp.getContext());
|
||||
PaginationResponse<Alarm> page4AcknowledgedAndTimestamp = testInterface.getForCustomer(customerId_1, null, null, pastTimestamp, true, sortBy, page3AcknowledgedAndTimestamp.getContext());
|
||||
|
||||
assertEquals(10, page1AcknowledgedAndTimestamp.getItems().size());
|
||||
assertEquals(9, page2AcknowledgedAndTimestamp.getItems().size());
|
||||
assertEquals(0, page3AcknowledgedAndTimestamp.getItems().size());
|
||||
assertEquals(0, page4AcknowledgedAndTimestamp.getItems().size());
|
||||
|
||||
page1AcknowledgedAndTimestamp.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
page2AcknowledgedAndTimestamp.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
|
||||
page1AcknowledgedAndTimestamp.getItems().forEach(e -> assertTrue(e.getCreatedTimestamp() > checkTimestamp));
|
||||
page2AcknowledgedAndTimestamp.getItems().forEach(e -> assertTrue(e.getCreatedTimestamp() > checkTimestamp));
|
||||
|
||||
assertTrue(page3AcknowledgedAndTimestamp.getContext().isLastPage());
|
||||
assertTrue(page4AcknowledgedAndTimestamp.getContext().isLastPage());
|
||||
|
||||
// testing Acknowledged with equipmentId and timestamp
|
||||
// With timestamp, alarmCodes will be set to AlarmCode.validValues, so these calls will be equivalent to having all filters included.
|
||||
// Because all filters are included, the alarm_by_acknowledged will be used instead of alarm_by_acknowledged_timestamp
|
||||
PaginationResponse<Alarm> page1AcknowledgedEquipmentIdAndTimestamp = testInterface.getForCustomer(customerId_1, equipmentIds, null, pastTimestamp, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2AcknowledgedEquipmentIdAndTimestamp = testInterface.getForCustomer(customerId_1, equipmentIds, null, pastTimestamp, true, sortBy, page1AcknowledgedEquipmentIdAndTimestamp.getContext());
|
||||
PaginationResponse<Alarm> page3AcknowledgedEquipmentIdAndTimestamp = testInterface.getForCustomer(customerId_1, equipmentIds, null, pastTimestamp, true, sortBy, page2AcknowledgedEquipmentIdAndTimestamp.getContext());
|
||||
|
||||
assertEquals(10, page1AcknowledgedEquipmentIdAndTimestamp.getItems().size());
|
||||
assertEquals(9, page2AcknowledgedEquipmentIdAndTimestamp.getItems().size());
|
||||
assertEquals(0, page3AcknowledgedEquipmentIdAndTimestamp.getItems().size());
|
||||
|
||||
page1AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
page2AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
|
||||
page1AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertTrue(equipmentIds.contains(e.getEquipmentId())));
|
||||
page2AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertTrue(equipmentIds.contains(e.getEquipmentId())));
|
||||
|
||||
page1AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertTrue(e.getCreatedTimestamp() > checkTimestamp));
|
||||
page2AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertTrue(e.getCreatedTimestamp() > checkTimestamp));
|
||||
|
||||
assertTrue(page3AcknowledgedEquipmentIdAndTimestamp.getContext().isLastPage());
|
||||
|
||||
//test first page of the results with empty sort order -> default sort order (by Id ascending)
|
||||
PaginationResponse<Alarm> page1EmptySort = testInterface.getForCustomer(customerId_1, null, null, -1, Collections.emptyList(), context);
|
||||
PaginationResponse<Alarm> page1EmptySort = testInterface.getForCustomer(customerId_1, null, null, -1, null, Collections.emptyList(), context);
|
||||
assertEquals(10, page1EmptySort.getItems().size());
|
||||
|
||||
List<String> expectedPage1EmptySortStrings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> expectedPage1EmptySortStrings = getAlarmPagination_expectedPage1EmptySortStrings();
|
||||
List<String> actualPage1EmptySortStrings = new ArrayList<>();
|
||||
page1EmptySort.getItems().stream().forEach( ce -> actualPage1EmptySortStrings.add(ce.getScopeId()) );
|
||||
|
||||
assertEquals(expectedPage1EmptySortStrings, actualPage1EmptySortStrings);
|
||||
|
||||
//test first page of the results with null sort order -> default sort order (by Id ascending)
|
||||
PaginationResponse<Alarm> page1NullSort = testInterface.getForCustomer(customerId_1, null, null, -1, null, context);
|
||||
PaginationResponse<Alarm> page1NullSort = testInterface.getForCustomer(customerId_1, null, null, -1, null, null, context);
|
||||
assertEquals(10, page1NullSort.getItems().size());
|
||||
|
||||
List<String> expectedPage1NullSortStrings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> expectedPage1NullSortStrings = expectedPage1EmptySortStrings;
|
||||
List<String> actualPage1NullSortStrings = new ArrayList<>();
|
||||
page1NullSort.getItems().stream().forEach( ce -> actualPage1NullSortStrings.add(ce.getScopeId()) );
|
||||
|
||||
@@ -303,10 +403,10 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
|
||||
|
||||
//test first page of the results with sort descending order by a equipmentId property
|
||||
PaginationResponse<Alarm> page1SingleSortDesc = testInterface.getForCustomer(customerId_1, null, null, -1, Collections.singletonList(new ColumnAndSort("equipmentId", SortOrder.desc)), context);
|
||||
PaginationResponse<Alarm> page1SingleSortDesc = testInterface.getForCustomer(customerId_1, null, null, -1, null, Collections.singletonList(new ColumnAndSort("equipmentId", SortOrder.desc)), context);
|
||||
assertEquals(10, page1SingleSortDesc.getItems().size());
|
||||
|
||||
List<String> expectedPage1SingleSortDescStrings = new ArrayList< >(Arrays.asList(new String[]{"qr_49", "qr_48", "qr_47", "qr_46", "qr_45", "qr_44", "qr_43", "qr_42", "qr_41", "qr_40" }));
|
||||
List<String> expectedPage1SingleSortDescStrings = getAlarmPagination_expectedPage1SingleSortDescStrings();
|
||||
List<String> actualPage1SingleSortDescStrings = new ArrayList<>();
|
||||
page1SingleSortDesc.getItems().stream().forEach( ce -> actualPage1SingleSortDescStrings.add(ce.getScopeId()) );
|
||||
|
||||
@@ -315,13 +415,13 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
//test with explicit list of equipmentIds and explicit list of AlarmCodes
|
||||
long createdAfterTs = pastTimestamp + 10;
|
||||
context = new PaginationContext<>(10);
|
||||
page1 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, context);
|
||||
page2 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page1.getContext());
|
||||
page3 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page2.getContext());
|
||||
page4 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page3.getContext());
|
||||
page5 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page4.getContext());
|
||||
page6 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page5.getContext());
|
||||
page7 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page6.getContext());
|
||||
page1 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, context);
|
||||
page2 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page1.getContext());
|
||||
page3 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page2.getContext());
|
||||
page4 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page3.getContext());
|
||||
page5 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page4.getContext());
|
||||
page6 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page5.getContext());
|
||||
page7 = testInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
@@ -339,9 +439,78 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
|
||||
//test with explicit list of equipmentIds of one element and explicit list of AlarmCodes of one element
|
||||
context = new PaginationContext<>(10);
|
||||
page1 = testInterface.getForCustomer(customerId_1, Collections.singleton(equipmentIds.iterator().next()), Collections.singleton(AlarmCode.AccessPointIsUnreachable), -1, sortBy, context);
|
||||
page1 = testInterface.getForCustomer(customerId_1, Collections.singleton(equipmentIds.iterator().next()), Collections.singleton(AlarmCode.AccessPointIsUnreachable), -1, null, sortBy, context);
|
||||
assertEquals(1, page1.getItems().size());
|
||||
|
||||
testInterface.resetAlarmCounters();
|
||||
|
||||
//clean up after the test
|
||||
equipmentIds.forEach(eqId -> testInterface.delete(customerId_1, eqId));
|
||||
equipmentIds_c2.forEach(eqId -> testInterface.delete(customerId_2, eqId));
|
||||
|
||||
testInterface.resetAlarmCounters();
|
||||
|
||||
}
|
||||
|
||||
protected List<String> getAlarmPagination_expectedPage3Strings(){
|
||||
return Arrays.asList(new String[]{"qr_20", "qr_21", "qr_22", "qr_23", "qr_24", "qr_25", "qr_26", "qr_27", "qr_28", "qr_29" });
|
||||
}
|
||||
|
||||
protected List<String> getAlarmPagination_expectedPage1EmptySortStrings() {
|
||||
return Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" });
|
||||
}
|
||||
|
||||
protected List<String> getAlarmPagination_expectedPage1SingleSortDescStrings(){
|
||||
return Arrays.asList(new String[]{"qr_49", "qr_48", "qr_47", "qr_46", "qr_45", "qr_44", "qr_43", "qr_42", "qr_41", "qr_40" });
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlarmAcknowledgedPaginationWithUpdate() {
|
||||
Alarm alarm = createAlarmObject();
|
||||
|
||||
//create
|
||||
Alarm created = testInterface.create(alarm);
|
||||
assertNotNull(created);
|
||||
assertEquals(alarm.getCustomerId(), created.getCustomerId());
|
||||
assertEquals(alarm.getEquipmentId(), created.getEquipmentId());
|
||||
assertEquals(alarm.getAlarmCode(), created.getAlarmCode());
|
||||
assertEquals(alarm.getCreatedTimestamp(), created.getCreatedTimestamp());
|
||||
assertNotNull(created.getDetails());
|
||||
assertEquals(alarm.getDetails(), created.getDetails());
|
||||
|
||||
List<ColumnAndSort> sortBy = new ArrayList<>();
|
||||
sortBy.addAll(Arrays.asList(new ColumnAndSort("equipmentId")));
|
||||
PaginationContext<Alarm> context = new PaginationContext<>(10);
|
||||
|
||||
PaginationResponse<Alarm> page1CheckFalse = testInterface.getForCustomer(created.getCustomerId(), null, null, -1, false, sortBy, context);
|
||||
|
||||
assertEquals(1, page1CheckFalse.getItems().size());
|
||||
page1CheckFalse.getItems().forEach(e -> assertFalse(e.isAcknowledged()));
|
||||
|
||||
PaginationResponse<Alarm> page1CheckTrue = testInterface.getForCustomer(created.getCustomerId(), null, null, -1, true, sortBy, context);
|
||||
|
||||
assertEquals(0, page1CheckTrue.getItems().size());
|
||||
|
||||
// update
|
||||
created.setAcknowledged(true);
|
||||
Alarm updated = testInterface.update(created);
|
||||
assertNotNull(updated);
|
||||
assertTrue(updated.isAcknowledged());
|
||||
|
||||
page1CheckFalse = testInterface.getForCustomer(created.getCustomerId(), null, null, -1, false, sortBy, context);
|
||||
|
||||
assertEquals(0, page1CheckFalse.getItems().size());
|
||||
|
||||
page1CheckTrue = testInterface.getForCustomer(created.getCustomerId(), null, null, -1, true, sortBy, context);
|
||||
|
||||
assertEquals(1, page1CheckTrue.getItems().size());
|
||||
page1CheckTrue.getItems().forEach(e -> assertTrue(e.isAcknowledged()));
|
||||
|
||||
//delete
|
||||
created = testInterface.delete(created.getCustomerId(), created.getEquipmentId(), created.getAlarmCode(), created.getCreatedTimestamp());
|
||||
assertNotNull(created);
|
||||
created = testInterface.getOrNull(created.getCustomerId(), created.getEquipmentId(), created.getAlarmCode(), created.getCreatedTimestamp());
|
||||
assertNull(created);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -467,6 +636,7 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
result.setEquipmentId(testSequence.getAndIncrement());
|
||||
result.setAlarmCode(AlarmCode.AccessPointIsUnreachable);
|
||||
result.setCreatedTimestamp(System.currentTimeMillis());
|
||||
result.setAcknowledged(false);
|
||||
|
||||
result.setScopeId("test-scope-" + result.getEquipmentId());
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,21 +15,21 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-datastore-inmemory</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-common-test</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -204,7 +204,7 @@ public class AlarmDatastoreInMemory extends BaseInMemoryDatastore implements Ala
|
||||
|
||||
@Override
|
||||
public PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet,
|
||||
long createdAfterTimestamp, List<ColumnAndSort> sortBy, PaginationContext<Alarm> context) {
|
||||
long createdAfterTimestamp, Boolean acknowledged, List<ColumnAndSort> sortBy, PaginationContext<Alarm> context) {
|
||||
|
||||
if(context == null) {
|
||||
context = new PaginationContext<>();
|
||||
@@ -226,6 +226,7 @@ public class AlarmDatastoreInMemory extends BaseInMemoryDatastore implements Ala
|
||||
&& ( equipmentIdSet == null || equipmentIdSet.isEmpty() || equipmentIdSet.contains(a.getEquipmentId()) )
|
||||
&& ( alarmCodeSet ==null || alarmCodeSet.isEmpty() || alarmCodeSet.contains(a.getAlarmCode()) )
|
||||
&& a.getCreatedTimestamp() > createdAfterTimestamp
|
||||
&& (acknowledged == null || a.isAcknowledged() == acknowledged.booleanValue())
|
||||
) {
|
||||
items.add(a.clone());
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,12 +15,12 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-exceptions</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public interface AlarmDatastore {
|
||||
* @param createdAfterTimestamp
|
||||
* @return next page of matching Alarm objects.
|
||||
*/
|
||||
PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, List<ColumnAndSort> sortBy, PaginationContext<Alarm> context);
|
||||
PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, Boolean acknowledged, List<ColumnAndSort> sortBy, PaginationContext<Alarm> context);
|
||||
|
||||
/**
|
||||
* @param customerId
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,26 +15,26 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-jdbc</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-jdbc-tests</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-common-test</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -445,7 +445,7 @@ public class AlarmDAO extends BaseJdbcDao {
|
||||
|
||||
|
||||
public PaginationResponse<Alarm> getForCustomer(int customerId,
|
||||
Set<Long> equipmentIds, Set<AlarmCode> alarmCodes, long createdAfterTimestamp,
|
||||
Set<Long> equipmentIds, Set<AlarmCode> alarmCodes, long createdAfterTimestamp, Boolean acknowledged,
|
||||
List<ColumnAndSort> sortBy, PaginationContext<Alarm> context) {
|
||||
|
||||
PaginationResponse<Alarm> ret = new PaginationResponse<>();
|
||||
@@ -507,6 +507,11 @@ public class AlarmDAO extends BaseJdbcDao {
|
||||
queryArgs.add(createdAfterTimestamp);
|
||||
}
|
||||
|
||||
if (acknowledged != null) {
|
||||
query += " and acknowledged = ? ";
|
||||
queryArgs.add(acknowledged);
|
||||
}
|
||||
|
||||
// add sorting options for the query
|
||||
StringBuilder strbSort = new StringBuilder(100);
|
||||
strbSort.append(" order by ");
|
||||
|
||||
@@ -57,7 +57,7 @@ public class AlarmDatastoreRdbms implements AlarmDatastore {
|
||||
|
||||
@Override
|
||||
public PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIdSet,
|
||||
Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, List<ColumnAndSort> sortBy,
|
||||
Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, Boolean acknowledged, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<Alarm> context) {
|
||||
|
||||
if(context == null) {
|
||||
@@ -65,7 +65,7 @@ public class AlarmDatastoreRdbms implements AlarmDatastore {
|
||||
}
|
||||
|
||||
return alarmDAO.getForCustomer(customerId, equipmentIdSet,
|
||||
alarmCodeSet, createdAfterTimestamp, sortBy,
|
||||
alarmCodeSet, createdAfterTimestamp, acknowledged, sortBy,
|
||||
context);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,17 +15,17 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>status-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>system-event-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.telecominfraproject.wlan.core.model.extensibleenum.EnumWithId;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.status.models.StatusCode;
|
||||
|
||||
/**
|
||||
* All available Alarm codes that can be handled by the CloudSDK.
|
||||
@@ -50,58 +51,58 @@ public class AlarmCode implements EnumWithId {
|
||||
|
||||
|
||||
public static final AlarmCode
|
||||
LimitedCloudConnectivity = new AlarmCode(3, "LimitedCloudConnectivity", "Equipment is connected, however it's not reporting status or metrics"),
|
||||
AccessPointIsUnreachable = new AlarmCode(4, "AccessPointIsUnreachable", "Equipment is not reachable from cloud"),
|
||||
LimitedCloudConnectivity = new AlarmCode(3, "LimitedCloudConnectivity", "Equipment is connected, however it's not reporting status or metrics", StatusCode.error, "Service AP and verify networking path to cloud"),
|
||||
AccessPointIsUnreachable = new AlarmCode(4, "AccessPointIsUnreachable", "Equipment is not reachable from cloud", StatusCode.error, "Service AP and verify networking path to cloud"),
|
||||
NoMetricsReceived = new AlarmCode(6, "NoMetricsReceived", "Equipment is not report metrics"),
|
||||
NoiseFloor2G = new AlarmCode(7, "NoiseFloor2G", "Noise floor is too high on 2G radio"),
|
||||
ChannelUtilization2G = new AlarmCode(8, "ChannelUtilization2G", "Channel utilization is too high on 2G radio"),
|
||||
NoiseFloor5G = new AlarmCode(9, "NoiseFloor5G", "Noise floor is too high on 5G radio"),
|
||||
ChannelUtilization5G = new AlarmCode(10, "ChannelUtilization5G", "Channel utilization is too high on 5G radio"),
|
||||
DNS = new AlarmCode(11, "DNS", "Issue with Domain Name System (DNS)"),
|
||||
DNSLatency = new AlarmCode(12, "DNSLatency", "DNS query takes too long"),
|
||||
DHCP = new AlarmCode(13, "DHCP", "Issue with DHCP"),
|
||||
DHCPLatency = new AlarmCode(14, "DHCPLatency", "DHCP request takes too long"),
|
||||
Radius = new AlarmCode(15, "Radius", "Issue with RADIUS"),
|
||||
RadiusLatency = new AlarmCode(16, "RadiusLatency", "RADIUS request takes too long"),
|
||||
CloudLink = new AlarmCode(17, "CloudLink", "Issue reported by equipment with connection with Cloud"),
|
||||
CloudLinkLatency = new AlarmCode(18, "CloudLinkLatency", "Cloud request take too long"),
|
||||
CPUUtilization = new AlarmCode(19, "CPUUtilization", "CPU utilization is too high"),
|
||||
MemoryUtilization = new AlarmCode(20, "MemoryUtilization", "Memory utilization is too high"),
|
||||
Disconnected = new AlarmCode(22, "Disconnected", "Equipment is not connected to the cloud"),
|
||||
CPUTemperature = new AlarmCode(23, "CPUTemperature", "CPU Temperature is too high"),
|
||||
NoiseFloor2G = new AlarmCode(7, "NoiseFloor2G", "Noise floor is too high on 2G radio", StatusCode.requiresAttention, "Investigate interference sources"),
|
||||
ChannelUtilization2G = new AlarmCode(8, "ChannelUtilization2G", "Channel utilization is too high on 2G radio", StatusCode.requiresAttention, "Consider adding more APs"),
|
||||
NoiseFloor5G = new AlarmCode(9, "NoiseFloor5G", "Noise floor is too high on 5G radio", StatusCode.requiresAttention, "Investigate interference sources"),
|
||||
ChannelUtilization5G = new AlarmCode(10, "ChannelUtilization5G", "Channel utilization is too high on 5G radio", StatusCode.requiresAttention, "Consider adding more APs"),
|
||||
DNS = new AlarmCode(11, "DNS", "Issue with Domain Name System (DNS)", StatusCode.error, "Service DNS server and network path"),
|
||||
DNSLatency = new AlarmCode(12, "DNSLatency", "DNS query takes too long", StatusCode.requiresAttention, "Service DNS server and network path"),
|
||||
DHCP = new AlarmCode(13, "DHCP", "Issue with DHCP", StatusCode.error, "Service DHCP server and network path"),
|
||||
DHCPLatency = new AlarmCode(14, "DHCPLatency", "DHCP request takes too long", StatusCode.requiresAttention, "Service DHCP server and network path"),
|
||||
Radius = new AlarmCode(15, "Radius", "Issue with RADIUS", StatusCode.error, "Service RADIUS server and network path"),
|
||||
RadiusLatency = new AlarmCode(16, "RadiusLatency", "RADIUS request takes too long", StatusCode.requiresAttention, "Service RADIUS server and network path"),
|
||||
CloudLink = new AlarmCode(17, "CloudLink", "Issue reported by equipment with connection with Cloud", StatusCode.error, "Investigate networking path to Cloud"),
|
||||
CloudLinkLatency = new AlarmCode(18, "CloudLinkLatency", "Cloud request take too long", StatusCode.requiresAttention, "Investigate networking path to Cloud"),
|
||||
CPUUtilization = new AlarmCode(19, "CPUUtilization", "CPU utilization is too high", StatusCode.requiresAttention, "Contact Tech Suport"),
|
||||
MemoryUtilization = new AlarmCode(20, "MemoryUtilization", "Memory utilization is too high", StatusCode.requiresAttention, "Contact Tech Suport"),
|
||||
Disconnected = new AlarmCode(22, "Disconnected", "Equipment is not connected to the cloud", StatusCode.error, "Service AP and verify networking path to cloud"),
|
||||
CPUTemperature = new AlarmCode(23, "CPUTemperature", "CPU Temperature is too high", StatusCode.requiresAttention, "Verify AP location"),
|
||||
LowMemoryReboot = new AlarmCode(25, "LowMemoryReboot", "Equipment rebooted due to low memory"),
|
||||
CountryCodeMisMatch = new AlarmCode(26, "CountryCodeMisMatch", "Equipment country code does not match with location"),
|
||||
HardwareIssueDiagnostic = new AlarmCode(29, "HardwareIssueDiagnostic", "Hardware issue encountered on equipment"),
|
||||
CountryCodeMisMatch = new AlarmCode(26, "CountryCodeMisMatch", "Equipment country code does not match with location", StatusCode.error, "Service AP"),
|
||||
HardwareIssueDiagnostic = new AlarmCode(29, "HardwareIssueDiagnostic", "Hardware issue encountered on equipment", StatusCode.error, "Reboot AP and contact tech support for RMA"),
|
||||
TooManyClients2g = new AlarmCode(30, "TooManyClients2g", "Too many client devices on 2G radio"),
|
||||
TooManyClients5g = new AlarmCode(31, "TooManyClients5g", "Too many client devices on 5G radio"),
|
||||
RebootRequestFailed = new AlarmCode(32, "RebootRequestFailed", "Failed to reboot equipment"),
|
||||
RadiusConfigurationFailed = new AlarmCode(33, "RadiusConfigurationFailed", "Failed to configure RADIUS on equipment"),
|
||||
FirmwareUpgradeStuck = new AlarmCode(34, "FirmwareUpgradeStuck", "Firmware upgrade failed"),
|
||||
MultipleAPCsOnSameSubnet = new AlarmCode(35, "MultipleAPCsOnSameSubnet", "Multiple APC reported on the same subnet"),
|
||||
RebootRequestFailed = new AlarmCode(32, "RebootRequestFailed", "Failed to reboot equipment", StatusCode.requiresAttention, "Contact Tech Support"),
|
||||
RadiusConfigurationFailed = new AlarmCode(33, "RadiusConfigurationFailed", "Failed to configure RADIUS on equipment", StatusCode.error, "Service RADIUS server and network path"),
|
||||
FirmwareUpgradeStuck = new AlarmCode(34, "FirmwareUpgradeStuck", "Firmware upgrade failed", StatusCode.error, "Reboot AP and contact tech support"),
|
||||
MultipleAPCsOnSameSubnet = new AlarmCode(35, "MultipleAPCsOnSameSubnet", "Multiple APC reported on the same subnet", StatusCode.error, "Verify subnet operation"),
|
||||
RadioHung2G = new AlarmCode(36, "RadioHung2G", "Radio hung on 2G radio"),
|
||||
RadioHung5G = new AlarmCode(37, "RadioHung5G", "Radio hung on 5G radio"),
|
||||
ConfigurationOutOfSync = new AlarmCode(38, "ConfigurationOutOfSync", "Equipment configuration is out-of-sync from cloud configuration"),
|
||||
ConfigurationOutOfSync = new AlarmCode(38, "ConfigurationOutOfSync", "Equipment configuration is out-of-sync from cloud configuration", StatusCode.requiresAttention, "Reboot AP. Contact Tech Support "),
|
||||
FailedCPAuthentications = new AlarmCode(40, "FailedCPAuthentications", "Captive portal authenticaiton request failed"),
|
||||
DisabledSSID = new AlarmCode(41, "DisabledSSID", "SSID is disabled on equipment even though it is configured"),
|
||||
DeauthAttackDetected = new AlarmCode(42, "DeauthAttackDetected", "De-Auth attack detected"),
|
||||
DeauthAttackDetected = new AlarmCode(42, "DeauthAttackDetected", "De-Auth attack detected", StatusCode.error, "Investigate rogue AP"),
|
||||
TooManyBlockedDevices = new AlarmCode(45, "TooManyBlockedDevices", "Too many blocked client devices provisioned"),
|
||||
TooManyRogueAPs = new AlarmCode(46, "TooManyRogueAPs", "Too many rogue APs provisioned"),
|
||||
NeighbourScanStuckOn2g = new AlarmCode(47, "NeighbourScanStuckOn2g", "Neighbour scan is stuck on 2G Radio"),
|
||||
NeighbourScanStuckOn5g = new AlarmCode(48, "NeighbourScanStuckOn5g", "Neighbour scan is stuck on 5G Radio"),
|
||||
NeighbourScanStuckOn2g = new AlarmCode(47, "NeighbourScanStuckOn2g", "Neighbour scan is stuck on 2G Radio", StatusCode.requiresAttention, "Contact Tech Support"),
|
||||
NeighbourScanStuckOn5g = new AlarmCode(48, "NeighbourScanStuckOn5g", "Neighbour scan is stuck on 5G Radio", StatusCode.requiresAttention, "Contact Tech Support"),
|
||||
InTroubleshootMode = new AlarmCode(49, "InTroubleshootMode", "Equipment is in troubleshoot mode for too long"),
|
||||
ChannelsOutOfSync2g = new AlarmCode(50, "ChannelsOutOfSync2g", "Channel configuration is out-of-sync from cloud configuration on 2G radio"), // in case the channel selection is out of sync
|
||||
ChannelsOutOfSync5g = new AlarmCode(51, "ChannelsOutOfSync5g", "Channel configuration is out-of-sync from cloud configuration on 5G radio"), // in case the channel selection is out of sync
|
||||
InconsistentBasemacs = new AlarmCode(52, "InconsistentBasemacs", "Equipment base MAC address reported is different than the provisioned value."),
|
||||
ChannelsOutOfSync2g = new AlarmCode(50, "ChannelsOutOfSync2g", "Channel configuration is out-of-sync from cloud configuration on 2G radio", StatusCode.requiresAttention, "Contact Tech Support"), // in case the channel selection is out of sync
|
||||
ChannelsOutOfSync5g = new AlarmCode(51, "ChannelsOutOfSync5g", "Channel configuration is out-of-sync from cloud configuration on 5G radio", StatusCode.requiresAttention, "Contact Tech Support"), // in case the channel selection is out of sync
|
||||
InconsistentBasemacs = new AlarmCode(52, "InconsistentBasemacs", "Equipment base MAC address reported is different than the provisioned value.", StatusCode.error, "Contact tech support for RMA"),
|
||||
GenericError = new AlarmCode(53, "GenericError", "Generic error encountered, detail in alarm text"),
|
||||
RadioHung = new AlarmCode(54, "RadioHung", "Equipment reported radio hung"),
|
||||
AssocFailure = new AlarmCode(55, "AssocFailure", "Association failed"),
|
||||
ClientAuthFailure = new AlarmCode(56, "ClientAuthFailure", "Client device authentication failed"),
|
||||
ClientAuthFailure = new AlarmCode(56, "ClientAuthFailure", "Client device authentication failed", StatusCode.error, "Investigate rogue client"),
|
||||
QoEIssues2g = new AlarmCode(57, "QoEIssues2g", "QoE issue detected on 2G radio"),
|
||||
QoEIssues5g = new AlarmCode(58, "QoEIssues5g", "QoE issue detected on 5G radio"),
|
||||
|
||||
// for multiple DNS servers
|
||||
DNSServerUnreachable = new AlarmCode(67, "DNSServerUnreachable", "DNS Server is unreachable"),
|
||||
DNSServerLatency = new AlarmCode(68, "DNSServerLatency", "DNS Server query takes too long"),
|
||||
DNSServerUnreachable = new AlarmCode(67, "DNSServerUnreachable", "DNS Server is unreachable", StatusCode.requiresAttention, "Service DNS server and network path"),
|
||||
DNSServerLatency = new AlarmCode(68, "DNSServerLatency", "DNS Server query takes too long", StatusCode.requiresAttention, "Service DNS server and network path"),
|
||||
|
||||
|
||||
UNSUPPORTED = new AlarmCode(-1, "UNSUPPORTED", "Alarm code is not supported by this release")
|
||||
@@ -119,11 +120,28 @@ public class AlarmCode implements EnumWithId {
|
||||
}
|
||||
}
|
||||
|
||||
public static enum AlarmCategory{
|
||||
CustomerNetworkAffecting,
|
||||
CloudPlatformAffecting
|
||||
}
|
||||
|
||||
private final int id;
|
||||
private final String name;
|
||||
private final String description;
|
||||
|
||||
private final StatusCode severity;
|
||||
private final String recommendedAction;
|
||||
private final AlarmCategory category;
|
||||
private final boolean propagateFast;
|
||||
|
||||
protected AlarmCode(int id, String name, String description){
|
||||
this(id, name, description, StatusCode.error, "", AlarmCategory.CustomerNetworkAffecting, false);
|
||||
}
|
||||
|
||||
protected AlarmCode(int id, String name, String description, StatusCode severity, String recommendedAction){
|
||||
this(id, name, description, severity, recommendedAction, AlarmCategory.CustomerNetworkAffecting, false);
|
||||
}
|
||||
|
||||
protected AlarmCode(int id, String name, String description, StatusCode severity, String recommendedAction, AlarmCategory category, boolean propagateFast){
|
||||
|
||||
synchronized(lock) {
|
||||
|
||||
@@ -132,6 +150,10 @@ public class AlarmCode implements EnumWithId {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.severity = severity;
|
||||
this.recommendedAction = recommendedAction;
|
||||
this.category = category;
|
||||
this.propagateFast = propagateFast;
|
||||
|
||||
ELEMENTS_BY_NAME.values().forEach(s -> {
|
||||
if(s.getName().equals(name)) {
|
||||
@@ -191,6 +213,26 @@ public class AlarmCode implements EnumWithId {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public StatusCode getSeverity() {
|
||||
return severity;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String getRecommendedAction() {
|
||||
return recommendedAction;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public AlarmCategory getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isPropagateFast() {
|
||||
return propagateFast;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String name() {
|
||||
return name;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<artifactId>alarm-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public interface AlarmServiceInterface {
|
||||
* @param createdAfterTimestamp
|
||||
* @return next page of matching Alarm objects.
|
||||
*/
|
||||
PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, List<ColumnAndSort> sortBy, PaginationContext<Alarm> context);
|
||||
PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, Boolean acknowledged, List<ColumnAndSort> sortBy, PaginationContext<Alarm> context);
|
||||
|
||||
/**
|
||||
* @param customerId
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<artifactId>alarm-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -69,11 +69,11 @@ public class AlarmServiceLocal implements AlarmServiceInterface {
|
||||
|
||||
@Override
|
||||
public PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIdSet,
|
||||
Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, List<ColumnAndSort> sortBy,
|
||||
Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, Boolean acknowledged, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<Alarm> context) {
|
||||
|
||||
return alarmController.getForCustomer(customerId, equipmentIdSet,
|
||||
alarmCodeSet, createdAfterTimestamp, sortBy, context);
|
||||
alarmCodeSet, createdAfterTimestamp, acknowledged, sortBy, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,41 +15,41 @@
|
||||
<dependency>
|
||||
<artifactId>alarm-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>base-client</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Dependencies for the unit tests -->
|
||||
<dependency>
|
||||
<artifactId>base-remote-tests</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -170,10 +170,10 @@ public class AlarmServiceRemote extends BaseRemoteClient implements AlarmService
|
||||
|
||||
@Override
|
||||
public PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIdSet,
|
||||
Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, List<ColumnAndSort> sortBy,
|
||||
Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, Boolean acknowledged, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<Alarm> context) {
|
||||
|
||||
LOG.debug("calling getForCustomer( {}, {}, {}, {}, {}, {} )", customerId, equipmentIdSet, alarmCodeSet, createdAfterTimestamp, sortBy, context);
|
||||
LOG.debug("calling getForCustomer( {}, {}, {}, {}, {}, {}, {} )", customerId, equipmentIdSet, alarmCodeSet, createdAfterTimestamp, acknowledged, sortBy, context);
|
||||
|
||||
String equipmentIdSetStr = null;
|
||||
if (equipmentIdSet != null && !equipmentIdSet.isEmpty()) {
|
||||
@@ -193,9 +193,9 @@ public class AlarmServiceRemote extends BaseRemoteClient implements AlarmService
|
||||
|
||||
ResponseEntity<PaginationResponse<Alarm>> responseEntity = restTemplate.exchange(
|
||||
getBaseUrl()
|
||||
+ "/forCustomer?customerId={customerId}&equipmentIdSet={equipmentIdSetStr}&alarmCodeSet={alarmCodeSetStr}&createdAfterTimestamp={createdAfterTimestamp}&sortBy={sortBy}&paginationContext={paginationContext}",
|
||||
+ "/forCustomer?customerId={customerId}&equipmentIdSet={equipmentIdSetStr}&alarmCodeSet={alarmCodeSetStr}&createdAfterTimestamp={createdAfterTimestamp}&acknowledged={acknowledged}&sortBy={sortBy}&paginationContext={paginationContext}",
|
||||
HttpMethod.GET,
|
||||
null, Alarm_PAGINATION_RESPONSE_CLASS_TOKEN, customerId, equipmentIdSetStr, alarmCodeSetStr, createdAfterTimestamp, sortBy, context);
|
||||
null, Alarm_PAGINATION_RESPONSE_CLASS_TOKEN, customerId, equipmentIdSetStr, alarmCodeSetStr, createdAfterTimestamp, acknowledged, sortBy, context);
|
||||
|
||||
PaginationResponse<Alarm> ret = responseEntity.getBody();
|
||||
LOG.debug("completed getForCustomer {} ", ret.getItems().size());
|
||||
|
||||
@@ -232,6 +232,11 @@ public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
mdl.setCreatedTimestamp(mdl.getCreatedTimestamp() - 10000);
|
||||
pastTimestamp = mdl.getCreatedTimestamp();
|
||||
}
|
||||
if (i < 20) {
|
||||
mdl.setAcknowledged(true);
|
||||
} else {
|
||||
mdl.setAcknowledged(false);
|
||||
}
|
||||
|
||||
apNameIdx++;
|
||||
remoteInterface.create(mdl);
|
||||
@@ -252,13 +257,13 @@ public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
|
||||
//get active alarms for all equipment and all alarmCodes for the customer since the beginning of time
|
||||
PaginationContext<Alarm> context = new PaginationContext<>(10);
|
||||
PaginationResponse<Alarm> page1 = remoteInterface.getForCustomer(customerId_1, null, null, -1, sortBy, context);
|
||||
PaginationResponse<Alarm> page2 = remoteInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page1.getContext());
|
||||
PaginationResponse<Alarm> page3 = remoteInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page2.getContext());
|
||||
PaginationResponse<Alarm> page4 = remoteInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page3.getContext());
|
||||
PaginationResponse<Alarm> page5 = remoteInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page4.getContext());
|
||||
PaginationResponse<Alarm> page6 = remoteInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page5.getContext());
|
||||
PaginationResponse<Alarm> page7 = remoteInterface.getForCustomer(customerId_1, null, null, -1, sortBy, page6.getContext());
|
||||
PaginationResponse<Alarm> page1 = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, context);
|
||||
PaginationResponse<Alarm> page2 = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page1.getContext());
|
||||
PaginationResponse<Alarm> page3 = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page2.getContext());
|
||||
PaginationResponse<Alarm> page4 = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page3.getContext());
|
||||
PaginationResponse<Alarm> page5 = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page4.getContext());
|
||||
PaginationResponse<Alarm> page6 = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page5.getContext());
|
||||
PaginationResponse<Alarm> page7 = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
@@ -291,9 +296,99 @@ public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
|
||||
assertEquals(expectedPage3Strings, actualPage3Strings);
|
||||
|
||||
// testing Acknowledged filter (alarm_by_acknowledged)
|
||||
PaginationResponse<Alarm> page1Acknowledged = remoteInterface.getForCustomer(customerId_1, null, null, -1, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2Acknowledged = remoteInterface.getForCustomer(customerId_1, null, null, -1, true, sortBy, page1Acknowledged.getContext());
|
||||
PaginationResponse<Alarm> page3Acknowledged = remoteInterface.getForCustomer(customerId_1, null, null, -1, true, sortBy, page2Acknowledged.getContext());
|
||||
PaginationResponse<Alarm> page4Acknowledged = remoteInterface.getForCustomer(customerId_1, null, null, -1, true, sortBy, page3Acknowledged.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1Acknowledged.getItems().size());
|
||||
assertEquals(10, page2Acknowledged.getItems().size());
|
||||
assertEquals(0, page3Acknowledged.getItems().size());
|
||||
assertEquals(0, page4Acknowledged.getItems().size());
|
||||
|
||||
// testing Acknowledged filter with equipmentIds (alarm_by_acknowledged_equipmentId)
|
||||
PaginationResponse<Alarm> page1AcknowledgedAndEquipment = remoteInterface.getForCustomer(customerId_1, equipmentIds, null, -1, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2AcknowledgedAndEquipment = remoteInterface.getForCustomer(customerId_1, equipmentIds, null, -1, true, sortBy, page1AcknowledgedAndEquipment.getContext());
|
||||
PaginationResponse<Alarm> page3AcknowledgedAndEquipment = remoteInterface.getForCustomer(customerId_1, equipmentIds, null, -1, true, sortBy, page2AcknowledgedAndEquipment.getContext());
|
||||
PaginationResponse<Alarm> page4AcknowledgedAndEquipment = remoteInterface.getForCustomer(customerId_1, equipmentIds, null, -1, true, sortBy, page3AcknowledgedAndEquipment.getContext());
|
||||
|
||||
page1AcknowledgedAndEquipment.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
page2AcknowledgedAndEquipment.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
|
||||
page1AcknowledgedAndEquipment.getItems().forEach(e -> assertTrue(equipmentIds.contains(e.getEquipmentId())));
|
||||
page2AcknowledgedAndEquipment.getItems().forEach(e -> assertTrue(equipmentIds.contains(e.getEquipmentId())));
|
||||
|
||||
assertTrue(page3AcknowledgedAndEquipment.getContext().isLastPage());
|
||||
assertTrue(page4AcknowledgedAndEquipment.getContext().isLastPage());
|
||||
|
||||
// testing Acknowledged filter with alarmCodes (alarm_by_acknowledged_alarmCode)
|
||||
PaginationResponse<Alarm> page1AcknowledgedAndAlarmCode = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, -1, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2AcknowledgedAndAlarmCode = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, -1, true, sortBy, page1AcknowledgedAndAlarmCode.getContext());
|
||||
PaginationResponse<Alarm> page3AcknowledgedAndAlarmCode = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, -1, true, sortBy, page2AcknowledgedAndAlarmCode.getContext());
|
||||
PaginationResponse<Alarm> page4AcknowledgedAndAlarmCode = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, -1, true, sortBy, page3AcknowledgedAndAlarmCode.getContext());
|
||||
|
||||
page1AcknowledgedAndAlarmCode.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
page2AcknowledgedAndAlarmCode.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
|
||||
page1AcknowledgedAndAlarmCode.getItems().forEach(e -> assertEquals(AlarmCode.AccessPointIsUnreachable, e.getAlarmCode()));
|
||||
page2AcknowledgedAndAlarmCode.getItems().forEach(e -> assertEquals(AlarmCode.AccessPointIsUnreachable, e.getAlarmCode()));
|
||||
|
||||
assertTrue(page3AcknowledgedAndAlarmCode.getContext().isLastPage());
|
||||
assertTrue(page4AcknowledgedAndAlarmCode.getContext().isLastPage());
|
||||
|
||||
// testing Acknowledged filter with failure alarm code (no alarms initialized with failure code, should return empty page)
|
||||
PaginationResponse<Alarm> page1AcknowledgedAndAlarmCodeFailure = remoteInterface.getForCustomer(customerId_1, equipmentIds, Collections.singleton(AlarmCode.AssocFailure), -1, true, sortBy, context);
|
||||
|
||||
assertTrue(page1AcknowledgedAndAlarmCodeFailure.getContext().isLastPage());
|
||||
|
||||
long checkTimestamp = pastTimestamp;
|
||||
|
||||
// testing Acknowledged filter with timestamp (alarm_by_acknowledged_timestamp)
|
||||
PaginationResponse<Alarm> page1AcknowledgedAndTimestamp = remoteInterface.getForCustomer(customerId_1, null, null, pastTimestamp, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2AcknowledgedAndTimestamp = remoteInterface.getForCustomer(customerId_1, null, null, pastTimestamp, true, sortBy, page1AcknowledgedAndTimestamp.getContext());
|
||||
PaginationResponse<Alarm> page3AcknowledgedAndTimestamp = remoteInterface.getForCustomer(customerId_1, null, null, pastTimestamp, true, sortBy, page2AcknowledgedAndTimestamp.getContext());
|
||||
PaginationResponse<Alarm> page4AcknowledgedAndTimestamp = remoteInterface.getForCustomer(customerId_1, null, null, pastTimestamp, true, sortBy, page3AcknowledgedAndTimestamp.getContext());
|
||||
|
||||
assertEquals(10, page1AcknowledgedAndTimestamp.getItems().size());
|
||||
assertEquals(9, page2AcknowledgedAndTimestamp.getItems().size());
|
||||
assertEquals(0, page3AcknowledgedAndTimestamp.getItems().size());
|
||||
assertEquals(0, page4AcknowledgedAndTimestamp.getItems().size());
|
||||
|
||||
page1AcknowledgedAndTimestamp.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
page2AcknowledgedAndTimestamp.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
|
||||
page1AcknowledgedAndTimestamp.getItems().forEach(e -> assertTrue(e.getCreatedTimestamp() > checkTimestamp));
|
||||
page2AcknowledgedAndTimestamp.getItems().forEach(e -> assertTrue(e.getCreatedTimestamp() > checkTimestamp));
|
||||
|
||||
assertTrue(page3AcknowledgedAndTimestamp.getContext().isLastPage());
|
||||
assertTrue(page4AcknowledgedAndTimestamp.getContext().isLastPage());
|
||||
|
||||
// testing Acknowledged with equipmentId and timestamp
|
||||
// With timestamp, alarmCodes will be set to AlarmCode.validValues, so these calls will be equivalent to having all filters included.
|
||||
// Because all filters are included, the alarm_by_acknowledged will be used instead of alarm_by_acknowledged_timestamp
|
||||
PaginationResponse<Alarm> page1AcknowledgedEquipmentIdAndTimestamp = remoteInterface.getForCustomer(customerId_1, equipmentIds, null, pastTimestamp, true, sortBy, context);
|
||||
PaginationResponse<Alarm> page2AcknowledgedEquipmentIdAndTimestamp = remoteInterface.getForCustomer(customerId_1, equipmentIds, null, pastTimestamp, true, sortBy, page1AcknowledgedEquipmentIdAndTimestamp.getContext());
|
||||
PaginationResponse<Alarm> page3AcknowledgedEquipmentIdAndTimestamp = remoteInterface.getForCustomer(customerId_1, equipmentIds, null, pastTimestamp, true, sortBy, page2AcknowledgedEquipmentIdAndTimestamp.getContext());
|
||||
|
||||
assertEquals(10, page1AcknowledgedEquipmentIdAndTimestamp.getItems().size());
|
||||
assertEquals(9, page2AcknowledgedEquipmentIdAndTimestamp.getItems().size());
|
||||
assertEquals(0, page3AcknowledgedEquipmentIdAndTimestamp.getItems().size());
|
||||
|
||||
page1AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
page2AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertEquals(true, e.isAcknowledged()) );
|
||||
|
||||
page1AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertTrue(equipmentIds.contains(e.getEquipmentId())));
|
||||
page2AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertTrue(equipmentIds.contains(e.getEquipmentId())));
|
||||
|
||||
page1AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertTrue(e.getCreatedTimestamp() > checkTimestamp));
|
||||
page2AcknowledgedEquipmentIdAndTimestamp.getItems().forEach(e -> assertTrue(e.getCreatedTimestamp() > checkTimestamp));
|
||||
|
||||
assertTrue(page3AcknowledgedEquipmentIdAndTimestamp.getContext().isLastPage());
|
||||
|
||||
//test first page of the results with empty sort order -> default sort order (by Id ascending)
|
||||
PaginationResponse<Alarm> page1EmptySort = remoteInterface.getForCustomer(customerId_1, null, null, -1, Collections.emptyList(), context);
|
||||
PaginationResponse<Alarm> page1EmptySort = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, Collections.emptyList(), context);
|
||||
assertEquals(10, page1EmptySort.getItems().size());
|
||||
|
||||
List<String> expectedPage1EmptySortStrings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
@@ -303,7 +398,7 @@ public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
assertEquals(expectedPage1EmptySortStrings, actualPage1EmptySortStrings);
|
||||
|
||||
//test first page of the results with null sort order -> default sort order (by Id ascending)
|
||||
PaginationResponse<Alarm> page1NullSort = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, context);
|
||||
PaginationResponse<Alarm> page1NullSort = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, null, context);
|
||||
assertEquals(10, page1NullSort.getItems().size());
|
||||
|
||||
List<String> expectedPage1NullSortStrings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
@@ -314,7 +409,7 @@ public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
|
||||
|
||||
//test first page of the results with sort descending order by a equipmentId property
|
||||
PaginationResponse<Alarm> page1SingleSortDesc = remoteInterface.getForCustomer(customerId_1, null, null, -1, Collections.singletonList(new ColumnAndSort("equipmentId", SortOrder.desc)), context);
|
||||
PaginationResponse<Alarm> page1SingleSortDesc = remoteInterface.getForCustomer(customerId_1, null, null, -1, null, Collections.singletonList(new ColumnAndSort("equipmentId", SortOrder.desc)), context);
|
||||
assertEquals(10, page1SingleSortDesc.getItems().size());
|
||||
|
||||
List<String> expectedPage1SingleSortDescStrings = new ArrayList< >(Arrays.asList(new String[]{"qr_49", "qr_48", "qr_47", "qr_46", "qr_45", "qr_44", "qr_43", "qr_42", "qr_41", "qr_40" }));
|
||||
@@ -326,13 +421,13 @@ public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
//test with explicit list of equipmentIds and explicit list of AlarmCodes
|
||||
long createdAfterTs = pastTimestamp + 10;
|
||||
context = new PaginationContext<>(10);
|
||||
page1 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, context);
|
||||
page2 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page1.getContext());
|
||||
page3 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page2.getContext());
|
||||
page4 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page3.getContext());
|
||||
page5 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page4.getContext());
|
||||
page6 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page5.getContext());
|
||||
page7 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, sortBy, page6.getContext());
|
||||
page1 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, context);
|
||||
page2 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page1.getContext());
|
||||
page3 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page2.getContext());
|
||||
page4 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page3.getContext());
|
||||
page5 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page4.getContext());
|
||||
page6 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page5.getContext());
|
||||
page7 = remoteInterface.getForCustomer(customerId_1, equipmentIds, alarmCodes, createdAfterTs, null, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
@@ -350,10 +445,59 @@ public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
|
||||
//test with explicit list of equipmentIds of one element and explicit list of AlarmCodes of one element
|
||||
context = new PaginationContext<>(10);
|
||||
page1 = remoteInterface.getForCustomer(customerId_1, Collections.singleton(equipmentIds.iterator().next()), Collections.singleton(AlarmCode.AccessPointIsUnreachable), -1, sortBy, context);
|
||||
page1 = remoteInterface.getForCustomer(customerId_1, Collections.singleton(equipmentIds.iterator().next()), Collections.singleton(AlarmCode.AccessPointIsUnreachable), -1, null, sortBy, context);
|
||||
assertEquals(1, page1.getItems().size());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlarmAcknowledgedPaginationWithUpdate() {
|
||||
Alarm alarm = createAlarmObject();
|
||||
|
||||
//create
|
||||
Alarm created = remoteInterface.create(alarm);
|
||||
assertNotNull(created);
|
||||
assertEquals(alarm.getCustomerId(), created.getCustomerId());
|
||||
assertEquals(alarm.getEquipmentId(), created.getEquipmentId());
|
||||
assertEquals(alarm.getAlarmCode(), created.getAlarmCode());
|
||||
assertEquals(alarm.getCreatedTimestamp(), created.getCreatedTimestamp());
|
||||
assertNotNull(created.getDetails());
|
||||
assertEquals(alarm.getDetails(), created.getDetails());
|
||||
|
||||
List<ColumnAndSort> sortBy = new ArrayList<>();
|
||||
sortBy.addAll(Arrays.asList(new ColumnAndSort("equipmentId")));
|
||||
PaginationContext<Alarm> context = new PaginationContext<>(10);
|
||||
|
||||
PaginationResponse<Alarm> page1CheckFalse = remoteInterface.getForCustomer(created.getCustomerId(), null, null, -1, false, sortBy, context);
|
||||
|
||||
assertEquals(1, page1CheckFalse.getItems().size());
|
||||
page1CheckFalse.getItems().forEach(e -> assertFalse(e.isAcknowledged()));
|
||||
|
||||
PaginationResponse<Alarm> page1CheckTrue = remoteInterface.getForCustomer(created.getCustomerId(), null, null, -1, true, sortBy, context);
|
||||
|
||||
assertEquals(0, page1CheckTrue.getItems().size());
|
||||
|
||||
// update
|
||||
created.setAcknowledged(true);
|
||||
Alarm updated = remoteInterface.update(created);
|
||||
assertNotNull(updated);
|
||||
assertTrue(updated.isAcknowledged());
|
||||
|
||||
page1CheckFalse = remoteInterface.getForCustomer(created.getCustomerId(), null, null, -1, false, sortBy, context);
|
||||
|
||||
assertEquals(0, page1CheckFalse.getItems().size());
|
||||
|
||||
page1CheckTrue = remoteInterface.getForCustomer(created.getCustomerId(), null, null, -1, true, sortBy, context);
|
||||
|
||||
assertEquals(1, page1CheckTrue.getItems().size());
|
||||
page1CheckTrue.getItems().forEach(e -> assertTrue(e.isAcknowledged()));
|
||||
|
||||
//delete
|
||||
created = remoteInterface.delete(created.getCustomerId(), created.getEquipmentId(), created.getAlarmCode(), created.getCreatedTimestamp());
|
||||
assertNotNull(created);
|
||||
created = remoteInterface.getOrNull(created.getCustomerId(), created.getEquipmentId(), created.getAlarmCode(), created.getCreatedTimestamp());
|
||||
assertNull(created);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,29 +15,29 @@
|
||||
<dependency>
|
||||
<artifactId>base-container</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -123,10 +123,11 @@ public class AlarmController {
|
||||
|
||||
@RequestMapping(value = "/forCustomer", method = RequestMethod.GET)
|
||||
public PaginationResponse<Alarm> getForCustomer(@RequestParam int customerId,
|
||||
@RequestParam Set<Long> equipmentIdSet,
|
||||
@RequestParam Set<AlarmCode> alarmCodeSet,
|
||||
@RequestParam long createdAfterTimestamp,
|
||||
@RequestParam List<ColumnAndSort> sortBy,
|
||||
@RequestParam(required = false) Set<Long> equipmentIdSet,
|
||||
@RequestParam(required = false) Set<AlarmCode> alarmCodeSet,
|
||||
@RequestParam(required = false) long createdAfterTimestamp,
|
||||
@RequestParam(required = false) Boolean acknowledged,
|
||||
@RequestParam(required = false) List<ColumnAndSort> sortBy,
|
||||
@RequestParam(required = false) PaginationContext<Alarm> paginationContext) {
|
||||
|
||||
if(paginationContext == null) {
|
||||
@@ -148,7 +149,7 @@ public class AlarmController {
|
||||
}
|
||||
|
||||
PaginationResponse<Alarm> onePage = this.alarmDatastore
|
||||
.getForCustomer(customerId, equipmentIdSet, alarmCodeSet, createdAfterTimestamp, sortBy, paginationContext);
|
||||
.getForCustomer(customerId, equipmentIdSet, alarmCodeSet, createdAfterTimestamp, acknowledged, sortBy, paginationContext);
|
||||
ret.setContext(onePage.getContext());
|
||||
ret.getItems().addAll(onePage.getItems());
|
||||
|
||||
|
||||
@@ -534,7 +534,7 @@ paths:
|
||||
- name: equipmentIdSet
|
||||
in: query
|
||||
description: Equipment ID Set
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
@@ -543,7 +543,7 @@ paths:
|
||||
- name: alarmCodeSet
|
||||
in: query
|
||||
description: Alarm Code Set
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
@@ -551,14 +551,20 @@ paths:
|
||||
- name: createdAfterTimestamp
|
||||
in: query
|
||||
description: Created After Timestamp
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
- name: acknowledged
|
||||
in: query
|
||||
description: Acknowledged flag
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
- name: sortBy
|
||||
in: query
|
||||
description: sort options
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
<artifactId>all-cloud-and-opensync-gw-in-one-docker</artifactId>
|
||||
@@ -22,7 +22,7 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>all-cloud-and-opensync-gw-in-one-process</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -48,5 +48,4 @@ RUN chmod +x /app/run.sh
|
||||
EXPOSE 1883 6640 6643 4043 4044
|
||||
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["/app/run.sh"]
|
||||
CMD [""]
|
||||
CMD ["/app/run.sh"]
|
||||
|
||||
@@ -1,221 +1,469 @@
|
||||
{
|
||||
"model_type": "Equipment",
|
||||
"id": 51,
|
||||
"customerId": 2,
|
||||
"profileId": 12,
|
||||
"locationId": 8,
|
||||
"equipmentType": "AP",
|
||||
"inventoryId": "Test_Client_21P10C68818122",
|
||||
"name": "Test_Client_21P10C68818122",
|
||||
"details": {
|
||||
"model_type": "ApElementConfiguration",
|
||||
"equipmentModel": "EA8300-CA",
|
||||
"elementConfigVersion": "AP-V1",
|
||||
"model_type": "Equipment",
|
||||
"id": 1,
|
||||
"customerId": 2,
|
||||
"profileId": 8,
|
||||
"locationId": 8,
|
||||
"equipmentType": "AP",
|
||||
"deviceMode": "standaloneAP",
|
||||
"gettingIP": "dhcp",
|
||||
"staticIP": null,
|
||||
"staticIpMaskCidr": null,
|
||||
"staticIpGw": null,
|
||||
"gettingDNS": "dhcp",
|
||||
"staticDnsIp1": null,
|
||||
"staticDnsIp2": null,
|
||||
"peerInfoList": [],
|
||||
"deviceName": "Default Device Name",
|
||||
"locationData": null,
|
||||
"locallyConfiguredMgmtVlan": 0,
|
||||
"locallyConfigured": false,
|
||||
"deploymentType": "CEILING",
|
||||
"syntheticClientEnabled": null,
|
||||
"frameReportThrottleEnabled": true,
|
||||
"antennaType": "OMNI",
|
||||
"costSavingEventsEnabled": true,
|
||||
"forwardMode": "BRIDGE",
|
||||
"radioMap": {
|
||||
"is2dot4GHz": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is2dot4GHz",
|
||||
"channelNumber": 6,
|
||||
"manualChannelNumber": 6,
|
||||
"backupChannelNumber": 11,
|
||||
"bannedChannels": [],
|
||||
"allowedChannels": [],
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
"inventoryId": "Open_AP_21P10C68818122",
|
||||
"name": "Open_AP_21P10C68818122",
|
||||
"details": {
|
||||
"model_type": "ApElementConfiguration",
|
||||
"equipmentModel": "EA8300-CA",
|
||||
"elementConfigVersion": "AP-V1",
|
||||
"equipmentType": "AP",
|
||||
"deviceMode": "standaloneAP",
|
||||
"gettingIP": "dhcp",
|
||||
"staticIP": null,
|
||||
"staticIpMaskCidr": null,
|
||||
"staticIpGw": null,
|
||||
"gettingDNS": "dhcp",
|
||||
"staticDnsIp1": null,
|
||||
"staticDnsIp2": null,
|
||||
"peerInfoList": [],
|
||||
"deviceName": "Open_AP_21P10C68818122",
|
||||
"locationData": null,
|
||||
"locallyConfiguredMgmtVlan": 0,
|
||||
"locallyConfigured": false,
|
||||
"deploymentType": "CEILING",
|
||||
"syntheticClientEnabled": null,
|
||||
"frameReportThrottleEnabled": true,
|
||||
"antennaType": "OMNI",
|
||||
"costSavingEventsEnabled": true,
|
||||
"forwardMode": "BRIDGE",
|
||||
"radioMap": {
|
||||
"is5GHzU": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is5GHzU",
|
||||
"channelNumber": 149,
|
||||
"manualChannelNumber": 149,
|
||||
"backupChannelNumber": 154,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": 18
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 161,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 100,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 132,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 165,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 104,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 136,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 108,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 140,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 112,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 144,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 116,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 149,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 153,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 157,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is2dot4GHz",
|
||||
"channelNumber": 6,
|
||||
"manualChannelNumber": 6,
|
||||
"backupChannelNumber": 11,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": 18
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 1,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 2,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 3,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 4,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 5,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 6,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 7,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 8,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 9,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 10,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 11,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
}
|
||||
]
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is5GHzL",
|
||||
"channelNumber": 36,
|
||||
"manualChannelNumber": 36,
|
||||
"backupChannelNumber": 44,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": 18
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 52,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 36,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 56,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 40,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 60,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 44,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 64,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 48,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": 32
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [],
|
||||
"activeChannel": 6
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is5GHzU",
|
||||
"channelNumber": 149,
|
||||
"manualChannelNumber": 149,
|
||||
"backupChannelNumber": 154,
|
||||
"bannedChannels": [],
|
||||
"allowedChannels": [],
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": 32
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [],
|
||||
"activeChannel": 149
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is5GHzL",
|
||||
"channelNumber": 36,
|
||||
"manualChannelNumber": 36,
|
||||
"backupChannelNumber": 44,
|
||||
"bannedChannels": [],
|
||||
"allowedChannels": [],
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": 32
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [],
|
||||
"activeChannel": 36
|
||||
}
|
||||
"advancedRadioMap": {
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is2dot4GHz",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"multicastRate": {
|
||||
"model_type": "SourceSelectionMulticast",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "manual",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 20,
|
||||
"minLoadFactor": 50
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"dtimPeriod": 2,
|
||||
"deauthAttackDetection": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is5GHzU",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"multicastRate": {
|
||||
"model_type": "SourceSelectionMulticast",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "manual",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"dtimPeriod": 2,
|
||||
"deauthAttackDetection": null
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is5GHzL",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"multicastRate": {
|
||||
"model_type": "SourceSelectionMulticast",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "manual",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"dtimPeriod": 2,
|
||||
"deauthAttackDetection": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"advancedRadioMap": {
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is2dot4GHz",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "auto",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "auto",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"deauthAttackDetection": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is5GHzU",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "auto",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "auto",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"deauthAttackDetection": null
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is5GHzL",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "auto",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "auto",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"deauthAttackDetection": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"latitude": null,
|
||||
"longitude": null,
|
||||
"serial": "21P10C68818122",
|
||||
"createdTimestamp": 1591653239821,
|
||||
"lastModifiedTimestamp": 1591653241398
|
||||
}
|
||||
"latitude": null,
|
||||
"longitude": null,
|
||||
"baseMacAddress": {
|
||||
"model_type": "MacAddress",
|
||||
"address": "JPWi7y5T",
|
||||
"addressAsString": "24:f5:a2:ef:2e:53"
|
||||
},
|
||||
"serial": "21P10C68818122",
|
||||
"createdTimestamp": 1612285288821,
|
||||
"lastModifiedTimestamp": 1612285293922
|
||||
}
|
||||
@@ -1,60 +1,61 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 8,
|
||||
"parentId" : 0,
|
||||
"locationType" : "SITE",
|
||||
"customerId" : 2,
|
||||
"name" : "Ottawa",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "ca",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyActivityDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1590607043540,
|
||||
"lastModifiedTimestamp" : 1590607043540
|
||||
"model_type": "Location",
|
||||
"id": 8,
|
||||
"parentId": 0,
|
||||
"locationType": "SITE",
|
||||
"customerId": 2,
|
||||
"name": "Ottawa",
|
||||
"details": {
|
||||
"model_type": "LocationDetails",
|
||||
"countryCode": "CA",
|
||||
"dailyActivityDetails": {
|
||||
"SUNDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"MONDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"TUESDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"WEDNESDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"THURSDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"FRIDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"SATURDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
}
|
||||
},
|
||||
"maintenanceWindow": null,
|
||||
"rrmEnabled": true,
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"createdTimestamp": 1612285243534,
|
||||
"lastModifiedTimestamp": 1612285243534
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 12,
|
||||
"id": 8,
|
||||
"customerId": 2,
|
||||
"profileType": "equipment_ap",
|
||||
"name": "ApProfile-3-radios",
|
||||
@@ -20,11 +20,6 @@
|
||||
"syntheticClientEnabled": true,
|
||||
"ledControlEnabled": true,
|
||||
"equipmentDiscovery": false,
|
||||
"greTunnelName": null,
|
||||
"greParentIfName": null,
|
||||
"greLocalInetAddr": null,
|
||||
"greRemoteInetAddr": null,
|
||||
"greRemoteMacAddr": null,
|
||||
"radioMap": {
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioProfileConfiguration",
|
||||
@@ -42,15 +37,22 @@
|
||||
"bestAPSteerType": "both"
|
||||
}
|
||||
},
|
||||
"greTunnelConfigurations": [
|
||||
{
|
||||
"model_type": "GreTunnelConfiguration",
|
||||
"greTunnelName": "gre1",
|
||||
"greRemoteInetAddr": "192.168.1.101",
|
||||
"vlanIdsInGreTunnel": [
|
||||
100
|
||||
]
|
||||
}
|
||||
],
|
||||
"profileType": "equipment_ap"
|
||||
},
|
||||
"createdTimestamp": 1606778369934,
|
||||
"lastModifiedTimestamp": 1606778443413,
|
||||
"createdTimestamp": 1612285248925,
|
||||
"lastModifiedTimestamp": 1612285628377,
|
||||
"childProfileIds": [
|
||||
16,
|
||||
5,
|
||||
10,
|
||||
11,
|
||||
15
|
||||
2,
|
||||
4
|
||||
]
|
||||
}
|
||||
@@ -1,135 +1,58 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 14,
|
||||
"id": 5,
|
||||
"customerId": 2,
|
||||
"profileType": "captive_portal",
|
||||
"name": "Captive-portal",
|
||||
"details": {
|
||||
"model_type": "CaptivePortalConfiguration",
|
||||
"name": "Captive-portal",
|
||||
"browserTitle": "Access the network as Guest",
|
||||
"headerContent": "Captive Portal",
|
||||
"userAcceptancePolicy": "Use this network at your own risk. No warranty of any kind.",
|
||||
"successPageMarkdownText": "Welcome to the network",
|
||||
"redirectURL": "",
|
||||
"externalCaptivePortalURL": null,
|
||||
"sessionTimeoutInMinutes": 60,
|
||||
"logoFile": null,
|
||||
"backgroundFile": null,
|
||||
"walledGardenAllowlist": [],
|
||||
"usernamePasswordFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "userList",
|
||||
"fileCategory": "UsernamePasswordList",
|
||||
"fileType": "TEXT",
|
||||
"altSlot": true
|
||||
},
|
||||
"authenticationType": "guest",
|
||||
"radiusAuthMethod": "CHAP",
|
||||
"maxUsersWithSameCredentials": 42,
|
||||
"externalPolicyFile": null,
|
||||
"backgroundPosition": "left_top",
|
||||
"backgroundRepeat": "no_repeat",
|
||||
"radiusServiceName": null,
|
||||
"expiryType": "unlimited",
|
||||
"userList": [
|
||||
{
|
||||
"model_type": "TimedAccessUserRecord",
|
||||
"username": "customer",
|
||||
"password": "testing123",
|
||||
"activationTime": 1602183994956,
|
||||
"expirationTime": 1602212794956,
|
||||
"numDevices": 1,
|
||||
"userDetails": {
|
||||
"model_type": "TimedAccessUserDetails",
|
||||
"firstName": "Pac",
|
||||
"lastName": "Man",
|
||||
"passwordNeedsReset": false
|
||||
},
|
||||
"userMacAddresses": [
|
||||
{
|
||||
"model_type": "MacAddress",
|
||||
"address": "fKtg5upO",
|
||||
"addressAsString": "7c:ab:60:e6:ea:4e"
|
||||
}
|
||||
],
|
||||
"lastModifiedTimestamp": 0
|
||||
},
|
||||
{
|
||||
"model_type": "TimedAccessUserRecord",
|
||||
"username": "customer",
|
||||
"password": "testing123",
|
||||
"activationTime": 1602183994957,
|
||||
"expirationTime": 1602187594957,
|
||||
"numDevices": 0,
|
||||
"userDetails": {
|
||||
"model_type": "TimedAccessUserDetails",
|
||||
"firstName": "Q",
|
||||
"lastName": "Bert",
|
||||
"passwordNeedsReset": false
|
||||
},
|
||||
"userMacAddresses": [
|
||||
{
|
||||
"model_type": "MacAddress",
|
||||
"address": "wJrQdqho",
|
||||
"addressAsString": "c0:9a:d0:76:a8:68"
|
||||
}
|
||||
],
|
||||
"lastModifiedTimestamp": 0
|
||||
},
|
||||
{
|
||||
"model_type": "TimedAccessUserRecord",
|
||||
"username": "customer2",
|
||||
"password": "testing1234",
|
||||
"activationTime": 1602183994957,
|
||||
"expirationTime": 1602788794957,
|
||||
"numDevices": 1,
|
||||
"userDetails": {
|
||||
"model_type": "TimedAccessUserDetails",
|
||||
"firstName": "Duke",
|
||||
"lastName": "Nukem",
|
||||
"passwordNeedsReset": false
|
||||
},
|
||||
"userMacAddresses": [
|
||||
{
|
||||
"model_type": "MacAddress",
|
||||
"address": "fKtg5upN",
|
||||
"addressAsString": "7c:ab:60:e6:ea:4d"
|
||||
}
|
||||
],
|
||||
"lastModifiedTimestamp": 0
|
||||
},
|
||||
{
|
||||
"model_type": "TimedAccessUserRecord",
|
||||
"username": "customer2",
|
||||
"password": "testing1234",
|
||||
"activationTime": 1602183994957,
|
||||
"expirationTime": 1602270394957,
|
||||
"numDevices": 0,
|
||||
"userDetails": {
|
||||
"model_type": "TimedAccessUserDetails",
|
||||
"firstName": "Missile",
|
||||
"lastName": "Commander",
|
||||
"passwordNeedsReset": false
|
||||
},
|
||||
"userMacAddresses": [
|
||||
{
|
||||
"model_type": "MacAddress",
|
||||
"address": "wJrQdqhj",
|
||||
"addressAsString": "c0:9a:d0:76:a8:63"
|
||||
}
|
||||
],
|
||||
"lastModifiedTimestamp": 0
|
||||
}
|
||||
],
|
||||
"macAllowList": [],
|
||||
"profileType": "captive_portal"
|
||||
"model_type": "CaptivePortalConfiguration",
|
||||
"name": "Default",
|
||||
"browserTitle": "Captive-portal",
|
||||
"headerContent": "Captive Portal",
|
||||
"userAcceptancePolicy": "Please agree to the following terms for using this network:",
|
||||
"successPageMarkdownText": "You are now authorized and connected to the network.",
|
||||
"redirectURL": "https://www.google.com",
|
||||
"externalCaptivePortalURL": null,
|
||||
"sessionTimeoutInMinutes": 10,
|
||||
"logoFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "/filestore/tip-logo-mobile",
|
||||
"fileCategory": "CaptivePortalLogo",
|
||||
"fileType": "PNG",
|
||||
"altSlot": false
|
||||
},
|
||||
"backgroundFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "/filestore/tip-logo",
|
||||
"fileCategory": "CaptivePortalBackground",
|
||||
"fileType": "PNG",
|
||||
"altSlot": false
|
||||
},
|
||||
"walledGardenAllowlist": [
|
||||
],
|
||||
"usernamePasswordFile": null,
|
||||
"authenticationType": "guest",
|
||||
"radiusAuthMethod": "CHAP",
|
||||
"maxUsersWithSameCredentials": 3,
|
||||
"externalPolicyFile": null,
|
||||
"backgroundPosition": "left_top",
|
||||
"backgroundRepeat": "no_repeat",
|
||||
"radiusServiceId": 0,
|
||||
"expiryType": "time_limited",
|
||||
"userList": [
|
||||
],
|
||||
"macAllowList": [
|
||||
],
|
||||
"profileType": "captive_portal"
|
||||
},
|
||||
"createdTimestamp": 1602183994959,
|
||||
"lastModifiedTimestamp": 1602183994959,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
"createdTimestamp": 1611857459118,
|
||||
"lastModifiedTimestamp": 1611857459118,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,71 +1,71 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 24,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint",
|
||||
"name": "TipWlan-Passpoint-Config",
|
||||
"details": {
|
||||
"model_type": "PasspointProfile",
|
||||
"enableInterworkingAndHs20": true,
|
||||
"hessid": null,
|
||||
"passpointAccessNetworkType": "free_public_network",
|
||||
"passpointNetworkAuthenticationType": "acceptance_of_terms_and_conditions",
|
||||
"additionalStepsRequiredForAccess": 0,
|
||||
"deauthRequestTimeout": 0,
|
||||
"operatingClass": 0,
|
||||
"termsAndConditionsFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "https://localhost:9091/filestore/termsAndConditions",
|
||||
"fileCategory": "ExternalPolicyConfiguration",
|
||||
"fileType": "TEXT",
|
||||
"altSlot": false
|
||||
},
|
||||
"whitelistDomain": null,
|
||||
"emergencyServicesReachable": true,
|
||||
"unauthenticatedEmergencyServiceAccessible": false,
|
||||
"internetConnectivity": true,
|
||||
"connectionCapabilitySet": [
|
||||
{
|
||||
"model_type": "PasspointConnectionCapability",
|
||||
"connectionCapabilitiesPortNumber": 8888,
|
||||
"connectionCapabilitiesStatus": "open",
|
||||
"connectionCapabilitiesIpProtocol": "TCP"
|
||||
}
|
||||
],
|
||||
"ipAddressTypeAvailability": "public_IPv4_address_available",
|
||||
"qosMapSetConfiguration": null,
|
||||
"apGeospatialLocation": null,
|
||||
"apCivicLocation": null,
|
||||
"apPublicLocationIdUri": null,
|
||||
"gasAddr3Behaviour": "p2pSpecWorkaroundFromRequest",
|
||||
"anqpDomainId": 1234,
|
||||
"disableDownstreamGroupAddressedForwarding": false,
|
||||
"enable2pt4GHz": true,
|
||||
"enable5GHz": true,
|
||||
"associatedAccessSsidProfileIds": [
|
||||
15
|
||||
],
|
||||
"osuSsidProfileId": 16,
|
||||
"passpointOperatorProfileId": 17,
|
||||
"passpointVenueProfileId": 18,
|
||||
"passpointOsuProviderProfileIds": [
|
||||
19,
|
||||
20
|
||||
],
|
||||
"accessNetworkType": "free_public_network",
|
||||
"networkAuthenticationType": "acceptance_of_terms_and_conditions",
|
||||
"profileType": "passpoint"
|
||||
},
|
||||
"createdTimestamp": 1606778370807,
|
||||
"lastModifiedTimestamp": 1606778370807,
|
||||
"childProfileIds": [
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20
|
||||
]
|
||||
}
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 37,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint",
|
||||
"name": "hotspot20-profile-2021-01-21T21:28:59.171Z",
|
||||
"details": {
|
||||
"model_type": "PasspointProfile",
|
||||
"enableInterworkingAndHs20": true,
|
||||
"hessid": null,
|
||||
"passpointAccessNetworkType": "free_public_network",
|
||||
"passpointNetworkAuthenticationType": "acceptance_of_terms_and_conditions",
|
||||
"additionalStepsRequiredForAccess": 0,
|
||||
"deauthRequestTimeout": 0,
|
||||
"operatingClass": 0,
|
||||
"termsAndConditionsFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "https://localhost:9091/filestore/termsAndConditions",
|
||||
"fileCategory": "ExternalPolicyConfiguration",
|
||||
"fileType": "TEXT",
|
||||
"altSlot": false
|
||||
},
|
||||
"whitelistDomain": null,
|
||||
"emergencyServicesReachable": true,
|
||||
"unauthenticatedEmergencyServiceAccessible": false,
|
||||
"internetConnectivity": true,
|
||||
"connectionCapabilitySet": [
|
||||
{
|
||||
"model_type": "PasspointConnectionCapability",
|
||||
"connectionCapabilitiesPortNumber": 8888,
|
||||
"connectionCapabilitiesIpProtocol": "TCP",
|
||||
"connectionCapabilitiesStatus": "open"
|
||||
}
|
||||
],
|
||||
"ipAddressTypeAvailability": "public_IPv4_address_available",
|
||||
"qosMapSetConfiguration": null,
|
||||
"apGeospatialLocation": null,
|
||||
"apCivicLocation": null,
|
||||
"apPublicLocationIdUri": null,
|
||||
"gasAddr3Behaviour": "p2pSpecWorkaroundFromRequest",
|
||||
"anqpDomainId": 1234,
|
||||
"disableDownstreamGroupAddressedForwarding": false,
|
||||
"enable2pt4GHz": true,
|
||||
"enable5GHz": true,
|
||||
"associatedAccessSsidProfileIds": [
|
||||
32
|
||||
],
|
||||
"osuSsidProfileId": 31,
|
||||
"passpointOperatorProfileId": 34,
|
||||
"passpointVenueProfileId": 33,
|
||||
"passpointOsuProviderProfileIds": [
|
||||
35,
|
||||
36
|
||||
],
|
||||
"accessNetworkType": "free_public_network",
|
||||
"networkAuthenticationType": "acceptance_of_terms_and_conditions",
|
||||
"profileType": "passpoint"
|
||||
},
|
||||
"createdTimestamp": 0,
|
||||
"lastModifiedTimestamp": 1611264539331,
|
||||
"childProfileIds": [
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,270 +1,263 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 19,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_osu_id_provider",
|
||||
"name": "TipWlan-Passpoint-OSU-Provider",
|
||||
"details": {
|
||||
"model_type": "PasspointOsuProviderProfile",
|
||||
"domainName": "rogers.com",
|
||||
"mccMncList": [
|
||||
{
|
||||
"model_type": "PasspointMccMnc",
|
||||
"mcc": 302,
|
||||
"mnc": 720,
|
||||
"iso": "ca",
|
||||
"country": "Canada",
|
||||
"countryCode": 1,
|
||||
"network": "Rogers AT&T Wireless",
|
||||
"mccMncPairing": "302,720"
|
||||
}
|
||||
],
|
||||
"naiRealmList": [
|
||||
{
|
||||
"model_type": "PasspointNaiRealmInformation",
|
||||
"naiRealms": [
|
||||
"rogers.com"
|
||||
],
|
||||
"encoding": 0,
|
||||
"eapMethods": [
|
||||
"EAP-TTLS with username/password",
|
||||
"EAP-TLS with certificate"
|
||||
],
|
||||
"eapMap": {
|
||||
"EAP-TTLS with username/password": [
|
||||
"Credential Type:username/password",
|
||||
"Non-EAP Inner Authentication Type:MSCHAPV2"
|
||||
],
|
||||
"EAP-TLS with certificate": [
|
||||
"Credential Type:Certificate"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"osuIconList": [
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_CA",
|
||||
"iconName": "icon32eng",
|
||||
"filePath": "/tmp/icon32eng.png",
|
||||
"imageUrl": "https://localhost:9096/icon32eng.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32eng:/tmp/icon32eng.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "fra",
|
||||
"iconLocale": "fr_CA",
|
||||
"iconName": "icon32fra",
|
||||
"filePath": "/tmp/icon32fra.png",
|
||||
"imageUrl": "https://localhost:9096/icon32fra.png",
|
||||
"hs20IconString": "32:32:fra:image/png:icon32fra:/tmp/icon32fra.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_US",
|
||||
"iconName": "icon32usa",
|
||||
"filePath": "/tmp/icon32usa.png",
|
||||
"imageUrl": "https://localhost:9096/icon32usa.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32usa:/tmp/icon32usa.png"
|
||||
}
|
||||
],
|
||||
"osuServerUri": "https://example.com/osu/rogers",
|
||||
"osuFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example provider rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example provider rogers"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de fournisseur rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemple de fournisseur rogers"
|
||||
}
|
||||
],
|
||||
"osuNaiStandalone": "anonymous@rogers.com",
|
||||
"osuNaiShared": "anonymous@rogers.com",
|
||||
"osuMethodList": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"osuServiceDescription": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example services rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example services rogers"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemples de services rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemples de services rogers"
|
||||
}
|
||||
],
|
||||
"roamingOi": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
],
|
||||
"profileType": "passpoint_osu_id_provider"
|
||||
},
|
||||
"createdTimestamp": 1606778370345,
|
||||
"lastModifiedTimestamp": 1606778370345,
|
||||
"childProfileIds": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 20,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_osu_id_provider",
|
||||
"name": "TipWlan-Passpoint-OSU-Provider-2",
|
||||
"details": {
|
||||
"model_type": "PasspointOsuProviderProfile",
|
||||
"domainName": "telus.com",
|
||||
"mccMncList": [
|
||||
{
|
||||
"model_type": "PasspointMccMnc",
|
||||
"mcc": 302,
|
||||
"mnc": 220,
|
||||
"iso": "ca",
|
||||
"country": "Canada",
|
||||
"countryCode": 1,
|
||||
"network": "Telus Mobility",
|
||||
"mccMncPairing": "302,220"
|
||||
}
|
||||
],
|
||||
"naiRealmList": [
|
||||
{
|
||||
"model_type": "PasspointNaiRealmInformation",
|
||||
"naiRealms": [
|
||||
"telus.com"
|
||||
],
|
||||
"encoding": 0,
|
||||
"eapMethods": [
|
||||
"EAP-TTLS with username/password",
|
||||
"EAP-TLS with certificate"
|
||||
],
|
||||
"eapMap": {
|
||||
"EAP-TTLS with username/password": [
|
||||
"Credential Type:username/password",
|
||||
"Non-EAP Inner Authentication Type:MSCHAPV2"
|
||||
],
|
||||
"EAP-TLS with certificate": [
|
||||
"Credential Type:Certificate"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"osuIconList": [
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_CA",
|
||||
"iconName": "icon32eng",
|
||||
"filePath": "/tmp/icon32eng.png",
|
||||
"imageUrl": "https://localhost:9096/icon32eng.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32eng:/tmp/icon32eng.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "fra",
|
||||
"iconLocale": "fr_CA",
|
||||
"iconName": "icon32fra",
|
||||
"filePath": "/tmp/icon32fra.png",
|
||||
"imageUrl": "https://localhost:9096/icon32fra.png",
|
||||
"hs20IconString": "32:32:fra:image/png:icon32fra:/tmp/icon32fra.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_US",
|
||||
"iconName": "icon32usa",
|
||||
"filePath": "/tmp/icon32usa.png",
|
||||
"imageUrl": "https://localhost:9096/icon32usa.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32usa:/tmp/icon32usa.png"
|
||||
}
|
||||
],
|
||||
"osuServerUri": "https://example.com/osu/telus",
|
||||
"osuFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example provider telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example provider telus"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de fournisseur telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemple de fournisseur telus"
|
||||
}
|
||||
],
|
||||
"osuNaiStandalone": "anonymous@telus.com",
|
||||
"osuNaiShared": "anonymous@telus.com",
|
||||
"osuMethodList": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"osuServiceDescription": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example services telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example services telus"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemples de services telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemples de services telus"
|
||||
}
|
||||
],
|
||||
"roamingOi": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
],
|
||||
"profileType": "passpoint_osu_id_provider"
|
||||
},
|
||||
"createdTimestamp": 1606778370351,
|
||||
"lastModifiedTimestamp": 1606778370351,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 35,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_osu_id_provider",
|
||||
"name": "provider1-profile-2021-01-21T21:28:59.057Z",
|
||||
"details": {
|
||||
"model_type": "PasspointOsuProviderProfile",
|
||||
"mccMncList": [
|
||||
{
|
||||
"model_type": "PasspointMccMnc",
|
||||
"mcc": 302,
|
||||
"mnc": 720,
|
||||
"iso": "ca",
|
||||
"country": "Canada",
|
||||
"countryCode": 1,
|
||||
"network": "Rogers AT&T Wireless",
|
||||
"mccMncPairing": "302,720"
|
||||
}
|
||||
],
|
||||
"naiRealmList": [
|
||||
{
|
||||
"model_type": "PasspointNaiRealmInformation",
|
||||
"naiRealms": [
|
||||
"rogers.com"
|
||||
],
|
||||
"encoding": 0,
|
||||
"eapMethods": [
|
||||
"EAP-TTLS with username/password",
|
||||
"EAP-TLS with certificate"
|
||||
],
|
||||
"eapMap": {
|
||||
"EAP-TTLS with username/password": [
|
||||
"Credential Type:username/password",
|
||||
"Non-EAP Inner Authentication Type:MSCHAPV2"
|
||||
],
|
||||
"EAP-TLS with certificate": [
|
||||
"Credential Type:Certificate"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"osuIconList": [
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_CA",
|
||||
"iconName": "icon32eng",
|
||||
"filePath": "/tmp/icon32eng.png",
|
||||
"imageUrl": "https://localhost:9096/icon32eng.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32eng:/tmp/icon32eng.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "fra",
|
||||
"iconLocale": "fr_CA",
|
||||
"iconName": "icon32fra",
|
||||
"filePath": "/tmp/icon32fra.png",
|
||||
"imageUrl": "https://localhost:9096/icon32fra.png",
|
||||
"hs20IconString": "32:32:fra:image/png:icon32fra:/tmp/icon32fra.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_US",
|
||||
"iconName": "icon32usa",
|
||||
"filePath": "/tmp/icon32usa.png",
|
||||
"imageUrl": "https://localhost:9096/icon32usa.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32usa:/tmp/icon32usa.png"
|
||||
}
|
||||
],
|
||||
"osuServerUri": "https://example.com/osu/rogers",
|
||||
"osuFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example provider rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example provider rogers"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de fournisseur rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemple de fournisseur rogers"
|
||||
}
|
||||
],
|
||||
"osuNaiStandalone": "anonymous@rogers.com",
|
||||
"osuNaiShared": "anonymous@rogers.com",
|
||||
"osuMethodList": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"osuServiceDescription": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example services rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example services rogers"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemples de services rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemples de services rogers"
|
||||
}
|
||||
],
|
||||
"roamingOi": [
|
||||
"BAA2D00100",
|
||||
"BAA2D00000"
|
||||
],
|
||||
"profileType": "passpoint_osu_id_provider"
|
||||
},
|
||||
"createdTimestamp": 1611264539070,
|
||||
"lastModifiedTimestamp": 1611264539070,
|
||||
"childProfileIds": []
|
||||
},
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 36,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_osu_id_provider",
|
||||
"name": "provider2-profile-2021-01-21T21:28:59.118Z",
|
||||
"details": {
|
||||
"model_type": "PasspointOsuProviderProfile",
|
||||
"mccMncList": [
|
||||
{
|
||||
"model_type": "PasspointMccMnc",
|
||||
"mcc": 302,
|
||||
"mnc": 220,
|
||||
"iso": "ca",
|
||||
"country": "Canada",
|
||||
"countryCode": 1,
|
||||
"network": "Telus Mobility",
|
||||
"mccMncPairing": "302,220"
|
||||
}
|
||||
],
|
||||
"naiRealmList": [
|
||||
{
|
||||
"model_type": "PasspointNaiRealmInformation",
|
||||
"naiRealms": [
|
||||
"telus.com"
|
||||
],
|
||||
"encoding": 0,
|
||||
"eapMethods": [
|
||||
"EAP-TTLS with username/password",
|
||||
"EAP-TLS with certificate"
|
||||
],
|
||||
"eapMap": {
|
||||
"EAP-TTLS with username/password": [
|
||||
"Credential Type:username/password",
|
||||
"Non-EAP Inner Authentication Type:MSCHAPV2"
|
||||
],
|
||||
"EAP-TLS with certificate": [
|
||||
"Credential Type:Certificate"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"osuIconList": [
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_CA",
|
||||
"iconName": "icon32eng",
|
||||
"filePath": "/tmp/icon32eng.png",
|
||||
"imageUrl": "https://localhost:9096/icon32eng.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32eng:/tmp/icon32eng.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "fra",
|
||||
"iconLocale": "fr_CA",
|
||||
"iconName": "icon32fra",
|
||||
"filePath": "/tmp/icon32fra.png",
|
||||
"imageUrl": "https://localhost:9096/icon32fra.png",
|
||||
"hs20IconString": "32:32:fra:image/png:icon32fra:/tmp/icon32fra.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_US",
|
||||
"iconName": "icon32usa",
|
||||
"filePath": "/tmp/icon32usa.png",
|
||||
"imageUrl": "https://localhost:9096/icon32usa.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32usa:/tmp/icon32usa.png"
|
||||
}
|
||||
],
|
||||
"osuServerUri": "https://example.com/osu/telus",
|
||||
"osuFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example provider telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example provider telus"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de fournisseur telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemple de fournisseur telus"
|
||||
}
|
||||
],
|
||||
"osuNaiStandalone": "anonymous@telus.com",
|
||||
"osuNaiShared": "anonymous@telus.com",
|
||||
"osuMethodList": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"osuServiceDescription": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example services telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example services telus"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemples de services telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemples de services telus"
|
||||
}
|
||||
],
|
||||
"roamingOi": [
|
||||
"004096",
|
||||
"005014",
|
||||
"F4F5E8F5F4"
|
||||
],
|
||||
"profileType": "passpoint_osu_id_provider"
|
||||
},
|
||||
"createdTimestamp": 1611264539131,
|
||||
"lastModifiedTimestamp": 1611264539131,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
@@ -1,37 +1,41 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 17,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_operator",
|
||||
"name": "TipWlan-Passpoint-Operator",
|
||||
"details": {
|
||||
"model_type": "PasspointOperatorProfile",
|
||||
"serverOnlyAuthenticatedL2EncryptionNetwork": false,
|
||||
"x509CertificateLocation": "/etc/ca.pem",
|
||||
"operatorFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Default friendly passpoint_operator name",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Default friendly passpoint_operator name"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Nom de l'opérateur convivial par défaut",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Nom de l'opérateur convivial par défaut"
|
||||
}
|
||||
],
|
||||
"profileType": "passpoint_operator"
|
||||
},
|
||||
"createdTimestamp": 1606778369945,
|
||||
"lastModifiedTimestamp": 1606778369945,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 34,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_operator",
|
||||
"name": "operator-profile-2021-01-21T21:28:58.994Z",
|
||||
"details": {
|
||||
"model_type": "PasspointOperatorProfile",
|
||||
"serverOnlyAuthenticatedL2EncryptionNetwork": false,
|
||||
"x509CertificateLocation": "/etc/ca.pem",
|
||||
"operatorFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Nom de l'opérateur convivial par défaut",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Nom de l'opérateur convivial par défaut"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Default friendly passpoint_operator name",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Default friendly passpoint_operator name"
|
||||
}
|
||||
],
|
||||
"domainNameList": [
|
||||
"bell.ca",
|
||||
"telus.com",
|
||||
"rogers.com"
|
||||
],
|
||||
"profileType": "passpoint_operator"
|
||||
},
|
||||
"createdTimestamp": 1611264539004,
|
||||
"lastModifiedTimestamp": 1611264539004,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
@@ -1,34 +1,24 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 1,
|
||||
"customerId": 2,
|
||||
"profileType": "radius",
|
||||
"name": "Radius-Profile",
|
||||
"details": {
|
||||
"model_type": "RadiusProfile",
|
||||
"subnetConfiguration": null,
|
||||
"serviceRegionMap": {
|
||||
"Ottawa": {
|
||||
"model_type": "RadiusServiceRegion",
|
||||
"serverMap": {
|
||||
"Radius-Profile": [
|
||||
{
|
||||
"model_type": "RadiusServer",
|
||||
"ipAddress": "192.168.0.1",
|
||||
"secret": "testing123",
|
||||
"authPort": 1812,
|
||||
"timeout": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"regionName": "Ottawa"
|
||||
}
|
||||
},
|
||||
"profileType": "radius"
|
||||
},
|
||||
"createdTimestamp": 1601961451668,
|
||||
"lastModifiedTimestamp": 1601961451668,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 1,
|
||||
"customerId": 2,
|
||||
"profileType": "radius",
|
||||
"name": "Radius-Profile",
|
||||
"details": {
|
||||
"model_type": "RadiusProfile",
|
||||
"primaryRadiusAuthServer": {
|
||||
"model_type": "RadiusServer",
|
||||
"ipAddress": "192.168.0.1",
|
||||
"secret": "testing123",
|
||||
"port": 1812,
|
||||
"timeout": null
|
||||
},
|
||||
"profileType": "radius"
|
||||
},
|
||||
"createdTimestamp": 1611262628767,
|
||||
"lastModifiedTimestamp": 1611262628767,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 11,
|
||||
"id": 4,
|
||||
"customerId": 2,
|
||||
"profileType": "rf",
|
||||
"name": "TipWlan-rf",
|
||||
@@ -198,7 +198,7 @@
|
||||
},
|
||||
"profileType": "rf"
|
||||
},
|
||||
"createdTimestamp": 1606778369933,
|
||||
"lastModifiedTimestamp": 1606778369933,
|
||||
"createdTimestamp": 1612285248650,
|
||||
"lastModifiedTimestamp": 1612285248650,
|
||||
"childProfileIds": []
|
||||
}
|
||||
@@ -1,203 +1,75 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 5,
|
||||
"customerId": 2,
|
||||
"profileType": "ssid",
|
||||
"name": "TipWlan-cloud-3-radios",
|
||||
"details": {
|
||||
"model_type": "SsidConfiguration",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"appliedRadios": [
|
||||
"is5GHzL",
|
||||
"is2dot4GHz",
|
||||
"is5GHzU"
|
||||
],
|
||||
"ssidAdminState": "enabled",
|
||||
"secureMode": "wpa2OnlyPSK",
|
||||
"vlanId": 1,
|
||||
"keyStr": "openwifi",
|
||||
"broadcastSsid": "enabled",
|
||||
"keyRefresh": 0,
|
||||
"noLocalSubnets": false,
|
||||
"radiusServiceName": null,
|
||||
"radiusAccountingServiceName": null,
|
||||
"radiusAcountingServiceInterval": null,
|
||||
"captivePortalId": null,
|
||||
"bandwidthLimitDown": 0,
|
||||
"bandwidthLimitUp": 0,
|
||||
"clientBandwidthLimitDown": 0,
|
||||
"clientBandwidthLimitUp": 0,
|
||||
"videoTrafficOnly": false,
|
||||
"radioBasedConfigs": {
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId": null,
|
||||
"enable80211w": null,
|
||||
"wepConfig": null,
|
||||
"forwardMode": "BRIDGE",
|
||||
"profileType": "ssid"
|
||||
},
|
||||
"createdTimestamp": 1606778369598,
|
||||
"lastModifiedTimestamp": 1606778369598,
|
||||
"childProfileIds": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 15,
|
||||
"customerId": 2,
|
||||
"profileType": "ssid",
|
||||
"name": "TipWlan-cloud-passpoint-access",
|
||||
"details": {
|
||||
"model_type": "SsidConfiguration",
|
||||
"ssid": "TipWlan-cloud-passpoint-access",
|
||||
"appliedRadios": [
|
||||
"is5GHzL",
|
||||
"is5GHzU"
|
||||
],
|
||||
"ssidAdminState": "enabled",
|
||||
"secureMode": "wpa2PSK",
|
||||
"vlanId": 1,
|
||||
"keyStr": "testing123",
|
||||
"broadcastSsid": "enabled",
|
||||
"keyRefresh": 0,
|
||||
"noLocalSubnets": false,
|
||||
"radiusServiceName": null,
|
||||
"radiusAccountingServiceName": null,
|
||||
"radiusAcountingServiceInterval": null,
|
||||
"captivePortalId": null,
|
||||
"bandwidthLimitDown": 0,
|
||||
"bandwidthLimitUp": 0,
|
||||
"clientBandwidthLimitDown": 0,
|
||||
"clientBandwidthLimitUp": 0,
|
||||
"videoTrafficOnly": false,
|
||||
"radioBasedConfigs": {
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId": null,
|
||||
"enable80211w": null,
|
||||
"wepConfig": null,
|
||||
"forwardMode": null,
|
||||
"profileType": "ssid"
|
||||
},
|
||||
"createdTimestamp": 1606778369943,
|
||||
"lastModifiedTimestamp": 1606778370811,
|
||||
"childProfileIds": [
|
||||
24
|
||||
]
|
||||
},
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 16,
|
||||
"customerId": 2,
|
||||
"profileType": "ssid",
|
||||
"name": "TipWlan-cloud-passpoint-osu",
|
||||
"details": {
|
||||
"model_type": "SsidConfiguration",
|
||||
"ssid": "TipWlan-cloud-passpoint-osu",
|
||||
"appliedRadios": [
|
||||
"is2dot4GHz"
|
||||
],
|
||||
"ssidAdminState": "enabled",
|
||||
"secureMode": "open",
|
||||
"vlanId": 1,
|
||||
"keyStr": null,
|
||||
"broadcastSsid": "enabled",
|
||||
"keyRefresh": 0,
|
||||
"noLocalSubnets": false,
|
||||
"radiusServiceName": null,
|
||||
"radiusAccountingServiceName": null,
|
||||
"radiusAcountingServiceInterval": null,
|
||||
"captivePortalId": null,
|
||||
"bandwidthLimitDown": 0,
|
||||
"bandwidthLimitUp": 0,
|
||||
"clientBandwidthLimitDown": 0,
|
||||
"clientBandwidthLimitUp": 0,
|
||||
"videoTrafficOnly": false,
|
||||
"radioBasedConfigs": {
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId": null,
|
||||
"enable80211w": null,
|
||||
"wepConfig": null,
|
||||
"forwardMode": null,
|
||||
"profileType": "ssid"
|
||||
},
|
||||
"createdTimestamp": 1606778369944,
|
||||
"lastModifiedTimestamp": 1606778370352,
|
||||
"childProfileIds": [
|
||||
19,
|
||||
20
|
||||
]
|
||||
}
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 2,
|
||||
"customerId": 2,
|
||||
"profileType": "ssid",
|
||||
"name": "TipWlan-cloud-3-radios",
|
||||
"details": {
|
||||
"model_type": "SsidConfiguration",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"appliedRadios": [
|
||||
"is5GHzU",
|
||||
"is2dot4GHz",
|
||||
"is5GHzL"
|
||||
],
|
||||
"ssidAdminState": "enabled",
|
||||
"secureMode": "wpa2OnlyPSK",
|
||||
"vlanId": 1,
|
||||
"keyStr": "openwifi",
|
||||
"broadcastSsid": "enabled",
|
||||
"keyRefresh": 0,
|
||||
"noLocalSubnets": false,
|
||||
"radiusServiceId": 0,
|
||||
"radiusAcountingServiceInterval": 60,
|
||||
"captivePortalId": null,
|
||||
"bandwidthLimitDown": 0,
|
||||
"bandwidthLimitUp": 0,
|
||||
"clientBandwidthLimitDown": 0,
|
||||
"clientBandwidthLimitUp": 0,
|
||||
"videoTrafficOnly": false,
|
||||
"radioBasedConfigs": {
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId": null,
|
||||
"enable80211w": null,
|
||||
"wepConfig": null,
|
||||
"forwardMode": "BRIDGE",
|
||||
"profileType": "ssid",
|
||||
"radiusClientConfiguration": {
|
||||
"model_type": "RadiusNasConfiguration",
|
||||
"nasClientId": "DEFAULT",
|
||||
"nasClientIp": "WAN_IP",
|
||||
"userDefinedNasId": null,
|
||||
"userDefinedNasIp": null,
|
||||
"operatorId": null
|
||||
}
|
||||
},
|
||||
"createdTimestamp": 1612285248638,
|
||||
"lastModifiedTimestamp": 1612285248638,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,43 +1,42 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 18,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_venue",
|
||||
"name": "TipWlan-Passpoint-Venue",
|
||||
"details": {
|
||||
"model_type": "PasspointVenueProfile",
|
||||
"venueNameSet": [
|
||||
{
|
||||
"model_type": "PasspointVenueName",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de lieu",
|
||||
"defaultDupleSeparator": ":",
|
||||
"venueUrl": "http://www.example.com/info-fra",
|
||||
"asDuple": "fra:Exemple de lieu"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointVenueName",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example passpoint_venue",
|
||||
"defaultDupleSeparator": ":",
|
||||
"venueUrl": "http://www.example.com/info-eng",
|
||||
"asDuple": "eng:Example passpoint_venue"
|
||||
}
|
||||
],
|
||||
"venueTypeAssignment": {
|
||||
"model_type": "PasspointVenueTypeAssignment",
|
||||
"venueDescription": "Research and Development Facility",
|
||||
"venueGroupId": 2,
|
||||
"venueTypeId": 8
|
||||
},
|
||||
"profileType": "passpoint_venue"
|
||||
},
|
||||
"createdTimestamp": 1606778369950,
|
||||
"lastModifiedTimestamp": 1606778369950,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 33,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_venue",
|
||||
"name": "venue-profile-2021-01-21T21:28:58.934Z",
|
||||
"details": {
|
||||
"model_type": "PasspointVenueProfile",
|
||||
"venueNameSet": [
|
||||
{
|
||||
"model_type": "PasspointVenueName",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de lieu",
|
||||
"defaultDupleSeparator": ":",
|
||||
"venueUrl": "http://www.example.com/info-fra",
|
||||
"asDuple": "fra:Exemple de lieu"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointVenueName",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example passpoint_venue",
|
||||
"defaultDupleSeparator": ":",
|
||||
"venueUrl": "http://www.example.com/info-eng",
|
||||
"asDuple": "eng:Example passpoint_venue"
|
||||
}
|
||||
],
|
||||
"venueTypeAssignment": {
|
||||
"model_type": "PasspointVenueTypeAssignment",
|
||||
"venueDescription": "Research and Development Facility",
|
||||
"venueGroupId": 2,
|
||||
"venueTypeId": 8
|
||||
},
|
||||
"profileType": "passpoint_venue"
|
||||
},
|
||||
"createdTimestamp": 1611264538947,
|
||||
"lastModifiedTimestamp": 1611264538947,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
@@ -171,7 +171,9 @@ echo "https://github.com/Telecominfraproject/wlan-cloud-services/blob/master/por
|
||||
|
||||
SPRING_EXTRA_PROPS=" --add-opens java.base/java.lang=ALL-UNNAMED"
|
||||
|
||||
export ALL_PROPS="$PROFILES $SSL_PROPS $CLIENT_MQTT_SSL_PROPS $OVSDB_PROPS $MQTT_PROPS $LOGGING_PROPS $RESTAPI_PROPS $SPRING_EXTRA_PROPS "
|
||||
JVM_EXTRA_PROPS=" ${JVM_MEM_OPTIONS:- } "
|
||||
|
||||
export ALL_PROPS="$JVM_EXTRA_PROPS $PROFILES $SSL_PROPS $CLIENT_MQTT_SSL_PROPS $OVSDB_PROPS $MQTT_PROPS $LOGGING_PROPS $RESTAPI_PROPS $SPRING_EXTRA_PROPS "
|
||||
|
||||
echo Starting dynamic opensync wifi controller
|
||||
|
||||
|
||||
@@ -1,221 +1,472 @@
|
||||
{
|
||||
"model_type": "Equipment",
|
||||
"id": 51,
|
||||
"customerId": 2,
|
||||
"profileId": 12,
|
||||
"locationId": 8,
|
||||
"equipmentType": "AP",
|
||||
"inventoryId": "Test_Client_21P10C68818122",
|
||||
"name": "Test_Client_21P10C68818122",
|
||||
"details": {
|
||||
"model_type": "ApElementConfiguration",
|
||||
"equipmentModel": "EA8300-CA",
|
||||
"elementConfigVersion": "AP-V1",
|
||||
"model_type": "Equipment",
|
||||
"id": 1,
|
||||
"customerId": 2,
|
||||
"profileId": 8,
|
||||
"locationId": 8,
|
||||
"equipmentType": "AP",
|
||||
"deviceMode": "standaloneAP",
|
||||
"gettingIP": "dhcp",
|
||||
"staticIP": null,
|
||||
"staticIpMaskCidr": null,
|
||||
"staticIpGw": null,
|
||||
"gettingDNS": "dhcp",
|
||||
"staticDnsIp1": null,
|
||||
"staticDnsIp2": null,
|
||||
"peerInfoList": [],
|
||||
"deviceName": "Default Device Name",
|
||||
"locationData": null,
|
||||
"locallyConfiguredMgmtVlan": 0,
|
||||
"locallyConfigured": false,
|
||||
"deploymentType": "CEILING",
|
||||
"syntheticClientEnabled": null,
|
||||
"frameReportThrottleEnabled": true,
|
||||
"antennaType": "OMNI",
|
||||
"costSavingEventsEnabled": true,
|
||||
"forwardMode": "BRIDGE",
|
||||
"radioMap": {
|
||||
"is2dot4GHz": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is2dot4GHz",
|
||||
"channelNumber": 6,
|
||||
"manualChannelNumber": 6,
|
||||
"backupChannelNumber": 11,
|
||||
"bannedChannels": [],
|
||||
"allowedChannels": [],
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
"inventoryId": "Open_AP_21P10C68818122",
|
||||
"name": "Open_AP_21P10C68818122",
|
||||
"details": {
|
||||
"model_type": "ApElementConfiguration",
|
||||
"equipmentModel": "EA8300-CA",
|
||||
"elementConfigVersion": "AP-V1",
|
||||
"equipmentType": "AP",
|
||||
"deviceMode": "standaloneAP",
|
||||
"gettingIP": "dhcp",
|
||||
"staticIP": null,
|
||||
"staticIpMaskCidr": null,
|
||||
"staticIpGw": null,
|
||||
"gettingDNS": "dhcp",
|
||||
"staticDnsIp1": null,
|
||||
"staticDnsIp2": null,
|
||||
"peerInfoList": [],
|
||||
"deviceName": "Open_AP_21P10C68818122",
|
||||
"locationData": null,
|
||||
"locallyConfiguredMgmtVlan": 0,
|
||||
"locallyConfigured": false,
|
||||
"deploymentType": "CEILING",
|
||||
"syntheticClientEnabled": null,
|
||||
"frameReportThrottleEnabled": true,
|
||||
"antennaType": "OMNI",
|
||||
"costSavingEventsEnabled": true,
|
||||
"forwardMode": "BRIDGE",
|
||||
"radioMap": {
|
||||
"is5GHzU": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is5GHzU",
|
||||
"channelNumber": 149,
|
||||
"manualChannelNumber": 149,
|
||||
"backupChannelNumber": 157,
|
||||
"manualBackupChannelNumber": 157,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": 18
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 161,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 100,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 132,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 165,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 104,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 136,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 108,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 140,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 112,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 144,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 116,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 149,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 153,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 157,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is2dot4GHz",
|
||||
"channelNumber": 6,
|
||||
"manualChannelNumber": 6,
|
||||
"backupChannelNumber": 11,
|
||||
"manualBackupChannelNumber": 11,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": 18
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 1,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 2,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 3,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 4,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 5,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 6,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 7,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 8,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 9,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 10,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 11,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 20
|
||||
}
|
||||
]
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is5GHzL",
|
||||
"channelNumber": 36,
|
||||
"manualChannelNumber": 36,
|
||||
"backupChannelNumber": 44,
|
||||
"manualBackupChannelNumber": 44,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
"value": 18
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 52,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 36,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 56,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 40,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 60,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 44,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 64,
|
||||
"powerLevel": 18,
|
||||
"dfs": true,
|
||||
"channelWidth": 80
|
||||
},
|
||||
{
|
||||
"model_type": "ChannelPowerLevel",
|
||||
"channelNumber": 48,
|
||||
"powerLevel": 18,
|
||||
"dfs": false,
|
||||
"channelWidth": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": 32
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [],
|
||||
"activeChannel": 6
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is5GHzU",
|
||||
"channelNumber": 149,
|
||||
"manualChannelNumber": 149,
|
||||
"backupChannelNumber": 154,
|
||||
"bannedChannels": [],
|
||||
"allowedChannels": [],
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": 32
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [],
|
||||
"activeChannel": 149
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "ElementRadioConfiguration",
|
||||
"radioType": "is5GHzL",
|
||||
"channelNumber": 36,
|
||||
"manualChannelNumber": 36,
|
||||
"backupChannelNumber": 44,
|
||||
"bannedChannels": [],
|
||||
"allowedChannels": [],
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"probeResponseThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"clientDisconnectThresholdDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": -90
|
||||
},
|
||||
"eirpTxPower": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "auto",
|
||||
"value": 32
|
||||
},
|
||||
"perimeterDetectionEnabled": true,
|
||||
"bestAPSteerType": "both",
|
||||
"deauthAttackDetection": null,
|
||||
"allowedChannelsPowerLevels": [],
|
||||
"activeChannel": 36
|
||||
}
|
||||
"advancedRadioMap": {
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is2dot4GHz",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"multicastRate": {
|
||||
"model_type": "SourceSelectionMulticast",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "manual",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 20,
|
||||
"minLoadFactor": 50
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"dtimPeriod": 2,
|
||||
"deauthAttackDetection": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is5GHzU",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"multicastRate": {
|
||||
"model_type": "SourceSelectionMulticast",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "manual",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"dtimPeriod": 2,
|
||||
"deauthAttackDetection": null
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is5GHzL",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"multicastRate": {
|
||||
"model_type": "SourceSelectionMulticast",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "profile",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "manual",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"dtimPeriod": 2,
|
||||
"deauthAttackDetection": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"advancedRadioMap": {
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is2dot4GHz",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "auto",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "auto",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"deauthAttackDetection": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is5GHzU",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "auto",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "auto",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"deauthAttackDetection": null
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioConfiguration",
|
||||
"radioType": "is5GHzL",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
"model_type": "SourceSelectionManagement",
|
||||
"source": "auto",
|
||||
"value": "auto"
|
||||
},
|
||||
"bestApSettings": {
|
||||
"model_type": "SourceSelectionSteering",
|
||||
"source": "auto",
|
||||
"value": {
|
||||
"model_type": "RadioBestApSettings",
|
||||
"mlComputed": true,
|
||||
"dropInSnrPercentage": 30,
|
||||
"minLoadFactor": 40
|
||||
}
|
||||
},
|
||||
"legacyBSSRate": "enabled",
|
||||
"deauthAttackDetection": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"latitude": null,
|
||||
"longitude": null,
|
||||
"serial": "21P10C68818122",
|
||||
"createdTimestamp": 1591653239821,
|
||||
"lastModifiedTimestamp": 1591653241398
|
||||
}
|
||||
"latitude": null,
|
||||
"longitude": null,
|
||||
"baseMacAddress": {
|
||||
"model_type": "MacAddress",
|
||||
"address": "JPWi7y5T",
|
||||
"addressAsString": "24:f5:a2:ef:2e:53"
|
||||
},
|
||||
"serial": "21P10C68818122",
|
||||
"createdTimestamp": 1612285288821,
|
||||
"lastModifiedTimestamp": 1612285293922
|
||||
}
|
||||
@@ -1,60 +1,61 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 8,
|
||||
"parentId" : 0,
|
||||
"locationType" : "SITE",
|
||||
"customerId" : 2,
|
||||
"name" : "Ottawa",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "ca",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyActivityDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1590607043540,
|
||||
"lastModifiedTimestamp" : 1590607043540
|
||||
"model_type": "Location",
|
||||
"id": 8,
|
||||
"parentId": 0,
|
||||
"locationType": "SITE",
|
||||
"customerId": 2,
|
||||
"name": "Ottawa",
|
||||
"details": {
|
||||
"model_type": "LocationDetails",
|
||||
"countryCode": "CA",
|
||||
"dailyActivityDetails": {
|
||||
"SUNDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"MONDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"TUESDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"WEDNESDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"THURSDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"FRIDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"SATURDAY": {
|
||||
"model_type": "LocationActivityDetails",
|
||||
"busyTime": "13:30",
|
||||
"quietTime": "3:00",
|
||||
"timezone": "US/Eastern"
|
||||
}
|
||||
},
|
||||
"maintenanceWindow": null,
|
||||
"rrmEnabled": true,
|
||||
"timezone": "US/Eastern"
|
||||
},
|
||||
"createdTimestamp": 1612285243534,
|
||||
"lastModifiedTimestamp": 1612285243534
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 12,
|
||||
"id": 8,
|
||||
"customerId": 2,
|
||||
"profileType": "equipment_ap",
|
||||
"name": "ApProfile-3-radios",
|
||||
@@ -20,11 +20,6 @@
|
||||
"syntheticClientEnabled": true,
|
||||
"ledControlEnabled": true,
|
||||
"equipmentDiscovery": false,
|
||||
"greTunnelName": null,
|
||||
"greParentIfName": null,
|
||||
"greLocalInetAddr": null,
|
||||
"greRemoteInetAddr": null,
|
||||
"greRemoteMacAddr": null,
|
||||
"radioMap": {
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioProfileConfiguration",
|
||||
@@ -42,15 +37,22 @@
|
||||
"bestAPSteerType": "both"
|
||||
}
|
||||
},
|
||||
"greTunnelConfigurations": [
|
||||
{
|
||||
"model_type": "GreTunnelConfiguration",
|
||||
"greTunnelName": "gre1",
|
||||
"greRemoteInetAddr": "192.168.1.101",
|
||||
"vlanIdsInGreTunnel": [
|
||||
100
|
||||
]
|
||||
}
|
||||
],
|
||||
"profileType": "equipment_ap"
|
||||
},
|
||||
"createdTimestamp": 1606778369934,
|
||||
"lastModifiedTimestamp": 1606778443413,
|
||||
"createdTimestamp": 1612285248925,
|
||||
"lastModifiedTimestamp": 1612285628377,
|
||||
"childProfileIds": [
|
||||
16,
|
||||
5,
|
||||
10,
|
||||
11,
|
||||
15
|
||||
2,
|
||||
4
|
||||
]
|
||||
}
|
||||
@@ -1,135 +1,58 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 14,
|
||||
"id": 5,
|
||||
"customerId": 2,
|
||||
"profileType": "captive_portal",
|
||||
"name": "Captive-portal",
|
||||
"details": {
|
||||
"model_type": "CaptivePortalConfiguration",
|
||||
"name": "Captive-portal",
|
||||
"browserTitle": "Access the network as Guest",
|
||||
"headerContent": "Captive Portal",
|
||||
"userAcceptancePolicy": "Use this network at your own risk. No warranty of any kind.",
|
||||
"successPageMarkdownText": "Welcome to the network",
|
||||
"redirectURL": "",
|
||||
"externalCaptivePortalURL": null,
|
||||
"sessionTimeoutInMinutes": 60,
|
||||
"logoFile": null,
|
||||
"backgroundFile": null,
|
||||
"walledGardenAllowlist": [],
|
||||
"usernamePasswordFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "userList",
|
||||
"fileCategory": "UsernamePasswordList",
|
||||
"fileType": "TEXT",
|
||||
"altSlot": true
|
||||
},
|
||||
"authenticationType": "guest",
|
||||
"radiusAuthMethod": "CHAP",
|
||||
"maxUsersWithSameCredentials": 42,
|
||||
"externalPolicyFile": null,
|
||||
"backgroundPosition": "left_top",
|
||||
"backgroundRepeat": "no_repeat",
|
||||
"radiusServiceName": null,
|
||||
"expiryType": "unlimited",
|
||||
"userList": [
|
||||
{
|
||||
"model_type": "TimedAccessUserRecord",
|
||||
"username": "customer",
|
||||
"password": "testing123",
|
||||
"activationTime": 1602183994956,
|
||||
"expirationTime": 1602212794956,
|
||||
"numDevices": 1,
|
||||
"userDetails": {
|
||||
"model_type": "TimedAccessUserDetails",
|
||||
"firstName": "Pac",
|
||||
"lastName": "Man",
|
||||
"passwordNeedsReset": false
|
||||
},
|
||||
"userMacAddresses": [
|
||||
{
|
||||
"model_type": "MacAddress",
|
||||
"address": "fKtg5upO",
|
||||
"addressAsString": "7c:ab:60:e6:ea:4e"
|
||||
}
|
||||
],
|
||||
"lastModifiedTimestamp": 0
|
||||
},
|
||||
{
|
||||
"model_type": "TimedAccessUserRecord",
|
||||
"username": "customer",
|
||||
"password": "testing123",
|
||||
"activationTime": 1602183994957,
|
||||
"expirationTime": 1602187594957,
|
||||
"numDevices": 0,
|
||||
"userDetails": {
|
||||
"model_type": "TimedAccessUserDetails",
|
||||
"firstName": "Q",
|
||||
"lastName": "Bert",
|
||||
"passwordNeedsReset": false
|
||||
},
|
||||
"userMacAddresses": [
|
||||
{
|
||||
"model_type": "MacAddress",
|
||||
"address": "wJrQdqho",
|
||||
"addressAsString": "c0:9a:d0:76:a8:68"
|
||||
}
|
||||
],
|
||||
"lastModifiedTimestamp": 0
|
||||
},
|
||||
{
|
||||
"model_type": "TimedAccessUserRecord",
|
||||
"username": "customer2",
|
||||
"password": "testing1234",
|
||||
"activationTime": 1602183994957,
|
||||
"expirationTime": 1602788794957,
|
||||
"numDevices": 1,
|
||||
"userDetails": {
|
||||
"model_type": "TimedAccessUserDetails",
|
||||
"firstName": "Duke",
|
||||
"lastName": "Nukem",
|
||||
"passwordNeedsReset": false
|
||||
},
|
||||
"userMacAddresses": [
|
||||
{
|
||||
"model_type": "MacAddress",
|
||||
"address": "fKtg5upN",
|
||||
"addressAsString": "7c:ab:60:e6:ea:4d"
|
||||
}
|
||||
],
|
||||
"lastModifiedTimestamp": 0
|
||||
},
|
||||
{
|
||||
"model_type": "TimedAccessUserRecord",
|
||||
"username": "customer2",
|
||||
"password": "testing1234",
|
||||
"activationTime": 1602183994957,
|
||||
"expirationTime": 1602270394957,
|
||||
"numDevices": 0,
|
||||
"userDetails": {
|
||||
"model_type": "TimedAccessUserDetails",
|
||||
"firstName": "Missile",
|
||||
"lastName": "Commander",
|
||||
"passwordNeedsReset": false
|
||||
},
|
||||
"userMacAddresses": [
|
||||
{
|
||||
"model_type": "MacAddress",
|
||||
"address": "wJrQdqhj",
|
||||
"addressAsString": "c0:9a:d0:76:a8:63"
|
||||
}
|
||||
],
|
||||
"lastModifiedTimestamp": 0
|
||||
}
|
||||
],
|
||||
"macAllowList": [],
|
||||
"profileType": "captive_portal"
|
||||
"model_type": "CaptivePortalConfiguration",
|
||||
"name": "Default",
|
||||
"browserTitle": "Captive-portal",
|
||||
"headerContent": "Captive Portal",
|
||||
"userAcceptancePolicy": "Please agree to the following terms for using this network:",
|
||||
"successPageMarkdownText": "You are now authorized and connected to the network.",
|
||||
"redirectURL": "https://www.google.com",
|
||||
"externalCaptivePortalURL": null,
|
||||
"sessionTimeoutInMinutes": 10,
|
||||
"logoFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "/filestore/tip-logo-mobile",
|
||||
"fileCategory": "CaptivePortalLogo",
|
||||
"fileType": "PNG",
|
||||
"altSlot": false
|
||||
},
|
||||
"backgroundFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "/filestore/tip-logo",
|
||||
"fileCategory": "CaptivePortalBackground",
|
||||
"fileType": "PNG",
|
||||
"altSlot": false
|
||||
},
|
||||
"walledGardenAllowlist": [
|
||||
],
|
||||
"usernamePasswordFile": null,
|
||||
"authenticationType": "guest",
|
||||
"radiusAuthMethod": "CHAP",
|
||||
"maxUsersWithSameCredentials": 3,
|
||||
"externalPolicyFile": null,
|
||||
"backgroundPosition": "left_top",
|
||||
"backgroundRepeat": "no_repeat",
|
||||
"radiusServiceId": 0,
|
||||
"expiryType": "time_limited",
|
||||
"userList": [
|
||||
],
|
||||
"macAllowList": [
|
||||
],
|
||||
"profileType": "captive_portal"
|
||||
},
|
||||
"createdTimestamp": 1602183994959,
|
||||
"lastModifiedTimestamp": 1602183994959,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
"createdTimestamp": 1611857459118,
|
||||
"lastModifiedTimestamp": 1611857459118,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,71 +1,71 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 24,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint",
|
||||
"name": "TipWlan-Passpoint-Config",
|
||||
"details": {
|
||||
"model_type": "PasspointProfile",
|
||||
"enableInterworkingAndHs20": true,
|
||||
"hessid": null,
|
||||
"passpointAccessNetworkType": "free_public_network",
|
||||
"passpointNetworkAuthenticationType": "acceptance_of_terms_and_conditions",
|
||||
"additionalStepsRequiredForAccess": 0,
|
||||
"deauthRequestTimeout": 0,
|
||||
"operatingClass": 0,
|
||||
"termsAndConditionsFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "https://localhost:9091/filestore/termsAndConditions",
|
||||
"fileCategory": "ExternalPolicyConfiguration",
|
||||
"fileType": "TEXT",
|
||||
"altSlot": false
|
||||
},
|
||||
"whitelistDomain": null,
|
||||
"emergencyServicesReachable": true,
|
||||
"unauthenticatedEmergencyServiceAccessible": false,
|
||||
"internetConnectivity": true,
|
||||
"connectionCapabilitySet": [
|
||||
{
|
||||
"model_type": "PasspointConnectionCapability",
|
||||
"connectionCapabilitiesPortNumber": 8888,
|
||||
"connectionCapabilitiesStatus": "open",
|
||||
"connectionCapabilitiesIpProtocol": "TCP"
|
||||
}
|
||||
],
|
||||
"ipAddressTypeAvailability": "public_IPv4_address_available",
|
||||
"qosMapSetConfiguration": null,
|
||||
"apGeospatialLocation": null,
|
||||
"apCivicLocation": null,
|
||||
"apPublicLocationIdUri": null,
|
||||
"gasAddr3Behaviour": "p2pSpecWorkaroundFromRequest",
|
||||
"anqpDomainId": 1234,
|
||||
"disableDownstreamGroupAddressedForwarding": false,
|
||||
"enable2pt4GHz": true,
|
||||
"enable5GHz": true,
|
||||
"associatedAccessSsidProfileIds": [
|
||||
15
|
||||
],
|
||||
"osuSsidProfileId": 16,
|
||||
"passpointOperatorProfileId": 17,
|
||||
"passpointVenueProfileId": 18,
|
||||
"passpointOsuProviderProfileIds": [
|
||||
19,
|
||||
20
|
||||
],
|
||||
"accessNetworkType": "free_public_network",
|
||||
"networkAuthenticationType": "acceptance_of_terms_and_conditions",
|
||||
"profileType": "passpoint"
|
||||
},
|
||||
"createdTimestamp": 1606778370807,
|
||||
"lastModifiedTimestamp": 1606778370807,
|
||||
"childProfileIds": [
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20
|
||||
]
|
||||
}
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 37,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint",
|
||||
"name": "hotspot20-profile-2021-01-21T21:28:59.171Z",
|
||||
"details": {
|
||||
"model_type": "PasspointProfile",
|
||||
"enableInterworkingAndHs20": true,
|
||||
"hessid": null,
|
||||
"passpointAccessNetworkType": "free_public_network",
|
||||
"passpointNetworkAuthenticationType": "acceptance_of_terms_and_conditions",
|
||||
"additionalStepsRequiredForAccess": 0,
|
||||
"deauthRequestTimeout": 0,
|
||||
"operatingClass": 0,
|
||||
"termsAndConditionsFile": {
|
||||
"model_type": "ManagedFileInfo",
|
||||
"md5checksum": null,
|
||||
"lastModifiedTimestamp": null,
|
||||
"apExportUrl": "https://localhost:9091/filestore/termsAndConditions",
|
||||
"fileCategory": "ExternalPolicyConfiguration",
|
||||
"fileType": "TEXT",
|
||||
"altSlot": false
|
||||
},
|
||||
"whitelistDomain": null,
|
||||
"emergencyServicesReachable": true,
|
||||
"unauthenticatedEmergencyServiceAccessible": false,
|
||||
"internetConnectivity": true,
|
||||
"connectionCapabilitySet": [
|
||||
{
|
||||
"model_type": "PasspointConnectionCapability",
|
||||
"connectionCapabilitiesPortNumber": 8888,
|
||||
"connectionCapabilitiesIpProtocol": "TCP",
|
||||
"connectionCapabilitiesStatus": "open"
|
||||
}
|
||||
],
|
||||
"ipAddressTypeAvailability": "public_IPv4_address_available",
|
||||
"qosMapSetConfiguration": null,
|
||||
"apGeospatialLocation": null,
|
||||
"apCivicLocation": null,
|
||||
"apPublicLocationIdUri": null,
|
||||
"gasAddr3Behaviour": "p2pSpecWorkaroundFromRequest",
|
||||
"anqpDomainId": 1234,
|
||||
"disableDownstreamGroupAddressedForwarding": false,
|
||||
"enable2pt4GHz": true,
|
||||
"enable5GHz": true,
|
||||
"associatedAccessSsidProfileIds": [
|
||||
32
|
||||
],
|
||||
"osuSsidProfileId": 31,
|
||||
"passpointOperatorProfileId": 34,
|
||||
"passpointVenueProfileId": 33,
|
||||
"passpointOsuProviderProfileIds": [
|
||||
35,
|
||||
36
|
||||
],
|
||||
"accessNetworkType": "free_public_network",
|
||||
"networkAuthenticationType": "acceptance_of_terms_and_conditions",
|
||||
"profileType": "passpoint"
|
||||
},
|
||||
"createdTimestamp": 0,
|
||||
"lastModifiedTimestamp": 1611264539331,
|
||||
"childProfileIds": [
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,270 +1,263 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 19,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_osu_id_provider",
|
||||
"name": "TipWlan-Passpoint-OSU-Provider",
|
||||
"details": {
|
||||
"model_type": "PasspointOsuProviderProfile",
|
||||
"domainName": "rogers.com",
|
||||
"mccMncList": [
|
||||
{
|
||||
"model_type": "PasspointMccMnc",
|
||||
"mcc": 302,
|
||||
"mnc": 720,
|
||||
"iso": "ca",
|
||||
"country": "Canada",
|
||||
"countryCode": 1,
|
||||
"network": "Rogers AT&T Wireless",
|
||||
"mccMncPairing": "302,720"
|
||||
}
|
||||
],
|
||||
"naiRealmList": [
|
||||
{
|
||||
"model_type": "PasspointNaiRealmInformation",
|
||||
"naiRealms": [
|
||||
"rogers.com"
|
||||
],
|
||||
"encoding": 0,
|
||||
"eapMethods": [
|
||||
"EAP-TTLS with username/password",
|
||||
"EAP-TLS with certificate"
|
||||
],
|
||||
"eapMap": {
|
||||
"EAP-TTLS with username/password": [
|
||||
"Credential Type:username/password",
|
||||
"Non-EAP Inner Authentication Type:MSCHAPV2"
|
||||
],
|
||||
"EAP-TLS with certificate": [
|
||||
"Credential Type:Certificate"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"osuIconList": [
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_CA",
|
||||
"iconName": "icon32eng",
|
||||
"filePath": "/tmp/icon32eng.png",
|
||||
"imageUrl": "https://localhost:9096/icon32eng.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32eng:/tmp/icon32eng.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "fra",
|
||||
"iconLocale": "fr_CA",
|
||||
"iconName": "icon32fra",
|
||||
"filePath": "/tmp/icon32fra.png",
|
||||
"imageUrl": "https://localhost:9096/icon32fra.png",
|
||||
"hs20IconString": "32:32:fra:image/png:icon32fra:/tmp/icon32fra.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_US",
|
||||
"iconName": "icon32usa",
|
||||
"filePath": "/tmp/icon32usa.png",
|
||||
"imageUrl": "https://localhost:9096/icon32usa.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32usa:/tmp/icon32usa.png"
|
||||
}
|
||||
],
|
||||
"osuServerUri": "https://example.com/osu/rogers",
|
||||
"osuFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example provider rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example provider rogers"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de fournisseur rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemple de fournisseur rogers"
|
||||
}
|
||||
],
|
||||
"osuNaiStandalone": "anonymous@rogers.com",
|
||||
"osuNaiShared": "anonymous@rogers.com",
|
||||
"osuMethodList": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"osuServiceDescription": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example services rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example services rogers"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemples de services rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemples de services rogers"
|
||||
}
|
||||
],
|
||||
"roamingOi": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
],
|
||||
"profileType": "passpoint_osu_id_provider"
|
||||
},
|
||||
"createdTimestamp": 1606778370345,
|
||||
"lastModifiedTimestamp": 1606778370345,
|
||||
"childProfileIds": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 20,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_osu_id_provider",
|
||||
"name": "TipWlan-Passpoint-OSU-Provider-2",
|
||||
"details": {
|
||||
"model_type": "PasspointOsuProviderProfile",
|
||||
"domainName": "telus.com",
|
||||
"mccMncList": [
|
||||
{
|
||||
"model_type": "PasspointMccMnc",
|
||||
"mcc": 302,
|
||||
"mnc": 220,
|
||||
"iso": "ca",
|
||||
"country": "Canada",
|
||||
"countryCode": 1,
|
||||
"network": "Telus Mobility",
|
||||
"mccMncPairing": "302,220"
|
||||
}
|
||||
],
|
||||
"naiRealmList": [
|
||||
{
|
||||
"model_type": "PasspointNaiRealmInformation",
|
||||
"naiRealms": [
|
||||
"telus.com"
|
||||
],
|
||||
"encoding": 0,
|
||||
"eapMethods": [
|
||||
"EAP-TTLS with username/password",
|
||||
"EAP-TLS with certificate"
|
||||
],
|
||||
"eapMap": {
|
||||
"EAP-TTLS with username/password": [
|
||||
"Credential Type:username/password",
|
||||
"Non-EAP Inner Authentication Type:MSCHAPV2"
|
||||
],
|
||||
"EAP-TLS with certificate": [
|
||||
"Credential Type:Certificate"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"osuIconList": [
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_CA",
|
||||
"iconName": "icon32eng",
|
||||
"filePath": "/tmp/icon32eng.png",
|
||||
"imageUrl": "https://localhost:9096/icon32eng.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32eng:/tmp/icon32eng.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "fra",
|
||||
"iconLocale": "fr_CA",
|
||||
"iconName": "icon32fra",
|
||||
"filePath": "/tmp/icon32fra.png",
|
||||
"imageUrl": "https://localhost:9096/icon32fra.png",
|
||||
"hs20IconString": "32:32:fra:image/png:icon32fra:/tmp/icon32fra.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_US",
|
||||
"iconName": "icon32usa",
|
||||
"filePath": "/tmp/icon32usa.png",
|
||||
"imageUrl": "https://localhost:9096/icon32usa.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32usa:/tmp/icon32usa.png"
|
||||
}
|
||||
],
|
||||
"osuServerUri": "https://example.com/osu/telus",
|
||||
"osuFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example provider telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example provider telus"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de fournisseur telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemple de fournisseur telus"
|
||||
}
|
||||
],
|
||||
"osuNaiStandalone": "anonymous@telus.com",
|
||||
"osuNaiShared": "anonymous@telus.com",
|
||||
"osuMethodList": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"osuServiceDescription": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example services telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example services telus"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemples de services telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemples de services telus"
|
||||
}
|
||||
],
|
||||
"roamingOi": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
],
|
||||
"profileType": "passpoint_osu_id_provider"
|
||||
},
|
||||
"createdTimestamp": 1606778370351,
|
||||
"lastModifiedTimestamp": 1606778370351,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 35,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_osu_id_provider",
|
||||
"name": "provider1-profile-2021-01-21T21:28:59.057Z",
|
||||
"details": {
|
||||
"model_type": "PasspointOsuProviderProfile",
|
||||
"mccMncList": [
|
||||
{
|
||||
"model_type": "PasspointMccMnc",
|
||||
"mcc": 302,
|
||||
"mnc": 720,
|
||||
"iso": "ca",
|
||||
"country": "Canada",
|
||||
"countryCode": 1,
|
||||
"network": "Rogers AT&T Wireless",
|
||||
"mccMncPairing": "302,720"
|
||||
}
|
||||
],
|
||||
"naiRealmList": [
|
||||
{
|
||||
"model_type": "PasspointNaiRealmInformation",
|
||||
"naiRealms": [
|
||||
"rogers.com"
|
||||
],
|
||||
"encoding": 0,
|
||||
"eapMethods": [
|
||||
"EAP-TTLS with username/password",
|
||||
"EAP-TLS with certificate"
|
||||
],
|
||||
"eapMap": {
|
||||
"EAP-TTLS with username/password": [
|
||||
"Credential Type:username/password",
|
||||
"Non-EAP Inner Authentication Type:MSCHAPV2"
|
||||
],
|
||||
"EAP-TLS with certificate": [
|
||||
"Credential Type:Certificate"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"osuIconList": [
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_CA",
|
||||
"iconName": "icon32eng",
|
||||
"filePath": "/tmp/icon32eng.png",
|
||||
"imageUrl": "https://localhost:9096/icon32eng.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32eng:/tmp/icon32eng.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "fra",
|
||||
"iconLocale": "fr_CA",
|
||||
"iconName": "icon32fra",
|
||||
"filePath": "/tmp/icon32fra.png",
|
||||
"imageUrl": "https://localhost:9096/icon32fra.png",
|
||||
"hs20IconString": "32:32:fra:image/png:icon32fra:/tmp/icon32fra.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_US",
|
||||
"iconName": "icon32usa",
|
||||
"filePath": "/tmp/icon32usa.png",
|
||||
"imageUrl": "https://localhost:9096/icon32usa.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32usa:/tmp/icon32usa.png"
|
||||
}
|
||||
],
|
||||
"osuServerUri": "https://example.com/osu/rogers",
|
||||
"osuFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example provider rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example provider rogers"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de fournisseur rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemple de fournisseur rogers"
|
||||
}
|
||||
],
|
||||
"osuNaiStandalone": "anonymous@rogers.com",
|
||||
"osuNaiShared": "anonymous@rogers.com",
|
||||
"osuMethodList": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"osuServiceDescription": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example services rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example services rogers"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemples de services rogers",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemples de services rogers"
|
||||
}
|
||||
],
|
||||
"roamingOi": [
|
||||
"BAA2D00100",
|
||||
"BAA2D00000"
|
||||
],
|
||||
"profileType": "passpoint_osu_id_provider"
|
||||
},
|
||||
"createdTimestamp": 1611264539070,
|
||||
"lastModifiedTimestamp": 1611264539070,
|
||||
"childProfileIds": []
|
||||
},
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 36,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_osu_id_provider",
|
||||
"name": "provider2-profile-2021-01-21T21:28:59.118Z",
|
||||
"details": {
|
||||
"model_type": "PasspointOsuProviderProfile",
|
||||
"mccMncList": [
|
||||
{
|
||||
"model_type": "PasspointMccMnc",
|
||||
"mcc": 302,
|
||||
"mnc": 220,
|
||||
"iso": "ca",
|
||||
"country": "Canada",
|
||||
"countryCode": 1,
|
||||
"network": "Telus Mobility",
|
||||
"mccMncPairing": "302,220"
|
||||
}
|
||||
],
|
||||
"naiRealmList": [
|
||||
{
|
||||
"model_type": "PasspointNaiRealmInformation",
|
||||
"naiRealms": [
|
||||
"telus.com"
|
||||
],
|
||||
"encoding": 0,
|
||||
"eapMethods": [
|
||||
"EAP-TTLS with username/password",
|
||||
"EAP-TLS with certificate"
|
||||
],
|
||||
"eapMap": {
|
||||
"EAP-TTLS with username/password": [
|
||||
"Credential Type:username/password",
|
||||
"Non-EAP Inner Authentication Type:MSCHAPV2"
|
||||
],
|
||||
"EAP-TLS with certificate": [
|
||||
"Credential Type:Certificate"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"osuIconList": [
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_CA",
|
||||
"iconName": "icon32eng",
|
||||
"filePath": "/tmp/icon32eng.png",
|
||||
"imageUrl": "https://localhost:9096/icon32eng.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32eng:/tmp/icon32eng.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "fra",
|
||||
"iconLocale": "fr_CA",
|
||||
"iconName": "icon32fra",
|
||||
"filePath": "/tmp/icon32fra.png",
|
||||
"imageUrl": "https://localhost:9096/icon32fra.png",
|
||||
"hs20IconString": "32:32:fra:image/png:icon32fra:/tmp/icon32fra.png"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointOsuIcon",
|
||||
"iconWidth": 32,
|
||||
"iconHeight": 32,
|
||||
"languageCode": "eng",
|
||||
"iconLocale": "en_US",
|
||||
"iconName": "icon32usa",
|
||||
"filePath": "/tmp/icon32usa.png",
|
||||
"imageUrl": "https://localhost:9096/icon32usa.png",
|
||||
"hs20IconString": "32:32:eng:image/png:icon32usa:/tmp/icon32usa.png"
|
||||
}
|
||||
],
|
||||
"osuServerUri": "https://example.com/osu/telus",
|
||||
"osuFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example provider telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example provider telus"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de fournisseur telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemple de fournisseur telus"
|
||||
}
|
||||
],
|
||||
"osuNaiStandalone": "anonymous@telus.com",
|
||||
"osuNaiShared": "anonymous@telus.com",
|
||||
"osuMethodList": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"osuServiceDescription": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example services telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Example services telus"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemples de services telus",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Exemples de services telus"
|
||||
}
|
||||
],
|
||||
"roamingOi": [
|
||||
"004096",
|
||||
"005014",
|
||||
"F4F5E8F5F4"
|
||||
],
|
||||
"profileType": "passpoint_osu_id_provider"
|
||||
},
|
||||
"createdTimestamp": 1611264539131,
|
||||
"lastModifiedTimestamp": 1611264539131,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
@@ -1,37 +1,41 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 17,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_operator",
|
||||
"name": "TipWlan-Passpoint-Operator",
|
||||
"details": {
|
||||
"model_type": "PasspointOperatorProfile",
|
||||
"serverOnlyAuthenticatedL2EncryptionNetwork": false,
|
||||
"x509CertificateLocation": "/etc/ca.pem",
|
||||
"operatorFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Default friendly passpoint_operator name",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Default friendly passpoint_operator name"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Nom de l'opérateur convivial par défaut",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Nom de l'opérateur convivial par défaut"
|
||||
}
|
||||
],
|
||||
"profileType": "passpoint_operator"
|
||||
},
|
||||
"createdTimestamp": 1606778369945,
|
||||
"lastModifiedTimestamp": 1606778369945,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 34,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_operator",
|
||||
"name": "operator-profile-2021-01-21T21:28:58.994Z",
|
||||
"details": {
|
||||
"model_type": "PasspointOperatorProfile",
|
||||
"serverOnlyAuthenticatedL2EncryptionNetwork": false,
|
||||
"x509CertificateLocation": "/etc/ca.pem",
|
||||
"operatorFriendlyName": [
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Nom de l'opérateur convivial par défaut",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "fra:Nom de l'opérateur convivial par défaut"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointDuple",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Default friendly passpoint_operator name",
|
||||
"defaultDupleSeparator": ":",
|
||||
"asDuple": "eng:Default friendly passpoint_operator name"
|
||||
}
|
||||
],
|
||||
"domainNameList": [
|
||||
"bell.ca",
|
||||
"telus.com",
|
||||
"rogers.com"
|
||||
],
|
||||
"profileType": "passpoint_operator"
|
||||
},
|
||||
"createdTimestamp": 1611264539004,
|
||||
"lastModifiedTimestamp": 1611264539004,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
@@ -1,34 +1,24 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 1,
|
||||
"customerId": 2,
|
||||
"profileType": "radius",
|
||||
"name": "Radius-Profile",
|
||||
"details": {
|
||||
"model_type": "RadiusProfile",
|
||||
"subnetConfiguration": null,
|
||||
"serviceRegionMap": {
|
||||
"Ottawa": {
|
||||
"model_type": "RadiusServiceRegion",
|
||||
"serverMap": {
|
||||
"Radius-Profile": [
|
||||
{
|
||||
"model_type": "RadiusServer",
|
||||
"ipAddress": "192.168.0.1",
|
||||
"secret": "testing123",
|
||||
"authPort": 1812,
|
||||
"timeout": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"regionName": "Ottawa"
|
||||
}
|
||||
},
|
||||
"profileType": "radius"
|
||||
},
|
||||
"createdTimestamp": 1601961451668,
|
||||
"lastModifiedTimestamp": 1601961451668,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 1,
|
||||
"customerId": 2,
|
||||
"profileType": "radius",
|
||||
"name": "Radius-Profile",
|
||||
"details": {
|
||||
"model_type": "RadiusProfile",
|
||||
"primaryRadiusAuthServer": {
|
||||
"model_type": "RadiusServer",
|
||||
"ipAddress": "192.168.0.1",
|
||||
"secret": "testing123",
|
||||
"port": 1812,
|
||||
"timeout": null
|
||||
},
|
||||
"profileType": "radius"
|
||||
},
|
||||
"createdTimestamp": 1611262628767,
|
||||
"lastModifiedTimestamp": 1611262628767,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 11,
|
||||
"id": 4,
|
||||
"customerId": 2,
|
||||
"profileType": "rf",
|
||||
"name": "TipWlan-rf",
|
||||
@@ -198,7 +198,7 @@
|
||||
},
|
||||
"profileType": "rf"
|
||||
},
|
||||
"createdTimestamp": 1606778369933,
|
||||
"lastModifiedTimestamp": 1606778369933,
|
||||
"createdTimestamp": 1612285248650,
|
||||
"lastModifiedTimestamp": 1612285248650,
|
||||
"childProfileIds": []
|
||||
}
|
||||
@@ -1,203 +1,75 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 5,
|
||||
"customerId": 2,
|
||||
"profileType": "ssid",
|
||||
"name": "TipWlan-cloud-3-radios",
|
||||
"details": {
|
||||
"model_type": "SsidConfiguration",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"appliedRadios": [
|
||||
"is5GHzL",
|
||||
"is2dot4GHz",
|
||||
"is5GHzU"
|
||||
],
|
||||
"ssidAdminState": "enabled",
|
||||
"secureMode": "wpa2OnlyPSK",
|
||||
"vlanId": 1,
|
||||
"keyStr": "openwifi",
|
||||
"broadcastSsid": "enabled",
|
||||
"keyRefresh": 0,
|
||||
"noLocalSubnets": false,
|
||||
"radiusServiceName": null,
|
||||
"radiusAccountingServiceName": null,
|
||||
"radiusAcountingServiceInterval": null,
|
||||
"captivePortalId": null,
|
||||
"bandwidthLimitDown": 0,
|
||||
"bandwidthLimitUp": 0,
|
||||
"clientBandwidthLimitDown": 0,
|
||||
"clientBandwidthLimitUp": 0,
|
||||
"videoTrafficOnly": false,
|
||||
"radioBasedConfigs": {
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId": null,
|
||||
"enable80211w": null,
|
||||
"wepConfig": null,
|
||||
"forwardMode": "BRIDGE",
|
||||
"profileType": "ssid"
|
||||
},
|
||||
"createdTimestamp": 1606778369598,
|
||||
"lastModifiedTimestamp": 1606778369598,
|
||||
"childProfileIds": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 15,
|
||||
"customerId": 2,
|
||||
"profileType": "ssid",
|
||||
"name": "TipWlan-cloud-passpoint-access",
|
||||
"details": {
|
||||
"model_type": "SsidConfiguration",
|
||||
"ssid": "TipWlan-cloud-passpoint-access",
|
||||
"appliedRadios": [
|
||||
"is5GHzL",
|
||||
"is5GHzU"
|
||||
],
|
||||
"ssidAdminState": "enabled",
|
||||
"secureMode": "wpa2PSK",
|
||||
"vlanId": 1,
|
||||
"keyStr": "testing123",
|
||||
"broadcastSsid": "enabled",
|
||||
"keyRefresh": 0,
|
||||
"noLocalSubnets": false,
|
||||
"radiusServiceName": null,
|
||||
"radiusAccountingServiceName": null,
|
||||
"radiusAcountingServiceInterval": null,
|
||||
"captivePortalId": null,
|
||||
"bandwidthLimitDown": 0,
|
||||
"bandwidthLimitUp": 0,
|
||||
"clientBandwidthLimitDown": 0,
|
||||
"clientBandwidthLimitUp": 0,
|
||||
"videoTrafficOnly": false,
|
||||
"radioBasedConfigs": {
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId": null,
|
||||
"enable80211w": null,
|
||||
"wepConfig": null,
|
||||
"forwardMode": null,
|
||||
"profileType": "ssid"
|
||||
},
|
||||
"createdTimestamp": 1606778369943,
|
||||
"lastModifiedTimestamp": 1606778370811,
|
||||
"childProfileIds": [
|
||||
24
|
||||
]
|
||||
},
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 16,
|
||||
"customerId": 2,
|
||||
"profileType": "ssid",
|
||||
"name": "TipWlan-cloud-passpoint-osu",
|
||||
"details": {
|
||||
"model_type": "SsidConfiguration",
|
||||
"ssid": "TipWlan-cloud-passpoint-osu",
|
||||
"appliedRadios": [
|
||||
"is2dot4GHz"
|
||||
],
|
||||
"ssidAdminState": "enabled",
|
||||
"secureMode": "open",
|
||||
"vlanId": 1,
|
||||
"keyStr": null,
|
||||
"broadcastSsid": "enabled",
|
||||
"keyRefresh": 0,
|
||||
"noLocalSubnets": false,
|
||||
"radiusServiceName": null,
|
||||
"radiusAccountingServiceName": null,
|
||||
"radiusAcountingServiceInterval": null,
|
||||
"captivePortalId": null,
|
||||
"bandwidthLimitDown": 0,
|
||||
"bandwidthLimitUp": 0,
|
||||
"clientBandwidthLimitDown": 0,
|
||||
"clientBandwidthLimitUp": 0,
|
||||
"videoTrafficOnly": false,
|
||||
"radioBasedConfigs": {
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId": null,
|
||||
"enable80211w": null,
|
||||
"wepConfig": null,
|
||||
"forwardMode": null,
|
||||
"profileType": "ssid"
|
||||
},
|
||||
"createdTimestamp": 1606778369944,
|
||||
"lastModifiedTimestamp": 1606778370352,
|
||||
"childProfileIds": [
|
||||
19,
|
||||
20
|
||||
]
|
||||
}
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 2,
|
||||
"customerId": 2,
|
||||
"profileType": "ssid",
|
||||
"name": "TipWlan-cloud-3-radios",
|
||||
"details": {
|
||||
"model_type": "SsidConfiguration",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"appliedRadios": [
|
||||
"is5GHzU",
|
||||
"is2dot4GHz",
|
||||
"is5GHzL"
|
||||
],
|
||||
"ssidAdminState": "enabled",
|
||||
"secureMode": "wpa2OnlyPSK",
|
||||
"vlanId": 1,
|
||||
"keyStr": "openwifi",
|
||||
"broadcastSsid": "enabled",
|
||||
"keyRefresh": 0,
|
||||
"noLocalSubnets": false,
|
||||
"radiusServiceId": 0,
|
||||
"radiusAcountingServiceInterval": 60,
|
||||
"captivePortalId": null,
|
||||
"bandwidthLimitDown": 0,
|
||||
"bandwidthLimitUp": 0,
|
||||
"clientBandwidthLimitDown": 0,
|
||||
"clientBandwidthLimitUp": 0,
|
||||
"videoTrafficOnly": false,
|
||||
"radioBasedConfigs": {
|
||||
"is5GHzU": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is2dot4GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHz": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
},
|
||||
"is5GHzL": {
|
||||
"model_type": "RadioBasedSsidConfiguration",
|
||||
"enable80211r": null,
|
||||
"enable80211k": null,
|
||||
"enable80211v": null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId": null,
|
||||
"enable80211w": null,
|
||||
"wepConfig": null,
|
||||
"forwardMode": "BRIDGE",
|
||||
"profileType": "ssid",
|
||||
"radiusClientConfiguration": {
|
||||
"model_type": "RadiusNasConfiguration",
|
||||
"nasClientId": "DEFAULT",
|
||||
"nasClientIp": "WAN_IP",
|
||||
"userDefinedNasId": null,
|
||||
"userDefinedNasIp": null,
|
||||
"operatorId": null
|
||||
}
|
||||
},
|
||||
"createdTimestamp": 1612285248638,
|
||||
"lastModifiedTimestamp": 1612285248638,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,43 +1,42 @@
|
||||
[
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 18,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_venue",
|
||||
"name": "TipWlan-Passpoint-Venue",
|
||||
"details": {
|
||||
"model_type": "PasspointVenueProfile",
|
||||
"venueNameSet": [
|
||||
{
|
||||
"model_type": "PasspointVenueName",
|
||||
"locale": "fr_CA",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de lieu",
|
||||
"defaultDupleSeparator": ":",
|
||||
"venueUrl": "http://www.example.com/info-fra",
|
||||
"asDuple": "fra:Exemple de lieu"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointVenueName",
|
||||
"locale": "en_CA",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example passpoint_venue",
|
||||
"defaultDupleSeparator": ":",
|
||||
"venueUrl": "http://www.example.com/info-eng",
|
||||
"asDuple": "eng:Example passpoint_venue"
|
||||
}
|
||||
],
|
||||
"venueTypeAssignment": {
|
||||
"model_type": "PasspointVenueTypeAssignment",
|
||||
"venueDescription": "Research and Development Facility",
|
||||
"venueGroupId": 2,
|
||||
"venueTypeId": 8
|
||||
},
|
||||
"profileType": "passpoint_venue"
|
||||
},
|
||||
"createdTimestamp": 1606778369950,
|
||||
"lastModifiedTimestamp": 1606778369950,
|
||||
"childProfileIds": [
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"model_type": "Profile",
|
||||
"id": 33,
|
||||
"customerId": 2,
|
||||
"profileType": "passpoint_venue",
|
||||
"name": "venue-profile-2021-01-21T21:28:58.934Z",
|
||||
"details": {
|
||||
"model_type": "PasspointVenueProfile",
|
||||
"venueNameSet": [
|
||||
{
|
||||
"model_type": "PasspointVenueName",
|
||||
"locale": "fra",
|
||||
"dupleIso3Language": "fra",
|
||||
"dupleName": "Exemple de lieu",
|
||||
"defaultDupleSeparator": ":",
|
||||
"venueUrl": "http://www.example.com/info-fra",
|
||||
"asDuple": "fra:Exemple de lieu"
|
||||
},
|
||||
{
|
||||
"model_type": "PasspointVenueName",
|
||||
"locale": "eng",
|
||||
"dupleIso3Language": "eng",
|
||||
"dupleName": "Example passpoint_venue",
|
||||
"defaultDupleSeparator": ":",
|
||||
"venueUrl": "http://www.example.com/info-eng",
|
||||
"asDuple": "eng:Example passpoint_venue"
|
||||
}
|
||||
],
|
||||
"venueTypeAssignment": {
|
||||
"model_type": "PasspointVenueTypeAssignment",
|
||||
"venueDescription": "Research and Development Facility",
|
||||
"venueGroupId": 2,
|
||||
"venueTypeId": 8
|
||||
},
|
||||
"profileType": "passpoint_venue"
|
||||
},
|
||||
"createdTimestamp": 1611264538947,
|
||||
"lastModifiedTimestamp": 1611264538947,
|
||||
"childProfileIds": []
|
||||
}
|
||||
]
|
||||
@@ -59,6 +59,8 @@ echo "https://github.com/Telecominfraproject/wlan-cloud-services/blob/master/por
|
||||
|
||||
SPRING_EXTRA_PROPS=" --add-opens java.base/java.lang=ALL-UNNAMED"
|
||||
|
||||
export ALL_PROPS="$PROFILES $SSL_PROPS $CLIENT_MQTT_SSL_PROPS $OVSDB_PROPS $MQTT_PROPS $LOGGING_PROPS $RESTAPI_PROPS $SPRING_EXTRA_PROPS"
|
||||
JVM_EXTRA_PROPS=" ${JVM_MEM_OPTIONS:- } "
|
||||
|
||||
export ALL_PROPS="$JVM_EXTRA_PROPS $PROFILES $SSL_PROPS $CLIENT_MQTT_SSL_PROPS $OVSDB_PROPS $MQTT_PROPS $LOGGING_PROPS $RESTAPI_PROPS $SPRING_EXTRA_PROPS"
|
||||
|
||||
java $ALL_PROPS -jar app.jar
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -21,350 +21,350 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>opensync-ext-cloud</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- PortForwarding Gateway - to support remote ssh connections to APs -->
|
||||
<dependency>
|
||||
<artifactId>port-forwarding-gateway</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- portal services -->
|
||||
<dependency>
|
||||
<artifactId>webtoken-auth-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-services</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>customer-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-user-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>firmware-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>manufacturer-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>filestore-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- prov services -->
|
||||
<dependency>
|
||||
<artifactId>customer-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>customer-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>location-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>profile-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-user-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>portal-user-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>firmware-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>firmware-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>manufacturer-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>manufacturer-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>adoption-metrics-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- ssc services -->
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>service-metric-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>system-event-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>alarm-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>status-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>client-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>routing-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Stream Processors -->
|
||||
<dependency>
|
||||
<artifactId>single-process-streams</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>provisioning-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>dashboard-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-alarms-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-gateway-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -46,6 +46,7 @@ import com.telecominfraproject.wlan.customer.service.CustomerServiceInterface;
|
||||
import com.telecominfraproject.wlan.equipment.EquipmentServiceInterface;
|
||||
import com.telecominfraproject.wlan.equipment.models.ApElementConfiguration;
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.equipment.models.NetworkForwardMode;
|
||||
import com.telecominfraproject.wlan.firmware.FirmwareServiceInterface;
|
||||
import com.telecominfraproject.wlan.firmware.models.FirmwareTrackAssignmentDetails;
|
||||
import com.telecominfraproject.wlan.firmware.models.FirmwareTrackAssignmentRecord;
|
||||
@@ -65,11 +66,13 @@ import com.telecominfraproject.wlan.profile.metrics.ServiceMetricsCollectionConf
|
||||
import com.telecominfraproject.wlan.profile.models.Profile;
|
||||
import com.telecominfraproject.wlan.profile.models.ProfileContainer;
|
||||
import com.telecominfraproject.wlan.profile.models.ProfileType;
|
||||
import com.telecominfraproject.wlan.profile.models.common.FileCategory;
|
||||
import com.telecominfraproject.wlan.profile.models.common.FileType;
|
||||
import com.telecominfraproject.wlan.profile.models.common.ManagedFileInfo;
|
||||
import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.network.models.RadioProfileConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.radius.models.RadiusProfile;
|
||||
import com.telecominfraproject.wlan.profile.radius.models.RadiusServer;
|
||||
import com.telecominfraproject.wlan.profile.radius.models.RadiusServiceRegion;
|
||||
import com.telecominfraproject.wlan.profile.rf.models.RfConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode;
|
||||
@@ -83,6 +86,7 @@ import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDataType;
|
||||
import com.telecominfraproject.wlan.status.StatusServiceInterface;
|
||||
import com.telecominfraproject.wlan.status.dashboard.models.CustomerPortalDashboardStatus;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentAdminStatusData;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentChannelStatusData;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentProtocolState;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentProtocolStatusData;
|
||||
import com.telecominfraproject.wlan.status.equipment.report.models.EquipmentCapacityDetails;
|
||||
@@ -103,6 +107,8 @@ import com.telecominfraproject.wlan.systemevent.models.SystemEventRecord;
|
||||
public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AllInOneWithGatewayStartListener.class);
|
||||
|
||||
private static final String DEFAULT_KEYSTRING = "w1r3l3ss-fr33d0m";
|
||||
|
||||
@Autowired
|
||||
private CustomerServiceInterface customerServiceInterface;
|
||||
@@ -226,19 +232,8 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
profileRadius.setProfileType(ProfileType.radius);
|
||||
profileRadius.setName("Radius-Profile");
|
||||
|
||||
RadiusProfile radiusDetails = new RadiusProfile();
|
||||
RadiusServiceRegion radiusServiceRegion = new RadiusServiceRegion();
|
||||
RadiusServer radiusServer = new RadiusServer();
|
||||
radiusServer.setAuthPort(1812);
|
||||
try {
|
||||
radiusServer.setIpAddress(InetAddress.getByName("192.168.0.1"));
|
||||
} catch (UnknownHostException e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
radiusServer.setSecret("testing123");
|
||||
radiusServiceRegion.addRadiusServer("Radius-Profile", radiusServer);
|
||||
radiusServiceRegion.setRegionName("Ottawa");
|
||||
radiusDetails.addRadiusServiceRegion(radiusServiceRegion);
|
||||
RadiusProfile radiusDetails = RadiusProfile.createWithDefaults();
|
||||
|
||||
profileRadius.setDetails(radiusDetails);
|
||||
profileRadius = profileServiceInterface.create(profileRadius);
|
||||
|
||||
@@ -288,7 +283,7 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
ssidConfigEAP.setSecureMode(SecureMode.wpaEAP);
|
||||
ssidConfigEAP.setKeyStr("testing123");
|
||||
profileSsidEAP.setDetails(ssidConfigEAP);
|
||||
ssidConfigEAP.setRadiusServiceName(profileRadius.getName());
|
||||
ssidConfigEAP.setRadiusServiceId(profileRadius.getId());
|
||||
Set<Long> childIds = new HashSet<Long>();
|
||||
childIds.add(profileRadius.getId());
|
||||
profileSsidEAP.setChildProfileIds(childIds);
|
||||
@@ -296,14 +291,16 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
|
||||
Profile profileSsid_3_radios = new Profile();
|
||||
profileSsid_3_radios.setCustomerId(customer.getId());
|
||||
profileSsid_3_radios.setName("TipWlan-cloud-3-radios");
|
||||
profileSsid_3_radios.setName("TipWlan-cloud-wifi");
|
||||
SsidConfiguration ssidConfig_3_radios = SsidConfiguration.createWithDefaults();
|
||||
Set<RadioType> appliedRadios_3_radios = new HashSet<RadioType>();
|
||||
appliedRadios_3_radios.add(RadioType.is2dot4GHz);
|
||||
appliedRadios_3_radios.add(RadioType.is5GHzL);
|
||||
appliedRadios_3_radios.add(RadioType.is5GHzU);
|
||||
ssidConfig_3_radios.setAppliedRadios(appliedRadios_3_radios);
|
||||
ssidConfig_3_radios.setSsid("TipWlan-cloud-3-radios");
|
||||
ssidConfig_3_radios.setSsid("TipWlan-cloud-wifi");
|
||||
ssidConfig_3_radios.setSecureMode(SecureMode.wpa2OnlyPSK);
|
||||
ssidConfig_3_radios.setKeyStr(DEFAULT_KEYSTRING);
|
||||
profileSsid_3_radios.setDetails(ssidConfig_3_radios);
|
||||
profileSsid_3_radios = profileServiceInterface.create(profileSsid_3_radios);
|
||||
|
||||
@@ -316,6 +313,8 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
appliedRadios_2_radios.add(RadioType.is5GHz);
|
||||
ssidConfig_2_radios.setAppliedRadios(appliedRadios_2_radios);
|
||||
ssidConfig_2_radios.setSsid("TipWlan-cloud-2-radios");
|
||||
ssidConfig_2_radios.setSecureMode(SecureMode.wpa2OnlyPSK);
|
||||
ssidConfig_2_radios.setKeyStr(DEFAULT_KEYSTRING);
|
||||
profileSsid_2_radios.setDetails(ssidConfig_2_radios);
|
||||
profileSsid_2_radios = profileServiceInterface.create(profileSsid_2_radios);
|
||||
|
||||
@@ -327,20 +326,48 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
profileRf.setDetails(rfConfig);
|
||||
profileRf = profileServiceInterface.create(profileRf);
|
||||
|
||||
//Captive portal profile
|
||||
Profile profileCaptivePortal = new Profile();
|
||||
profileCaptivePortal.setCustomerId(customer.getId());
|
||||
profileCaptivePortal.setName("Captive-portal");
|
||||
CaptivePortalConfiguration captivePortalConfig = new CaptivePortalConfiguration();
|
||||
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.guest);
|
||||
captivePortalConfig.setBrowserTitle("Access the network as Guest");
|
||||
captivePortalConfig.setExpiryType(SessionExpiryType.unlimited);
|
||||
captivePortalConfig.setMaxUsersWithSameCredentials(42);
|
||||
captivePortalConfig.setName(profileCaptivePortal.getName());
|
||||
captivePortalConfig.setSuccessPageMarkdownText("Welcome to the network");
|
||||
captivePortalConfig.setUserAcceptancePolicy("Use this network at your own risk. No warranty of any kind.");
|
||||
profileCaptivePortal.setDetails(captivePortalConfig);
|
||||
profileCaptivePortal = profileServiceInterface.create(profileCaptivePortal);
|
||||
// Captive portal profile
|
||||
Profile profileCaptivePortal = new Profile();
|
||||
profileCaptivePortal.setCustomerId(customer.getId());
|
||||
profileCaptivePortal.setName("Captive-portal");
|
||||
profileCaptivePortal.setProfileType(ProfileType.captive_portal);
|
||||
|
||||
CaptivePortalConfiguration captivePortalConfig = new CaptivePortalConfiguration();
|
||||
captivePortalConfig.setRedirectURL("https://www.google.com");
|
||||
captivePortalConfig.setSessionTimeoutInMinutes(10);
|
||||
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.guest);
|
||||
ManagedFileInfo backgroundFile = new ManagedFileInfo();
|
||||
backgroundFile.setFileCategory(FileCategory.CaptivePortalBackground);
|
||||
backgroundFile.setFileType(FileType.PNG);
|
||||
backgroundFile.setApExportUrl("tip-logo.png");
|
||||
ManagedFileInfo logoFile = new ManagedFileInfo();
|
||||
logoFile.setFileCategory(FileCategory.CaptivePortalLogo);
|
||||
logoFile.setFileType(FileType.PNG);
|
||||
logoFile.setApExportUrl("tip-logo-mobile.png");
|
||||
captivePortalConfig.setBackgroundFile(backgroundFile);
|
||||
captivePortalConfig.setLogoFile(logoFile);
|
||||
|
||||
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.guest);
|
||||
captivePortalConfig.setBrowserTitle(profileCaptivePortal.getName());
|
||||
profileCaptivePortal.setDetails(captivePortalConfig);
|
||||
profileCaptivePortal = profileServiceInterface.create(profileCaptivePortal);
|
||||
|
||||
Profile profileSsid_captive = new Profile();
|
||||
profileSsid_captive.setCustomerId(customer.getId());
|
||||
profileSsid_captive.setName("TipWlan-captive");
|
||||
SsidConfiguration ssidConfig_captive = SsidConfiguration.createWithDefaults();
|
||||
Set<RadioType> appliedRadios_3_radios_captive = new HashSet<RadioType>();
|
||||
appliedRadios_3_radios_captive.add(RadioType.is2dot4GHz);
|
||||
ssidConfig_captive.setAppliedRadios(appliedRadios_3_radios_captive);
|
||||
ssidConfig_captive.setSsid("TipWlan-captive");
|
||||
ssidConfig_captive.setSecureMode(SecureMode.wpa2PSK);
|
||||
ssidConfig_captive.setRadiusAcountingServiceInterval(60);
|
||||
ssidConfig_captive.setCaptivePortalId(profileCaptivePortal.getId());
|
||||
ssidConfig_captive.setKeyStr(DEFAULT_KEYSTRING);
|
||||
ssidConfig_captive.setForwardMode(NetworkForwardMode.NAT);
|
||||
profileSsid_captive.setDetails(ssidConfig_captive);
|
||||
profileSsid_captive.getChildProfileIds().add(profileCaptivePortal.getId());
|
||||
profileSsid_captive = profileServiceInterface.create(profileSsid_captive);
|
||||
|
||||
Profile profileAp_3_radios = new Profile();
|
||||
profileAp_3_radios.setCustomerId(customer.getId());
|
||||
@@ -642,7 +669,9 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
apNodeMetrics.setApPerformance(apPerformance);
|
||||
|
||||
smr.setCreatedTimestamp(System.currentTimeMillis());
|
||||
apNodeMetrics.setChannelUtilization(RadioType.is2dot4GHz, getRandomInt(30, 70));
|
||||
smr.setLocationId(equipment.getLocationId());
|
||||
|
||||
apNodeMetrics.setChannelUtilization(RadioType.is2dot4GHz, getRandomInt(30, 70));
|
||||
apNodeMetrics.setChannelUtilization(RadioType.is5GHzL, getRandomInt(30, 70));
|
||||
apNodeMetrics.setChannelUtilization(RadioType.is5GHzU, getRandomInt(30, 70));
|
||||
|
||||
@@ -922,6 +951,21 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
|
||||
status.setDetails(eqRadioUtilReport);
|
||||
statusList.add(status);
|
||||
|
||||
status = new Status();
|
||||
status.setCustomerId(equipment.getCustomerId());
|
||||
status.setEquipmentId(equipment.getId());
|
||||
EquipmentChannelStatusData eqChannelStatus = new EquipmentChannelStatusData();
|
||||
|
||||
Map<RadioType, Integer> channelStatusDataMap = new EnumMap<>(RadioType.class);
|
||||
channelStatusDataMap.put(RadioType.is2dot4GHz, 6);
|
||||
channelStatusDataMap.put(RadioType.is5GHzL, 36);
|
||||
channelStatusDataMap.put(RadioType.is5GHzU, 157);
|
||||
|
||||
eqChannelStatus.setChannelNumberStatusDataMap(channelStatusDataMap);
|
||||
|
||||
status.setDetails(eqChannelStatus);
|
||||
statusList.add(status);
|
||||
|
||||
statusServiceInterface.update(statusList);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>all-cloud-in-one-process-with-persistence</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -16,6 +16,8 @@ then
|
||||
fi
|
||||
#echo HOST_PROPS $HOST_PROPS
|
||||
|
||||
export ALL_PROPS="$LOGGING_PROPS $DATABASE_PROPS $HOST_PROPS"
|
||||
JVM_EXTRA_PROPS=" ${JVM_MEM_OPTIONS:- } "
|
||||
|
||||
export ALL_PROPS="$JVM_EXTRA_PROPS $LOGGING_PROPS $DATABASE_PROPS $HOST_PROPS"
|
||||
|
||||
java $ALL_PROPS -jar app.jar
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>all-cloud-in-one-process</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -13,6 +13,8 @@ then
|
||||
HOST_PROPS+=" -Dtip.wlan.introspectTokenApi.host=${BACKEND_SERVER}:9091"
|
||||
fi
|
||||
|
||||
export ALL_PROPS="$LOGGING_PROPS $HOST_PROPS"
|
||||
JVM_EXTRA_PROPS=" ${JVM_MEM_OPTIONS:- } "
|
||||
|
||||
export ALL_PROPS="$JVM_EXTRA_PROPS $LOGGING_PROPS $HOST_PROPS"
|
||||
|
||||
java $ALL_PROPS -jar app.jar
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -22,322 +22,322 @@
|
||||
<dependency>
|
||||
<artifactId>webtoken-auth-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-services</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>customer-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-user-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>firmware-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>manufacturer-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>filestore-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- prov services -->
|
||||
<dependency>
|
||||
<artifactId>customer-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>customer-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-user-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-user-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>firmware-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>firmware-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>manufacturer-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>manufacturer-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- ssc services -->
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-datastore-rdbms</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Stream Processors -->
|
||||
<dependency>
|
||||
<artifactId>single-process-streams</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>provisioning-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>dashboard-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-alarms-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-gateway-service-remote</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -21,339 +21,344 @@
|
||||
<dependency>
|
||||
<artifactId>webtoken-auth-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-services</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>customer-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-user-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>firmware-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>manufacturer-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>filestore-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- prov services -->
|
||||
<dependency>
|
||||
<artifactId>customer-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>customer-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>location-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>profile-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-user-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>portal-user-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>firmware-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>firmware-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>manufacturer-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>manufacturer-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>adoption-metrics-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- ssc services -->
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>service-metric-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>system-event-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>alarm-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>status-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>client-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- Use in-memory DS for now, later switch to RDBMS -->
|
||||
<artifactId>routing-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Stream Processors -->
|
||||
<dependency>
|
||||
<artifactId>single-process-streams</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>provisioning-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>dashboard-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-alarms-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-gateway-service-remote</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>port-forwarding-gateway-local</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.telecominfraproject.wlan.startuptasks;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.BufferedWriter;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
@@ -48,7 +48,6 @@ import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.SecurityType;
|
||||
import com.telecominfraproject.wlan.core.model.role.PortalUserRole;
|
||||
import com.telecominfraproject.wlan.core.model.scheduler.EmptySchedule;
|
||||
import com.telecominfraproject.wlan.core.model.service.bonjour.BonjourService;
|
||||
import com.telecominfraproject.wlan.customer.models.Customer;
|
||||
import com.telecominfraproject.wlan.customer.models.CustomerDetails;
|
||||
import com.telecominfraproject.wlan.customer.models.EquipmentAutoProvisioningSettings;
|
||||
@@ -71,14 +70,13 @@ import com.telecominfraproject.wlan.location.models.LocationType;
|
||||
import com.telecominfraproject.wlan.location.service.LocationServiceInterface;
|
||||
import com.telecominfraproject.wlan.portaluser.PortalUserServiceInterface;
|
||||
import com.telecominfraproject.wlan.portaluser.models.PortalUser;
|
||||
import com.telecominfraproject.wlan.portforwardinggateway.PortForwarderGatewayInterface;
|
||||
import com.telecominfraproject.wlan.profile.ProfileServiceInterface;
|
||||
import com.telecominfraproject.wlan.profile.bonjour.models.BonjourGatewayProfile;
|
||||
import com.telecominfraproject.wlan.profile.bonjour.models.BonjourServiceSet;
|
||||
import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalAuthenticationType;
|
||||
import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.captiveportal.models.SessionExpiryType;
|
||||
import com.telecominfraproject.wlan.profile.captiveportal.user.models.TimedAccessUserDetails;
|
||||
import com.telecominfraproject.wlan.profile.captiveportal.user.models.TimedAccessUserRecord;
|
||||
import com.telecominfraproject.wlan.profile.event.models.ApEventRateConfigurationDetails;
|
||||
import com.telecominfraproject.wlan.profile.metrics.ServiceMetricsCollectionConfigProfile;
|
||||
import com.telecominfraproject.wlan.profile.models.Profile;
|
||||
import com.telecominfraproject.wlan.profile.models.ProfileContainer;
|
||||
@@ -87,6 +85,7 @@ import com.telecominfraproject.wlan.profile.models.common.FileCategory;
|
||||
import com.telecominfraproject.wlan.profile.models.common.FileType;
|
||||
import com.telecominfraproject.wlan.profile.models.common.ManagedFileInfo;
|
||||
import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.network.models.GreTunnelConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.network.models.RadioProfileConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.models.PasspointDuple;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.models.PasspointMccMnc;
|
||||
@@ -98,7 +97,6 @@ import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointO
|
||||
import com.telecominfraproject.wlan.profile.passpoint.models.venue.PasspointVenueProfile;
|
||||
import com.telecominfraproject.wlan.profile.radius.models.RadiusProfile;
|
||||
import com.telecominfraproject.wlan.profile.radius.models.RadiusServer;
|
||||
import com.telecominfraproject.wlan.profile.radius.models.RadiusServiceRegion;
|
||||
import com.telecominfraproject.wlan.profile.rf.models.RfConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode;
|
||||
@@ -113,6 +111,7 @@ import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDataType;
|
||||
import com.telecominfraproject.wlan.status.StatusServiceInterface;
|
||||
import com.telecominfraproject.wlan.status.dashboard.models.CustomerPortalDashboardStatus;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentAdminStatusData;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentChannelStatusData;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentProtocolState;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentProtocolStatusData;
|
||||
import com.telecominfraproject.wlan.status.equipment.report.models.EquipmentCapacityDetails;
|
||||
@@ -169,6 +168,9 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
@Autowired
|
||||
private FirmwareServiceInterface firmwareInterface;
|
||||
|
||||
@Autowired
|
||||
private PortForwarderGatewayInterface portForwarderGatewayInterface;
|
||||
|
||||
@Value("${tip.wlan.numEquipmentToCreateOnStartup:0}")
|
||||
private int numEquipmentToCreateOnStartup;
|
||||
|
||||
@@ -270,43 +272,23 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
profileRadius.setProfileType(ProfileType.radius);
|
||||
profileRadius.setName("Radius-Profile");
|
||||
|
||||
RadiusProfile radiusDetails = new RadiusProfile();
|
||||
RadiusServiceRegion radiusServiceRegion = new RadiusServiceRegion();
|
||||
RadiusServer radiusServer = new RadiusServer();
|
||||
radiusServer.setAuthPort(1812);
|
||||
RadiusProfile radiusDetails = RadiusProfile.createWithDefaults();
|
||||
|
||||
RadiusServer primaryRadiusAccountingServer = new RadiusServer();
|
||||
primaryRadiusAccountingServer.setPort(RadiusProfile.DEFAULT_RADIUS_ACCOUNTING_PORT);
|
||||
try {
|
||||
radiusServer.setIpAddress(InetAddress.getByName("192.168.0.1"));
|
||||
primaryRadiusAccountingServer.setIpAddress(InetAddress.getByName("192.168.0.2"));
|
||||
} catch (UnknownHostException e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
radiusServer.setSecret("testing123");
|
||||
radiusServiceRegion.addRadiusServer("Radius-Profile", radiusServer);
|
||||
radiusServiceRegion.setRegionName("Ottawa");
|
||||
radiusDetails.addRadiusServiceRegion(radiusServiceRegion);
|
||||
primaryRadiusAccountingServer.setSecret(RadiusProfile.DEFAULT_RADIUS_SECRET);
|
||||
primaryRadiusAccountingServer.setTimeout(RadiusProfile.DEFAULT_RADIUS_TIMEOUT);
|
||||
|
||||
radiusDetails.setPrimaryRadiusAccountingServer(primaryRadiusAccountingServer);
|
||||
|
||||
profileRadius.setDetails(radiusDetails);
|
||||
profileRadius = profileServiceInterface.create(profileRadius);
|
||||
|
||||
create3RadioMetricsProfile("Metrics-Profile-3-Radios", customer.getId());
|
||||
create2RadioMetricsProfile("Metrics-Profile-2-Radios", customer.getId());
|
||||
|
||||
Profile profileSsidEAP = new Profile();
|
||||
profileSsidEAP.setCustomerId(customer.getId());
|
||||
profileSsidEAP.setName("TipWlan-cloud-Enterprise");
|
||||
SsidConfiguration ssidConfigEAP = SsidConfiguration.createWithDefaults();
|
||||
Set<RadioType> appliedRadiosEAP = new HashSet<RadioType>();
|
||||
appliedRadiosEAP.add(RadioType.is2dot4GHz);
|
||||
appliedRadiosEAP.add(RadioType.is5GHzL);
|
||||
appliedRadiosEAP.add(RadioType.is5GHzU);
|
||||
ssidConfigEAP.setAppliedRadios(appliedRadiosEAP);
|
||||
ssidConfigEAP.setSecureMode(SecureMode.wpaEAP);
|
||||
ssidConfigEAP.setKeyStr("testing123");
|
||||
profileSsidEAP.setDetails(ssidConfigEAP);
|
||||
ssidConfigEAP.setRadiusServiceName(profileRadius.getName());
|
||||
Set<Long> childIds = new HashSet<Long>();
|
||||
childIds.add(profileRadius.getId());
|
||||
profileSsidEAP.setChildProfileIds(childIds);
|
||||
profileSsidEAP = profileServiceInterface.create(profileSsidEAP);
|
||||
|
||||
Profile profileSsid_3_radios = new Profile();
|
||||
profileSsid_3_radios.setCustomerId(customer.getId());
|
||||
profileSsid_3_radios.setName("TipWlan-cloud-3-radios");
|
||||
@@ -344,6 +326,11 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
profileRf.setDetails(rfConfig);
|
||||
profileRf = profileServiceInterface.create(profileRf);
|
||||
|
||||
// create userlist file
|
||||
Path path = constructCaptivePortalUserList();
|
||||
|
||||
LOG.debug("Path to userlist {}", path);
|
||||
|
||||
// Captive portal profile
|
||||
Profile profileCaptivePortal = new Profile();
|
||||
profileCaptivePortal.setCustomerId(customer.getId());
|
||||
@@ -351,43 +338,50 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
profileCaptivePortal.setProfileType(ProfileType.captive_portal);
|
||||
|
||||
CaptivePortalConfiguration captivePortalConfig = new CaptivePortalConfiguration();
|
||||
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.guest);
|
||||
captivePortalConfig.setBrowserTitle("Access the network as Guest");
|
||||
captivePortalConfig.setExpiryType(SessionExpiryType.unlimited);
|
||||
captivePortalConfig.setMaxUsersWithSameCredentials(42);
|
||||
captivePortalConfig.setName(profileCaptivePortal.getName());
|
||||
captivePortalConfig.setSuccessPageMarkdownText("Welcome to the network");
|
||||
captivePortalConfig.setUserAcceptancePolicy("Use this network at your own risk. No warranty of any kind.");
|
||||
|
||||
List<TimedAccessUserRecord> userList = new ArrayList<>();
|
||||
constructCaptivePortalUserList(userList);
|
||||
captivePortalConfig.setUserList(userList);
|
||||
|
||||
ManagedFileInfo info = new ManagedFileInfo();
|
||||
info.setAltSlot(true);
|
||||
info.setApExportUrl("userList");
|
||||
info.setFileCategory(FileCategory.UsernamePasswordList);
|
||||
info.setFileType(FileType.TEXT);
|
||||
captivePortalConfig.setUsernamePasswordFile(info);
|
||||
captivePortalConfig.setRedirectURL("https://www.google.com");
|
||||
captivePortalConfig.setSessionTimeoutInMinutes(10);
|
||||
captivePortalConfig.setAuthenticationType(CaptivePortalAuthenticationType.username);
|
||||
ManagedFileInfo backgroundFile = new ManagedFileInfo();
|
||||
backgroundFile.setFileCategory(FileCategory.CaptivePortalBackground);
|
||||
backgroundFile.setFileType(FileType.PNG);
|
||||
backgroundFile.setApExportUrl("/filestore/tip-logo.png");
|
||||
ManagedFileInfo logoFile = new ManagedFileInfo();
|
||||
logoFile.setFileCategory(FileCategory.CaptivePortalLogo);
|
||||
logoFile.setFileType(FileType.PNG);
|
||||
logoFile.setApExportUrl("/filestore/tip-logo-mobile.png");
|
||||
ManagedFileInfo usernamePasswordFile = new ManagedFileInfo();
|
||||
usernamePasswordFile.setFileCategory(FileCategory.UsernamePasswordList);
|
||||
usernamePasswordFile.setFileType(FileType.TEXT);
|
||||
usernamePasswordFile.setApExportUrl("/filestore/userlist.txt");
|
||||
captivePortalConfig.setUsernamePasswordFile(usernamePasswordFile);
|
||||
captivePortalConfig.setBackgroundFile(backgroundFile);
|
||||
captivePortalConfig.setLogoFile(logoFile);
|
||||
captivePortalConfig.setBrowserTitle(profileCaptivePortal.getName());
|
||||
profileCaptivePortal.setDetails(captivePortalConfig);
|
||||
|
||||
profileCaptivePortal = profileServiceInterface.create(profileCaptivePortal);
|
||||
|
||||
// BonjourGateway profile
|
||||
Profile bonjourProfile = new Profile();
|
||||
bonjourProfile.setCustomerId(customer.getId());
|
||||
bonjourProfile.setName("Bonjour-gateway");
|
||||
bonjourProfile.setProfileType(ProfileType.bonjour);
|
||||
BonjourGatewayProfile bonjourGatewayConfig = new BonjourGatewayProfile();
|
||||
bonjourGatewayConfig.setProfileDescription("Bonjour Gateway Configuration for Design Testing");
|
||||
BonjourServiceSet bonjourServiceSet = new BonjourServiceSet();
|
||||
bonjourServiceSet.setVlanId((short) 1);
|
||||
bonjourServiceSet.addServiceName(BonjourService.SFTP.getServiceName());
|
||||
bonjourServiceSet.addServiceName(BonjourService.SSH.getServiceName());
|
||||
bonjourServiceSet.addServiceName(BonjourService.AirPort.getServiceName());
|
||||
bonjourGatewayConfig.addBonjourServiceSet(bonjourServiceSet);
|
||||
bonjourProfile.setDetails(bonjourGatewayConfig);
|
||||
bonjourProfile = profileServiceInterface.create(bonjourProfile);
|
||||
Profile profileSsid_captive = new Profile();
|
||||
profileSsid_captive.setCustomerId(customer.getId());
|
||||
profileSsid_captive.setName("TipWlan-captive");
|
||||
SsidConfiguration ssidConfig_captive = SsidConfiguration.createWithDefaults();
|
||||
Set<RadioType> appliedRadios_3_radios_captive = new HashSet<RadioType>();
|
||||
appliedRadios_3_radios_captive.add(RadioType.is2dot4GHz);
|
||||
ssidConfig_captive.setAppliedRadios(appliedRadios_3_radios_captive);
|
||||
ssidConfig_captive.setSsid("TipWlan-captive");
|
||||
ssidConfig_captive.setSecureMode(SecureMode.open);
|
||||
ssidConfig_captive.setRadiusAcountingServiceInterval(60);
|
||||
ssidConfig_captive.setCaptivePortalId(profileCaptivePortal.getId());
|
||||
ssidConfig_captive.setForwardMode(NetworkForwardMode.NAT);
|
||||
profileSsid_captive.setDetails(ssidConfig_captive);
|
||||
profileSsid_captive.getChildProfileIds().add(profileCaptivePortal.getId());
|
||||
profileSsid_captive = profileServiceInterface.create(profileSsid_captive);
|
||||
|
||||
Profile apEventRates = new Profile();
|
||||
apEventRates.setCustomerId(customer.getId());
|
||||
apEventRates.setName("ApEventRateProfile-default");
|
||||
apEventRates.setDetails(ApEventRateConfigurationDetails.createWithDefaults());
|
||||
|
||||
apEventRates = profileServiceInterface.create(apEventRates);
|
||||
|
||||
Profile profileAp_3_radios = new Profile();
|
||||
profileAp_3_radios.setCustomerId(customer.getId());
|
||||
@@ -402,10 +396,19 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
radioProfileMap_3_radios.put(RadioType.is5GHzU,
|
||||
RadioProfileConfiguration.createWithDefaults(RadioType.is5GHzU));
|
||||
((ApNetworkConfiguration) profileAp_3_radios.getDetails()).setRadioMap(radioProfileMap_3_radios);
|
||||
|
||||
try {
|
||||
Set<GreTunnelConfiguration> greTunnels = Set.of(new GreTunnelConfiguration("gre1",
|
||||
InetAddress.getByName("192.168.1.101"), Set.of(Integer.valueOf(100))));
|
||||
((ApNetworkConfiguration) profileAp_3_radios.getDetails()).setGreTunnelConfigurations(greTunnels);
|
||||
|
||||
} catch (UnknownHostException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
profileAp_3_radios.getChildProfileIds().add(profileSsid_3_radios.getId());
|
||||
profileAp_3_radios.getChildProfileIds()
|
||||
.add(create3RadioMetricsProfile("Metrics-Profile-3-Radios", customer.getId()).getId());
|
||||
profileAp_3_radios.getChildProfileIds().add(createRfProfile(customer.getId(), "TipWlan-rf").getId());
|
||||
profileAp_3_radios.getChildProfileIds().add(profileRf.getId());
|
||||
profileAp_3_radios.getChildProfileIds().add(apEventRates.getId());
|
||||
profileAp_3_radios = profileServiceInterface.create(profileAp_3_radios);
|
||||
|
||||
// TipWlan-cloud-hotspot-access
|
||||
@@ -419,16 +422,9 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
radioProfileMap_2_radios.put(RadioType.is5GHz, RadioProfileConfiguration.createWithDefaults(RadioType.is5GHz));
|
||||
((ApNetworkConfiguration) profileAp_2_radios.getDetails()).setRadioMap(radioProfileMap_2_radios);
|
||||
profileAp_2_radios.getChildProfileIds().add(profileSsid_2_radios.getId());
|
||||
profileAp_3_radios.getChildProfileIds().add(profileRf.getId());
|
||||
profileAp_2_radios.getChildProfileIds().add(profileRf.getId());
|
||||
profileAp_2_radios = profileServiceInterface.create(profileAp_2_radios);
|
||||
|
||||
Profile enterpriseProfileAp = new Profile();
|
||||
enterpriseProfileAp.setCustomerId(customer.getId());
|
||||
enterpriseProfileAp.setName("EnterpriseApProfile");
|
||||
enterpriseProfileAp.setDetails(ApNetworkConfiguration.createWithDefaults());
|
||||
enterpriseProfileAp.getChildProfileIds().add(profileSsidEAP.getId());
|
||||
enterpriseProfileAp = profileServiceInterface.create(enterpriseProfileAp);
|
||||
|
||||
// configure equipment auto-provisioning for the customer
|
||||
CustomerDetails details = new CustomerDetails();
|
||||
EquipmentAutoProvisioningSettings autoProvisioning = new EquipmentAutoProvisioningSettings();
|
||||
@@ -452,18 +448,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
customer.setDetails(details);
|
||||
customer = customerServiceInterface.update(customer);
|
||||
|
||||
Profile passpointHotspotConfig = new Profile();
|
||||
Profile passpointOperatorProfile = new Profile();
|
||||
Profile passpointVenueProfile = new Profile();
|
||||
Profile hotspot20IdProviderProfile = new Profile();
|
||||
Profile hotspot20IdProviderProfile2 = new Profile();
|
||||
Profile profileSsidPsk = new Profile();
|
||||
Profile profileSsidOsu = new Profile();
|
||||
Profile hotspotProfileAp = createPasspointHotspot(customer, passpointHotspotConfig, passpointOperatorProfile, passpointVenueProfile,
|
||||
hotspot20IdProviderProfile, hotspot20IdProviderProfile2, profileSsidPsk, profileSsidOsu);
|
||||
|
||||
LOG.info("Passpoint AP Profile {}", hotspotProfileAp);
|
||||
|
||||
List<Equipment> equipmentList = new ArrayList<>();
|
||||
|
||||
for (int i = 1; i <= numEquipmentToCreateOnStartup; i++) {
|
||||
@@ -488,11 +472,9 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
// setting the region to the location used in location_2, so assign
|
||||
// profiles
|
||||
// based on this
|
||||
if (i <= 32) {
|
||||
equipment.setProfileId(profileAp_3_radios.getId());
|
||||
} else {
|
||||
equipment.setProfileId(enterpriseProfileAp.getId());
|
||||
}
|
||||
|
||||
equipment.setProfileId(profileAp_3_radios.getId());
|
||||
|
||||
equipment.setInventoryId("ap-" + i);
|
||||
equipment.setName("AP " + i);
|
||||
equipment.setBaseMacAddress(new MacAddress(
|
||||
@@ -526,11 +508,7 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
|
||||
createAlarmsForEquipment(equipment);
|
||||
|
||||
if (i <= 32) {
|
||||
createClientSessions(equipment, ssidConfig_3_radios);
|
||||
} else {
|
||||
createClientSessions(equipment, ssidConfigEAP);
|
||||
}
|
||||
createClientSessions(equipment, ssidConfig_captive);
|
||||
|
||||
createServiceMetrics(equipment);
|
||||
|
||||
@@ -634,22 +612,20 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
profileSsidOsu.getChildProfileIds().add(hotspot20IdProviderProfile2.getId());
|
||||
profileSsidOsu = profileServiceInterface.update(profileSsidOsu);
|
||||
|
||||
passpointHotspotConfig = createPasspointHotspotConfig(customer.getId(), hotspot20IdProviderProfile2.getId(), hotspot20IdProviderProfile.getId(), passpointOperatorProfile.getId(),
|
||||
passpointVenueProfile.getId(), profileSsidPsk.getId(), profileSsidOsu.getId());
|
||||
|
||||
passpointHotspotConfig = createPasspointHotspotConfig(customer.getId(), hotspot20IdProviderProfile2.getId(),
|
||||
hotspot20IdProviderProfile.getId(), passpointOperatorProfile.getId(), passpointVenueProfile.getId(),
|
||||
profileSsidPsk.getId(), profileSsidOsu.getId());
|
||||
|
||||
profileSsidPsk.getChildProfileIds().add(passpointHotspotConfig.getId());
|
||||
profileSsidPsk = profileServiceInterface.update(profileSsidPsk);
|
||||
|
||||
|
||||
return createPasspointApProfile(customer.getId(), profileSsidPsk.getId(), profileSsidOsu.getId());
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected Profile createPasspointHotspotConfig(int customerId, Long hotspot20IdProviderProfile2Id, Long hotspot20IdProviderProfileId, Long passpointOperatorProfileId,
|
||||
Long passpointVenueProfileId,Long profileSsidPskId, Long profileSsidOpenId ) {
|
||||
protected Profile createPasspointHotspotConfig(int customerId, Long hotspot20IdProviderProfile2Id,
|
||||
Long hotspot20IdProviderProfileId, Long passpointOperatorProfileId, Long passpointVenueProfileId,
|
||||
Long profileSsidPskId, Long profileSsidOpenId) {
|
||||
Profile passpointHotspotConfig = new Profile();
|
||||
passpointHotspotConfig.setCustomerId(customerId);
|
||||
passpointHotspotConfig.setName("TipWlan-Passpoint-Config");
|
||||
@@ -666,12 +642,11 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
providerIds.add(hotspot20IdProviderProfile2Id);
|
||||
((PasspointProfile) passpointHotspotConfig.getDetails()).setPasspointOsuProviderProfileIds(providerIds);
|
||||
((PasspointProfile) passpointHotspotConfig.getDetails())
|
||||
.setPasspointOperatorProfileId(passpointOperatorProfileId);
|
||||
((PasspointProfile) passpointHotspotConfig.getDetails())
|
||||
.setPasspointVenueProfileId(passpointVenueProfileId);
|
||||
.setPasspointOperatorProfileId(passpointOperatorProfileId);
|
||||
((PasspointProfile) passpointHotspotConfig.getDetails()).setPasspointVenueProfileId(passpointVenueProfileId);
|
||||
((PasspointProfile) passpointHotspotConfig.getDetails()).setOsuSsidProfileId(profileSsidOpenId);
|
||||
((PasspointProfile) passpointHotspotConfig.getDetails())
|
||||
.setAssociatedAccessSsidProfileIds(List.of(profileSsidPskId));
|
||||
.setAssociatedAccessSsidProfileIds(List.of(profileSsidPskId));
|
||||
|
||||
return profileServiceInterface.create(passpointHotspotConfig);
|
||||
}
|
||||
@@ -694,11 +669,13 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
mccMncList.add(passpointMccMnc);
|
||||
Set<String> naiRealms = new HashSet<>();
|
||||
naiRealms.add(naiRealm);
|
||||
List<Byte> roamingOi = new ArrayList<>();
|
||||
roamingOi.add(Byte.valueOf("1"));
|
||||
roamingOi.add(Byte.valueOf("2"));
|
||||
roamingOi.add(Byte.valueOf("3"));
|
||||
roamingOi.add(Byte.valueOf("4"));
|
||||
List<String> roamingOi = new ArrayList<>();
|
||||
roamingOi.add("BAA2D00100");
|
||||
roamingOi.add("BAA2D00000");
|
||||
roamingOi.add("F4F5E8F5F4");
|
||||
roamingOi.add("005014");
|
||||
roamingOi.add("004096");
|
||||
|
||||
hotspot20IdProviderProfile = createOsuProviderProfile(customer, hotspot20IdProviderProfile, mccMncList,
|
||||
naiRealms, "https://example.com/osu/" + naiRealm.split(".com")[0], naiRealm.split(".com")[0], naiRealm,
|
||||
roamingOi);
|
||||
@@ -723,7 +700,10 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
passpointOperatorProfile.setName("TipWlan-Passpoint-Operator");
|
||||
passpointOperatorProfile.setProfileType(ProfileType.passpoint_operator);
|
||||
passpointOperatorProfile.setDetails(PasspointOperatorProfile.createWithDefaults());
|
||||
((PasspointOperatorProfile) passpointOperatorProfile.getDetails())
|
||||
.setDomainNameList(Set.of("rogers.com", "telus.com", "bell.ca"));
|
||||
passpointOperatorProfile = profileServiceInterface.create(passpointOperatorProfile);
|
||||
|
||||
return passpointOperatorProfile;
|
||||
}
|
||||
|
||||
@@ -801,7 +781,7 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
|
||||
protected Profile createOsuProviderProfile(Customer customer, Profile hotspot20IdProviderProfile,
|
||||
List<PasspointMccMnc> mccMncList, Set<String> realms, String serverUri, String suffix, String domainName,
|
||||
List<Byte> roamingOi) {
|
||||
List<String> roamingOi) {
|
||||
|
||||
PasspointOsuProviderProfile passpointIdProviderProfile = PasspointOsuProviderProfile.createWithDefaults();
|
||||
|
||||
@@ -844,7 +824,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
|
||||
naiRealmList.add(naiRealmInfo);
|
||||
passpointIdProviderProfile.setNaiRealmList(naiRealmList);
|
||||
passpointIdProviderProfile.setDomainName(domainName);
|
||||
passpointIdProviderProfile.setOsuNaiStandalone("anonymous@" + domainName);
|
||||
passpointIdProviderProfile.setOsuNaiShared("anonymous@" + domainName);
|
||||
List<Integer> methodList = new ArrayList<>();
|
||||
@@ -878,7 +857,9 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
return hotspot20IdProviderProfile;
|
||||
}
|
||||
|
||||
protected void constructCaptivePortalUserList(List<TimedAccessUserRecord> userList) {
|
||||
protected Path constructCaptivePortalUserList() {
|
||||
|
||||
List<TimedAccessUserRecord> userList = new ArrayList<>();
|
||||
|
||||
TimedAccessUserRecord userRecord1 = new TimedAccessUserRecord();
|
||||
userRecord1.setActivationTime(System.currentTimeMillis());
|
||||
@@ -902,7 +883,7 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
TimedAccessUserRecord userRecord2 = new TimedAccessUserRecord();
|
||||
userRecord2.setActivationTime(System.currentTimeMillis());
|
||||
userRecord2.setExpirationTime(System.currentTimeMillis() + 1000 * 60 * 60); // 1
|
||||
// hr
|
||||
// hr
|
||||
userRecord2.setPassword("testing123");
|
||||
userRecord2.setUsername("customer");
|
||||
TimedAccessUserDetails userDetails2 = new TimedAccessUserDetails();
|
||||
@@ -956,34 +937,27 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
userRecord4.setUserMacAddresses(userMacAddresses4);
|
||||
userList.add(userRecord4);
|
||||
|
||||
Path path = Paths.get("/tmp/tip-wlan-filestore/userList");
|
||||
Path path = Paths.get("/tmp/tip-wlan-filestore/userlist.txt");
|
||||
|
||||
try {
|
||||
Files.deleteIfExists(path);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (TimedAccessUserRecord userRecord : userList) {
|
||||
|
||||
byte[] bytes = ("username=" + userRecord.getUsername() + ", password=" + userRecord.getPassword()
|
||||
sb.append("username=" + userRecord.getUsername() + ", password=" + userRecord.getPassword()
|
||||
+ ", firstname=" + userRecord.getUserDetails().getFirstName() + ", lastname="
|
||||
+ userRecord.getUserDetails().getLastName() + System.lineSeparator()).getBytes();
|
||||
try {
|
||||
Files.write(path, bytes, StandardOpenOption.APPEND);
|
||||
System.out.println("Successfully written data to the file");
|
||||
} catch (NoSuchFileException e) {
|
||||
try {
|
||||
Files.write(path, bytes);
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
+ userRecord.getUserDetails().getLastName() + System.lineSeparator());
|
||||
}
|
||||
|
||||
try (BufferedWriter bw = Files.newBufferedWriter(path, StandardCharsets.UTF_8, StandardOpenOption.CREATE_NEW)) {
|
||||
bw.write(sb.toString());
|
||||
System.out.println("Successfully written data to the file");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
private void createFirmwareObjects(Customer customer) {
|
||||
@@ -1170,6 +1144,8 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
apNodeMetrics.setApPerformance(apPerformance);
|
||||
|
||||
smr.setCreatedTimestamp(System.currentTimeMillis() - mCnt * 60000);
|
||||
smr.setLocationId(equipment.getLocationId());
|
||||
|
||||
apNodeMetrics.setChannelUtilization(RadioType.is2dot4GHz, getRandomInt(30, 70));
|
||||
apNodeMetrics.setChannelUtilization(RadioType.is5GHzL, getRandomInt(30, 70));
|
||||
apNodeMetrics.setChannelUtilization(RadioType.is5GHzU, getRandomInt(30, 70));
|
||||
@@ -1261,6 +1237,7 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
smrClient.setDetails(clientMetrics);
|
||||
smrClient.setCreatedTimestamp(smr.getCreatedTimestamp());
|
||||
smrClient.setClientMac(clientMac.getAddressAsLong());
|
||||
smrClient.setLocationId(equipment.getLocationId());
|
||||
|
||||
clientMetrics.setPeriodLengthSec(60);
|
||||
clientMetrics.setRadioType(RadioType.is2dot4GHz);
|
||||
@@ -1287,6 +1264,7 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
smrClient.setDetails(clientMetrics);
|
||||
smrClient.setCreatedTimestamp(smr.getCreatedTimestamp());
|
||||
smrClient.setClientMac(clientMac.getAddressAsLong());
|
||||
smrClient.setLocationId(equipment.getLocationId());
|
||||
|
||||
clientMetrics.setPeriodLengthSec(60);
|
||||
clientMetrics.setRadioType(RadioType.is5GHzL);
|
||||
@@ -1313,6 +1291,7 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
smrClient.setDetails(clientMetrics);
|
||||
smrClient.setCreatedTimestamp(smr.getCreatedTimestamp());
|
||||
smrClient.setClientMac(clientMac.getAddressAsLong());
|
||||
smrClient.setLocationId(equipment.getLocationId());
|
||||
|
||||
clientMetrics.setPeriodLengthSec(60);
|
||||
clientMetrics.setRadioType(RadioType.is5GHzU);
|
||||
@@ -1532,6 +1511,21 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
|
||||
status.setDetails(eqRadioUtilReport);
|
||||
statusList.add(status);
|
||||
|
||||
status = new Status();
|
||||
status.setCustomerId(equipment.getCustomerId());
|
||||
status.setEquipmentId(equipment.getId());
|
||||
EquipmentChannelStatusData eqChannelStatus = new EquipmentChannelStatusData();
|
||||
|
||||
Map<RadioType, Integer> channelStatusDataMap = new EnumMap<>(RadioType.class);
|
||||
channelStatusDataMap.put(RadioType.is2dot4GHz, 6);
|
||||
channelStatusDataMap.put(RadioType.is5GHzL, 36);
|
||||
channelStatusDataMap.put(RadioType.is5GHzU, 157);
|
||||
|
||||
eqChannelStatus.setChannelNumberStatusDataMap(channelStatusDataMap);
|
||||
|
||||
status.setDetails(eqChannelStatus);
|
||||
statusList.add(status);
|
||||
|
||||
statusServiceInterface.update(statusList);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,26 +15,26 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-cassandra</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>client-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-cassandra-tests</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>client-datastore-common-test</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -141,7 +141,17 @@ public class ClientDAO {
|
||||
|
||||
private static final String CQL_DELETE_BLOCKED_LIST =
|
||||
"delete from client_blocklist where customerId = ? and macAddress = ?";
|
||||
|
||||
// Statements using client_by_mac_string table
|
||||
private static final String CQL_GET_CLIENT_MAC_LIKE_MAC_SUBSTRING =
|
||||
"select customerId, macAddress from client_by_mac_string where customerId = ? and macAddressString like ?";
|
||||
|
||||
private static final String CQL_INSERT_INTO_CLIENT_MAC_STRING =
|
||||
"insert into client_by_mac_string (customerId, macAddress, macAddressString) values (?, ?, ?)";
|
||||
|
||||
private static final String CQL_DELETE_FROM_CLIENT_MAC_STRING =
|
||||
"delete from client_by_mac_string where customerId = ? and macAddressString = ?";
|
||||
|
||||
private static final RowMapper<Client> clientRowMapper = new ClientRowMapper();
|
||||
|
||||
@Autowired
|
||||
@@ -156,6 +166,9 @@ public class ClientDAO {
|
||||
private PreparedStatement preparedStmt_getBlockedListForCustomer;
|
||||
private PreparedStatement preparedStmt_insertBlockedList;
|
||||
private PreparedStatement preparedStmt_deleteBlockedList;
|
||||
private PreparedStatement preparedStmt_getClientMacLikeMacString;
|
||||
private PreparedStatement preparedStmt_insertMacString;
|
||||
private PreparedStatement preparedStmt_deleteMacString;
|
||||
|
||||
|
||||
@PostConstruct
|
||||
@@ -170,8 +183,11 @@ public class ClientDAO {
|
||||
preparedStmt_getPageForCustomer = cqlSession.prepare(CQL_GET_BY_CUSTOMER_ID);
|
||||
preparedStmt_getBlockedListForCustomer = cqlSession.prepare(CQL_GET_BLOCKED_LIST_BY_CUSTOMER_ID);
|
||||
preparedStmt_insertBlockedList = cqlSession.prepare(CQL_INSERT_BLOCKED_LIST);
|
||||
preparedStmt_deleteBlockedList = cqlSession.prepare(CQL_DELETE_BLOCKED_LIST);
|
||||
|
||||
preparedStmt_deleteBlockedList = cqlSession.prepare(CQL_DELETE_BLOCKED_LIST);
|
||||
preparedStmt_getClientMacLikeMacString = cqlSession.prepare(CQL_GET_CLIENT_MAC_LIKE_MAC_SUBSTRING);
|
||||
preparedStmt_insertMacString = cqlSession.prepare(CQL_INSERT_INTO_CLIENT_MAC_STRING);
|
||||
preparedStmt_deleteMacString = cqlSession.prepare(CQL_DELETE_FROM_CLIENT_MAC_STRING);
|
||||
|
||||
} catch (InvalidQueryException e) {
|
||||
LOG.error("Cannot prepare query", e);
|
||||
throw e;
|
||||
@@ -211,6 +227,13 @@ public class ClientDAO {
|
||||
client.setNeedToUpdateBlocklist(true);
|
||||
|
||||
}
|
||||
|
||||
// update client_by_mac_string table
|
||||
cqlSession.execute(preparedStmt_insertMacString.bind(
|
||||
client.getCustomerId(),
|
||||
client.getMacAddress().getAddressAsLong(),
|
||||
client.getMacAddress().getAddressAsString()
|
||||
));
|
||||
|
||||
LOG.debug("Stored Client {}", client);
|
||||
|
||||
@@ -334,6 +357,11 @@ public class ClientDAO {
|
||||
client.setNeedToUpdateBlocklist(true);
|
||||
|
||||
}
|
||||
|
||||
// update client_by_mac_string table
|
||||
cqlSession.execute(preparedStmt_deleteMacString.bind(
|
||||
client.getCustomerId(),
|
||||
client.getMacAddress().getAddressAsString()));
|
||||
|
||||
} else {
|
||||
throw new DsEntityNotFoundException("Cannot find Client for id " + customerId + " " + clientMac);
|
||||
@@ -378,10 +406,11 @@ public class ClientDAO {
|
||||
LOG.debug("get({}, {}) returns {} record(s)", customerId, clientMacSet, results.size());
|
||||
return results;
|
||||
}
|
||||
|
||||
private static enum FilterOptions{ customer_only, customer_and_macAddress}
|
||||
|
||||
|
||||
public PaginationResponse<Client> getForCustomer(int customerId, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<Client> context) {
|
||||
public PaginationResponse<Client> getForCustomer(int customerId, String macSubstring,
|
||||
List<ColumnAndSort> sortBy, PaginationContext<Client> context) {
|
||||
|
||||
PaginationResponse<Client> ret = new PaginationResponse<>();
|
||||
ret.setContext(context.clone());
|
||||
@@ -389,13 +418,27 @@ public class ClientDAO {
|
||||
if (ret.getContext().isLastPage()) {
|
||||
// no more pages available according to the context
|
||||
LOG.debug(
|
||||
"No more pages available when looking up Clients for customer {} with last returned page number {}",
|
||||
customerId, context.getLastReturnedPageNumber());
|
||||
"No more pages available when looking up Clients for customer {} macSubstring {} with last returned page number {}",
|
||||
customerId, macSubstring, context.getLastReturnedPageNumber());
|
||||
return ret;
|
||||
}
|
||||
|
||||
LOG.debug("Looking up Clients for customer {} with last returned page number {}",
|
||||
customerId, context.getLastReturnedPageNumber());
|
||||
LOG.debug("Looking up Clients for customer {} macSubstring {} with last returned page number {}",
|
||||
customerId, macSubstring, context.getLastReturnedPageNumber());
|
||||
|
||||
String query = CQL_GET_BY_CUSTOMER_ID;
|
||||
FilterOptions filterOptions = FilterOptions.customer_only;
|
||||
|
||||
// add filters for the query
|
||||
ArrayList<Object> queryArgs = new ArrayList<>();
|
||||
queryArgs.add(customerId);
|
||||
|
||||
if (macSubstring != null && !macSubstring.isEmpty()) {
|
||||
queryArgs.add("%" + macSubstring.toLowerCase() + "%");
|
||||
|
||||
query = CQL_GET_CLIENT_MAC_LIKE_MAC_SUBSTRING;
|
||||
filterOptions = FilterOptions.customer_and_macAddress;
|
||||
}
|
||||
|
||||
// add sorting options for the query
|
||||
// Cassandra allows very limited support for ordering results
|
||||
@@ -403,8 +446,18 @@ public class ClientDAO {
|
||||
// In here allowed orderings are the order induced by the clustering columns and the reverse of that one.
|
||||
// also, order by with secondary indexes is not supported
|
||||
// ***** We will ignore the order supplied by the caller for this datastore
|
||||
|
||||
BoundStatement boundStmt = preparedStmt_getPageForCustomer.bind(customerId );
|
||||
|
||||
PreparedStatement preparedStmt_getPageForCustomer;
|
||||
try {
|
||||
preparedStmt_getPageForCustomer = cqlSession.prepare(query);
|
||||
} catch(InvalidQueryException e) {
|
||||
LOG.error("Cannot prepare cassandra query '{}'", query, e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
// add pagination parameters for the query
|
||||
BoundStatement boundStmt = preparedStmt_getPageForCustomer.bind(queryArgs.toArray() );
|
||||
|
||||
//have to do it this way - setPageSize creates new object
|
||||
boundStmt = boundStmt.setPageSize(context.getMaxItemsPerPage());
|
||||
|
||||
@@ -419,17 +472,36 @@ public class ClientDAO {
|
||||
|
||||
List<Client> pageItems = new ArrayList<>();
|
||||
|
||||
// iterate through the current page
|
||||
while (rs.getAvailableWithoutFetching() > 0) {
|
||||
pageItems.add(clientRowMapper.mapRow(rs.one()));
|
||||
switch(filterOptions) {
|
||||
case customer_only:
|
||||
// iterate through the current page
|
||||
while (rs.getAvailableWithoutFetching() > 0) {
|
||||
pageItems.add(clientRowMapper.mapRow(rs.one()));
|
||||
}
|
||||
break;
|
||||
case customer_and_macAddress:
|
||||
//the query was against client_by_mac_string table
|
||||
//find all the macAddresses for the page, then retrieve records for them from client table
|
||||
Set<MacAddress> macAddrSet = new HashSet<>();
|
||||
while (rs.getAvailableWithoutFetching() > 0) {
|
||||
macAddrSet.add(new MacAddress(rs.one().getLong("macAddress")));
|
||||
}
|
||||
|
||||
//get all clients for the involved mac addresses
|
||||
pageItems = get(customerId, macAddrSet);
|
||||
|
||||
break;
|
||||
default:
|
||||
LOG.warn("Unknown filter option:", filterOptions);
|
||||
throw new IllegalArgumentException("Unknown filter option " + filterOptions);
|
||||
}
|
||||
|
||||
if (pageItems.isEmpty()) {
|
||||
LOG.debug("Cannot find Clients for customer {} with last returned page number {}",
|
||||
customerId, context.getLastReturnedPageNumber());
|
||||
LOG.debug("Cannot find Clients for customer {} macSubstring {} with last returned page number {}",
|
||||
customerId, macSubstring, context.getLastReturnedPageNumber());
|
||||
} else {
|
||||
LOG.debug("Found {} Clients for customer {} with last returned page number {}",
|
||||
pageItems.size(), customerId, context.getLastReturnedPageNumber());
|
||||
LOG.debug("Found {} Clients for customer {} macSubstring {} with last returned page number {}",
|
||||
pageItems.size(), customerId, macSubstring, context.getLastReturnedPageNumber());
|
||||
}
|
||||
|
||||
ret.setItems(pageItems);
|
||||
@@ -446,6 +518,15 @@ public class ClientDAO {
|
||||
// startAfterItem is not used in Cassandra datastores, set it to null
|
||||
ret.getContext().setStartAfterItem(null);
|
||||
|
||||
//in cassandra we will rely only on nextPagingState to set the lastPage indicator
|
||||
ret.getContext().setLastPage(false);
|
||||
|
||||
if(nextPagingState == null) {
|
||||
//in cassandra, if there are no more pages available, the pagingState is returned as null by the driver
|
||||
//this overrides all other heuristics related to guessing the indication of the last page
|
||||
ret.getContext().setLastPage(true);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,21 +49,21 @@ public class ClientDatastoreCassandra implements ClientDatastore {
|
||||
public List<Client> get(int customerId, Set<MacAddress> clientMacSet) {
|
||||
return clientDAO.get(customerId, clientMacSet);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Client> getBlockedClients(int customerId) {
|
||||
return clientDAO.getBlockedClients(customerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaginationResponse<Client> getForCustomer(int customerId, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<Client> context) {
|
||||
public PaginationResponse<Client> getForCustomer(int customerId, String macSubstring,
|
||||
List<ColumnAndSort> sortBy, PaginationContext<Client> context) {
|
||||
|
||||
if(context == null) {
|
||||
context = new PaginationContext<>();
|
||||
}
|
||||
|
||||
return clientDAO.getForCustomer( customerId, sortBy, context);
|
||||
return clientDAO.getForCustomer(customerId, macSubstring, sortBy, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,13 +88,13 @@ public class ClientDatastoreCassandra implements ClientDatastore {
|
||||
|
||||
@Override
|
||||
public PaginationResponse<ClientSession> getSessionsForCustomer(int customerId, Set<Long> equipmentIds, Set<Long> locationIds,
|
||||
List<ColumnAndSort> sortBy, PaginationContext<ClientSession> context) {
|
||||
String macSubstring, List<ColumnAndSort> sortBy, PaginationContext<ClientSession> context) {
|
||||
|
||||
if(context == null) {
|
||||
context = new PaginationContext<>();
|
||||
}
|
||||
|
||||
return clientSessionDAO.getSessionsForCustomer(customerId, equipmentIds, locationIds, sortBy, context);
|
||||
return clientSessionDAO.getSessionsForCustomer(customerId, equipmentIds, locationIds, macSubstring, sortBy, context);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.ColumnAndSort;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
import com.telecominfraproject.wlan.core.server.cassandra.CassandraUtils;
|
||||
import com.telecominfraproject.wlan.core.server.cassandra.RowMapper;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsEntityNotFoundException;
|
||||
|
||||
@@ -134,6 +135,12 @@ public class ClientSessionDAO {
|
||||
|
||||
private static final String CQL_INSERT_INTO_BY_LOCATION_TABLE = "insert into client_session_by_location(customerId, locationId, equipmentId, macAddress) values ( ?, ?, ?, ?) ";
|
||||
private static final String CQL_DELETE_FROM_BY_LOCATION_TABLE = "delete from client_session_by_location where locationId = ? and equipmentId = ? and macAddress = ? ";
|
||||
|
||||
private static final String CQL_INSERT_INTO_CLIENT_SESSION_MAC = "insert into client_session_by_mac (customerId, locationId, equipmentId, macAddress, macAddressString) values (?, ?, ?, ?, ?)";
|
||||
private static final String CQL_DELETE_FROM_CLIENT_SESSION_MAC = "delete from client_session_by_mac where locationId = ? and equipmentId = ? and macAddress = ?";
|
||||
|
||||
private static final String CQL_INSERT_INTO_CLIENT_SESSION_MAC_AND_EQUIPMENT = "insert into client_session_by_mac_and_equipment (customerId, locationId, equipmentId, macAddress, macAddressString) values (?, ?, ?, ?, ?)";
|
||||
private static final String CQL_DELETE_FROM_CLIENT_SESSION_MAC_AND_EQUIPMENT = "delete from client_session_by_mac_and_equipment where locationId = ? and equipmentId = ? and macAddress = ?";
|
||||
|
||||
|
||||
private static final RowMapper<ClientSession> clientSessionRowMapper = new ClientSessionRowMapper();
|
||||
@@ -151,6 +158,11 @@ public class ClientSessionDAO {
|
||||
private PreparedStatement preparedStmt_deleteByEquipment;
|
||||
private PreparedStatement preparedStmt_createByLocation;
|
||||
private PreparedStatement preparedStmt_deleteByLocation;
|
||||
private PreparedStatement preparedStmt_createByMac;
|
||||
private PreparedStatement preparedStmt_deleteByMac;
|
||||
private PreparedStatement preparedStmt_createByMacAndEquipment;
|
||||
private PreparedStatement preparedStmt_deleteByMacAndEquipment;
|
||||
|
||||
|
||||
@PostConstruct
|
||||
private void postConstruct(){
|
||||
@@ -166,6 +178,10 @@ public class ClientSessionDAO {
|
||||
preparedStmt_deleteByEquipment = cqlSession.prepare(CQL_DELETE_FROM_BY_EQUIPMENT_TABLE);
|
||||
preparedStmt_createByLocation = cqlSession.prepare(CQL_INSERT_INTO_BY_LOCATION_TABLE);
|
||||
preparedStmt_deleteByLocation = cqlSession.prepare(CQL_DELETE_FROM_BY_LOCATION_TABLE);
|
||||
preparedStmt_createByMac = cqlSession.prepare(CQL_INSERT_INTO_CLIENT_SESSION_MAC);
|
||||
preparedStmt_deleteByMac = cqlSession.prepare(CQL_DELETE_FROM_CLIENT_SESSION_MAC);
|
||||
preparedStmt_createByMacAndEquipment = cqlSession.prepare(CQL_INSERT_INTO_CLIENT_SESSION_MAC_AND_EQUIPMENT);
|
||||
preparedStmt_deleteByMacAndEquipment = cqlSession.prepare(CQL_DELETE_FROM_CLIENT_SESSION_MAC_AND_EQUIPMENT);
|
||||
|
||||
} catch (InvalidQueryException e) {
|
||||
LOG.error("Cannot prepare query", e);
|
||||
@@ -203,6 +219,22 @@ public class ClientSessionDAO {
|
||||
clientSession.getLocationId(),
|
||||
clientSession.getEquipmentId(),
|
||||
clientSession.getMacAddress().getAddressAsLong()));
|
||||
|
||||
cqlSession.execute(preparedStmt_createByMac.bind(
|
||||
clientSession.getCustomerId(),
|
||||
clientSession.getLocationId(),
|
||||
clientSession.getEquipmentId(),
|
||||
clientSession.getMacAddress().getAddressAsLong(),
|
||||
clientSession.getMacAddress().getAddressAsString()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_createByMacAndEquipment.bind(
|
||||
clientSession.getCustomerId(),
|
||||
clientSession.getLocationId(),
|
||||
clientSession.getEquipmentId(),
|
||||
clientSession.getMacAddress().getAddressAsLong(),
|
||||
clientSession.getMacAddress().getAddressAsString()
|
||||
));
|
||||
|
||||
LOG.debug("Stored Client session {}", clientSession);
|
||||
|
||||
@@ -297,6 +329,16 @@ public class ClientSessionDAO {
|
||||
clientSession.getLocationId(),
|
||||
clientSession.getEquipmentId(),
|
||||
clientSession.getMacAddress().getAddressAsLong()));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteByMac.bind(
|
||||
clientSession.getLocationId(),
|
||||
clientSession.getEquipmentId(),
|
||||
clientSession.getMacAddress().getAddressAsLong()));
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteByMacAndEquipment.bind(
|
||||
clientSession.getLocationId(),
|
||||
clientSession.getEquipmentId(),
|
||||
clientSession.getMacAddress().getAddressAsLong()));
|
||||
|
||||
|
||||
return clientSession;
|
||||
@@ -336,9 +378,9 @@ public class ClientSessionDAO {
|
||||
return results;
|
||||
}
|
||||
|
||||
private static enum FilterOptions{ customer_only, customer_and_equipment, customer_and_location}
|
||||
private static enum FilterOptions{ customer_only, customer_and_equipment, customer_and_location, customer_and_macAddress}
|
||||
|
||||
public PaginationResponse<ClientSession> getSessionsForCustomer(int customerId, Set<Long> equipmentIds, Set<Long> locationIds, List<ColumnAndSort> sortBy,
|
||||
public PaginationResponse<ClientSession> getSessionsForCustomer(int customerId, Set<Long> equipmentIds, Set<Long> locationIds, String macSubstring, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<ClientSession> context) {
|
||||
|
||||
PaginationResponse<ClientSession> ret = new PaginationResponse<>();
|
||||
@@ -367,17 +409,7 @@ public class ClientSessionDAO {
|
||||
if (equipmentIds != null && !equipmentIds.isEmpty()) {
|
||||
queryArgs.addAll(equipmentIds);
|
||||
|
||||
StringBuilder strb = new StringBuilder(100);
|
||||
strb.append("and equipmentId in (");
|
||||
for (int i = 0; i < equipmentIds.size(); i++) {
|
||||
strb.append("?");
|
||||
if (i < equipmentIds.size() - 1) {
|
||||
strb.append(",");
|
||||
}
|
||||
}
|
||||
strb.append(") ");
|
||||
|
||||
query += strb.toString();
|
||||
query += "and equipmentId in " + CassandraUtils.getBindPlaceholders(equipmentIds);
|
||||
query_head = "select macAddress from client_session_by_equipment where customerId = ? ";
|
||||
|
||||
filterOptions = FilterOptions.customer_and_equipment;
|
||||
@@ -392,21 +424,32 @@ public class ClientSessionDAO {
|
||||
queryArgs.addAll(equipmentIds);
|
||||
}
|
||||
|
||||
StringBuilder strb = new StringBuilder(100);
|
||||
strb.append(" locationId in (");
|
||||
for (int i = 0; i < locationIds.size(); i++) {
|
||||
strb.append("?");
|
||||
if (i < locationIds.size() - 1) {
|
||||
strb.append(",");
|
||||
}
|
||||
}
|
||||
strb.append(") ");
|
||||
|
||||
query = strb.toString() + query;
|
||||
query = " locationId in " + CassandraUtils.getBindPlaceholders(locationIds) + query;
|
||||
query_head = "select macAddress from client_session_by_location where ";
|
||||
|
||||
filterOptions = FilterOptions.customer_and_location;
|
||||
}
|
||||
|
||||
//add macSubstring filters
|
||||
if (macSubstring != null && !macSubstring.isEmpty()) {
|
||||
queryArgs.clear();
|
||||
queryArgs.add(customerId);
|
||||
queryArgs.add("%" + macSubstring.toLowerCase() + "%");
|
||||
query_head = "select macAddress from client_session_by_mac where customerId = ? ";
|
||||
|
||||
if (locationIds != null && !locationIds.isEmpty()) {
|
||||
queryArgs.addAll(locationIds);
|
||||
query = "and " + query;
|
||||
}
|
||||
if (equipmentIds != null && !equipmentIds.isEmpty()) {
|
||||
queryArgs.addAll(equipmentIds);
|
||||
query_head = "select macAddress from client_session_by_mac_and_equipment where customerId = ? ";
|
||||
}
|
||||
|
||||
query = " and macAddressString like ? " + query + " allow filtering";
|
||||
|
||||
filterOptions = FilterOptions.customer_and_macAddress;
|
||||
}
|
||||
|
||||
// add sorting options for the query
|
||||
// Cassandra allows very limited support for ordering results
|
||||
@@ -450,14 +493,29 @@ public class ClientSessionDAO {
|
||||
break;
|
||||
case customer_and_equipment:
|
||||
case customer_and_location:
|
||||
case customer_and_macAddress:
|
||||
//the query was against client_session_by_equipment or client_session_by_location table
|
||||
//find all the macAddresses for the page, then retrieve records for them from client_session table
|
||||
Set<MacAddress> macAddrSet = new HashSet<>();
|
||||
while (rs.getAvailableWithoutFetching() > 0) {
|
||||
macAddrSet.add(new MacAddress(rs.one().getLong("macAddress")));
|
||||
}
|
||||
|
||||
//get all the sessions for the involved mac addresses
|
||||
List<ClientSession> pageSessions = getSessions(customerId, macAddrSet);
|
||||
pageItems.addAll(pageSessions);
|
||||
|
||||
//apply local filtering because retrieved sessions may be from different equipments and locations
|
||||
pageSessions.forEach(cs -> {
|
||||
//apply locationId and equipmentId filtering in here
|
||||
if ((locationIds == null || locationIds.isEmpty() || locationIds.contains(cs.getLocationId()))
|
||||
&& (equipmentIds == null || equipmentIds.isEmpty() || equipmentIds.contains(cs.getEquipmentId()))
|
||||
&& (macSubstring == null || macSubstring.isEmpty() || cs.getMacAddress().getAddressAsString().toLowerCase().contains(macSubstring.toLowerCase()))
|
||||
)
|
||||
{
|
||||
pageItems.add(cs);
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
default:
|
||||
LOG.warn("Unknown filter option:", filterOptions);
|
||||
@@ -486,6 +544,15 @@ public class ClientSessionDAO {
|
||||
// startAfterItem is not used in Cassandra datastores, set it to null
|
||||
ret.getContext().setStartAfterItem(null);
|
||||
|
||||
//in cassandra we will rely only on nextPagingState to set the lastPage indicator
|
||||
ret.getContext().setLastPage(false);
|
||||
|
||||
if(nextPagingState == null) {
|
||||
//in cassandra, if there are no more pages available, the pagingState is returned as null by the driver
|
||||
//this overrides all other heuristics related to guessing the indication of the last page
|
||||
ret.getContext().setLastPage(true);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client (
|
||||
PRIMARY KEY ((customerId, macAddress))
|
||||
) WITH comment='Wireless client details used by TIP WLAN CloudSDK';
|
||||
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_client_customerId ON tip_wlan_keyspace.client (customerId);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client_blocklist (
|
||||
@@ -19,6 +18,16 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client_blocklist (
|
||||
PRIMARY KEY ((customerId), macAddress)
|
||||
) WITH comment='Wireless client blocklist by MAC used by TIP WLAN CloudSDK';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client_by_mac_string (
|
||||
customerId int,
|
||||
macAddress bigint,
|
||||
macAddressString text,
|
||||
|
||||
PRIMARY KEY (customerId, macAddressString)
|
||||
) WITH comment='Index Table to look up wireless client details by macAddress in text form used by TIP WLAN CloudSDK';
|
||||
|
||||
CREATE CUSTOM INDEX IF NOT EXISTS idx_client_macAddressString ON tip_wlan_keyspace.client_by_mac_string (macAddressString) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode': 'CONTAINS', 'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer', 'case_sensitive': 'false'};
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client_session (
|
||||
customerId int,
|
||||
@@ -32,7 +41,8 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client_session (
|
||||
details blob,
|
||||
|
||||
PRIMARY KEY ((customerId, macAddress), equipmentId)
|
||||
) WITH comment='Wireless client sessions used by TIP WLAN CloudSDK';
|
||||
) WITH comment='Wireless client sessions used by TIP WLAN CloudSDK. Records automatically expire after 30 days'
|
||||
AND default_time_to_live = 2592000;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_client_session_customerId ON tip_wlan_keyspace.client_session (customerId);
|
||||
|
||||
@@ -42,14 +52,40 @@ CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client_session_by_equipment (
|
||||
macAddress bigint ,
|
||||
|
||||
PRIMARY KEY ((customerId, equipmentId), macAddress)
|
||||
) WITH comment='Index Table to look up wireless client sessions by equipmentId used by TIP WLAN CloudSDK';
|
||||
) WITH comment='Index Table to look up wireless client sessions by equipmentId used by TIP WLAN CloudSDK. Records automatically expire after 30 days'
|
||||
AND default_time_to_live = 2592000;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client_session_by_location (
|
||||
customerId int,
|
||||
locationId bigint,
|
||||
equipmentId bigint,
|
||||
macAddress bigint ,
|
||||
macAddress bigint,
|
||||
|
||||
PRIMARY KEY ((locationId), equipmentId, macAddress)
|
||||
) WITH comment='Index Table to look up wireless client sessions by location and equipment used by TIP WLAN CloudSDK';
|
||||
) WITH comment='Index Table to look up wireless client sessions by location and equipment used by TIP WLAN CloudSDK. Records automatically expire after 30 days'
|
||||
AND default_time_to_live = 2592000;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client_session_by_mac (
|
||||
customerId int,
|
||||
locationId bigint,
|
||||
equipmentId bigint,
|
||||
macAddress bigint,
|
||||
macAddressString text,
|
||||
|
||||
PRIMARY KEY ((macAddress), locationId, equipmentId, macAddressString)
|
||||
) WITH comment='Index Table to look up wireless client sessions by macAddressString, location, and equipment by TIP WLAN CloudSDK. Records automatically expire after 30 days'
|
||||
AND default_time_to_live = 2592000;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.client_session_by_mac_and_equipment (
|
||||
customerId int,
|
||||
locationId bigint,
|
||||
equipmentId bigint,
|
||||
macAddress bigint,
|
||||
macAddressString text,
|
||||
|
||||
PRIMARY KEY ((macAddress), equipmentId, locationId, macAddressString)
|
||||
) WITH comment='Index Table to look up wireless client sessions by macAddressString, location, and equipment by TIP WLAN CloudSDK. Records automatically expire after 30 days'
|
||||
AND default_time_to_live = 2592000;
|
||||
|
||||
CREATE CUSTOM INDEX IF NOT EXISTS idx_client_session_by_mac_macAddressString ON tip_wlan_keyspace.client_session_by_mac (macAddressString) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode': 'CONTAINS', 'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer', 'case_sensitive': 'false'};
|
||||
CREATE CUSTOM INDEX IF NOT EXISTS idx_client_session_by_mac_and_equipment_macAddressString ON tip_wlan_keyspace.client_session_by_mac_and_equipment (macAddressString) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode': 'CONTAINS', 'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer', 'case_sensitive': 'false'};
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
package com.telecominfraproject.wlan.client.datastore.cassandra;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
@@ -20,15 +12,6 @@ import org.springframework.context.annotation.Import;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.telecominfraproject.wlan.client.datastore.BaseClientDatastoreTest;
|
||||
import com.telecominfraproject.wlan.client.info.models.ClientInfoDetails;
|
||||
import com.telecominfraproject.wlan.client.models.Client;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionDetails;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.ColumnAndSort;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.SortOrder;
|
||||
import com.telecominfraproject.wlan.core.server.cassandra.BaseCassandraDataSource;
|
||||
import com.telecominfraproject.wlan.core.server.cassandra.test.BaseCassandraTest;
|
||||
|
||||
@@ -43,410 +26,40 @@ import com.telecominfraproject.wlan.core.server.cassandra.test.BaseCassandraTest
|
||||
@Ignore("Ignore Cassandra Tests until we can set up a cassandra cluster for the integration testing")
|
||||
public class ClientDatastoreCassandraTests extends BaseClientDatastoreTest {
|
||||
|
||||
@Test
|
||||
public void testClientPagination()
|
||||
{
|
||||
//create 100 Clients
|
||||
Client mdl;
|
||||
int customerId_1 = (int) testSequence.incrementAndGet();
|
||||
int customerId_2 = (int) testSequence.incrementAndGet();
|
||||
|
||||
List<Client> created_models = new ArrayList<>();
|
||||
|
||||
int apNameIdx = 0;
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = new Client();
|
||||
mdl.setCustomerId(customerId_1);
|
||||
ClientInfoDetails details = new ClientInfoDetails();
|
||||
details.setAlias("qr_"+apNameIdx);
|
||||
mdl.setDetails(details );
|
||||
mdl.setMacAddress(new MacAddress((long)i));
|
||||
|
||||
apNameIdx++;
|
||||
mdl = testInterface.create(mdl);
|
||||
created_models.add(mdl);
|
||||
}
|
||||
@Override
|
||||
protected List<String> getClientPagination_ExpectedPage3Strings() {
|
||||
//in cassandra the sort order is weird but consistent - although it may change on the cassandra server restart
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_10", "qr_13", "qr_8", "qr_18", "qr_42", "qr_30", "qr_35", "qr_28", "qr_14", "qr_22" }));
|
||||
}
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = new Client();
|
||||
mdl.setCustomerId(customerId_2);
|
||||
ClientInfoDetails details = new ClientInfoDetails();
|
||||
details.setAlias("qr_"+apNameIdx);
|
||||
mdl.setDetails(details );
|
||||
mdl.setMacAddress(new MacAddress((long)i));
|
||||
|
||||
apNameIdx++;
|
||||
mdl = testInterface.create(mdl);
|
||||
created_models.add(mdl);
|
||||
}
|
||||
@Override
|
||||
protected List<String> getClientPagination_ExpectedPage1EmptySortStrings(){
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_32", "qr_0", "qr_12", "qr_25", "qr_40", "qr_39", "qr_29", "qr_41", "qr_4", "qr_44" }));
|
||||
}
|
||||
|
||||
//paginate over Clients
|
||||
|
||||
List<ColumnAndSort> sortBy = new ArrayList<>();
|
||||
//Cassandra has limited support for sorting. Not going to sort the results
|
||||
//sortBy.addAll(Arrays.asList(new ColumnAndSort("macAddress")));
|
||||
|
||||
PaginationContext<Client> context = new PaginationContext<>(10);
|
||||
PaginationResponse<Client> page1 = testInterface.getForCustomer(customerId_1, sortBy, context);
|
||||
PaginationResponse<Client> page2 = testInterface.getForCustomer(customerId_1, sortBy, page1.getContext());
|
||||
PaginationResponse<Client> page3 = testInterface.getForCustomer(customerId_1, sortBy, page2.getContext());
|
||||
PaginationResponse<Client> page4 = testInterface.getForCustomer(customerId_1, sortBy, page3.getContext());
|
||||
PaginationResponse<Client> page5 = testInterface.getForCustomer(customerId_1, sortBy, page4.getContext());
|
||||
PaginationResponse<Client> page6 = testInterface.getForCustomer(customerId_1, sortBy, page5.getContext());
|
||||
PaginationResponse<Client> page7 = testInterface.getForCustomer(customerId_1, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
assertEquals(10, page2.getItems().size());
|
||||
assertEquals(10, page3.getItems().size());
|
||||
assertEquals(10, page4.getItems().size());
|
||||
assertEquals(10, page5.getItems().size());
|
||||
|
||||
page1.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page2.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page3.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page4.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page5.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
|
||||
assertEquals(0, page6.getItems().size());
|
||||
assertEquals(0, page7.getItems().size());
|
||||
|
||||
assertFalse(page1.getContext().isLastPage());
|
||||
assertFalse(page2.getContext().isLastPage());
|
||||
assertFalse(page3.getContext().isLastPage());
|
||||
assertFalse(page4.getContext().isLastPage());
|
||||
assertFalse(page5.getContext().isLastPage());
|
||||
|
||||
assertTrue(page6.getContext().isLastPage());
|
||||
assertTrue(page7.getContext().isLastPage());
|
||||
|
||||
//sort order is weird but consistent
|
||||
List<String> expectedPage3Strings = new ArrayList< >(Arrays.asList(new String[]{"qr_48", "qr_30", "qr_31", "qr_12", "qr_8", "qr_9", "qr_17", "qr_49", "qr_14", "qr_43" }));
|
||||
List<String> actualPage3Strings = new ArrayList<>();
|
||||
page3.getItems().stream().forEach( ce -> actualPage3Strings.add(((ClientInfoDetails)ce.getDetails()).getAlias()) );
|
||||
|
||||
assertEquals(expectedPage3Strings, actualPage3Strings);
|
||||
|
||||
//test first page of the results with empty sort order -> sort order is weird but consistent
|
||||
PaginationResponse<Client> page1EmptySort = testInterface.getForCustomer(customerId_1, Collections.emptyList(), context);
|
||||
assertEquals(10, page1EmptySort.getItems().size());
|
||||
|
||||
List<String> expectedPage1EmptySortStrings = new ArrayList<>(Arrays.asList(new String[]{"qr_29", "qr_44", "qr_13", "qr_23", "qr_47", "qr_3", "qr_36", "qr_33", "qr_11", "qr_45" }));
|
||||
List<String> actualPage1EmptySortStrings = new ArrayList<>();
|
||||
page1EmptySort.getItems().stream().forEach( ce -> actualPage1EmptySortStrings.add(((ClientInfoDetails)ce.getDetails()).getAlias()) );
|
||||
|
||||
assertEquals(expectedPage1EmptySortStrings, actualPage1EmptySortStrings);
|
||||
|
||||
//test first page of the results with null sort order -> sort order is weird but consistent
|
||||
PaginationResponse<Client> page1NullSort = testInterface.getForCustomer(customerId_1, null, context);
|
||||
assertEquals(10, page1NullSort.getItems().size());
|
||||
|
||||
List<String> expectedPage1NullSortStrings = new ArrayList<>(expectedPage1EmptySortStrings);
|
||||
List<String> actualPage1NullSortStrings = new ArrayList<>();
|
||||
page1NullSort.getItems().stream().forEach( ce -> actualPage1NullSortStrings.add(((ClientInfoDetails)ce.getDetails()).getAlias()) );
|
||||
|
||||
assertEquals(expectedPage1NullSortStrings, actualPage1NullSortStrings);
|
||||
|
||||
|
||||
//test first page of the results with sort descending order by a macAddress property -> sort order is weird but consistent
|
||||
PaginationResponse<Client> page1SingleSortDesc = testInterface.getForCustomer(customerId_1, Collections.singletonList(new ColumnAndSort("macAddress", SortOrder.desc)), context);
|
||||
assertEquals(10, page1SingleSortDesc.getItems().size());
|
||||
|
||||
List<String> expectedPage1SingleSortDescStrings = new ArrayList<>(expectedPage1EmptySortStrings);
|
||||
List<String> actualPage1SingleSortDescStrings = new ArrayList<>();
|
||||
page1SingleSortDesc.getItems().stream().forEach( ce -> actualPage1SingleSortDescStrings.add(((ClientInfoDetails)ce.getDetails()).getAlias()) );
|
||||
|
||||
assertEquals(expectedPage1SingleSortDescStrings, actualPage1SingleSortDescStrings);
|
||||
|
||||
created_models.forEach(m -> testInterface.delete(m.getCustomerId(), m.getMacAddress()));
|
||||
|
||||
@Override
|
||||
protected List<String> getClientPagination_ExpectedPage1SingleSortDescStrings() {
|
||||
return getClientPagination_ExpectedPage1EmptySortStrings();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testClientSessionPagination()
|
||||
{
|
||||
//create 100 Client sessions
|
||||
ClientSession mdl;
|
||||
int customerId_1 = (int) testSequence.incrementAndGet();
|
||||
int customerId_2 = (int) testSequence.incrementAndGet();
|
||||
long equipmentId_1 = testSequence.incrementAndGet();
|
||||
long equipmentId_2 = testSequence.incrementAndGet();
|
||||
long locationId_1 = testSequence.incrementAndGet();
|
||||
long locationId_2 = testSequence.incrementAndGet();
|
||||
|
||||
int apNameIdx = 0;
|
||||
|
||||
List<ClientSession> sessionsToCreate = new ArrayList<>();
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = new ClientSession();
|
||||
mdl.setCustomerId(customerId_1);
|
||||
if(i<10) {
|
||||
mdl.setEquipmentId(equipmentId_1);
|
||||
mdl.setLocationId(locationId_1);
|
||||
} else if(i<20) {
|
||||
mdl.setEquipmentId(equipmentId_2);
|
||||
mdl.setLocationId(locationId_2);
|
||||
} else {
|
||||
mdl.setEquipmentId(testSequence.incrementAndGet());
|
||||
}
|
||||
|
||||
ClientSessionDetails details = new ClientSessionDetails();
|
||||
details.setApFingerprint("qr_"+apNameIdx);
|
||||
mdl.setDetails(details );
|
||||
mdl.setMacAddress(new MacAddress((long)i));
|
||||
|
||||
apNameIdx++;
|
||||
|
||||
sessionsToCreate.add(mdl);
|
||||
}
|
||||
|
||||
List<ClientSession> createdList = testInterface.updateSessions(sessionsToCreate);
|
||||
List<ClientSessionDetails> createdDetailsList = new ArrayList<>();
|
||||
List<ClientSessionDetails> detailsToCreateList = new ArrayList<>();
|
||||
|
||||
sessionsToCreate.forEach(s -> detailsToCreateList.add(s.getDetails()));
|
||||
createdList.forEach(s -> createdDetailsList.add(s.getDetails()));
|
||||
assertEquals(detailsToCreateList, createdDetailsList);
|
||||
|
||||
|
||||
List<ClientSession> createdListExtra = new ArrayList<>();
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = new ClientSession();
|
||||
mdl.setCustomerId(customerId_2);
|
||||
mdl.setEquipmentId(testSequence.incrementAndGet());
|
||||
mdl.setLocationId(testSequence.incrementAndGet());
|
||||
ClientSessionDetails details = new ClientSessionDetails();
|
||||
details.setApFingerprint("qr_"+apNameIdx);
|
||||
mdl.setDetails(details );
|
||||
mdl.setMacAddress(new MacAddress((long)i));
|
||||
|
||||
apNameIdx++;
|
||||
mdl = testInterface.updateSession(mdl);
|
||||
createdListExtra.add(mdl);
|
||||
}
|
||||
|
||||
//paginate over Clients
|
||||
|
||||
List<ColumnAndSort> sortBy = new ArrayList<>();
|
||||
//Cassandra has limited support for sorting, we're not using that feature
|
||||
//sortBy.addAll(Arrays.asList(new ColumnAndSort("macAddress")));
|
||||
|
||||
PaginationContext<ClientSession> context = new PaginationContext<>(10);
|
||||
PaginationResponse<ClientSession> page1 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, context);
|
||||
PaginationResponse<ClientSession> page2 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page1.getContext());
|
||||
PaginationResponse<ClientSession> page3 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page2.getContext());
|
||||
PaginationResponse<ClientSession> page4 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page3.getContext());
|
||||
PaginationResponse<ClientSession> page5 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page4.getContext());
|
||||
PaginationResponse<ClientSession> page6 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page5.getContext());
|
||||
PaginationResponse<ClientSession> page7 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
assertEquals(10, page2.getItems().size());
|
||||
assertEquals(10, page3.getItems().size());
|
||||
assertEquals(10, page4.getItems().size());
|
||||
assertEquals(10, page5.getItems().size());
|
||||
|
||||
page1.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page2.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page3.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page4.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
page5.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()) );
|
||||
|
||||
assertEquals(0, page6.getItems().size());
|
||||
assertEquals(0, page7.getItems().size());
|
||||
|
||||
assertFalse(page1.getContext().isLastPage());
|
||||
assertFalse(page2.getContext().isLastPage());
|
||||
assertFalse(page3.getContext().isLastPage());
|
||||
assertFalse(page4.getContext().isLastPage());
|
||||
assertFalse(page5.getContext().isLastPage());
|
||||
|
||||
assertTrue(page6.getContext().isLastPage());
|
||||
assertTrue(page7.getContext().isLastPage());
|
||||
|
||||
Set<String> expectedAllPagesStrings = new HashSet<>();
|
||||
for(int i=0; i<50; i++) {
|
||||
expectedAllPagesStrings.add("qr_"+i);
|
||||
}
|
||||
Set<String> actualPage3Strings = new HashSet<>();
|
||||
|
||||
page1.getItems().stream().forEach( ce -> actualPage3Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
page2.getItems().stream().forEach( ce -> actualPage3Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
page3.getItems().stream().forEach( ce -> actualPage3Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
page4.getItems().stream().forEach( ce -> actualPage3Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
page5.getItems().stream().forEach( ce -> actualPage3Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedAllPagesStrings, actualPage3Strings);
|
||||
|
||||
|
||||
PaginationContext<ClientSession> context100 = new PaginationContext<>(100);
|
||||
//test first page of the results with empty sort order -> sort order is weird but consistent
|
||||
PaginationResponse<ClientSession> page1EmptySort = testInterface.getSessionsForCustomer(customerId_1, null, null, Collections.emptyList(), context100);
|
||||
assertEquals(50, page1EmptySort.getItems().size());
|
||||
|
||||
Set<String> expectedPage1EmptySortStrings = new HashSet<>(expectedAllPagesStrings);
|
||||
|
||||
Set<String> actualPage1EmptySortStrings = new HashSet<>();
|
||||
page1EmptySort.getItems().stream().forEach( ce -> actualPage1EmptySortStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1EmptySortStrings, actualPage1EmptySortStrings);
|
||||
|
||||
//test first page of the results with null sort order -> sort order is weird but consistent
|
||||
PaginationResponse<ClientSession> page1NullSort = testInterface.getSessionsForCustomer(customerId_1, null, null, null, context100);
|
||||
assertEquals(50, page1NullSort.getItems().size());
|
||||
|
||||
Set<String> expectedPage1NullSortStrings = new HashSet<>(expectedPage1EmptySortStrings);
|
||||
Set<String> actualPage1NullSortStrings = new HashSet<>();
|
||||
page1NullSort.getItems().stream().forEach( ce -> actualPage1NullSortStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1NullSortStrings, actualPage1NullSortStrings);
|
||||
|
||||
|
||||
//test first page of the results with sort descending order by a macAddress property -> sort order is weird but consistent
|
||||
PaginationResponse<ClientSession> page1SingleSortDesc = testInterface.getSessionsForCustomer(customerId_1, null, null, Collections.singletonList(new ColumnAndSort("macAddress", SortOrder.desc)), context100);
|
||||
assertEquals(50, page1SingleSortDesc.getItems().size());
|
||||
|
||||
Set<String> expectedPage1SingleSortDescStrings = new HashSet<>(expectedPage1EmptySortStrings);
|
||||
Set<String> actualPage1SingleSortDescStrings = new HashSet<>();
|
||||
page1SingleSortDesc.getItems().stream().forEach( ce -> actualPage1SingleSortDescStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1SingleSortDescStrings, actualPage1SingleSortDescStrings);
|
||||
|
||||
//test the results for equipment_1 only
|
||||
PaginationResponse<ClientSession> page1Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page2Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), null, Collections.emptyList(), page1Eq_1.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1.getItems().size());
|
||||
assertEquals(0, page2Eq_1.getItems().size());
|
||||
assertFalse(page1Eq_1.getContext().isLastPage());
|
||||
assertTrue(page2Eq_1.getContext().isLastPage());
|
||||
|
||||
List<String> expectedPage1Eq_1Strings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> actualPage1Eq_1Strings = new ArrayList<>();
|
||||
page1Eq_1.getItems().stream().forEach( ce -> actualPage1Eq_1Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1Eq_1Strings, actualPage1Eq_1Strings);
|
||||
|
||||
//test the results for equipment_2 only
|
||||
PaginationResponse<ClientSession> page1Eq_2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_2)), null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page2Eq_2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_2)), null, Collections.emptyList(), page1Eq_2.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_2.getItems().size());
|
||||
assertEquals(0, page2Eq_2.getItems().size());
|
||||
assertFalse(page1Eq_2.getContext().isLastPage());
|
||||
assertTrue(page2Eq_2.getContext().isLastPage());
|
||||
|
||||
List<String> expectedPage1Eq_2Strings = new ArrayList<>(Arrays.asList(new String[]{"qr_10", "qr_11", "qr_12", "qr_13", "qr_14", "qr_15", "qr_16", "qr_17", "qr_18", "qr_19"}));
|
||||
List<String> actualPage1Eq_2Strings = new ArrayList<>();
|
||||
page1Eq_2.getItems().stream().forEach( ce -> actualPage1Eq_2Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1Eq_2Strings, actualPage1Eq_2Strings);
|
||||
|
||||
|
||||
//test the results for equipment_1 or equipment_2 only
|
||||
PaginationResponse<ClientSession> page1Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2)), null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page2Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2)), null, Collections.emptyList(), page1Eq_1or2.getContext());
|
||||
PaginationResponse<ClientSession> page3Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2)), null, Collections.emptyList(), page2Eq_1or2.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1or2.getItems().size());
|
||||
assertEquals(10, page2Eq_1or2.getItems().size());
|
||||
assertEquals(0, page3Eq_1or2.getItems().size());
|
||||
assertFalse(page1Eq_1or2.getContext().isLastPage());
|
||||
assertFalse(page2Eq_1or2.getContext().isLastPage());
|
||||
assertTrue(page3Eq_1or2.getContext().isLastPage());
|
||||
|
||||
List<String> expectedPage1Eq_1or2Strings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> actualPage1Eq_1or2Strings = new ArrayList<>();
|
||||
page1Eq_1or2.getItems().stream().forEach( ce -> actualPage1Eq_1or2Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1Eq_1or2Strings, actualPage1Eq_1or2Strings);
|
||||
|
||||
List<String> expectedPage2Eq_1or2Strings = new ArrayList<>(Arrays.asList(new String[]{"qr_10", "qr_11", "qr_12", "qr_13", "qr_14", "qr_15", "qr_16", "qr_17", "qr_18", "qr_19" }));
|
||||
List<String> actualPage2Eq_1or2Strings = new ArrayList<>();
|
||||
page2Eq_1or2.getItems().stream().forEach( ce -> actualPage2Eq_1or2Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage2Eq_1or2Strings, actualPage2Eq_1or2Strings);
|
||||
|
||||
//
|
||||
// test filters on locationIds
|
||||
//
|
||||
|
||||
//test the results for location_1 only
|
||||
page1Eq_1 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1)), Collections.emptyList(), context);
|
||||
page2Eq_1 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1)), Collections.emptyList(), page1Eq_1.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1.getItems().size());
|
||||
assertEquals(0, page2Eq_1.getItems().size());
|
||||
assertFalse(page1Eq_1.getContext().isLastPage());
|
||||
assertTrue(page2Eq_1.getContext().isLastPage());
|
||||
|
||||
expectedPage1Eq_1Strings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> actualPage1Loc_1Strings = new ArrayList<>();
|
||||
page1Eq_1.getItems().stream().forEach( ce -> actualPage1Loc_1Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1Eq_1Strings, actualPage1Loc_1Strings);
|
||||
|
||||
//test the results for location_2 only
|
||||
page1Eq_2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_2)), Collections.emptyList(), context);
|
||||
page2Eq_2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_2)), Collections.emptyList(), page1Eq_2.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_2.getItems().size());
|
||||
assertEquals(0, page2Eq_2.getItems().size());
|
||||
assertFalse(page1Eq_2.getContext().isLastPage());
|
||||
assertTrue(page2Eq_2.getContext().isLastPage());
|
||||
|
||||
expectedPage1Eq_2Strings = new ArrayList<>(Arrays.asList(new String[]{"qr_10", "qr_11", "qr_12", "qr_13", "qr_14", "qr_15", "qr_16", "qr_17", "qr_18", "qr_19"}));
|
||||
List<String> actualPage1Loc_2Strings = new ArrayList<>();
|
||||
page1Eq_2.getItems().stream().forEach( ce -> actualPage1Loc_2Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1Eq_2Strings, actualPage1Loc_2Strings);
|
||||
|
||||
|
||||
//test the results for location_1 or location_2 only
|
||||
page1Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), context);
|
||||
page2Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), page1Eq_1or2.getContext());
|
||||
page3Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), page2Eq_1or2.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1or2.getItems().size());
|
||||
assertEquals(10, page2Eq_1or2.getItems().size());
|
||||
assertEquals(0, page3Eq_1or2.getItems().size());
|
||||
assertFalse(page1Eq_1or2.getContext().isLastPage());
|
||||
assertFalse(page2Eq_1or2.getContext().isLastPage());
|
||||
assertTrue(page3Eq_1or2.getContext().isLastPage());
|
||||
|
||||
expectedPage1Eq_1or2Strings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> actualPage1Loc_1or2Strings = new ArrayList<>();
|
||||
page1Eq_1or2.getItems().stream().forEach( ce -> actualPage1Loc_1or2Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1Eq_1or2Strings, actualPage1Loc_1or2Strings);
|
||||
|
||||
expectedPage2Eq_1or2Strings = new ArrayList<>(Arrays.asList(new String[]{"qr_10", "qr_11", "qr_12", "qr_13", "qr_14", "qr_15", "qr_16", "qr_17", "qr_18", "qr_19" }));
|
||||
List<String> actualPage2Loc_1or2Strings = new ArrayList<>();
|
||||
page2Eq_1or2.getItems().stream().forEach( ce -> actualPage2Loc_1or2Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage2Eq_1or2Strings, actualPage2Loc_1or2Strings);
|
||||
|
||||
//test the results for ( location_1 or location_2 ) and equipment_1only
|
||||
page1Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), context);
|
||||
page2Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), page1Eq_1.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1.getItems().size());
|
||||
assertEquals(0, page2Eq_1.getItems().size());
|
||||
assertFalse(page1Eq_1.getContext().isLastPage());
|
||||
assertTrue(page2Eq_1.getContext().isLastPage());
|
||||
|
||||
expectedPage1Eq_1Strings = new ArrayList<>(expectedPage1Eq_1or2Strings);
|
||||
List<String> actualPage1Loc_121Strings = new ArrayList<>();
|
||||
page1Eq_1.getItems().stream().forEach( ce -> actualPage1Loc_121Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1Eq_1Strings, actualPage1Loc_121Strings);
|
||||
|
||||
createdList.forEach(c -> testInterface.deleteSession(c.getCustomerId(), c.getEquipmentId(), c.getMacAddress()));
|
||||
createdListExtra.forEach(c -> testInterface.deleteSession(c.getCustomerId(), c.getEquipmentId(), c.getMacAddress()));
|
||||
@Override
|
||||
protected List<String> getClientSessionPagination_expectedPage1EmptySortStrings(){
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_12", "qr_47", "qr_4", "qr_1", "qr_21", "qr_42", "qr_45", "qr_35", "qr_14", "qr_0" }));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getClientSessionPagination_expectedPage3Strings(){
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_28", "qr_32", "qr_6", "qr_19", "qr_49", "qr_31", "qr_33", "qr_25", "qr_7", "qr_40" }));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getClientSessionPagination_expectedPage1SingleSortDescStrings() {
|
||||
return getClientSessionPagination_expectedPage1EmptySortStrings();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ use tip_wlan_keyspace;
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
insert into client (customerId, macAddress, createdTimestamp, lastModifiedTimestamp, details) values ( 1, 1, 1594837187000, 1594837187000, textAsBlob('test1') );
|
||||
insert into client (customerId, macAddress, createdTimestamp, lastModifiedTimestamp, details) values ( 1, 2, 1594837187000, 1594837187000, textAsBlob('test2') );
|
||||
insert into client (customerId, macAddress, createdTimestamp, lastModifiedTimestamp, details) values ( 1, 3, 1594837187000, 1594837187000, textAsBlob('test3') );
|
||||
insert into client (customerId, macAddress, createdTimestamp, lastModifiedTimestamp, details) values ( 1, 2, 1594837187001, 1594837187001, textAsBlob('test2') );
|
||||
insert into client (customerId, macAddress, createdTimestamp, lastModifiedTimestamp, details) values ( 1, 3, 1594837187002, 1594837187002, textAsBlob('test3') );
|
||||
|
||||
select * from client where customerId = 1 and macAddress = 1;
|
||||
|
||||
@@ -14,13 +14,24 @@ select * from client where customerId = 1 and macAddress in (1,2);
|
||||
|
||||
select * from client where customerId = 1;
|
||||
|
||||
|
||||
update client set details=textAsBlob('test1_u'), lastModifiedTimestamp = 1594837187001 where customerId = 1 and macAddress = 1 IF lastModifiedTimestamp = 1594837187000 ;
|
||||
|
||||
select lastModifiedTimestamp from client where customerId = 1 and macAddress = 1;
|
||||
|
||||
delete from client where customerId = 1 and macAddress = 1;
|
||||
|
||||
-- Index table for looking up clients by macAddress substring:
|
||||
-- insert into it when client record is inserted
|
||||
-- delete from it when client record is deleted
|
||||
-- no update
|
||||
|
||||
insert into client_by_mac_string (customerId, macAddress, macAddressString) values ( 1, 1, 'a1:ff:ff:ff:af:fa');
|
||||
insert into client_by_mac_string (customerId, macAddress, macAddressString) values ( 1, 2, 'b1:ff:ff:ff:bf:fb');
|
||||
insert into client_by_mac_string (customerId, macAddress, macAddressString) values ( 1, 3, 'c1:ff:ff:ff:cf:fc');
|
||||
|
||||
select * from client_by_mac_string where customerId = 1 and macAddressString like '%cf%';
|
||||
|
||||
delete from client_by_mac_string where customerId = 1 and macAddressString = 'c1:ff:ff:ff:cf:fc';
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Operations on client_blocklist
|
||||
@@ -114,12 +125,42 @@ select * from client_session_by_location where locationId in (1,2,3) and equipme
|
||||
|
||||
select customerId, locationId, equipmentId, macAddress from client_session_by_location where locationId in (1,2,3) and equipmentId in (1,2,3);
|
||||
|
||||
-- Index table for looking up client sessions by macAddress substring:
|
||||
-- insert into it when client record is inserted
|
||||
-- delete from it when client record is deleted
|
||||
-- no update
|
||||
|
||||
insert into client_session_by_mac (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 1, 1, 1, 'A1:1');
|
||||
insert into client_session_by_mac (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 1, 2, 2, 'A1:2');
|
||||
insert into client_session_by_mac (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 2, 1, 3, 'A1:3');
|
||||
insert into client_session_by_mac (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 2, 2, 3, 'B1:3');
|
||||
insert into client_session_by_mac (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 3, 2, 3, 'B1:3');
|
||||
|
||||
insert into client_session_by_mac_and_equipment (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 1, 1, 1, 'A1:1');
|
||||
insert into client_session_by_mac_and_equipment (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 1, 2, 2, 'A1:2');
|
||||
insert into client_session_by_mac_and_equipment (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 2, 1, 3, 'A1:3');
|
||||
insert into client_session_by_mac_and_equipment (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 2, 2, 3, 'B1:3');
|
||||
insert into client_session_by_mac_and_equipment (customerId, locationId, equipmentId, macAddress, macAddressString) values ( 1, 3, 2, 3, 'B1:3');
|
||||
|
||||
select macAddress from client_session_by_mac where macAddressString like '%A1%';
|
||||
select macAddress from client_session_by_mac where macAddressString like '%A1%' and locationId in (2);
|
||||
select macAddress from client_session_by_mac where macAddressString like '%A1%' and locationId in (1,2);
|
||||
|
||||
select macAddress from client_session_by_mac_and_equipment where macAddressString like '%A1%' and equipmentId in (2);
|
||||
select macAddress from client_session_by_mac_and_equipment where macAddressString like '%A1%' and equipmentId in (1,3);
|
||||
|
||||
delete from client_session_by_mac where locationId = 1 and equipmentId = 1 and macAddressString = 'A1:1';
|
||||
delete from client_session_by_mac_and_equipment where locationId = 1 and equipmentId = 1 and macAddressString = 'A1:1';
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Commands to clean up after the test
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
TRUNCATE TABLE client_session_by_location ;
|
||||
TRUNCATE TABLE client_session_by_equipment ;
|
||||
TRUNCATE TABLE client_session_by_location;
|
||||
TRUNCATE TABLE client_session_by_equipment;
|
||||
TRUNCATE TABLE client_session_by_mac;
|
||||
TRUNCATE TABLE client_session_by_mac_and_equipment;
|
||||
TRUNCATE TABLE client_session;
|
||||
TRUNCATE TABLE client_by_mac_string;
|
||||
TRUNCATE TABLE client;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>client-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
||||
@@ -175,8 +175,12 @@ public abstract class BaseClientDatastoreTest {
|
||||
mdl.setCustomerId(customerId_1);
|
||||
ClientInfoDetails details = new ClientInfoDetails();
|
||||
details.setAlias("qr_"+apNameIdx);
|
||||
mdl.setDetails(details );
|
||||
mdl.setMacAddress(new MacAddress((long)i));
|
||||
mdl.setDetails(details);
|
||||
if (i < 20) {
|
||||
mdl.setMacAddress(new MacAddress("A1:FF:FF:FF:FF:" + Integer.toHexString(i)));
|
||||
} else {
|
||||
mdl.setMacAddress(new MacAddress("B1:FF:FF:FF:FF:" + Integer.toHexString(i)));
|
||||
}
|
||||
|
||||
apNameIdx++;
|
||||
mdl = testInterface.create(mdl);
|
||||
@@ -188,8 +192,8 @@ public abstract class BaseClientDatastoreTest {
|
||||
mdl.setCustomerId(customerId_2);
|
||||
ClientInfoDetails details = new ClientInfoDetails();
|
||||
details.setAlias("qr_"+apNameIdx);
|
||||
mdl.setDetails(details );
|
||||
mdl.setMacAddress(new MacAddress((long)i));
|
||||
mdl.setDetails(details);
|
||||
mdl.setMacAddress(new MacAddress("B1:FF:FF:FF:FF:" + Integer.toHexString(i)));
|
||||
|
||||
apNameIdx++;
|
||||
mdl = testInterface.create(mdl);
|
||||
@@ -202,13 +206,13 @@ public abstract class BaseClientDatastoreTest {
|
||||
sortBy.addAll(Arrays.asList(new ColumnAndSort("macAddress")));
|
||||
|
||||
PaginationContext<Client> context = new PaginationContext<>(10);
|
||||
PaginationResponse<Client> page1 = testInterface.getForCustomer(customerId_1, sortBy, context);
|
||||
PaginationResponse<Client> page2 = testInterface.getForCustomer(customerId_1, sortBy, page1.getContext());
|
||||
PaginationResponse<Client> page3 = testInterface.getForCustomer(customerId_1, sortBy, page2.getContext());
|
||||
PaginationResponse<Client> page4 = testInterface.getForCustomer(customerId_1, sortBy, page3.getContext());
|
||||
PaginationResponse<Client> page5 = testInterface.getForCustomer(customerId_1, sortBy, page4.getContext());
|
||||
PaginationResponse<Client> page6 = testInterface.getForCustomer(customerId_1, sortBy, page5.getContext());
|
||||
PaginationResponse<Client> page7 = testInterface.getForCustomer(customerId_1, sortBy, page6.getContext());
|
||||
PaginationResponse<Client> page1 = testInterface.getForCustomer(customerId_1, null, sortBy, context);
|
||||
PaginationResponse<Client> page2 = testInterface.getForCustomer(customerId_1, null, sortBy, page1.getContext());
|
||||
PaginationResponse<Client> page3 = testInterface.getForCustomer(customerId_1, null, sortBy, page2.getContext());
|
||||
PaginationResponse<Client> page4 = testInterface.getForCustomer(customerId_1, null, sortBy, page3.getContext());
|
||||
PaginationResponse<Client> page5 = testInterface.getForCustomer(customerId_1, null, sortBy, page4.getContext());
|
||||
PaginationResponse<Client> page6 = testInterface.getForCustomer(customerId_1, null, sortBy, page5.getContext());
|
||||
PaginationResponse<Client> page7 = testInterface.getForCustomer(customerId_1, null, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
@@ -235,28 +239,65 @@ public abstract class BaseClientDatastoreTest {
|
||||
assertTrue(page6.getContext().isLastPage());
|
||||
assertTrue(page7.getContext().isLastPage());
|
||||
|
||||
List<String> expectedPage3Strings = new ArrayList< >(Arrays.asList(new String[]{"qr_20", "qr_21", "qr_22", "qr_23", "qr_24", "qr_25", "qr_26", "qr_27", "qr_28", "qr_29" }));
|
||||
List<String> expectedPage3Strings = getClientPagination_ExpectedPage3Strings();
|
||||
List<String> actualPage3Strings = new ArrayList<>();
|
||||
page3.getItems().stream().forEach( ce -> actualPage3Strings.add(((ClientInfoDetails)ce.getDetails()).getAlias()) );
|
||||
|
||||
assertEquals(expectedPage3Strings, actualPage3Strings);
|
||||
|
||||
|
||||
// empty and null substring should return the same result
|
||||
PaginationResponse<Client> page1EmptySubstring = testInterface.getForCustomer(customerId_1, "", sortBy, context);
|
||||
PaginationResponse<Client> page2EmptySubstring = testInterface.getForCustomer(customerId_1, "", sortBy, page1EmptySubstring.getContext());
|
||||
PaginationResponse<Client> page3EmptySubstring = testInterface.getForCustomer(customerId_1, "", sortBy, page2EmptySubstring.getContext());
|
||||
PaginationResponse<Client> page4EmptySubstring = testInterface.getForCustomer(customerId_1, "", sortBy, page3EmptySubstring.getContext());
|
||||
PaginationResponse<Client> page5EmptySubstring = testInterface.getForCustomer(customerId_1, "", sortBy, page4EmptySubstring.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1EmptySubstring.getItems().size());
|
||||
assertEquals(10, page2EmptySubstring.getItems().size());
|
||||
assertEquals(10, page3EmptySubstring.getItems().size());
|
||||
assertEquals(10, page4EmptySubstring.getItems().size());
|
||||
assertEquals(10, page5EmptySubstring.getItems().size());
|
||||
|
||||
assertEquals(page1.getItems(), page1EmptySubstring.getItems());
|
||||
assertEquals(page2.getItems(), page2EmptySubstring.getItems());
|
||||
assertEquals(page3.getItems(), page3EmptySubstring.getItems());
|
||||
assertEquals(page4.getItems(), page4EmptySubstring.getItems());
|
||||
assertEquals(page5.getItems(), page5EmptySubstring.getItems());
|
||||
|
||||
// Test macAddress search
|
||||
PaginationResponse<Client> page1SearchMac = testInterface.getForCustomer(customerId_1, "A1", sortBy, context);
|
||||
PaginationResponse<Client> page2SearchMac = testInterface.getForCustomer(customerId_1, "A1", sortBy, page1SearchMac.getContext());
|
||||
PaginationResponse<Client> page3SearchMac = testInterface.getForCustomer(customerId_1, "A1", sortBy, page2SearchMac.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1SearchMac.getItems().size());
|
||||
assertEquals(10, page2SearchMac.getItems().size());
|
||||
assertEquals(0, page3SearchMac.getItems().size());
|
||||
|
||||
page1SearchMac.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()));
|
||||
page2SearchMac.getItems().forEach(e -> assertEquals(customerId_1, e.getCustomerId()));
|
||||
|
||||
page1SearchMac.getItems().forEach(e -> assertTrue(e.getMacAddress().getAddressAsString().contains("A1".toLowerCase())));
|
||||
page2SearchMac.getItems().forEach(e -> assertTrue(e.getMacAddress().getAddressAsString().contains("A1".toLowerCase())));
|
||||
|
||||
assertTrue(page3SearchMac.getContext().isLastPage());
|
||||
|
||||
//test first page of the results with empty sort order -> default sort order (by Id ascending)
|
||||
PaginationResponse<Client> page1EmptySort = testInterface.getForCustomer(customerId_1, Collections.emptyList(), context);
|
||||
PaginationResponse<Client> page1EmptySort = testInterface.getForCustomer(customerId_1, null, Collections.emptyList(), context);
|
||||
assertEquals(10, page1EmptySort.getItems().size());
|
||||
|
||||
List<String> expectedPage1EmptySortStrings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> expectedPage1EmptySortStrings = getClientPagination_ExpectedPage1EmptySortStrings();
|
||||
List<String> actualPage1EmptySortStrings = new ArrayList<>();
|
||||
page1EmptySort.getItems().stream().forEach( ce -> actualPage1EmptySortStrings.add(((ClientInfoDetails)ce.getDetails()).getAlias()) );
|
||||
|
||||
assertEquals(expectedPage1EmptySortStrings, actualPage1EmptySortStrings);
|
||||
|
||||
//test first page of the results with null sort order -> default sort order (by Id ascending)
|
||||
PaginationResponse<Client> page1NullSort = testInterface.getForCustomer(customerId_1, null, context);
|
||||
PaginationResponse<Client> page1NullSort = testInterface.getForCustomer(customerId_1, null, null, context);
|
||||
assertEquals(10, page1NullSort.getItems().size());
|
||||
|
||||
List<String> expectedPage1NullSortStrings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> expectedPage1NullSortStrings = new ArrayList<>(expectedPage1EmptySortStrings);
|
||||
List<String> actualPage1NullSortStrings = new ArrayList<>();
|
||||
page1NullSort.getItems().stream().forEach( ce -> actualPage1NullSortStrings.add(((ClientInfoDetails)ce.getDetails()).getAlias()) );
|
||||
|
||||
@@ -264,10 +305,10 @@ public abstract class BaseClientDatastoreTest {
|
||||
|
||||
|
||||
//test first page of the results with sort descending order by a macAddress property
|
||||
PaginationResponse<Client> page1SingleSortDesc = testInterface.getForCustomer(customerId_1, Collections.singletonList(new ColumnAndSort("macAddress", SortOrder.desc)), context);
|
||||
PaginationResponse<Client> page1SingleSortDesc = testInterface.getForCustomer(customerId_1, null, Collections.singletonList(new ColumnAndSort("macAddress", SortOrder.desc)), context);
|
||||
assertEquals(10, page1SingleSortDesc.getItems().size());
|
||||
|
||||
List<String> expectedPage1SingleSortDescStrings = new ArrayList< >(Arrays.asList(new String[]{"qr_49", "qr_48", "qr_47", "qr_46", "qr_45", "qr_44", "qr_43", "qr_42", "qr_41", "qr_40" }));
|
||||
List<String> expectedPage1SingleSortDescStrings = getClientPagination_ExpectedPage1SingleSortDescStrings();
|
||||
List<String> actualPage1SingleSortDescStrings = new ArrayList<>();
|
||||
page1SingleSortDesc.getItems().stream().forEach( ce -> actualPage1SingleSortDescStrings.add(((ClientInfoDetails)ce.getDetails()).getAlias()) );
|
||||
|
||||
@@ -277,6 +318,18 @@ public abstract class BaseClientDatastoreTest {
|
||||
|
||||
}
|
||||
|
||||
protected List<String> getClientPagination_ExpectedPage3Strings() {
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_20", "qr_21", "qr_22", "qr_23", "qr_24", "qr_25", "qr_26", "qr_27", "qr_28", "qr_29" }));
|
||||
}
|
||||
|
||||
protected List<String> getClientPagination_ExpectedPage1EmptySortStrings(){
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
}
|
||||
|
||||
protected List<String> getClientPagination_ExpectedPage1SingleSortDescStrings(){
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_49", "qr_48", "qr_47", "qr_46", "qr_45", "qr_44", "qr_43", "qr_42", "qr_41", "qr_40" }));
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Client session tests
|
||||
@@ -567,17 +620,19 @@ public abstract class BaseClientDatastoreTest {
|
||||
if(i<10) {
|
||||
mdl.setEquipmentId(equipmentId_1);
|
||||
mdl.setLocationId(locationId_1);
|
||||
mdl.setMacAddress(new MacAddress("A1:FF:FF:FF:FF:" + Integer.toHexString(i)));
|
||||
} else if(i<20) {
|
||||
mdl.setEquipmentId(equipmentId_2);
|
||||
mdl.setLocationId(locationId_2);
|
||||
mdl.setMacAddress(new MacAddress("A1:FF:FF:FF:FF:" + Integer.toHexString(i)));
|
||||
} else {
|
||||
mdl.setEquipmentId(testSequence.incrementAndGet());
|
||||
mdl.setMacAddress(new MacAddress("B1:FF:FF:FF:FF:" + Integer.toHexString(i)));
|
||||
}
|
||||
|
||||
ClientSessionDetails details = new ClientSessionDetails();
|
||||
details.setApFingerprint("qr_"+apNameIdx);
|
||||
mdl.setDetails(details );
|
||||
mdl.setMacAddress(new MacAddress((long)i));
|
||||
|
||||
apNameIdx++;
|
||||
|
||||
@@ -616,13 +671,13 @@ public abstract class BaseClientDatastoreTest {
|
||||
sortBy.addAll(Arrays.asList(new ColumnAndSort("macAddress")));
|
||||
|
||||
PaginationContext<ClientSession> context = new PaginationContext<>(10);
|
||||
PaginationResponse<ClientSession> page1 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, context);
|
||||
PaginationResponse<ClientSession> page2 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page1.getContext());
|
||||
PaginationResponse<ClientSession> page3 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page2.getContext());
|
||||
PaginationResponse<ClientSession> page4 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page3.getContext());
|
||||
PaginationResponse<ClientSession> page5 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page4.getContext());
|
||||
PaginationResponse<ClientSession> page6 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page5.getContext());
|
||||
PaginationResponse<ClientSession> page7 = testInterface.getSessionsForCustomer(customerId_1, null, null, sortBy, page6.getContext());
|
||||
PaginationResponse<ClientSession> page1 = testInterface.getSessionsForCustomer(customerId_1, null, null, null, sortBy, context);
|
||||
PaginationResponse<ClientSession> page2 = testInterface.getSessionsForCustomer(customerId_1, null, null, null, sortBy, page1.getContext());
|
||||
PaginationResponse<ClientSession> page3 = testInterface.getSessionsForCustomer(customerId_1, null, null, null, sortBy, page2.getContext());
|
||||
PaginationResponse<ClientSession> page4 = testInterface.getSessionsForCustomer(customerId_1, null, null, null, sortBy, page3.getContext());
|
||||
PaginationResponse<ClientSession> page5 = testInterface.getSessionsForCustomer(customerId_1, null, null, null, sortBy, page4.getContext());
|
||||
PaginationResponse<ClientSession> page6 = testInterface.getSessionsForCustomer(customerId_1, null, null, null, sortBy, page5.getContext());
|
||||
PaginationResponse<ClientSession> page7 = testInterface.getSessionsForCustomer(customerId_1, null, null, null, sortBy, page6.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1.getItems().size());
|
||||
@@ -649,28 +704,114 @@ public abstract class BaseClientDatastoreTest {
|
||||
assertTrue(page6.getContext().isLastPage());
|
||||
assertTrue(page7.getContext().isLastPage());
|
||||
|
||||
List<String> expectedPage3Strings = new ArrayList< >(Arrays.asList(new String[]{"qr_20", "qr_21", "qr_22", "qr_23", "qr_24", "qr_25", "qr_26", "qr_27", "qr_28", "qr_29" }));
|
||||
// when remote interface receives macSubstring = null, it will pass on macSubstring = "" instead.
|
||||
PaginationResponse<ClientSession> page1EmptySubstring = testInterface.getSessionsForCustomer(customerId_1, null, null, "", sortBy, context);
|
||||
PaginationResponse<ClientSession> page2EmptySubstring = testInterface.getSessionsForCustomer(customerId_1, null, null, "", sortBy, page1.getContext());
|
||||
PaginationResponse<ClientSession> page3EmptySubstring = testInterface.getSessionsForCustomer(customerId_1, null, null, "", sortBy, page2.getContext());
|
||||
PaginationResponse<ClientSession> page4EmptySubstring = testInterface.getSessionsForCustomer(customerId_1, null, null, "", sortBy, page3.getContext());
|
||||
PaginationResponse<ClientSession> page5EmptySubstring = testInterface.getSessionsForCustomer(customerId_1, null, null, "", sortBy, page4.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1EmptySubstring.getItems().size());
|
||||
assertEquals(10, page2EmptySubstring.getItems().size());
|
||||
assertEquals(10, page3EmptySubstring.getItems().size());
|
||||
assertEquals(10, page4EmptySubstring.getItems().size());
|
||||
assertEquals(10, page5EmptySubstring.getItems().size());
|
||||
|
||||
assertEquals(page1.getItems(), page1EmptySubstring.getItems());
|
||||
assertEquals(page2.getItems(), page2EmptySubstring.getItems());
|
||||
assertEquals(page3.getItems(), page3EmptySubstring.getItems());
|
||||
assertEquals(page4.getItems(), page4EmptySubstring.getItems());
|
||||
assertEquals(page5.getItems(), page5EmptySubstring.getItems());
|
||||
|
||||
Set<String> expectedAllPagesStrings = new HashSet<>();
|
||||
for(int i=0; i<50; i++) {
|
||||
expectedAllPagesStrings.add("qr_"+i);
|
||||
}
|
||||
Set<String> actualAllPagesStrings = new HashSet<>();
|
||||
|
||||
page1.getItems().stream().forEach( ce -> actualAllPagesStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
page2.getItems().stream().forEach( ce -> actualAllPagesStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
page3.getItems().stream().forEach( ce -> actualAllPagesStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
page4.getItems().stream().forEach( ce -> actualAllPagesStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
page5.getItems().stream().forEach( ce -> actualAllPagesStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedAllPagesStrings, actualAllPagesStrings);
|
||||
|
||||
List<String> expectedPage3Strings = getClientSessionPagination_expectedPage3Strings();
|
||||
List<String> actualPage3Strings = new ArrayList<>();
|
||||
page3.getItems().stream().forEach( ce -> actualPage3Strings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage3Strings, actualPage3Strings);
|
||||
|
||||
|
||||
// Test macAddress search
|
||||
PaginationResponse<ClientSession> page1SearchMac = testInterface.getSessionsForCustomer(customerId_1, null, null, "A1", sortBy, context);
|
||||
PaginationResponse<ClientSession> page2SearchMac = testInterface.getSessionsForCustomer(customerId_1, null, null, "A1", sortBy, page1SearchMac.getContext());
|
||||
PaginationResponse<ClientSession> page3SearchMac = testInterface.getSessionsForCustomer(customerId_1, null, null, "A1", sortBy, page2SearchMac.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1SearchMac.getItems().size());
|
||||
assertEquals(10, page2SearchMac.getItems().size());
|
||||
assertEquals(0, page3SearchMac.getItems().size());
|
||||
page1SearchMac.getItems().forEach(e -> assertTrue(e.getMacAddress().getAddressAsString().contains("A1".toLowerCase())));
|
||||
page2SearchMac.getItems().forEach(e -> assertTrue(e.getMacAddress().getAddressAsString().contains("A1".toLowerCase())));
|
||||
|
||||
// Test macAddress search with locationId
|
||||
Set<Long> locationSearchSet = new HashSet<Long>(Arrays.asList(locationId_1));
|
||||
PaginationResponse<ClientSession> page1SearchMacAndLocation = testInterface.getSessionsForCustomer(customerId_1, null, locationSearchSet, "A1", sortBy, context);
|
||||
PaginationResponse<ClientSession> page2SearchMacAndLocation = testInterface.getSessionsForCustomer(customerId_1, null, locationSearchSet, "A1", sortBy, page1SearchMacAndLocation.getContext());
|
||||
PaginationResponse<ClientSession> page3SearchMacAndLocation = testInterface.getSessionsForCustomer(customerId_1, null, locationSearchSet, "A1", sortBy, page2SearchMacAndLocation.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1SearchMacAndLocation.getItems().size());
|
||||
assertEquals(0, page2SearchMacAndLocation.getItems().size());
|
||||
assertEquals(0, page3SearchMacAndLocation.getItems().size());
|
||||
page1SearchMacAndLocation.getItems().forEach(e -> assertTrue(e.getMacAddress().getAddressAsString().contains("A1".toLowerCase())));
|
||||
page1SearchMacAndLocation.getItems().forEach(e -> assertEquals(locationId_1, e.getLocationId()));
|
||||
|
||||
// Test macAddress search with equipmentId
|
||||
Set<Long> equipmentSearchSet = new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2));
|
||||
PaginationResponse<ClientSession> page1SearchMacAndEquipment = testInterface.getSessionsForCustomer(customerId_1, equipmentSearchSet, null, "A1", sortBy, context);
|
||||
PaginationResponse<ClientSession> page2SearchMacAndEquipment = testInterface.getSessionsForCustomer(customerId_1, equipmentSearchSet, null, "A1", sortBy, page1SearchMacAndEquipment.getContext());
|
||||
PaginationResponse<ClientSession> page3SearchMacAndEquipment = testInterface.getSessionsForCustomer(customerId_1, equipmentSearchSet, null, "A1", sortBy, page2SearchMacAndEquipment.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1SearchMacAndEquipment.getItems().size());
|
||||
assertEquals(10, page2SearchMacAndEquipment.getItems().size());
|
||||
assertEquals(0, page3SearchMacAndEquipment.getItems().size());
|
||||
page1SearchMacAndEquipment.getItems().forEach(e -> assertTrue(e.getMacAddress().getAddressAsString().contains("A1".toLowerCase())));
|
||||
page1SearchMacAndEquipment.getItems().forEach(e -> assertTrue(equipmentSearchSet.contains(e.getEquipmentId())));
|
||||
|
||||
// Test macAddress search with equipmentId and locationId
|
||||
PaginationResponse<ClientSession> page1SearchMacAndEquipmentAndLocation = testInterface.getSessionsForCustomer(customerId_1, equipmentSearchSet, locationSearchSet, "A1", sortBy, context);
|
||||
PaginationResponse<ClientSession> page2SearchMacAndEquipmentAndLocation = testInterface.getSessionsForCustomer(customerId_1, equipmentSearchSet, locationSearchSet, "A1", sortBy, page1SearchMacAndEquipmentAndLocation.getContext());
|
||||
PaginationResponse<ClientSession> page3SearchMacAndEquipmentAndLocation = testInterface.getSessionsForCustomer(customerId_1, equipmentSearchSet, locationSearchSet, "A1", sortBy, page2SearchMacAndEquipmentAndLocation.getContext());
|
||||
|
||||
//verify returned pages
|
||||
assertEquals(10, page1SearchMacAndEquipmentAndLocation.getItems().size());
|
||||
assertEquals(0, page2SearchMacAndEquipmentAndLocation.getItems().size());
|
||||
assertEquals(0, page3SearchMacAndEquipmentAndLocation.getItems().size());
|
||||
page1SearchMacAndEquipmentAndLocation.getItems().forEach(e -> assertTrue(e.getMacAddress().getAddressAsString().contains("A1".toLowerCase())));
|
||||
page1SearchMacAndEquipmentAndLocation.getItems().forEach(e -> assertEquals(equipmentId_1, e.getEquipmentId()));
|
||||
page1SearchMacAndEquipmentAndLocation.getItems().forEach(e -> assertEquals(locationId_1, e.getLocationId()));
|
||||
|
||||
|
||||
//test first page of the results with empty sort order -> default sort order (by Id ascending)
|
||||
PaginationResponse<ClientSession> page1EmptySort = testInterface.getSessionsForCustomer(customerId_1, null, null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page1EmptySort = testInterface.getSessionsForCustomer(customerId_1, null, null, null, Collections.emptyList(), context);
|
||||
assertEquals(10, page1EmptySort.getItems().size());
|
||||
|
||||
List<String> expectedPage1EmptySortStrings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> expectedPage1EmptySortStrings = getClientSessionPagination_expectedPage1EmptySortStrings();
|
||||
List<String> actualPage1EmptySortStrings = new ArrayList<>();
|
||||
page1EmptySort.getItems().stream().forEach( ce -> actualPage1EmptySortStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1EmptySortStrings, actualPage1EmptySortStrings);
|
||||
|
||||
//test first page of the results with null sort order -> default sort order (by Id ascending)
|
||||
PaginationResponse<ClientSession> page1NullSort = testInterface.getSessionsForCustomer(customerId_1, null, null, null, context);
|
||||
PaginationResponse<ClientSession> page1NullSort = testInterface.getSessionsForCustomer(customerId_1, null, null, null, null, context);
|
||||
assertEquals(10, page1NullSort.getItems().size());
|
||||
|
||||
List<String> expectedPage1NullSortStrings = new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
List<String> expectedPage1NullSortStrings = getClientSessionPagination_expectedPage1EmptySortStrings();
|
||||
List<String> actualPage1NullSortStrings = new ArrayList<>();
|
||||
page1NullSort.getItems().stream().forEach( ce -> actualPage1NullSortStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
@@ -678,18 +819,18 @@ public abstract class BaseClientDatastoreTest {
|
||||
|
||||
|
||||
//test first page of the results with sort descending order by a macAddress property
|
||||
PaginationResponse<ClientSession> page1SingleSortDesc = testInterface.getSessionsForCustomer(customerId_1, null, null, Collections.singletonList(new ColumnAndSort("macAddress", SortOrder.desc)), context);
|
||||
PaginationResponse<ClientSession> page1SingleSortDesc = testInterface.getSessionsForCustomer(customerId_1, null, null, null, Collections.singletonList(new ColumnAndSort("macAddress", SortOrder.desc)), context);
|
||||
assertEquals(10, page1SingleSortDesc.getItems().size());
|
||||
|
||||
List<String> expectedPage1SingleSortDescStrings = new ArrayList< >(Arrays.asList(new String[]{"qr_49", "qr_48", "qr_47", "qr_46", "qr_45", "qr_44", "qr_43", "qr_42", "qr_41", "qr_40" }));
|
||||
List<String> expectedPage1SingleSortDescStrings = getClientSessionPagination_expectedPage1SingleSortDescStrings();
|
||||
List<String> actualPage1SingleSortDescStrings = new ArrayList<>();
|
||||
page1SingleSortDesc.getItems().stream().forEach( ce -> actualPage1SingleSortDescStrings.add(((ClientSessionDetails)ce.getDetails()).getApFingerprint()) );
|
||||
|
||||
assertEquals(expectedPage1SingleSortDescStrings, actualPage1SingleSortDescStrings);
|
||||
|
||||
//test the results for equipment_1 only
|
||||
PaginationResponse<ClientSession> page1Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page2Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), null, Collections.emptyList(), page1Eq_1.getContext());
|
||||
PaginationResponse<ClientSession> page1Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), null, null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page2Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), null, null, Collections.emptyList(), page1Eq_1.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1.getItems().size());
|
||||
assertEquals(0, page2Eq_1.getItems().size());
|
||||
@@ -703,8 +844,8 @@ public abstract class BaseClientDatastoreTest {
|
||||
assertEquals(expectedPage1Eq_1Strings, actualPage1Eq_1Strings);
|
||||
|
||||
//test the results for equipment_2 only
|
||||
PaginationResponse<ClientSession> page1Eq_2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_2)), null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page2Eq_2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_2)), null, Collections.emptyList(), page1Eq_2.getContext());
|
||||
PaginationResponse<ClientSession> page1Eq_2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_2)), null, null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page2Eq_2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_2)), null, null, Collections.emptyList(), page1Eq_2.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_2.getItems().size());
|
||||
assertEquals(0, page2Eq_2.getItems().size());
|
||||
@@ -719,9 +860,9 @@ public abstract class BaseClientDatastoreTest {
|
||||
|
||||
|
||||
//test the results for equipment_1 or equipment_2 only
|
||||
PaginationResponse<ClientSession> page1Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2)), null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page2Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2)), null, Collections.emptyList(), page1Eq_1or2.getContext());
|
||||
PaginationResponse<ClientSession> page3Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2)), null, Collections.emptyList(), page2Eq_1or2.getContext());
|
||||
PaginationResponse<ClientSession> page1Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2)), null, null, Collections.emptyList(), context);
|
||||
PaginationResponse<ClientSession> page2Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2)), null, null, Collections.emptyList(), page1Eq_1or2.getContext());
|
||||
PaginationResponse<ClientSession> page3Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1, equipmentId_2)), null, null, Collections.emptyList(), page2Eq_1or2.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1or2.getItems().size());
|
||||
assertEquals(10, page2Eq_1or2.getItems().size());
|
||||
@@ -747,8 +888,8 @@ public abstract class BaseClientDatastoreTest {
|
||||
//
|
||||
|
||||
//test the results for location_1 only
|
||||
page1Eq_1 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1)), Collections.emptyList(), context);
|
||||
page2Eq_1 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1)), Collections.emptyList(), page1Eq_1.getContext());
|
||||
page1Eq_1 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1)), null, Collections.emptyList(), context);
|
||||
page2Eq_1 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1)), null, Collections.emptyList(), page1Eq_1.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1.getItems().size());
|
||||
assertEquals(0, page2Eq_1.getItems().size());
|
||||
@@ -762,8 +903,8 @@ public abstract class BaseClientDatastoreTest {
|
||||
assertEquals(expectedPage1Eq_1Strings, actualPage1Loc_1Strings);
|
||||
|
||||
//test the results for location_2 only
|
||||
page1Eq_2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_2)), Collections.emptyList(), context);
|
||||
page2Eq_2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_2)), Collections.emptyList(), page1Eq_2.getContext());
|
||||
page1Eq_2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_2)), null, Collections.emptyList(), context);
|
||||
page2Eq_2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_2)), null, Collections.emptyList(), page1Eq_2.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_2.getItems().size());
|
||||
assertEquals(0, page2Eq_2.getItems().size());
|
||||
@@ -778,9 +919,9 @@ public abstract class BaseClientDatastoreTest {
|
||||
|
||||
|
||||
//test the results for location_1 or location_2 only
|
||||
page1Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), context);
|
||||
page2Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), page1Eq_1or2.getContext());
|
||||
page3Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), page2Eq_1or2.getContext());
|
||||
page1Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), null, Collections.emptyList(), context);
|
||||
page2Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), null, Collections.emptyList(), page1Eq_1or2.getContext());
|
||||
page3Eq_1or2 = testInterface.getSessionsForCustomer(customerId_1, null, new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), null, Collections.emptyList(), page2Eq_1or2.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1or2.getItems().size());
|
||||
assertEquals(10, page2Eq_1or2.getItems().size());
|
||||
@@ -802,8 +943,8 @@ public abstract class BaseClientDatastoreTest {
|
||||
assertEquals(expectedPage2Eq_1or2Strings, actualPage2Loc_1or2Strings);
|
||||
|
||||
//test the results for ( location_1 or location_2 ) and equipment_1only
|
||||
page1Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), context);
|
||||
page2Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), Collections.emptyList(), page1Eq_1.getContext());
|
||||
page1Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), null, Collections.emptyList(), context);
|
||||
page2Eq_1 = testInterface.getSessionsForCustomer(customerId_1, new HashSet<Long>(Arrays.asList(equipmentId_1)), new HashSet<Long>(Arrays.asList(locationId_1, locationId_2)), null, Collections.emptyList(), page1Eq_1.getContext());
|
||||
|
||||
assertEquals(10, page1Eq_1.getItems().size());
|
||||
assertEquals(0, page2Eq_1.getItems().size());
|
||||
@@ -820,6 +961,19 @@ public abstract class BaseClientDatastoreTest {
|
||||
createdListExtra.forEach(c -> testInterface.deleteSession(c.getCustomerId(), c.getEquipmentId(), c.getMacAddress()));
|
||||
}
|
||||
|
||||
protected List<String> getClientSessionPagination_expectedPage1EmptySortStrings(){
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_0", "qr_1", "qr_2", "qr_3", "qr_4", "qr_5", "qr_6", "qr_7", "qr_8", "qr_9" }));
|
||||
}
|
||||
|
||||
protected List<String> getClientSessionPagination_expectedPage3Strings(){
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_20", "qr_21", "qr_22", "qr_23", "qr_24", "qr_25", "qr_26", "qr_27", "qr_28", "qr_29" }));
|
||||
}
|
||||
|
||||
protected List<String> getClientSessionPagination_expectedPage1SingleSortDescStrings() {
|
||||
return new ArrayList<>(Arrays.asList(new String[]{"qr_49", "qr_48", "qr_47", "qr_46", "qr_45", "qr_44", "qr_43", "qr_42", "qr_41", "qr_40" }));
|
||||
}
|
||||
|
||||
|
||||
protected ClientSession createClientSessionObject() {
|
||||
ClientSession result = new ClientSession();
|
||||
long nextId = testSequence.getAndIncrement();
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,21 +15,21 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-datastore-inmemory</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>client-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>client-datastore-common-test</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -198,7 +198,7 @@ public class ClientDatastoreInMemory extends BaseInMemoryDatastore implements Cl
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaginationResponse<Client> getForCustomer(int customerId,
|
||||
public PaginationResponse<Client> getForCustomer(int customerId, String macSubstring,
|
||||
final List<ColumnAndSort> sortBy, PaginationContext<Client> context) {
|
||||
|
||||
if(context == null) {
|
||||
@@ -221,8 +221,11 @@ public class ClientDatastoreInMemory extends BaseInMemoryDatastore implements Cl
|
||||
if (mdl.getCustomerId() != customerId) {
|
||||
continue;
|
||||
}
|
||||
|
||||
items.add(mdl);
|
||||
|
||||
if (macSubstring == null ||
|
||||
mdl.getMacAddress().getAddressAsString().toLowerCase().contains(macSubstring.toLowerCase())) {
|
||||
items.add(mdl);
|
||||
}
|
||||
}
|
||||
|
||||
// apply sortBy columns
|
||||
@@ -384,6 +387,7 @@ public class ClientDatastoreInMemory extends BaseInMemoryDatastore implements Cl
|
||||
public PaginationResponse<ClientSession> getSessionsForCustomer(int customerId,
|
||||
Set<Long> equipmentIds,
|
||||
Set<Long> locationIds,
|
||||
String macSubstring,
|
||||
final List<ColumnAndSort> sortBy, PaginationContext<ClientSession> context) {
|
||||
|
||||
if(context == null) {
|
||||
@@ -413,7 +417,12 @@ public class ClientDatastoreInMemory extends BaseInMemoryDatastore implements Cl
|
||||
locationIds == null
|
||||
|| locationIds.isEmpty()
|
||||
|| locationIds.contains(mdl.getLocationId())
|
||||
)
|
||||
) &&
|
||||
(
|
||||
macSubstring == null
|
||||
|| macSubstring.isEmpty()
|
||||
|| mdl.getMacAddress().getAddressAsString().toLowerCase().contains(macSubstring.toLowerCase())
|
||||
)
|
||||
) {
|
||||
items.add(mdl);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,12 +15,12 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>client-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-exceptions</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public interface ClientDatastore {
|
||||
List<Client> get(int customerId, Set<MacAddress> clientMacSet);
|
||||
|
||||
/**
|
||||
* <br>Retrieves all of the Client records that are mapped to the provided customerId.
|
||||
* <br>Retrieves all of the Client records that are mapped to the provided customerId and optional macSubstring filter.
|
||||
* Results are returned in pages.
|
||||
*
|
||||
* <br>When changing sort order or filters, pagination should be restarted again from the first page.
|
||||
@@ -44,9 +44,10 @@ public interface ClientDatastore {
|
||||
*<li> "macAddress"
|
||||
*<br>
|
||||
* @param customerId
|
||||
* @param macSubstring
|
||||
* @return next page of matching Client objects.
|
||||
*/
|
||||
PaginationResponse<Client> getForCustomer(int customerId, List<ColumnAndSort> sortBy, PaginationContext<Client> context);
|
||||
PaginationResponse<Client> getForCustomer(int customerId, String macSubstring, List<ColumnAndSort> sortBy, PaginationContext<Client> context);
|
||||
|
||||
/**
|
||||
* @param customerId
|
||||
@@ -97,10 +98,11 @@ public interface ClientDatastore {
|
||||
* @param customerId
|
||||
* @param equipmentIds - set of equipment ids for which to retrieve session objects. Empty set or null means retrieve for all customer's equipment.
|
||||
* @param locationIds - set of location ids for which to retrieve session objects. Empty set or null means retrieve for all customer's locations.
|
||||
* @param macSubstring - To match with MacAddress
|
||||
*
|
||||
* @return next page of matching Client session objects.
|
||||
*/
|
||||
PaginationResponse<ClientSession> getSessionsForCustomer(int customerId, Set<Long> equipmentIds, Set<Long> locationIds, List<ColumnAndSort> sortBy, PaginationContext<ClientSession> context);
|
||||
PaginationResponse<ClientSession> getSessionsForCustomer(int customerId, Set<Long> equipmentIds, Set<Long> locationIds, String macSubstring, List<ColumnAndSort> sortBy, PaginationContext<ClientSession> context);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,26 +15,26 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-jdbc</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>client-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-jdbc-tests</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>client-datastore-common-test</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ public class ClientDAO extends BaseJdbcDao {
|
||||
|
||||
private static final String[] ALL_COLUMNS_LIST = {
|
||||
COL_ID,
|
||||
"macAddressString",
|
||||
|
||||
//TODO: add colums from properties Client in here
|
||||
"customerId",
|
||||
@@ -62,7 +63,7 @@ public class ClientDAO extends BaseJdbcDao {
|
||||
};
|
||||
|
||||
private static final Set<String> columnsToSkipForInsert = new HashSet<>(Arrays.asList());
|
||||
private static final Set<String> columnsToSkipForUpdate = new HashSet<>(Arrays.asList(COL_ID, "createdTimestamp", "customerId"));
|
||||
private static final Set<String> columnsToSkipForUpdate = new HashSet<>(Arrays.asList(COL_ID, "macAddressString", "createdTimestamp", "customerId"));
|
||||
|
||||
private static final String TABLE_NAME = "client";
|
||||
private static final String TABLE_PREFIX = "c.";
|
||||
@@ -153,6 +154,9 @@ public class ClientDAO extends BaseJdbcDao {
|
||||
;
|
||||
|
||||
private static final String SQL_GET_ALL_IN_SET = "select " + ALL_COLUMNS + " from "+TABLE_NAME + " where customerId = ? and "+ COL_ID +" in ";
|
||||
|
||||
private static final String SQL_APPEND_SEARCH_MAC_SUBSTRING =
|
||||
"and macAddressString like ? ";
|
||||
|
||||
private static final String SQL_PAGING_SUFFIX = " LIMIT ? OFFSET ? ";
|
||||
private static final String SORT_SUFFIX = "";
|
||||
@@ -183,6 +187,7 @@ public class ClientDAO extends BaseJdbcDao {
|
||||
|
||||
//TODO: add remaining properties from Client here
|
||||
ps.setLong(colIdx++, client.getMacAddress().getAddressAsLong());
|
||||
ps.setString(colIdx++, client.getMacAddress().getAddressAsString());
|
||||
ps.setInt(colIdx++, client.getCustomerId());
|
||||
ps.setBytes(colIdx++, (client.getDetails()!=null)?client.getDetails().toZippedBytes():null);
|
||||
|
||||
@@ -384,9 +389,8 @@ public class ClientDAO extends BaseJdbcDao {
|
||||
return results;
|
||||
}
|
||||
|
||||
|
||||
public PaginationResponse<Client> getForCustomer(int customerId, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<Client> context) {
|
||||
public PaginationResponse<Client> getForCustomer(int customerId, String macSubstring,
|
||||
List<ColumnAndSort> sortBy, PaginationContext<Client> context) {
|
||||
|
||||
PaginationResponse<Client> ret = new PaginationResponse<>();
|
||||
ret.setContext(context.clone());
|
||||
@@ -394,19 +398,25 @@ public class ClientDAO extends BaseJdbcDao {
|
||||
if (ret.getContext().isLastPage()) {
|
||||
// no more pages available according to the context
|
||||
LOG.debug(
|
||||
"No more pages available when looking up Clients for customer {} with last returned page number {}",
|
||||
customerId, context.getLastReturnedPageNumber());
|
||||
"No more pages available when looking up Clients for customer {} macSubstring {} with last returned page number {}",
|
||||
customerId, macSubstring, context.getLastReturnedPageNumber());
|
||||
return ret;
|
||||
}
|
||||
|
||||
LOG.debug("Looking up Clients for customer {} with last returned page number {}",
|
||||
customerId, context.getLastReturnedPageNumber());
|
||||
LOG.debug("Looking up Clients for customer {} macSubstring {} with last returned page number {}",
|
||||
customerId, macSubstring, context.getLastReturnedPageNumber());
|
||||
|
||||
String query = SQL_GET_BY_CUSTOMER_ID;
|
||||
|
||||
// add filters for the query
|
||||
ArrayList<Object> queryArgs = new ArrayList<>();
|
||||
queryArgs.add(customerId);
|
||||
|
||||
if (macSubstring != null) {
|
||||
query += SQL_APPEND_SEARCH_MAC_SUBSTRING;
|
||||
|
||||
queryArgs.add("%" + macSubstring.toLowerCase() + "%");
|
||||
}
|
||||
|
||||
// add sorting options for the query
|
||||
StringBuilder strbSort = new StringBuilder(100);
|
||||
@@ -456,8 +466,8 @@ public class ClientDAO extends BaseJdbcDao {
|
||||
List<Client> pageItems = this.jdbcTemplate.query(query, queryArgs.toArray(),
|
||||
clientRowMapper);
|
||||
|
||||
LOG.debug("Found {} Clients for customer {} with last returned page number {}",
|
||||
pageItems.size(), customerId, context.getLastReturnedPageNumber());
|
||||
LOG.debug("Found {} Clients for customer {} macSubstring {} with last returned page number {}",
|
||||
pageItems.size(), customerId, macSubstring, context.getLastReturnedPageNumber());
|
||||
|
||||
ret.setItems(pageItems);
|
||||
|
||||
|
||||
@@ -56,14 +56,14 @@ public class ClientDatastoreRdbms implements ClientDatastore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaginationResponse<Client> getForCustomer(int customerId, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<Client> context) {
|
||||
public PaginationResponse<Client> getForCustomer(int customerId, String macSubstring,
|
||||
List<ColumnAndSort> sortBy, PaginationContext<Client> context) {
|
||||
|
||||
if(context == null) {
|
||||
context = new PaginationContext<>();
|
||||
}
|
||||
|
||||
return clientDAO.getForCustomer( customerId, sortBy, context);
|
||||
return clientDAO.getForCustomer(customerId, macSubstring, sortBy, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,13 +88,13 @@ public class ClientDatastoreRdbms implements ClientDatastore {
|
||||
|
||||
@Override
|
||||
public PaginationResponse<ClientSession> getSessionsForCustomer(int customerId, Set<Long> equipmentIds, Set<Long> locationIds,
|
||||
List<ColumnAndSort> sortBy, PaginationContext<ClientSession> context) {
|
||||
String macSubstring, List<ColumnAndSort> sortBy, PaginationContext<ClientSession> context) {
|
||||
|
||||
if(context == null) {
|
||||
context = new PaginationContext<>();
|
||||
}
|
||||
|
||||
return clientSessionDAO.getSessionsForCustomer(customerId, equipmentIds, locationIds, sortBy, context);
|
||||
return clientSessionDAO.getSessionsForCustomer(customerId, equipmentIds, locationIds, macSubstring, sortBy, context);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,9 @@ public class ClientRowMapper implements RowMapper<Client> {
|
||||
Client client = new Client();
|
||||
int colIdx=1;
|
||||
client.setMacAddress(new MacAddress(rs.getLong(colIdx++)));
|
||||
|
||||
// macAddressString here does not need to map again to Client Object
|
||||
colIdx++;
|
||||
|
||||
//TODO: add columns from properties Client in here.
|
||||
//make sure order of fields is the same as defined in Client
|
||||
client.setCustomerId(rs.getInt(colIdx++));
|
||||
|
||||
@@ -51,6 +51,7 @@ public class ClientSessionDAO extends BaseJdbcDao {
|
||||
|
||||
private static final String[] ALL_COLUMNS_LIST = {
|
||||
COL_ID,
|
||||
"macAddressString",
|
||||
|
||||
//TODO: add colums from properties ClientSession in here
|
||||
"customerId",
|
||||
@@ -63,7 +64,7 @@ public class ClientSessionDAO extends BaseJdbcDao {
|
||||
};
|
||||
|
||||
private static final Set<String> columnsToSkipForInsert = new HashSet<>(Arrays.asList());
|
||||
private static final Set<String> columnsToSkipForUpdate = new HashSet<>(Arrays.asList(COL_ID, "customerId", "equipmentId"));
|
||||
private static final Set<String> columnsToSkipForUpdate = new HashSet<>(Arrays.asList(COL_ID, "macAddressString", "customerId", "equipmentId"));
|
||||
|
||||
private static final String TABLE_NAME = "client_session";
|
||||
private static final String TABLE_PREFIX = "s.";
|
||||
@@ -149,6 +150,9 @@ public class ClientSessionDAO extends BaseJdbcDao {
|
||||
;
|
||||
|
||||
private static final String SQL_GET_ALL_IN_SET = "select " + ALL_COLUMNS + " from "+TABLE_NAME + " where customerId = ? and "+ COL_ID +" in ";
|
||||
|
||||
private static final String SQL_APPEND_SEARCH_MAC_SUBSTRING =
|
||||
"and macAddressString like ? ";
|
||||
|
||||
private static final String SQL_PAGING_SUFFIX = " LIMIT ? OFFSET ? ";
|
||||
private static final String SORT_SUFFIX = "";
|
||||
@@ -181,6 +185,7 @@ public class ClientSessionDAO extends BaseJdbcDao {
|
||||
|
||||
//TODO: add remaining properties from Client here
|
||||
ps.setLong(colIdx++, clientSession.getMacAddress().getAddressAsLong());
|
||||
ps.setString(colIdx++, clientSession.getMacAddress().getAddressAsString());
|
||||
ps.setInt(colIdx++, clientSession.getCustomerId());
|
||||
ps.setLong(colIdx++, clientSession.getEquipmentId());
|
||||
ps.setLong(colIdx++, clientSession.getLocationId());
|
||||
@@ -332,8 +337,8 @@ public class ClientSessionDAO extends BaseJdbcDao {
|
||||
}
|
||||
|
||||
|
||||
public PaginationResponse<ClientSession> getSessionsForCustomer(int customerId, Set<Long> equipmentIds, Set<Long> locationIds, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<ClientSession> context) {
|
||||
public PaginationResponse<ClientSession> getSessionsForCustomer(int customerId, Set<Long> equipmentIds, Set<Long> locationIds,
|
||||
String macSubstring, List<ColumnAndSort> sortBy, PaginationContext<ClientSession> context) {
|
||||
|
||||
PaginationResponse<ClientSession> ret = new PaginationResponse<>();
|
||||
ret.setContext(context.clone());
|
||||
@@ -388,6 +393,13 @@ public class ClientSessionDAO extends BaseJdbcDao {
|
||||
|
||||
query += strb.toString();
|
||||
}
|
||||
|
||||
//add macSubstring filter
|
||||
if (macSubstring != null && !macSubstring.isEmpty()) {
|
||||
query += SQL_APPEND_SEARCH_MAC_SUBSTRING;
|
||||
|
||||
queryArgs.add("%" + macSubstring.toLowerCase() + "%");
|
||||
}
|
||||
|
||||
// add sorting options for the query
|
||||
StringBuilder strbSort = new StringBuilder(100);
|
||||
|
||||
@@ -28,7 +28,9 @@ public class ClientSessionRowMapper implements RowMapper<ClientSession> {
|
||||
ClientSession clientSession = new ClientSession();
|
||||
int colIdx=1;
|
||||
clientSession.setMacAddress(new MacAddress(rs.getLong(colIdx++)));
|
||||
|
||||
// macAddressString here does not need to map again to ClientSession Object
|
||||
colIdx++;
|
||||
|
||||
//TODO: add columns from properties ClientSession in here.
|
||||
//make sure order of fields is the same as defined in ClientSession
|
||||
clientSession.setCustomerId(rs.getInt(colIdx++));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
create table if not exists client (
|
||||
-- postgresql
|
||||
macAddress bigint ,
|
||||
macAddressString varchar(100) ,
|
||||
|
||||
customerId int,
|
||||
details bytea,
|
||||
@@ -11,8 +12,10 @@ create table if not exists client (
|
||||
primary key (customerId, macAddress)
|
||||
);
|
||||
|
||||
create index if not exists idx_client_customerId on client (customerId);
|
||||
alter table client add column if not exists macAddressString varchar(100);
|
||||
|
||||
create index if not exists idx_client_customerId on client (customerId);
|
||||
create index if not exists idx_client_customerId_macAddressString on client (customerId, macAddressString);
|
||||
|
||||
create table if not exists client_blocklist (
|
||||
-- postgresql
|
||||
@@ -26,6 +29,7 @@ create table if not exists client_blocklist (
|
||||
create table if not exists client_session (
|
||||
-- postgresql
|
||||
macAddress bigint ,
|
||||
macAddressString varchar(100) ,
|
||||
|
||||
customerId int,
|
||||
equipmentId bigint,
|
||||
@@ -37,6 +41,10 @@ create table if not exists client_session (
|
||||
primary key (customerId, equipmentId, macAddress)
|
||||
);
|
||||
|
||||
alter table client_session add column if not exists macAddressString varchar(100);
|
||||
|
||||
create index if not exists idx_clientSession_customerId on client_session (customerId);
|
||||
create index if not exists idx_clientSession_locationId on client_session (customerId, locationId);
|
||||
create index if not exists idx_clientSession_customerId_macAddressString on client_session (customerId, macAddressString);
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ drop table client_session if exists;
|
||||
create table client (
|
||||
-- hsqldb
|
||||
macAddress bigint,
|
||||
macAddressString varchar(100),
|
||||
|
||||
customerId int,
|
||||
details varbinary(65535),
|
||||
@@ -15,6 +16,7 @@ create table client (
|
||||
);
|
||||
|
||||
create index idx_client_customerId on client (customerId);
|
||||
create index if not exists idx_client_customerId_macAddressString on client (customerId, macAddressString);
|
||||
|
||||
create table if not exists client_blocklist (
|
||||
-- hsqldb
|
||||
@@ -28,6 +30,7 @@ create table if not exists client_blocklist (
|
||||
create table client_session (
|
||||
-- postgresql
|
||||
macAddress bigint ,
|
||||
macAddressString varchar(100),
|
||||
|
||||
customerId int,
|
||||
equipmentId bigint,
|
||||
@@ -41,4 +44,6 @@ create table client_session (
|
||||
|
||||
create index idx_clientSession_customerId on client_session (customerId);
|
||||
create index idx_clientSession_locationId on client_session (customerId, locationId);
|
||||
create index if not exists idx_clientSession_customerId_macAddressString on client_session (customerId, macAddressString);
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
insert into client (
|
||||
macAddress,
|
||||
macAddressString,
|
||||
customerId,
|
||||
details,
|
||||
createdTimestamp,
|
||||
lastModifiedTimestamp
|
||||
) values (
|
||||
1,
|
||||
'1',
|
||||
1,
|
||||
null,
|
||||
0,0
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<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">
|
||||
<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>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,12 +15,12 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>system-event-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.telecominfraproject.wlan.client.models.events;
|
||||
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.core.model.json.interfaces.HasLocationId;
|
||||
import com.telecominfraproject.wlan.systemevent.models.EquipmentEventWithPayload;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
*/
|
||||
public class ClientSessionChangedEvent extends EquipmentEventWithPayload<ClientSession> {
|
||||
public class ClientSessionChangedEvent extends EquipmentEventWithPayload<ClientSession> implements HasLocationId {
|
||||
private static final long serialVersionUID = 7142208487917559985L;
|
||||
|
||||
public ClientSessionChangedEvent(ClientSession clientSession){
|
||||
@@ -17,6 +18,15 @@ public class ClientSessionChangedEvent extends EquipmentEventWithPayload<ClientS
|
||||
clientSession);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLocationId() {
|
||||
if(getPayload() !=null) {
|
||||
return getPayload().getLocationId();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used by JSON
|
||||
*/
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.telecominfraproject.wlan.client.models.events;
|
||||
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.core.model.json.interfaces.HasLocationId;
|
||||
import com.telecominfraproject.wlan.systemevent.models.EquipmentEventWithPayload;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
*/
|
||||
public class ClientSessionClosedEvent extends EquipmentEventWithPayload<ClientSession> {
|
||||
public class ClientSessionClosedEvent extends EquipmentEventWithPayload<ClientSession> implements HasLocationId {
|
||||
private static final long serialVersionUID = 7142208487917559985L;
|
||||
|
||||
public ClientSessionClosedEvent(ClientSession clientSession){
|
||||
@@ -17,6 +18,15 @@ public class ClientSessionClosedEvent extends EquipmentEventWithPayload<ClientSe
|
||||
clientSession);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLocationId() {
|
||||
if(getPayload() !=null) {
|
||||
return getPayload().getLocationId();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used by JSON
|
||||
*/
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.telecominfraproject.wlan.client.models.events;
|
||||
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.core.model.json.interfaces.HasLocationId;
|
||||
import com.telecominfraproject.wlan.systemevent.models.EquipmentEventWithPayload;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
*/
|
||||
public class ClientSessionRemovedEvent extends EquipmentEventWithPayload<ClientSession> {
|
||||
public class ClientSessionRemovedEvent extends EquipmentEventWithPayload<ClientSession> implements HasLocationId {
|
||||
private static final long serialVersionUID = 7142208487917559985L;
|
||||
|
||||
public ClientSessionRemovedEvent(ClientSession clientSession){
|
||||
@@ -17,6 +18,15 @@ public class ClientSessionRemovedEvent extends EquipmentEventWithPayload<ClientS
|
||||
clientSession);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLocationId() {
|
||||
if(getPayload() !=null) {
|
||||
return getPayload().getLocationId();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used by JSON
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
package com.telecominfraproject.wlan.client.models.events.realtime;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.telecominfraproject.wlan.client.models.events.utils.WlanStatusCode;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.core.model.json.interfaces.HasClientMac;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEvent;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEventType;
|
||||
|
||||
public class ClientAssocEvent extends RealTimeEvent implements HasClientMac {
|
||||
private static final long serialVersionUID = 7015822981315570338L;
|
||||
|
||||
private long sessionId;
|
||||
private String ssid;
|
||||
private MacAddress clientMacAddress;
|
||||
private RadioType radioType;
|
||||
private boolean isReassociation;
|
||||
private WlanStatusCode status;
|
||||
private int rssi;
|
||||
private int internalSC;
|
||||
private boolean using11k;
|
||||
private boolean using11r;
|
||||
private boolean using11v;
|
||||
|
||||
public ClientAssocEvent() {
|
||||
// serialization
|
||||
|
||||
}
|
||||
|
||||
public ClientAssocEvent(int customerId, long locationId, long equipmentId, long timestamp, long sessionId, String ssid,
|
||||
MacAddress clientMacAddress, RadioType radioType, boolean isReassociation, WlanStatusCode status,
|
||||
Integer internalSC, Integer rssi) {
|
||||
super(RealTimeEventType.STA_Client_Assoc, customerId, locationId, equipmentId, timestamp);
|
||||
this.sessionId = sessionId;
|
||||
this.ssid = ssid;
|
||||
setClientMacAddress(clientMacAddress);
|
||||
this.radioType = radioType;
|
||||
this.isReassociation = isReassociation;
|
||||
this.status = status;
|
||||
this.internalSC = internalSC;
|
||||
this.rssi = rssi;
|
||||
}
|
||||
|
||||
public ClientAssocEvent(Long timestamp) {
|
||||
super(RealTimeEventType.STA_Client_Assoc, timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the sessionId
|
||||
*/
|
||||
public long getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sessionId
|
||||
* the sessionId to set
|
||||
*/
|
||||
public void setSessionId(long sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ssid
|
||||
*/
|
||||
public String getSsid() {
|
||||
return ssid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ssid
|
||||
* the ssid to set
|
||||
*/
|
||||
public void setSsid(String ssid) {
|
||||
this.ssid = ssid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MacAddress getClientMacAddress() {
|
||||
return clientMacAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param clientMacAddress
|
||||
* the clientMacAddress to set
|
||||
*/
|
||||
public void setClientMacAddress(MacAddress clientMacAddress) {
|
||||
this.clientMacAddress = clientMacAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the radioType
|
||||
*/
|
||||
public RadioType getRadioType() {
|
||||
return radioType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param radioType
|
||||
* the radioType to set
|
||||
*/
|
||||
public void setRadioType(RadioType radioType) {
|
||||
this.radioType = radioType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isReassociation
|
||||
*/
|
||||
public boolean isReassociation() {
|
||||
return isReassociation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isReassociation
|
||||
* the isReassociation to set
|
||||
*/
|
||||
public void setReassociation(boolean isReassociation) {
|
||||
this.isReassociation = isReassociation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the status
|
||||
*/
|
||||
public WlanStatusCode getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param status
|
||||
* the status to set
|
||||
*/
|
||||
public void setStatus(WlanStatusCode status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the rssi
|
||||
*/
|
||||
public int getRssi() {
|
||||
return rssi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rssi
|
||||
* the rssi to set
|
||||
*/
|
||||
public void setRssi(int rssi) {
|
||||
this.rssi = rssi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the internalSC
|
||||
*/
|
||||
public int getInternalSC() {
|
||||
return internalSC;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param internalSC
|
||||
* the internalSC to set
|
||||
*/
|
||||
public void setInternalSC(int internalSC) {
|
||||
this.internalSC = internalSC;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the using11k
|
||||
*/
|
||||
public boolean isUsing11k() {
|
||||
return using11k;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param using11k
|
||||
* the using11k to set
|
||||
*/
|
||||
public void setUsing11k(boolean using11k) {
|
||||
this.using11k = using11k;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the using11r
|
||||
*/
|
||||
public boolean isUsing11r() {
|
||||
return using11r;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param using11r
|
||||
* the using11r to set
|
||||
*/
|
||||
public void setUsing11r(boolean using11r) {
|
||||
this.using11r = using11r;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the using11v
|
||||
*/
|
||||
public boolean isUsing11v() {
|
||||
return using11v;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param using11v
|
||||
* the using11v to set
|
||||
*/
|
||||
public void setUsing11v(boolean using11v) {
|
||||
this.using11v = using11v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientAssocEvent clone() {
|
||||
return (ClientAssocEvent) super.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + Objects.hash(clientMacAddress, internalSC, isReassociation, radioType, rssi,
|
||||
sessionId, ssid, status, using11k, using11r, using11v);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (!super.equals(obj))
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ClientAssocEvent other = (ClientAssocEvent) obj;
|
||||
return Objects.equals(clientMacAddress, other.clientMacAddress) && internalSC == other.internalSC
|
||||
&& isReassociation == other.isReassociation && radioType == other.radioType && rssi == other.rssi
|
||||
&& sessionId == other.sessionId && Objects.equals(ssid, other.ssid)
|
||||
&& Objects.equals(status, other.status) && using11k == other.using11k && using11r == other.using11r
|
||||
&& using11v == other.using11v;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.telecominfraproject.wlan.client.models.events.realtime;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.telecominfraproject.wlan.client.models.events.utils.WlanStatusCode;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.core.model.json.interfaces.HasClientMac;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEvent;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEventType;
|
||||
|
||||
public class ClientAuthEvent extends RealTimeEvent implements HasClientMac {
|
||||
|
||||
private static final long serialVersionUID = 1221389696911864515L;
|
||||
|
||||
private long sessionId;
|
||||
private String ssid;
|
||||
private MacAddress clientMacAddress;
|
||||
private WlanStatusCode authStatus;
|
||||
private RadioType radioType;
|
||||
|
||||
public ClientAuthEvent() {
|
||||
// serialization
|
||||
|
||||
}
|
||||
|
||||
public ClientAuthEvent(Long timestamp) {
|
||||
super(RealTimeEventType.STA_Client_Auth, timestamp);
|
||||
}
|
||||
|
||||
public ClientAuthEvent(RealTimeEventType eventType, Long timestamp) {
|
||||
super(eventType, timestamp);
|
||||
}
|
||||
|
||||
public long getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MacAddress getClientMacAddress() {
|
||||
return clientMacAddress;
|
||||
}
|
||||
|
||||
public void setClientMacAddress(MacAddress clientMacAddress) {
|
||||
this.clientMacAddress = clientMacAddress;
|
||||
}
|
||||
|
||||
public String getSsid() {
|
||||
return ssid;
|
||||
}
|
||||
|
||||
public void setSsid(String ssid) {
|
||||
this.ssid = ssid;
|
||||
}
|
||||
|
||||
public WlanStatusCode getAuthStatus() {
|
||||
return authStatus;
|
||||
}
|
||||
|
||||
public void setAuthStatus(WlanStatusCode authStatus) {
|
||||
this.authStatus = authStatus;
|
||||
}
|
||||
|
||||
public RadioType getRadioType() {
|
||||
return radioType;
|
||||
}
|
||||
|
||||
public void setRadioType(RadioType radioType) {
|
||||
this.radioType = radioType;
|
||||
}
|
||||
|
||||
public ClientAuthEvent clone() {
|
||||
return (ClientAuthEvent) super.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasUnsupportedValue() {
|
||||
if (super.hasUnsupportedValue()) {
|
||||
return true;
|
||||
}
|
||||
if (RadioType.isUnsupported(radioType) || hasUnsupportedValue(clientMacAddress)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + Objects.hash(authStatus, clientMacAddress, radioType, sessionId, ssid);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (!super.equals(obj))
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ClientAuthEvent other = (ClientAuthEvent) obj;
|
||||
return Objects.equals(authStatus, other.authStatus) && Objects.equals(clientMacAddress, other.clientMacAddress)
|
||||
&& radioType == other.radioType && sessionId == other.sessionId && Objects.equals(ssid, other.ssid);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,414 @@
|
||||
package com.telecominfraproject.wlan.client.models.events.realtime;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.SecurityType;
|
||||
import com.telecominfraproject.wlan.core.model.json.interfaces.HasClientMac;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEvent;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEventType;
|
||||
|
||||
public class ClientConnectSuccessEvent extends RealTimeEvent implements HasClientMac {
|
||||
|
||||
private static final long serialVersionUID = -6082134146801575193L;
|
||||
private MacAddress clientMacAddress;
|
||||
private long sessionId;
|
||||
private RadioType radioType;
|
||||
private boolean isReassociation;
|
||||
private String ssid;
|
||||
private SecurityType securityType;
|
||||
private boolean fbtUsed;
|
||||
private InetAddress ipAddr;
|
||||
private String cltId;
|
||||
|
||||
private long authTs;
|
||||
private long assocTs;
|
||||
private long eapolTs;
|
||||
private long portEnabledTs;
|
||||
private long firstDataRxTs;
|
||||
private long firstDataTxTs;
|
||||
|
||||
private boolean using11k;
|
||||
private boolean using11r;
|
||||
private boolean using11v;
|
||||
|
||||
private long ipAcquisitionTs;
|
||||
private int assocRSSI;
|
||||
|
||||
/**
|
||||
* Adding this such that we can skip DHCP event decoding
|
||||
*/
|
||||
private String hostName;
|
||||
|
||||
public ClientConnectSuccessEvent() {
|
||||
super(RealTimeEventType.ClientConnectedSuccess, 0L);
|
||||
}
|
||||
|
||||
public ClientConnectSuccessEvent(long timestamp) {
|
||||
super(RealTimeEventType.ClientConnectedSuccess, timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param clientMacAddress
|
||||
* the clientMacAddress to set
|
||||
*/
|
||||
public void setClientMacAddress(MacAddress macAddress) {
|
||||
this.clientMacAddress = macAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the sessionId
|
||||
*/
|
||||
public long getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sessionId
|
||||
* the sessionId to set
|
||||
*/
|
||||
public void setSessionId(long sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the radioType
|
||||
*/
|
||||
public RadioType getRadioType() {
|
||||
return radioType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param radioType
|
||||
* the radioType to set
|
||||
*/
|
||||
public void setRadioType(RadioType radioType) {
|
||||
this.radioType = radioType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isReassociation
|
||||
*/
|
||||
public boolean isReassociation() {
|
||||
return isReassociation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isReassociation
|
||||
* the isReassociation to set
|
||||
*/
|
||||
public void setReassociation(boolean isReassociation) {
|
||||
this.isReassociation = isReassociation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ssid
|
||||
*/
|
||||
public String getSsid() {
|
||||
return ssid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ssid
|
||||
* the ssid to set
|
||||
*/
|
||||
public void setSsid(String ssid) {
|
||||
this.ssid = ssid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the securityType
|
||||
*/
|
||||
public SecurityType getSecurityType() {
|
||||
return securityType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param securityType
|
||||
* the securityType to set
|
||||
*/
|
||||
public void setSecurityType(SecurityType securityType) {
|
||||
this.securityType = securityType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the fbtUsed
|
||||
*/
|
||||
public boolean isFbtUsed() {
|
||||
return fbtUsed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fbtUsed
|
||||
* the fbtUsed to set
|
||||
*/
|
||||
public void setFbtUsed(boolean fbtUsed) {
|
||||
this.fbtUsed = fbtUsed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ipAddr
|
||||
*/
|
||||
public InetAddress getIpAddr() {
|
||||
return ipAddr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ipAddr
|
||||
* the ipAddr to set
|
||||
*/
|
||||
public void setIpAddr(InetAddress ipAddr) {
|
||||
this.ipAddr = ipAddr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cltId
|
||||
*/
|
||||
public String getCltId() {
|
||||
return cltId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cltId
|
||||
* the cltId to set
|
||||
*/
|
||||
public void setCltId(String cltId) {
|
||||
this.cltId = cltId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the authTs
|
||||
*/
|
||||
public long getAuthTs() {
|
||||
return authTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param authTs
|
||||
* the authTs to set
|
||||
*/
|
||||
public void setAuthTs(long authTs) {
|
||||
this.authTs = authTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the assocTs
|
||||
*/
|
||||
public long getAssocTs() {
|
||||
return assocTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param assocTs
|
||||
* the assocTs to set
|
||||
*/
|
||||
public void setAssocTs(long assocTs) {
|
||||
this.assocTs = assocTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the eapolTs
|
||||
*/
|
||||
public long getEapolTs() {
|
||||
return eapolTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param eapolTs
|
||||
* the eapolTs to set
|
||||
*/
|
||||
public void setEapolTs(long eapolTs) {
|
||||
this.eapolTs = eapolTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the portEnabledTs
|
||||
*/
|
||||
public long getPortEnabledTs() {
|
||||
return portEnabledTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param portEnabledTs
|
||||
* the portEnabledTs to set
|
||||
*/
|
||||
public void setPortEnabledTs(long portEnabledTs) {
|
||||
this.portEnabledTs = portEnabledTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the firstDataRxTs
|
||||
*/
|
||||
public long getFirstDataRxTs() {
|
||||
return firstDataRxTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param firstDataRxTs
|
||||
* the firstDataRxTs to set
|
||||
*/
|
||||
public void setFirstDataRxTs(long firstDataRxTs) {
|
||||
this.firstDataRxTs = firstDataRxTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the firstDataTxTs
|
||||
*/
|
||||
public long getFirstDataTxTs() {
|
||||
return firstDataTxTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param firstDataTxTs
|
||||
* the firstDataTxTs to set
|
||||
*/
|
||||
public void setFirstDataTxTs(long firstDataTxTs) {
|
||||
this.firstDataTxTs = firstDataTxTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the using11k
|
||||
*/
|
||||
public boolean isUsing11k() {
|
||||
return using11k;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param using11k
|
||||
* the using11k to set
|
||||
*/
|
||||
public void setUsing11k(boolean using11k) {
|
||||
this.using11k = using11k;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the using11r
|
||||
*/
|
||||
public boolean isUsing11r() {
|
||||
return using11r;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param using11r
|
||||
* the using11r to set
|
||||
*/
|
||||
public void setUsing11r(boolean using11r) {
|
||||
this.using11r = using11r;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the using11v
|
||||
*/
|
||||
public boolean isUsing11v() {
|
||||
return using11v;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param using11v
|
||||
* the using11v to set
|
||||
*/
|
||||
public void setUsing11v(boolean using11v) {
|
||||
this.using11v = using11v;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ipAcquisitionTs
|
||||
*/
|
||||
public long getIpAcquisitionTs() {
|
||||
return ipAcquisitionTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ipAcquisitionTs
|
||||
* the ipAcquisitionTs to set
|
||||
*/
|
||||
public void setIpAcquisitionTs(long ipAcquisitionTs) {
|
||||
this.ipAcquisitionTs = ipAcquisitionTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the assocRSSI
|
||||
*/
|
||||
public int getAssocRSSI() {
|
||||
return assocRSSI;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param assocRSSI
|
||||
* the assocRSSI to set
|
||||
*/
|
||||
public void setAssocRSSI(int assocRSSI) {
|
||||
this.assocRSSI = assocRSSI;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the hostName
|
||||
*/
|
||||
public String getHostName() {
|
||||
return hostName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param hostName
|
||||
* the hostName to set
|
||||
*/
|
||||
public void setHostName(String hostName) {
|
||||
this.hostName = hostName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MacAddress getClientMacAddress() {
|
||||
return clientMacAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasUnsupportedValue() {
|
||||
if (super.hasUnsupportedValue()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (RadioType.isUnsupported(radioType) || SecurityType.isUnsupported(securityType)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientConnectSuccessEvent clone() {
|
||||
return (ClientConnectSuccessEvent) super.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + Objects.hash(assocRSSI, assocTs, authTs, cltId, eapolTs, fbtUsed, firstDataRxTs,
|
||||
firstDataTxTs, hostName, ipAcquisitionTs, ipAddr, isReassociation, clientMacAddress, portEnabledTs, radioType,
|
||||
securityType, sessionId, ssid, using11k, using11r, using11v);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (!super.equals(obj))
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ClientConnectSuccessEvent other = (ClientConnectSuccessEvent) obj;
|
||||
return assocRSSI == other.assocRSSI && assocTs == other.assocTs && authTs == other.authTs
|
||||
&& Objects.equals(cltId, other.cltId) && eapolTs == other.eapolTs && fbtUsed == other.fbtUsed
|
||||
&& firstDataRxTs == other.firstDataRxTs && firstDataTxTs == other.firstDataTxTs
|
||||
&& Objects.equals(hostName, other.hostName) && ipAcquisitionTs == other.ipAcquisitionTs
|
||||
&& Objects.equals(ipAddr, other.ipAddr) && isReassociation == other.isReassociation
|
||||
&& Objects.equals(clientMacAddress, other.clientMacAddress) && portEnabledTs == other.portEnabledTs
|
||||
&& radioType == other.radioType && securityType == other.securityType && sessionId == other.sessionId
|
||||
&& Objects.equals(ssid, other.ssid) && using11k == other.using11k && using11r == other.using11r
|
||||
&& using11v == other.using11v;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
package com.telecominfraproject.wlan.client.models.events.realtime;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.telecominfraproject.wlan.client.models.events.utils.WlanReasonCode;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.core.model.json.JsonDeserializationUtils;
|
||||
import com.telecominfraproject.wlan.core.model.json.interfaces.HasClientMac;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEvent;
|
||||
import com.telecominfraproject.wlan.systemevent.equipment.realtime.RealTimeEventType;
|
||||
|
||||
public class ClientDisconnectEvent extends RealTimeEvent implements HasClientMac {
|
||||
|
||||
public static enum DisconnectFrameType {
|
||||
Deauth, Disassoc,
|
||||
|
||||
UNSUPPORTED;
|
||||
|
||||
@JsonCreator
|
||||
public static DisconnectFrameType getByName(String value) {
|
||||
return JsonDeserializationUtils.deserializEnum(value, DisconnectFrameType.class, UNSUPPORTED);
|
||||
}
|
||||
|
||||
public static boolean isUnsupported(DisconnectFrameType value) {
|
||||
return UNSUPPORTED.equals(value);
|
||||
}
|
||||
}
|
||||
|
||||
public static enum DisconnectInitiator {
|
||||
AccessPoint, Client,
|
||||
|
||||
UNSUPPORTED;
|
||||
|
||||
@JsonCreator
|
||||
public static DisconnectInitiator getByName(String value) {
|
||||
return JsonDeserializationUtils.deserializEnum(value, DisconnectInitiator.class, UNSUPPORTED);
|
||||
}
|
||||
|
||||
public static boolean isUnsupported(DisconnectInitiator value) {
|
||||
return UNSUPPORTED.equals(value);
|
||||
}
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = -7674230178565760938L;
|
||||
private long sessionId;
|
||||
private byte[] macAddressBytes;
|
||||
private MacAddress clientMacAddress;
|
||||
private long lastRecvTime;
|
||||
private long lastSentTime;
|
||||
private DisconnectFrameType frameType;
|
||||
private DisconnectInitiator initiator;
|
||||
private WlanReasonCode reasonCode;
|
||||
private int internalReasonCode;
|
||||
private int rssi;
|
||||
private String ssid;
|
||||
private RadioType radioType;
|
||||
|
||||
public ClientDisconnectEvent() {
|
||||
// serialization
|
||||
|
||||
}
|
||||
|
||||
public ClientDisconnectEvent(Long timestamp) {
|
||||
super(RealTimeEventType.STA_Client_Disconnect, timestamp);
|
||||
}
|
||||
|
||||
public ClientDisconnectEvent(RealTimeEventType eventType, Long timestamp) {
|
||||
super(eventType, timestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MacAddress getClientMacAddress() {
|
||||
return clientMacAddress;
|
||||
}
|
||||
|
||||
public DisconnectFrameType getFrameType() {
|
||||
return frameType;
|
||||
}
|
||||
|
||||
public DisconnectInitiator getInitiator() {
|
||||
return initiator;
|
||||
}
|
||||
|
||||
public Integer getInternalReasonCode() {
|
||||
return internalReasonCode;
|
||||
}
|
||||
|
||||
public long getLastRecvTime() {
|
||||
return lastRecvTime;
|
||||
}
|
||||
|
||||
public long getLastSentTime() {
|
||||
return lastSentTime;
|
||||
}
|
||||
|
||||
public WlanReasonCode getReasonCode() {
|
||||
return reasonCode;
|
||||
}
|
||||
|
||||
public int getRssi() {
|
||||
return rssi;
|
||||
}
|
||||
|
||||
public long getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public RadioType getRadioType() {
|
||||
return radioType;
|
||||
}
|
||||
|
||||
public String getSsid() {
|
||||
return ssid;
|
||||
}
|
||||
|
||||
public void setClientMacAddress(MacAddress clientMacAddress) {
|
||||
this.clientMacAddress = clientMacAddress;
|
||||
}
|
||||
|
||||
public void setFrameType(DisconnectFrameType frameType) {
|
||||
this.frameType = frameType;
|
||||
}
|
||||
|
||||
public void setInitiator(DisconnectInitiator initiator) {
|
||||
this.initiator = initiator;
|
||||
}
|
||||
|
||||
public void setInternalReasonCode(Integer internalReasonCode) {
|
||||
this.internalReasonCode = internalReasonCode;
|
||||
}
|
||||
|
||||
public void setLastRecvTime(long lastRecvTime) {
|
||||
this.lastRecvTime = lastRecvTime;
|
||||
}
|
||||
|
||||
public void setLastSentTime(long lastSentTime) {
|
||||
this.lastSentTime = lastSentTime;
|
||||
}
|
||||
|
||||
public void setReasonCode(WlanReasonCode reasonCode) {
|
||||
this.reasonCode = reasonCode;
|
||||
}
|
||||
|
||||
public void setRssi(int rssi) {
|
||||
this.rssi = rssi;
|
||||
}
|
||||
|
||||
public void setSessionId(long sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
public void setSsid(String ssid) {
|
||||
this.ssid = ssid;
|
||||
}
|
||||
|
||||
public void setRadioType(RadioType radioType) {
|
||||
this.radioType = radioType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasUnsupportedValue() {
|
||||
if (super.hasUnsupportedValue()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (DisconnectFrameType.isUnsupported(frameType) || DisconnectInitiator.isUnsupported(initiator)
|
||||
|| hasUnsupportedValue(clientMacAddress) || RadioType.isUnsupported(radioType)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientDisconnectEvent clone() {
|
||||
return (ClientDisconnectEvent) super.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + Arrays.hashCode(macAddressBytes);
|
||||
result = prime * result + Objects.hash(clientMacAddress, frameType, initiator, internalReasonCode, lastRecvTime,
|
||||
lastSentTime, radioType, reasonCode, rssi, sessionId, ssid);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (!super.equals(obj))
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ClientDisconnectEvent other = (ClientDisconnectEvent) obj;
|
||||
return Objects.equals(clientMacAddress, other.clientMacAddress) && frameType == other.frameType
|
||||
&& initiator == other.initiator && internalReasonCode == other.internalReasonCode
|
||||
&& lastRecvTime == other.lastRecvTime && lastSentTime == other.lastSentTime
|
||||
&& Arrays.equals(macAddressBytes, other.macAddressBytes) && radioType == other.radioType
|
||||
&& Objects.equals(reasonCode, other.reasonCode) && rssi == other.rssi && sessionId == other.sessionId
|
||||
&& Objects.equals(ssid, other.ssid);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user