mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-03-20 19:39:19 +00:00
Compare commits
364 Commits
20201203-1
...
WIFI-3471
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea9a9d6292 | ||
|
|
b41e35a536 | ||
|
|
64bd468ade | ||
|
|
fe488e9d5f | ||
|
|
a79778b083 | ||
|
|
d5b86d0c8d | ||
|
|
15698e99cb | ||
|
|
e06c28e85a | ||
|
|
c307f59e8a | ||
|
|
1e23a691d7 | ||
|
|
015e662e68 | ||
|
|
9f3af6773b | ||
|
|
b7eedf6b8c | ||
|
|
468e7bcddb | ||
|
|
9b712d6fb5 | ||
|
|
99475d3f2f | ||
|
|
7216b08ac7 | ||
|
|
34da98b9a8 | ||
|
|
65aeadeaa7 | ||
|
|
148a6762dc | ||
|
|
178378f8b6 | ||
|
|
d0e6866345 | ||
|
|
a2b3e711ea | ||
|
|
b5f5c6d19f | ||
|
|
a5079d04a7 | ||
|
|
35d89a1cf0 | ||
|
|
534ed3e9c0 | ||
|
|
a6ec1d6e7f | ||
|
|
a19fc425c2 | ||
|
|
fc8cab6a50 | ||
|
|
daabf38510 | ||
|
|
78c4d3a862 | ||
|
|
3f3e40d2dd | ||
|
|
91877f5305 | ||
|
|
11314e3395 | ||
|
|
fa6795369c | ||
|
|
e6e06d7b70 | ||
|
|
1e15e3cd94 | ||
|
|
02e03780db | ||
|
|
aac34150b2 | ||
|
|
3085c34cde | ||
|
|
35fd038113 | ||
|
|
7c387f1940 | ||
|
|
abb9b59659 | ||
|
|
7f0497754c | ||
|
|
82095510f7 | ||
|
|
0afd414870 | ||
|
|
772beab902 | ||
|
|
4a764db007 | ||
|
|
41add1922b | ||
|
|
90ac57b988 | ||
|
|
0cc90764c6 | ||
|
|
1e277f5650 | ||
|
|
716ba7e043 | ||
|
|
3d2f4db32a | ||
|
|
c75d44ff03 | ||
|
|
f9dbe12c8c | ||
|
|
910a2cbe0c | ||
|
|
799b243cc4 | ||
|
|
8834c33d90 | ||
|
|
e9c54a892b | ||
|
|
8353dd375f | ||
|
|
46de84b28b | ||
|
|
9edca1fd9d | ||
|
|
5714c9bf32 | ||
|
|
2b2e34a064 | ||
|
|
d7a75faf4c | ||
|
|
5fd977f064 | ||
|
|
bafec1fdd8 | ||
|
|
6b046e0a7a | ||
|
|
fb6604cdf5 | ||
|
|
2c1c60344e | ||
|
|
9e959e258f | ||
|
|
2410233046 | ||
|
|
a7f91a29f8 | ||
|
|
80cd0abd58 | ||
|
|
4555ff339b | ||
|
|
04a13877d1 | ||
|
|
e148bab291 | ||
|
|
9ad3cec4af | ||
|
|
dc0b838f83 | ||
|
|
7cac7fff3f | ||
|
|
b48340b709 | ||
|
|
44b3836758 | ||
|
|
4f0b032549 | ||
|
|
5ba0c4c242 | ||
|
|
304e80332a | ||
|
|
9fd3e73398 | ||
|
|
b9db744aee | ||
|
|
1eee65d284 | ||
|
|
75c943211a | ||
|
|
d0a0ed59fe | ||
|
|
a200fcc12e | ||
|
|
1f6996abb2 | ||
|
|
1ebaa4a539 | ||
|
|
f1e1bdffd7 | ||
|
|
37f5872552 | ||
|
|
367b9ec428 | ||
|
|
87ca619ad5 | ||
|
|
622f78f681 | ||
|
|
faeb65d8d6 | ||
|
|
34841a3a04 | ||
|
|
4fc8bc4018 | ||
|
|
cce36019fe | ||
|
|
4596280090 | ||
|
|
caaa8fb4e3 | ||
|
|
b957c8bf72 | ||
|
|
b797cc392f | ||
|
|
5fc9715649 | ||
|
|
0a66897e48 | ||
|
|
8d77fcb090 | ||
|
|
256d9fbd16 | ||
|
|
39e14da2e6 | ||
|
|
996c60adf6 | ||
|
|
879abe3beb | ||
|
|
796d657952 | ||
|
|
52ed5f6344 | ||
|
|
f5869961b2 | ||
|
|
f02cadbdc3 | ||
|
|
c45cabf607 | ||
|
|
c9faf138da | ||
|
|
f6b96fc566 | ||
|
|
a089e7b748 | ||
|
|
e790db2c2b | ||
|
|
b03dccc63f | ||
|
|
03eccfa448 | ||
|
|
18eeaffa13 | ||
|
|
40aaeb33f4 | ||
|
|
fb4ff772e4 | ||
|
|
d9076562d4 | ||
|
|
5ee517df81 | ||
|
|
492406b56f | ||
|
|
c5648961c4 | ||
|
|
c2540266d6 | ||
|
|
35047c4fe7 | ||
|
|
deae54b4e9 | ||
|
|
e957cf5a3b | ||
|
|
09a9002962 | ||
|
|
48040b3cba | ||
|
|
a29b6636b8 | ||
|
|
9d558695ae | ||
|
|
81e100b210 | ||
|
|
5fddfcbdc9 | ||
|
|
d86c4e2b0c | ||
|
|
5881a00657 | ||
|
|
56b0dc08ba | ||
|
|
5ec68adc99 | ||
|
|
0357f2d3a4 | ||
|
|
40c7439a60 | ||
|
|
901f1c4517 | ||
|
|
9c58fda584 | ||
|
|
982ccfdd0e | ||
|
|
535df0041e | ||
|
|
4b100290a7 | ||
|
|
660326974c | ||
|
|
ce8ff0885f | ||
|
|
5c85997548 | ||
|
|
1d77f9f7f2 | ||
|
|
ffc8ffe5e7 | ||
|
|
b0f76cb984 | ||
|
|
dc88bc43b8 | ||
|
|
1e7e29540d | ||
|
|
ae23c46570 | ||
|
|
ab1695a183 | ||
|
|
8e9db0c95e | ||
|
|
a4232049d0 | ||
|
|
0a65d2e8ca | ||
|
|
dca76d8a6e | ||
|
|
02d2e1cef4 | ||
|
|
dc0593d2ee | ||
|
|
f923587d1e | ||
|
|
62369d210e | ||
|
|
5c21848004 | ||
|
|
81616bb4aa | ||
|
|
f275c87290 | ||
|
|
03f5522cac | ||
|
|
0d5e4b4035 | ||
|
|
a2b159943a | ||
|
|
1a85f976e4 | ||
|
|
82cdbdbc68 | ||
|
|
ae0bd303dd | ||
|
|
782d221a70 | ||
|
|
bc5b0cad5a | ||
|
|
16ff64b5b9 | ||
|
|
9d639ccb0c | ||
|
|
e7fcaeffc7 | ||
|
|
b7560bd519 | ||
|
|
800fa9781c | ||
|
|
d8bdb51b21 | ||
|
|
ee5377c2af | ||
|
|
9d1e09c3c9 | ||
|
|
23d5c9b513 | ||
|
|
bf1d76a7c7 | ||
|
|
8dd7c99d11 | ||
|
|
be6b3f69a3 | ||
|
|
d37b5a55c2 | ||
|
|
694bb8dc05 | ||
|
|
32d4fb1197 | ||
|
|
ac3b928a85 | ||
|
|
1693b61c9f | ||
|
|
7a5cde65f2 | ||
|
|
e43663a290 | ||
|
|
bd35d28c70 | ||
|
|
be9fd94bfc | ||
|
|
e9283c85d4 | ||
|
|
4cdd220874 | ||
|
|
eeeb1d1df6 | ||
|
|
b47fdab224 | ||
|
|
c93c8b01f2 | ||
|
|
35620415fc | ||
|
|
659fc5bc9e | ||
|
|
818cfeb4f0 | ||
|
|
6e6a7d53d3 | ||
|
|
dfa5b71a79 | ||
|
|
7b657acee7 | ||
|
|
db5c1bb6c1 | ||
|
|
8c4ac0e282 | ||
|
|
f71e6804fa | ||
|
|
a3eac7942a | ||
|
|
e84f7b7765 | ||
|
|
6d133ae448 | ||
|
|
f30d70ae81 | ||
|
|
d4a516199a | ||
|
|
ea94c14e63 | ||
|
|
a35e2deb84 | ||
|
|
4c0d39860b | ||
|
|
40a1e597c1 | ||
|
|
b10b511c64 | ||
|
|
3ee708925f | ||
|
|
e7b40a1be6 | ||
|
|
b00fb6d287 | ||
|
|
6e8977365a | ||
|
|
ea794940a9 | ||
|
|
cdebd4485e | ||
|
|
272b6836a1 | ||
|
|
074f51ea8d | ||
|
|
f26dc9758b | ||
|
|
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
adoption-metrics-datastore-common-test/.gitignore
vendored
Normal file
1
adoption-metrics-datastore-common-test/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
||||
1
adoption-metrics-datastore-inmemory/.gitignore
vendored
Normal file
1
adoption-metrics-datastore-inmemory/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
1
adoption-metrics-datastore-interface/.gitignore
vendored
Normal file
1
adoption-metrics-datastore-interface/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-exceptions</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
1
adoption-metrics-datastore-rdbms/.gitignore
vendored
Normal file
1
adoption-metrics-datastore-rdbms/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-jdbc-tests</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
1
adoption-metrics-models/.gitignore
vendored
Normal file
1
adoption-metrics-models/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
1
adoption-metrics-service-interface/.gitignore
vendored
Normal file
1
adoption-metrics-service-interface/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
1
adoption-metrics-service-local/.gitignore
vendored
Normal file
1
adoption-metrics-service-local/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
1
adoption-metrics-service-remote/.gitignore
vendored
Normal file
1
adoption-metrics-service-remote/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>base-client</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.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.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
1
adoption-metrics-service/.gitignore
vendored
Normal file
1
adoption-metrics-service/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
1
adoption-metrics-sp/.gitignore
vendored
Normal file
1
adoption-metrics-sp/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
1
alarm-datastore-cassandra/.gitignore
vendored
Normal file
1
alarm-datastore-cassandra/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-cassandra-tests</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -7,12 +7,9 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
@@ -36,6 +33,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;
|
||||
@@ -118,14 +116,15 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
" from "+TABLE_NAME+" " +
|
||||
" where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ?";
|
||||
|
||||
private static final String CQL_GET_ALL_NO_DETAILS =
|
||||
"select customerId, equipmentId, alarmCode, createdTimestamp from alarm " ;
|
||||
|
||||
private static final String CQL_GET_BY_CUSTOMER_ID =
|
||||
"select " + ALL_COLUMNS +
|
||||
" from " + TABLE_NAME + " " +
|
||||
" where customerId = ? ";
|
||||
|
||||
private static final String CQL_GET_ALL =
|
||||
"select " + ALL_COLUMNS +
|
||||
" from " + TABLE_NAME + " ";
|
||||
|
||||
private static final String CQL_GET_LASTMOD_BY_ID =
|
||||
"select lastModifiedTimestamp " +
|
||||
" from "+TABLE_NAME+" " +
|
||||
@@ -151,27 +150,28 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
+ " IF lastModifiedTimestamp = ? "
|
||||
;
|
||||
|
||||
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 = ? ";
|
||||
//private static final String CQL_COUNTS_BY_ALARM_CODE_FOOTER = " group by alarmCode";
|
||||
|
||||
private static final String CQL_INCREMENT_EQUIPMENT_ALARM_COUNT = "update alarm_counts_by_equipment set alarmCount = alarmCount + 1 where customerId = ? and equipmentId = ? and alarmCode = ? ";
|
||||
private static final String CQL_DECREMENT_EQUIPMENT_ALARM_COUNT = "update alarm_counts_by_equipment set alarmCount = alarmCount - 1 where customerId = ? and equipmentId = ? and alarmCode = ? ";
|
||||
// CQL statements for counts
|
||||
private static final String CQL_GET_CUSTOMER_ALARM_COUNT_BY_CUSTOMER_ID = "select equipmentId, alarmCode from alarm where customerId = ? ";
|
||||
|
||||
private static final String CQL_GET_EQUIPMENT_ALARM_COUNT_BY_CUSTOMER_ID = "select equipmentId, alarmCode, alarmCount from alarm_counts_by_equipment where customerId = ? ";
|
||||
|
||||
private static final String CQL_INCREMENT_CUSTOMER_ALARM_COUNT = "update alarm_counts_by_customer set alarmCount = alarmCount + 1 where customerId = ? and alarmCode = ? ";
|
||||
private static final String CQL_DECREMENT_CUSTOMER_ALARM_COUNT = "update alarm_counts_by_customer set alarmCount = alarmCount - 1 where customerId = ? and alarmCode = ? ";
|
||||
private static final String CQL_GET_CUSTOMER_ACKNOWLEDGED_ALARM_COUNT_BY_CUSTOMER_ID = "select equipmentId, alarmCode from alarm_by_acknowledged where customerId = ? and acknowledged = ? ";
|
||||
|
||||
private static final String CQL_GET_CUSTOMER_ALARM_COUNT_BY_CUSTOMER_ID = "select alarmCode, alarmCount from alarm_counts_by_customer where customerId = ? ";
|
||||
|
||||
private static final String CQL_UPDATE_CUSTOMER_ALARM_COUNT = "update alarm_counts_by_customer set alarmCount = alarmCount + ? where customerId = ? and alarmCode = ? ";
|
||||
private static final String CQL_UPDATE_EQUIPMENT_ALARM_COUNT = "update alarm_counts_by_equipment set alarmCount = alarmCount + ? where customerId = ? and equipmentId = ? and alarmCode = ? ";
|
||||
|
||||
|
||||
private static final RowMapper<Alarm> alarmRowMapper = new AlarmRowMapper();
|
||||
|
||||
@@ -179,38 +179,39 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
private CqlSession cqlSession;
|
||||
|
||||
private PreparedStatement preparedStmt_getOrNull;
|
||||
private PreparedStatement preparedStmt_getAllNoDetails;
|
||||
private PreparedStatement preparedStmt_create;
|
||||
private PreparedStatement preparedStmt_update;
|
||||
private PreparedStatement preparedStmt_getLastmod;
|
||||
private PreparedStatement preparedStmt_delete;
|
||||
private PreparedStatement preparedStmt_deleteByEquipment;
|
||||
private PreparedStatement preparedStmt_incrementAlarmCountByEquipment;
|
||||
private PreparedStatement preparedStmt_decrementAlarmCountByEquipment;
|
||||
|
||||
private PreparedStatement preparedStmt_incrementAlarmCountByCustomer;
|
||||
private PreparedStatement preparedStmt_decrementAlarmCountByCustomer;
|
||||
|
||||
private PreparedStatement preparedStmt_updateAlarmCountByEquipment;
|
||||
private PreparedStatement preparedStmt_updateAlarmCountByCustomer;
|
||||
|
||||
|
||||
// filter by acknowledged statements
|
||||
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(){
|
||||
preparedStmt_getOrNull = cqlSession.prepare(CQL_GET_BY_ID);
|
||||
preparedStmt_getAllNoDetails = cqlSession.prepare(CQL_GET_ALL_NO_DETAILS);
|
||||
preparedStmt_create = cqlSession.prepare(CQL_INSERT);
|
||||
preparedStmt_update = cqlSession.prepare(CQL_UPDATE);
|
||||
preparedStmt_getLastmod = cqlSession.prepare(CQL_GET_LASTMOD_BY_ID);
|
||||
preparedStmt_delete = cqlSession.prepare(CQL_DELETE);
|
||||
preparedStmt_deleteByEquipment = cqlSession.prepare(CQL_DELETE_BY_EQUIPMENT);
|
||||
preparedStmt_incrementAlarmCountByEquipment = cqlSession.prepare(CQL_INCREMENT_EQUIPMENT_ALARM_COUNT);
|
||||
preparedStmt_decrementAlarmCountByEquipment = cqlSession.prepare(CQL_DECREMENT_EQUIPMENT_ALARM_COUNT);
|
||||
preparedStmt_incrementAlarmCountByCustomer= cqlSession.prepare(CQL_INCREMENT_CUSTOMER_ALARM_COUNT);
|
||||
preparedStmt_decrementAlarmCountByCustomer = cqlSession.prepare(CQL_DECREMENT_CUSTOMER_ALARM_COUNT);
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
@@ -244,17 +245,38 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
));
|
||||
|
||||
LOG.debug("Stored Alarm {}", alarm);
|
||||
|
||||
//update alarm count
|
||||
cqlSession.execute(preparedStmt_incrementAlarmCountByEquipment.bind(
|
||||
|
||||
//insert entry into acknowledged tables
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledged.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId()
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
alarm.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_incrementAlarmCountByCustomer.bind(
|
||||
|
||||
cqlSession.execute(preparedStmt_insertIntoAlarmByAcknowledgedEquipmentId.bind(
|
||||
alarm.getCustomerId(),
|
||||
alarm.getAlarmCode().getId()
|
||||
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 +331,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 +402,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();
|
||||
@@ -398,17 +494,38 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
|
||||
cqlSession.execute(preparedStmt_delete.bind(customerId, equipmentId, alarmCode.getId(), createdTimestamp));
|
||||
LOG.debug("Deleted Alarm {}", ret);
|
||||
|
||||
//update alarm count
|
||||
cqlSession.execute(preparedStmt_decrementAlarmCountByEquipment.bind(
|
||||
|
||||
//delete entry into acknowledged tables
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledged.bind(
|
||||
ret.getCustomerId(),
|
||||
ret.getEquipmentId(),
|
||||
ret.getAlarmCode().getId()
|
||||
ret.getAlarmCode().getId(),
|
||||
ret.getCreatedTimestamp(),
|
||||
ret.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_decrementAlarmCountByCustomer.bind(
|
||||
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedEquipmentId.bind(
|
||||
ret.getCustomerId(),
|
||||
ret.getAlarmCode().getId()
|
||||
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;
|
||||
@@ -424,153 +541,43 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
LOG.debug("Deleted Alarms {}", ret);
|
||||
|
||||
ret.forEach(al -> {
|
||||
//TODO: replace with one update of a counter
|
||||
//update alarm count
|
||||
cqlSession.execute(preparedStmt_decrementAlarmCountByEquipment.bind(
|
||||
//delete entry into acknowledged tables
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledged.bind(
|
||||
al.getCustomerId(),
|
||||
al.getEquipmentId(),
|
||||
al.getAlarmCode().getId()
|
||||
al.getAlarmCode().getId(),
|
||||
al.getCreatedTimestamp(),
|
||||
al.isAcknowledged()
|
||||
));
|
||||
|
||||
cqlSession.execute(preparedStmt_decrementAlarmCountByCustomer.bind(
|
||||
cqlSession.execute(preparedStmt_deleteFromAlarmByAcknowledgedEquipmentId.bind(
|
||||
al.getCustomerId(),
|
||||
al.getAlarmCode().getId()
|
||||
));
|
||||
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()
|
||||
));
|
||||
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetAlarmCounters() {
|
||||
LOG.debug("Resetting Alarm counters ");
|
||||
|
||||
//count real alarms per-customer and per equipment
|
||||
Map<Integer, AlarmCounts> alarmCountsPerCustomerMap = new HashMap<>();
|
||||
|
||||
//select customerId, equipmentId, alarmCode, createdTimestamp from alarm
|
||||
ResultSet rs = cqlSession.execute(preparedStmt_getAllNoDetails.bind());
|
||||
|
||||
rs.forEach(row -> {
|
||||
int customerId = row.getInt(0);
|
||||
long equipmentId = row.getLong(1);
|
||||
AlarmCode alarmCode = AlarmCode.getById(row.getInt(2));
|
||||
|
||||
AlarmCounts alarmCounts = alarmCountsPerCustomerMap.get(customerId);
|
||||
if(alarmCounts == null) {
|
||||
alarmCounts = new AlarmCounts();
|
||||
alarmCounts.setCustomerId(customerId);
|
||||
alarmCountsPerCustomerMap.put(customerId, alarmCounts);
|
||||
}
|
||||
|
||||
alarmCounts.addToCounter(equipmentId, alarmCode, 1);
|
||||
|
||||
});
|
||||
|
||||
//read existing counters alarms per-customer
|
||||
Map<Integer, AlarmCounts> existingCustomerCountsPerCustomerMap = new HashMap<>();
|
||||
rs = cqlSession.execute(cqlSession.prepare("select customerid, alarmcode, alarmcount from alarm_counts_by_customer ").bind());
|
||||
|
||||
rs.forEach(row -> {
|
||||
int customerId = row.getInt(0);
|
||||
AlarmCode alarmCode = AlarmCode.getById(row.getInt(1));
|
||||
long count = row.getLong(2);
|
||||
|
||||
AlarmCounts alarmCounts = existingCustomerCountsPerCustomerMap.get(customerId);
|
||||
if(alarmCounts == null) {
|
||||
alarmCounts = new AlarmCounts();
|
||||
alarmCounts.setCustomerId(customerId);
|
||||
existingCustomerCountsPerCustomerMap.put(customerId, alarmCounts);
|
||||
}
|
||||
|
||||
alarmCounts.addToCounter(0, alarmCode, (int) count);
|
||||
|
||||
});
|
||||
|
||||
//read existing counters alarms per equipment
|
||||
Map<Integer, AlarmCounts> existingEquipmentCountsPerCustomerMap = new HashMap<>();
|
||||
rs = cqlSession.execute(cqlSession.prepare("select customerid, equipmentid, alarmcode, alarmcount from alarm_counts_by_equipment ").bind());
|
||||
|
||||
rs.forEach(row -> {
|
||||
int customerId = row.getInt(0);
|
||||
long equipmentId = row.getLong(1);
|
||||
AlarmCode alarmCode = AlarmCode.getById(row.getInt(2));
|
||||
long count = row.getLong(3);
|
||||
|
||||
AlarmCounts alarmCounts = existingEquipmentCountsPerCustomerMap.get(customerId);
|
||||
if(alarmCounts == null) {
|
||||
alarmCounts = new AlarmCounts();
|
||||
alarmCounts.setCustomerId(customerId);
|
||||
existingEquipmentCountsPerCustomerMap.put(customerId, alarmCounts);
|
||||
}
|
||||
|
||||
alarmCounts.addToCounter(equipmentId, alarmCode, (int) count);
|
||||
|
||||
});
|
||||
|
||||
//set existing counters per customer - first to 0, then to new computed values
|
||||
existingCustomerCountsPerCustomerMap.values().forEach(customerCounts -> {
|
||||
AlarmCounts realAlarmCounts = alarmCountsPerCustomerMap.get(customerCounts.getCustomerId());
|
||||
customerCounts.getTotalCountsPerAlarmCodeMap().forEach((alarmCode, existingCount) -> {
|
||||
int realCount = realAlarmCounts != null ? realAlarmCounts.getTotalCountsPerAlarmCodeMap().getOrDefault(alarmCode, new AtomicInteger(0)).get(): 0;
|
||||
//update alarm_counts_by_customer set alarmCount = alarmCount + ? where customerId = ? and alarmCode = ?
|
||||
cqlSession.execute(preparedStmt_updateAlarmCountByCustomer.bind( (long) (0L - existingCount.get() + realCount), customerCounts.getCustomerId(), alarmCode.getId()));
|
||||
});
|
||||
});
|
||||
|
||||
//set existing counters per equipment - first to 0, then to new computed values
|
||||
existingEquipmentCountsPerCustomerMap.values().forEach(customerCounts -> {
|
||||
int customerId = customerCounts.getCustomerId();
|
||||
AlarmCounts realAlarmCounts = alarmCountsPerCustomerMap.get(customerId);
|
||||
|
||||
customerCounts.getCountsPerEquipmentIdMap().forEach((eqId, perAlarmCodeMap) -> {
|
||||
|
||||
perAlarmCodeMap.forEach((alarmCode, existingCount) -> {
|
||||
int realCount = 0;
|
||||
if(realAlarmCounts != null && realAlarmCounts.getCountsPerEquipmentIdMap().get(eqId)!=null ) {
|
||||
realCount = realAlarmCounts.getCountsPerEquipmentIdMap().get(eqId).getOrDefault(alarmCode, new AtomicInteger(0)).get();
|
||||
}
|
||||
//update alarm_counts_by_equipment set alarmCount = alarmCount + ? where customerId = ? and equipmentId = ? and alarmCode = ?
|
||||
cqlSession.execute(preparedStmt_updateAlarmCountByEquipment.bind( (long) ( 0L - existingCount.get() + realCount), customerId, eqId, alarmCode.getId()));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//process new customer counts that are not present in existing counts
|
||||
alarmCountsPerCustomerMap.values().forEach(customerCounts -> {
|
||||
AlarmCounts existingAlarmCounts = existingCustomerCountsPerCustomerMap.get(customerCounts.getCustomerId());
|
||||
if(existingAlarmCounts == null) {
|
||||
customerCounts.getTotalCountsPerAlarmCodeMap().forEach((alarmCode, newCount) -> {
|
||||
//update alarm_counts_by_customer set alarmCount = alarmCount + ? where customerId = ? and alarmCode = ?
|
||||
cqlSession.execute(preparedStmt_updateAlarmCountByCustomer.bind((long) newCount.get(), customerCounts.getCustomerId(), alarmCode.getId()));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//process new equipment counts that are not present in existing counts
|
||||
alarmCountsPerCustomerMap.values().forEach(customerCounts -> {
|
||||
int customerId = customerCounts.getCustomerId();
|
||||
AlarmCounts existingAlarmCounts = existingEquipmentCountsPerCustomerMap.get(customerId);
|
||||
|
||||
customerCounts.getCountsPerEquipmentIdMap().forEach((eqId, perAlarmCodeMap) -> {
|
||||
if(existingAlarmCounts == null || existingAlarmCounts.getCountsPerEquipmentIdMap().get(eqId) == null) {
|
||||
perAlarmCodeMap.forEach((alarmCode, existingCount) -> {
|
||||
//update alarm_counts_by_equipment set alarmCount = alarmCount + ? where customerId = ? and equipmentId = ? and alarmCode = ?
|
||||
cqlSession.execute(preparedStmt_updateAlarmCountByEquipment.bind((long) existingCount.get(), customerId, eqId, alarmCode.getId()));
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
LOG.debug("Completed resetting Alarm counters ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Alarm> get(int customerId, Set<Long> equipmentIds, Set<AlarmCode> alarmCodes,
|
||||
@@ -651,11 +658,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 +679,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 +689,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 +699,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 +758,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 +779,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 +826,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;
|
||||
}
|
||||
|
||||
@@ -793,7 +846,7 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIds, Set<AlarmCode> alarmCodes) {
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIds, Set<AlarmCode> alarmCodes, Boolean acknowledged) {
|
||||
ArrayList<Object> queryArgs = new ArrayList<>();
|
||||
queryArgs.add(customerId);
|
||||
|
||||
@@ -801,11 +854,13 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
|
||||
StringBuilder query = new StringBuilder();
|
||||
|
||||
if (equipmentIds != null && !equipmentIds.isEmpty()) {
|
||||
query.append(CQL_GET_EQUIPMENT_ALARM_COUNT_BY_CUSTOMER_ID);
|
||||
} else {
|
||||
if (acknowledged == null) {
|
||||
query.append(CQL_GET_CUSTOMER_ALARM_COUNT_BY_CUSTOMER_ID);
|
||||
}
|
||||
} else {
|
||||
queryArgs.add(acknowledged);
|
||||
query.append(CQL_GET_CUSTOMER_ACKNOWLEDGED_ALARM_COUNT_BY_CUSTOMER_ID);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//add alarmCodes filters
|
||||
@@ -814,23 +869,28 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
//add equipmentId filters
|
||||
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(",");
|
||||
|
||||
if (equipmentIds.size() == 1) {
|
||||
query.append("and equipmentId = ? ");
|
||||
} else {
|
||||
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.append(strb);
|
||||
}
|
||||
strb.append(") ");
|
||||
|
||||
query.append(strb);
|
||||
}
|
||||
|
||||
|
||||
AlarmCounts alarmCounts = new AlarmCounts();
|
||||
alarmCounts.setCustomerId(customerId);
|
||||
alarmCounts.setAcknowledged(acknowledged);
|
||||
|
||||
//TODO: create a cache of these prepared statements, keyed by the numberOfEquipmentIds_numberOfAlarmCodes
|
||||
PreparedStatement preparedStmt_getCounts;
|
||||
@@ -841,21 +901,11 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
throw e;
|
||||
}
|
||||
|
||||
ResultSet rs = cqlSession.execute(preparedStmt_getCounts.bind(queryArgs.toArray() ));
|
||||
ResultSet rs = cqlSession.execute(preparedStmt_getCounts.bind(queryArgs.toArray()));
|
||||
|
||||
int alarmCodeColIdx;
|
||||
int equipmentIdColIdx;
|
||||
int countColIdx;
|
||||
|
||||
if (equipmentIds == null || equipmentIds.isEmpty()) {
|
||||
alarmCodeColIdx = 0;
|
||||
equipmentIdColIdx = 0;
|
||||
countColIdx = 1;
|
||||
} else {
|
||||
alarmCodeColIdx = 1;
|
||||
equipmentIdColIdx = 0;
|
||||
countColIdx = 2;
|
||||
}
|
||||
int equipmentIdColIdx = 0;
|
||||
int alarmCodeColIdx = 1;
|
||||
|
||||
rs.forEach(row -> {
|
||||
//we will do the client-side filtering for the AlarmCodes, because querying for it as part of CQL does not seem to work
|
||||
@@ -863,86 +913,64 @@ public class AlarmDatastoreCassandra implements AlarmDatastore {
|
||||
//the amount of distinct alarm codes per equipment is very small
|
||||
AlarmCode ac = AlarmCode.getById(row.getInt(alarmCodeColIdx));
|
||||
|
||||
if (alarmCodes != null && !alarmCodes.isEmpty() && alarmCodes.contains(ac)
|
||||
|| alarmCodes == null || alarmCodes.isEmpty() )
|
||||
if (alarmCodes != null && !alarmCodes.isEmpty() && alarmCodes.contains(ac) || alarmCodes == null || alarmCodes.isEmpty() )
|
||||
{
|
||||
if(equipmentIds == null || equipmentIds.isEmpty()) {
|
||||
alarmCounts.addToCounter(0, ac, (int) row.getLong(countColIdx));
|
||||
alarmCounts.addToCounter(0, ac, 1);
|
||||
} else {
|
||||
alarmCounts.addToCounter(row.getLong(equipmentIdColIdx), ac, (int) row.getLong(countColIdx));
|
||||
alarmCounts.addToCounter(row.getLong(equipmentIdColIdx), ac, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return alarmCounts;
|
||||
}
|
||||
|
||||
public AlarmCounts getAlarmCounts_raw(int customerId, Set<Long> equipmentIds, Set<AlarmCode> alarmCodes) {
|
||||
|
||||
@Override
|
||||
public List<Alarm> get(Set<AlarmCode> alarmCodes, long createdAfterTimestamp) {
|
||||
|
||||
if (alarmCodes == null || alarmCodes.isEmpty()) {
|
||||
throw new IllegalArgumentException("alarmCodes must be provided");
|
||||
}
|
||||
|
||||
LOG.debug("Looking up Alarms for alarmCodes {} createdAfter {}", alarmCodes, createdAfterTimestamp);
|
||||
|
||||
String query = CQL_GET_ALL;
|
||||
|
||||
// add filters for the query
|
||||
ArrayList<Object> queryArgs = new ArrayList<>();
|
||||
queryArgs.add(customerId);
|
||||
|
||||
//build the query
|
||||
|
||||
StringBuilder query = new StringBuilder();
|
||||
// add alarmCodes filters
|
||||
alarmCodes.forEach(ac -> queryArgs.add(ac.getId()));
|
||||
|
||||
query.append(CQL_COUNTS_BY_EQUIPMENT_AND_ALARM_CODE_HEADER);
|
||||
|
||||
|
||||
//add alarmCodes filters
|
||||
//we will do the client-side filtering for the AlarmCodes, see below
|
||||
|
||||
//add equipmentId filters
|
||||
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(",");
|
||||
}
|
||||
StringBuilder strb = new StringBuilder(100);
|
||||
strb.append("where alarmCode in (");
|
||||
for (int i = 0; i < alarmCodes.size(); i++) {
|
||||
strb.append("?");
|
||||
if (i < alarmCodes.size() - 1) {
|
||||
strb.append(",");
|
||||
}
|
||||
strb.append(") ");
|
||||
|
||||
query.append(strb);
|
||||
}
|
||||
strb.append(") ");
|
||||
|
||||
|
||||
query.append(CQL_COUNTS_BY_EQUIPMENT_AND_ALARM_CODE_FOOTER);
|
||||
|
||||
AlarmCounts alarmCounts = new AlarmCounts();
|
||||
alarmCounts.setCustomerId(customerId);
|
||||
|
||||
//TODO: create a cache of these prepared statements, keyed by the numberOfEquipmentIds_numberOfAlarmCodes
|
||||
PreparedStatement preparedStmt_getCounts;
|
||||
try {
|
||||
preparedStmt_getCounts = cqlSession.prepare(query.toString());
|
||||
} catch(InvalidQueryException e) {
|
||||
LOG.error("Cannot prepare cassandra query '{}'", query.toString(), e);
|
||||
throw e;
|
||||
if (createdAfterTimestamp > 0) {
|
||||
strb.append(" and createdTimestamp > ?");
|
||||
queryArgs.add(createdAfterTimestamp);
|
||||
}
|
||||
|
||||
ResultSet rs = cqlSession.execute(preparedStmt_getCounts.bind(queryArgs.toArray() ));
|
||||
|
||||
rs.forEach(row -> {
|
||||
//we will do the client-side filtering for the AlarmCodes, because querying for it as part of CQL does not seem to work
|
||||
//we can afford it because there are not that many different alarm codes in total, and during normal operations
|
||||
//the amount of distinct alarm codes per equipment is very small
|
||||
AlarmCode ac = AlarmCode.getById(row.getInt(1));
|
||||
|
||||
if (alarmCodes != null && !alarmCodes.isEmpty() && alarmCodes.contains(ac)
|
||||
|| alarmCodes == null || alarmCodes.isEmpty() )
|
||||
{
|
||||
if(equipmentIds == null || equipmentIds.isEmpty()) {
|
||||
alarmCounts.addToCounter(0, ac, (int) row.getLong(2));
|
||||
} else {
|
||||
alarmCounts.addToCounter(row.getLong(0), ac, (int) row.getLong(2));
|
||||
}
|
||||
}
|
||||
});
|
||||
strb.append(" allow filtering");
|
||||
query += strb.toString();
|
||||
|
||||
return alarmCounts;
|
||||
}
|
||||
List<Alarm> ret = new ArrayList<>();
|
||||
|
||||
PreparedStatement preparedStmt_getListForCustomer = cqlSession.prepare(query);
|
||||
|
||||
ResultSet rs = cqlSession.execute(preparedStmt_getListForCustomer.bind(queryArgs.toArray()));
|
||||
|
||||
rs.forEach(row -> ret.add(alarmRowMapper.mapRow(row)));
|
||||
|
||||
LOG.debug("Found {} Alarms for alarmCodes {} createdAfter {}", ret.size(), alarmCodes, createdAfterTimestamp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,25 +20,50 @@ 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);
|
||||
|
||||
/*
|
||||
# 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)
|
||||
# See https://cassandra.apache.org/doc/latest/cql/types.html#counters
|
||||
#
|
||||
*/
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.alarm_counts_by_customer (
|
||||
customerId int,
|
||||
alarmCode int,
|
||||
alarmCount counter,
|
||||
|
||||
PRIMARY KEY ((customerId), alarmCode)
|
||||
) WITH comment='Counts of Alarms for a Customer generated by the TIP WLAN CloudSDK';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.alarm_counts_by_equipment (
|
||||
CREATE TABLE IF NOT EXISTS tip_wlan_keyspace.alarm_by_acknowledged (
|
||||
customerId int,
|
||||
equipmentId bigint,
|
||||
alarmCode int,
|
||||
alarmCount counter,
|
||||
alarmCode int,
|
||||
createdTimestamp bigint,
|
||||
acknowledged boolean,
|
||||
|
||||
PRIMARY KEY ((customerId, equipmentId), alarmCode)
|
||||
) WITH comment='Counts of Alarms for Equipment generated by the TIP WLAN CloudSDK';
|
||||
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';
|
||||
*/
|
||||
|
||||
@@ -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_12", "qr_49", "qr_21", "qr_39", "qr_1", "qr_25", "qr_42", "qr_9", "qr_29", "qr_7" });
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected List<String> getAlarmPagination_expectedPage1EmptySortStrings() {
|
||||
return Arrays.asList(new String[]{"qr_30", "qr_17", "qr_13", "qr_15", "qr_14", "qr_32", "qr_11", "qr_2", "qr_8", "qr_5" });
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getAlarmPagination_expectedPage1SingleSortDescStrings(){
|
||||
return getAlarmPagination_expectedPage1EmptySortStrings();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
1
alarm-datastore-common-test/.gitignore
vendored
Normal file
1
alarm-datastore-common-test/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.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;
|
||||
@@ -26,11 +30,7 @@ import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
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;
|
||||
import com.telecominfraproject.wlan.status.models.StatusCode;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
@@ -209,7 +209,8 @@ 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<>();
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_1);
|
||||
@@ -221,6 +222,11 @@ 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);
|
||||
@@ -229,7 +235,8 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
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 +248,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 +281,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 +400,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 +412,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 +436,74 @@ 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());
|
||||
|
||||
//clean up after the test
|
||||
equipmentIds.forEach(eqId -> testInterface.delete(customerId_1, eqId));
|
||||
equipmentIds_c2.forEach(eqId -> testInterface.delete(customerId_2, eqId));
|
||||
|
||||
}
|
||||
|
||||
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
|
||||
@@ -380,6 +542,7 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
mdl.setScopeId("qr_"+apNameIdx);
|
||||
if((i%2) == 0) {
|
||||
mdl.setAlarmCode(AlarmCode.CPUUtilization);
|
||||
mdl.setAcknowledged(true);
|
||||
equipmentIds_CPUUtilization.add(mdl.getEquipmentId());
|
||||
} else {
|
||||
equipmentIds_AccessPointIsUnreachable.add(mdl.getEquipmentId());
|
||||
@@ -391,21 +554,21 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
testInterface.create(mdl);
|
||||
}
|
||||
|
||||
{
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_1);
|
||||
mdl.setEquipmentId(0);
|
||||
mdl.setAlarmCode(AlarmCode.GenericError);
|
||||
equipmentIds_c1.add(mdl.getEquipmentId());
|
||||
|
||||
testInterface.create(mdl);
|
||||
}
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_1);
|
||||
mdl.setEquipmentId(0);
|
||||
mdl.setAlarmCode(AlarmCode.GenericError);
|
||||
equipmentIds_c1.add(mdl.getEquipmentId());
|
||||
|
||||
testInterface.create(mdl);
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_2);
|
||||
mdl.setScopeId("qr_"+apNameIdx);
|
||||
equipmentIds_c2.add(mdl.getEquipmentId());
|
||||
mdl.setAcknowledged(false);
|
||||
mdl.setAlarmCode(AlarmCode.GenericError);
|
||||
|
||||
apNameIdx++;
|
||||
testInterface.create(mdl);
|
||||
@@ -413,33 +576,71 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
|
||||
Set<AlarmCode> alarmCodes = new HashSet<>(Arrays.asList(AlarmCode.AccessPointIsUnreachable, AlarmCode.GenericError, AlarmCode.CPUUtilization));
|
||||
|
||||
AlarmCounts alarmCounts = testInterface.getAlarmCounts(customerId_1, equipmentIds, alarmCodes);
|
||||
AlarmCounts alarmCounts = testInterface.getAlarmCounts(customerId_1, equipmentIds, alarmCodes, null);
|
||||
assertEquals(0, alarmCounts.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(25, alarmCounts.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(25, alarmCounts.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(25, alarmCounts.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(25, alarmCounts.getSeverityCounter(StatusCode.error));
|
||||
|
||||
equipmentIds_CPUUtilization.forEach(eqId -> assertEquals(1, alarmCounts.getCounter(eqId, AlarmCode.CPUUtilization)));
|
||||
equipmentIds_AccessPointIsUnreachable.forEach(eqId -> assertEquals(1, alarmCounts.getCounter(eqId, AlarmCode.AccessPointIsUnreachable)) );
|
||||
|
||||
AlarmCounts alarmCounts_noEq = testInterface.getAlarmCounts(customerId_1, null, alarmCodes);
|
||||
AlarmCounts alarmCounts_noEq = testInterface.getAlarmCounts(customerId_1, null, alarmCodes, null);
|
||||
assertEquals(1, alarmCounts_noEq.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(25, alarmCounts_noEq.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(25, alarmCounts_noEq.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(25, alarmCounts_noEq.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(26, alarmCounts_noEq.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_noEq.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(3, alarmCounts_noEq.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_noEq_1code = testInterface.getAlarmCounts(customerId_1, null, Collections.singleton(AlarmCode.CPUUtilization));
|
||||
AlarmCounts alarmCounts_noEq_1code = testInterface.getAlarmCounts(customerId_1, null, Collections.singleton(AlarmCode.CPUUtilization), null);
|
||||
assertEquals(0, alarmCounts_noEq_1code.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(25, alarmCounts_noEq_1code.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_noEq_1code.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(25, alarmCounts_noEq_1code.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(0, alarmCounts_noEq_1code.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_noEq_1code.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(1, alarmCounts_noEq_1code.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_1Eq_1code = testInterface.getAlarmCounts(customerId_1, Collections.singleton(equipmentIds.iterator().next()), Collections.singleton(AlarmCode.CPUUtilization));
|
||||
AlarmCounts alarmCounts_acknowledgedT = testInterface.getAlarmCounts(customerId_1, null, Collections.singleton(AlarmCode.CPUUtilization), true);
|
||||
assertTrue(alarmCounts_acknowledgedT.getAcknowledged());
|
||||
assertEquals(0, alarmCounts_acknowledgedT.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(25, alarmCounts_acknowledgedT.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_acknowledgedT.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(25, alarmCounts_acknowledgedT.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(0, alarmCounts_acknowledgedT.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_acknowledgedT.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(1, alarmCounts_acknowledgedT.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_acknowledgedF = testInterface.getAlarmCounts(customerId_1, null, Collections.singleton(AlarmCode.CPUUtilization), false);
|
||||
assertFalse(alarmCounts_acknowledgedF.getAcknowledged());
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_acknowledgedF.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_acknowledgedF2 = testInterface.getAlarmCounts(customerId_2, null, Collections.singleton(AlarmCode.GenericError), false);
|
||||
assertFalse(alarmCounts_acknowledgedF2.getAcknowledged());
|
||||
assertEquals(50, alarmCounts_acknowledgedF2.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(0, alarmCounts_acknowledgedF2.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_acknowledgedF2.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(0, alarmCounts_acknowledgedF2.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(50, alarmCounts_acknowledgedF2.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_acknowledgedF2.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(1, alarmCounts_acknowledgedF2.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_1Eq_1code = testInterface.getAlarmCounts(customerId_1, Collections.singleton(equipmentIds.iterator().next()), Collections.singleton(AlarmCode.CPUUtilization), null);
|
||||
assertEquals(0, alarmCounts_1Eq_1code.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getCounter(equipmentIds.iterator().next(), AlarmCode.CPUUtilization));
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_1Eq_1code.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(0, alarmCounts_1Eq_1code.getSeverityCounter(StatusCode.error));
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getCountsPerEquipmentIdMap().size());
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
@@ -449,10 +650,12 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
for(int i=0; i< 4; i++) {
|
||||
smallEqIds.add(iter.next());
|
||||
}
|
||||
AlarmCounts alarmCounts_small = testInterface.getAlarmCounts(customerId_1, smallEqIds, alarmCodes);
|
||||
AlarmCounts alarmCounts_small = testInterface.getAlarmCounts(customerId_1, smallEqIds, alarmCodes, null);
|
||||
assertEquals(0, alarmCounts_small.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(2, alarmCounts_small.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(2, alarmCounts_small.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(2, alarmCounts_small.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(2, alarmCounts_small.getSeverityCounter(StatusCode.error));
|
||||
|
||||
//clean up after the test
|
||||
equipmentIds_c1.forEach(eqId -> testInterface.delete(customerId_1, eqId));
|
||||
@@ -460,6 +663,38 @@ public abstract class BaseAlarmDatastoreTest {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlarmCountsForSingleEquipment() {
|
||||
//create some Alarms
|
||||
Alarm mdl;
|
||||
int customerId = (int) testSequence.incrementAndGet();
|
||||
long equipmentId = testSequence.incrementAndGet();
|
||||
|
||||
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId);
|
||||
mdl.setEquipmentId(equipmentId);
|
||||
mdl.setAlarmCode(AlarmCode.CPUUtilization);
|
||||
testInterface.create(mdl);
|
||||
|
||||
mdl.setAlarmCode(AlarmCode.AccessPointIsUnreachable);
|
||||
testInterface.create(mdl);
|
||||
|
||||
Set<AlarmCode> alarmCodes = new HashSet<>(Arrays.asList(AlarmCode.AccessPointIsUnreachable, AlarmCode.GenericError, AlarmCode.CPUUtilization));
|
||||
|
||||
AlarmCounts alarmCounts = testInterface.getAlarmCounts(customerId, Collections.singleton(equipmentId), alarmCodes, null);
|
||||
assertEquals(0, alarmCounts.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(1, alarmCounts.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(1, alarmCounts.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(2, alarmCounts.getCounter(equipmentId, null));
|
||||
assertEquals(1, alarmCounts.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(1, alarmCounts.getSeverityCounter(StatusCode.error));
|
||||
|
||||
//clean up after the test
|
||||
testInterface.delete(customerId, equipmentId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected Alarm createAlarmObject() {
|
||||
Alarm result = new Alarm();
|
||||
@@ -467,6 +702,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
alarm-datastore-inmemory/.gitignore
vendored
Normal file
1
alarm-datastore-inmemory/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.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());
|
||||
}
|
||||
@@ -321,23 +322,59 @@ public class AlarmDatastoreInMemory extends BaseInMemoryDatastore implements Ala
|
||||
}
|
||||
|
||||
@Override
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet) {
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet, Boolean acknowledged) {
|
||||
|
||||
AlarmCounts alarmCounts = new AlarmCounts();
|
||||
alarmCounts.setCustomerId(customerId);
|
||||
alarmCounts.setAcknowledged(acknowledged);
|
||||
|
||||
idToAlarmMap.values().forEach(a -> {
|
||||
if(a.getCustomerId() == customerId) {
|
||||
if( alarmCodeSet ==null || alarmCodeSet.isEmpty() || alarmCodeSet.contains(a.getAlarmCode()) ) {
|
||||
if( equipmentIdSet != null && !equipmentIdSet.isEmpty() && equipmentIdSet.contains(a.getEquipmentId()) ) {
|
||||
alarmCounts.addToCounter(a.getEquipmentId(), a.getAlarmCode(), 1);
|
||||
} else if( equipmentIdSet == null || equipmentIdSet.isEmpty()) {
|
||||
alarmCounts.addToCounter(0, a.getAlarmCode(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if (acknowledged == null) {
|
||||
idToAlarmMap.values().forEach(a -> {
|
||||
if(a.getCustomerId() == customerId) {
|
||||
if( alarmCodeSet ==null || alarmCodeSet.isEmpty() || alarmCodeSet.contains(a.getAlarmCode()) ) {
|
||||
if( equipmentIdSet != null && !equipmentIdSet.isEmpty() && equipmentIdSet.contains(a.getEquipmentId()) ) {
|
||||
alarmCounts.addToCounter(a.getEquipmentId(), a.getAlarmCode(), 1);
|
||||
} else if (equipmentIdSet == null || equipmentIdSet.isEmpty()) {
|
||||
alarmCounts.addToCounter(0, a.getAlarmCode(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
idToAlarmMap.values().forEach(a -> {
|
||||
if(a.getCustomerId() == customerId && acknowledged.equals(a.isAcknowledged())) {
|
||||
if( alarmCodeSet ==null || alarmCodeSet.isEmpty() || alarmCodeSet.contains(a.getAlarmCode()) ) {
|
||||
if( equipmentIdSet != null && !equipmentIdSet.isEmpty() && equipmentIdSet.contains(a.getEquipmentId()) ) {
|
||||
alarmCounts.addToCounter(a.getEquipmentId(), a.getAlarmCode(), 1);
|
||||
} else if (equipmentIdSet == null || equipmentIdSet.isEmpty()) {
|
||||
alarmCounts.addToCounter(0, a.getAlarmCode(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return alarmCounts;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Alarm> get(Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp) {
|
||||
|
||||
if (alarmCodeSet == null || alarmCodeSet.isEmpty()) {
|
||||
throw new IllegalArgumentException("alarmCodeSet must be provided");
|
||||
}
|
||||
|
||||
List<Alarm> ret = new ArrayList<>();
|
||||
|
||||
idToAlarmMap.values().forEach(a -> {
|
||||
if (alarmCodeSet.contains(a.getAlarmCode()) && a.getCreatedTimestamp() > createdAfterTimestamp) {
|
||||
ret.add(a.clone());
|
||||
}
|
||||
});
|
||||
|
||||
LOG.debug("Found Alarms {}", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
1
alarm-datastore-interface/.gitignore
vendored
Normal file
1
alarm-datastore-interface/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-exceptions</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -60,22 +60,25 @@ 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
|
||||
* @param equipmentIdSet - if empty, then only total counts of all alarms for customer per alarm code will be counted
|
||||
* @param alarmCodeSet - can be empty, in which case all alarm codes will be counted
|
||||
* @param acknowledged - can by empty, in which case acknowledged will be ignored
|
||||
* @return alarm counts for the given filters
|
||||
*/
|
||||
AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet);
|
||||
AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet, Boolean acknowledged);
|
||||
|
||||
/**
|
||||
* In some datastores (i.e. Cassandra) it makes sense to store counts of alarms in a separate table for fast retrieval by UI.
|
||||
* Unfortunately, there are some situations where those counters get out of sync with the real alarm counts.
|
||||
* This method is here to re-calculate the counter values and bring them in-sync with the real alarms.
|
||||
* Retrieves a list of Alarms for the given alarm codes.
|
||||
*
|
||||
* @param alarmCodeSet - null or empty means include all alarm codes
|
||||
* @param createdAfterTimestamp
|
||||
* @return list of matching Alarm objects.
|
||||
* @throws IllegalArgumentException if supplied alarmCodeSet is null or empty
|
||||
*/
|
||||
default void resetAlarmCounters() {
|
||||
//only Cassandra datastore needs to implement this
|
||||
}
|
||||
List<Alarm> get(Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
<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>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>alarm-datastore-rdbms</artifactId>
|
||||
<name>alarm-datastore-rdbms</name>
|
||||
<description>SQL implementation of the data store</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-jdbc</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-jdbc-tests</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>alarm-datastore-common-test</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,646 +0,0 @@
|
||||
package com.telecominfraproject.wlan.alarm.datastore.rdbms;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
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 javax.sql.DataSource;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.dao.EmptyResultDataAccessException;
|
||||
import org.springframework.jdbc.core.PreparedStatementCreator;
|
||||
import org.springframework.jdbc.core.RowCallbackHandler;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
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.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.jdbc.BaseJdbcDao;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsConcurrentModificationException;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsDuplicateEntityException;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsEntityNotFoundException;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
*/
|
||||
@Repository
|
||||
@Transactional(propagation = Propagation.MANDATORY)
|
||||
public class AlarmDAO extends BaseJdbcDao {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AlarmDatastoreRdbms.class);
|
||||
|
||||
private static final String[] GENERATED_KEY_COLS = { };
|
||||
|
||||
private static final String[] ALL_COLUMNS_LIST = {
|
||||
|
||||
//TODO: add colums from properties Alarm in here
|
||||
"customerId",
|
||||
"equipmentId",
|
||||
"alarmCode",
|
||||
"createdTimestamp",
|
||||
"originatorType",
|
||||
"severity",
|
||||
"scopeType",
|
||||
"scopeId",
|
||||
"details",
|
||||
"acknowledged",
|
||||
//make sure the order of properties matches this list and list in AlarmRowMapper and list in create/update methods
|
||||
|
||||
"lastModifiedTimestamp"
|
||||
};
|
||||
|
||||
private static final Set<String> columnsToSkipForInsert = new HashSet<>(Arrays.asList());
|
||||
private static final Set<String> columnsToSkipForUpdate = new HashSet<>(Arrays.asList(
|
||||
"customerId",
|
||||
"equipmentId",
|
||||
"alarmCode",
|
||||
"createdTimestamp"));
|
||||
|
||||
private static final String TABLE_NAME = "alarm";
|
||||
private static final String TABLE_PREFIX = "s.";
|
||||
private static final String ALL_COLUMNS;
|
||||
|
||||
private static final Set<String> ALL_COLUMNS_LOWERCASE = new HashSet<>();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
//use this for queries where multiple tables are involved
|
||||
private static final String ALL_COLUMNS_WITH_PREFIX;
|
||||
|
||||
private static final String ALL_COLUMNS_FOR_INSERT;
|
||||
private static final String BIND_VARS_FOR_INSERT;
|
||||
private static final String ALL_COLUMNS_UPDATE;
|
||||
|
||||
static{
|
||||
StringBuilder strbAllColumns = new StringBuilder(1024);
|
||||
StringBuilder strbAllColumnsWithPrefix = new StringBuilder(1024);
|
||||
StringBuilder strbAllColumnsForInsert = new StringBuilder(1024);
|
||||
StringBuilder strbBindVarsForInsert = new StringBuilder(128);
|
||||
StringBuilder strbColumnsForUpdate = new StringBuilder(512);
|
||||
for(String colName: ALL_COLUMNS_LIST){
|
||||
|
||||
ALL_COLUMNS_LOWERCASE.add(colName.toLowerCase());
|
||||
|
||||
strbAllColumns.append(colName).append(",");
|
||||
strbAllColumnsWithPrefix.append(TABLE_PREFIX).append(colName).append(",");
|
||||
|
||||
if(!columnsToSkipForInsert.contains(colName)){
|
||||
strbAllColumnsForInsert.append(colName).append(",");
|
||||
strbBindVarsForInsert.append("?,");
|
||||
}
|
||||
|
||||
if(!columnsToSkipForUpdate.contains(colName)){
|
||||
strbColumnsForUpdate.append(colName).append("=?,");
|
||||
}
|
||||
}
|
||||
|
||||
// remove trailing ','
|
||||
strbAllColumns.deleteCharAt(strbAllColumns.length() - 1);
|
||||
strbAllColumnsWithPrefix.deleteCharAt(strbAllColumnsWithPrefix.length() - 1);
|
||||
strbAllColumnsForInsert.deleteCharAt(strbAllColumnsForInsert.length() - 1);
|
||||
strbBindVarsForInsert.deleteCharAt(strbBindVarsForInsert.length() - 1);
|
||||
strbColumnsForUpdate.deleteCharAt(strbColumnsForUpdate.length() - 1);
|
||||
|
||||
ALL_COLUMNS = strbAllColumns.toString();
|
||||
ALL_COLUMNS_WITH_PREFIX = strbAllColumnsWithPrefix.toString();
|
||||
ALL_COLUMNS_FOR_INSERT = strbAllColumnsForInsert.toString();
|
||||
BIND_VARS_FOR_INSERT = strbBindVarsForInsert.toString();
|
||||
ALL_COLUMNS_UPDATE = strbColumnsForUpdate.toString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static final String SQL_GET_BY_ID =
|
||||
"select " + ALL_COLUMNS +
|
||||
" from "+TABLE_NAME+" " +
|
||||
" where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ?";
|
||||
|
||||
private static final String SQL_GET_BY_CUSTOMER_ID =
|
||||
"select " + ALL_COLUMNS +
|
||||
" from " + TABLE_NAME + " " +
|
||||
" where customerId = ? ";
|
||||
|
||||
private static final String SQL_GET_LASTMOD_BY_ID =
|
||||
"select lastModifiedTimestamp " +
|
||||
" from "+TABLE_NAME+" " +
|
||||
" where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ?";
|
||||
|
||||
private static final String SQL_INSERT =
|
||||
"insert into "+TABLE_NAME+" ( "
|
||||
+ ALL_COLUMNS_FOR_INSERT
|
||||
+ " ) values ( "+BIND_VARS_FOR_INSERT+" ) ";
|
||||
|
||||
private static final String SQL_DELETE =
|
||||
"delete from "+TABLE_NAME+
|
||||
" where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ?";
|
||||
|
||||
private static final String SQL_DELETE_BY_EQUIPMENT =
|
||||
"delete from "+TABLE_NAME+
|
||||
" where customerId = ? and equipmentId = ? ";
|
||||
|
||||
private static final String SQL_UPDATE =
|
||||
"update "+TABLE_NAME+" set "
|
||||
+ ALL_COLUMNS_UPDATE +
|
||||
" where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ?"
|
||||
+ " and ( lastModifiedTimestamp = ? or ? = true) " //last parameter will allow us to skip check for concurrent modification, if necessary
|
||||
;
|
||||
|
||||
private static final String SQL_PAGING_SUFFIX = " LIMIT ? OFFSET ? ";
|
||||
private static final String SORT_SUFFIX = "";
|
||||
|
||||
private static final String SQL_COUNTS_BY_EQUIPMENT_AND_ALARM_CODE_HEADER = "select equipmentId, alarmCode, count(1) from alarm where customerId = ? ";
|
||||
private static final String SQL_COUNTS_BY_EQUIPMENT_AND_ALARM_CODE_FOOTER = " group by equipmentId, alarmCode";
|
||||
|
||||
private static final String SQL_COUNTS_BY_ALARM_CODE_HEADER = "select alarmCode, count(1) from alarm where customerId = ? ";
|
||||
private static final String SQL_COUNTS_BY_ALARM_CODE_FOOTER = " group by alarmCode";
|
||||
|
||||
private static final RowMapper<Alarm> alarmRowMapper = new AlarmRowMapper();
|
||||
|
||||
|
||||
@Autowired(required=false)
|
||||
public void setDataSource(AlarmDataSourceInterface dataSource) {
|
||||
setDataSource((DataSource)dataSource);
|
||||
}
|
||||
|
||||
|
||||
public Alarm create(final Alarm alarm) {
|
||||
|
||||
final long ts = System.currentTimeMillis();
|
||||
if(alarm.getCreatedTimestamp()<=0) {
|
||||
alarm.setCreatedTimestamp(ts);
|
||||
}
|
||||
|
||||
alarm.setLastModifiedTimestamp(ts);
|
||||
|
||||
try{
|
||||
jdbcTemplate.update(
|
||||
new PreparedStatementCreator() {
|
||||
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
|
||||
PreparedStatement ps = connection.prepareStatement(SQL_INSERT );
|
||||
int colIdx = 1;
|
||||
|
||||
//TODO: add remaining properties from Alarm here
|
||||
ps.setInt(colIdx++, alarm.getCustomerId());
|
||||
ps.setLong(colIdx++, alarm.getEquipmentId());
|
||||
ps.setInt(colIdx++, alarm.getAlarmCode().getId());
|
||||
ps.setLong(colIdx++, alarm.getCreatedTimestamp());
|
||||
|
||||
ps.setInt(colIdx++, alarm.getOriginatorType().getId());
|
||||
ps.setInt(colIdx++, alarm.getSeverity().getId());
|
||||
ps.setInt(colIdx++, alarm.getScopeType().getId());
|
||||
ps.setString(colIdx++, alarm.getScopeId());
|
||||
|
||||
ps.setBytes(colIdx++, (alarm.getDetails()!=null)?alarm.getDetails().toZippedBytes():null);
|
||||
|
||||
ps.setBoolean(colIdx++, alarm.isAcknowledged());
|
||||
ps.setLong(colIdx++, alarm.getLastModifiedTimestamp());
|
||||
|
||||
return ps;
|
||||
}
|
||||
});
|
||||
}catch (DuplicateKeyException e) {
|
||||
throw new DsDuplicateEntityException(e);
|
||||
}
|
||||
|
||||
LOG.debug("Stored Alarm {}", alarm);
|
||||
|
||||
return alarm.clone();
|
||||
}
|
||||
|
||||
public Alarm get(int customerId, long equipmentId, AlarmCode alarmCode, long createdTimestamp) {
|
||||
LOG.debug("Looking up Alarm for id {} {} {} {}", customerId, equipmentId, alarmCode, createdTimestamp);
|
||||
|
||||
try {
|
||||
Alarm alarm = this.jdbcTemplate.queryForObject(
|
||||
SQL_GET_BY_ID,
|
||||
alarmRowMapper, customerId, equipmentId, alarmCode.getId(), createdTimestamp);
|
||||
|
||||
LOG.debug("Found Alarm {}", alarm);
|
||||
|
||||
return alarm;
|
||||
}catch (EmptyResultDataAccessException e) {
|
||||
throw new DsEntityNotFoundException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Transactional(noRollbackFor = { EmptyResultDataAccessException.class })
|
||||
public Alarm getOrNull(int customerId, long equipmentId, AlarmCode alarmCode, long createdTimestamp) {
|
||||
LOG.debug("Looking up Alarm for id {} {} {} {}", customerId, equipmentId, alarmCode, createdTimestamp);
|
||||
|
||||
try{
|
||||
Alarm alarm = this.jdbcTemplate.queryForObject(
|
||||
SQL_GET_BY_ID,
|
||||
alarmRowMapper, customerId, equipmentId, alarmCode.getId(), createdTimestamp);
|
||||
|
||||
LOG.debug("Found Alarm {}", alarm);
|
||||
|
||||
return alarm;
|
||||
}catch (EmptyResultDataAccessException e) {
|
||||
LOG.debug("Could not find Alarm for id {} {} {} {}", customerId, equipmentId, alarmCode, createdTimestamp);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Alarm update(Alarm alarm) {
|
||||
|
||||
long newLastModifiedTs = System.currentTimeMillis();
|
||||
long incomingLastModifiedTs = alarm.getLastModifiedTimestamp();
|
||||
|
||||
int updateCount = this.jdbcTemplate.update(SQL_UPDATE, new Object[]{
|
||||
|
||||
//TODO: add remaining properties from Alarm here
|
||||
alarm.getOriginatorType().getId(),
|
||||
alarm.getSeverity().getId(),
|
||||
alarm.getScopeType().getId(),
|
||||
alarm.getScopeId(),
|
||||
(alarm.getDetails()!=null)?alarm.getDetails().toZippedBytes():null ,
|
||||
alarm.isAcknowledged(),
|
||||
|
||||
newLastModifiedTs,
|
||||
|
||||
// use id for update operation
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
// use lastModifiedTimestamp for data protection against concurrent modifications
|
||||
incomingLastModifiedTs,
|
||||
isSkipCheckForConcurrentUpdates()
|
||||
});
|
||||
|
||||
if(updateCount==0){
|
||||
|
||||
try{
|
||||
|
||||
if(isSkipCheckForConcurrentUpdates()){
|
||||
//in this case we did not request protection against concurrent updates,
|
||||
//so the updateCount is 0 because record in db was not found
|
||||
throw new EmptyResultDataAccessException(1);
|
||||
}
|
||||
|
||||
//find out if record could not be updated because it does not exist or because it was modified concurrently
|
||||
long recordTimestamp = this.jdbcTemplate.queryForObject(
|
||||
SQL_GET_LASTMOD_BY_ID,
|
||||
Long.class,
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp()
|
||||
);
|
||||
|
||||
LOG.debug("Concurrent modification detected for Alarm with id {} {} {} {} expected version is {} but version in db was {}",
|
||||
alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp(),
|
||||
incomingLastModifiedTs,
|
||||
recordTimestamp
|
||||
);
|
||||
throw new DsConcurrentModificationException("Concurrent modification detected for Alarm with id " +
|
||||
alarm.getCustomerId() + " " +
|
||||
alarm.getEquipmentId() + " " +
|
||||
alarm.getAlarmCode().getId() + " " +
|
||||
alarm.getCreatedTimestamp() + " "
|
||||
+" expected version is " + incomingLastModifiedTs
|
||||
+" but version in db was " + recordTimestamp
|
||||
);
|
||||
|
||||
}catch (EmptyResultDataAccessException e) {
|
||||
LOG.debug("Cannot find Alarm for {} {} {} {} ", alarm.getCustomerId(),
|
||||
alarm.getEquipmentId(),
|
||||
alarm.getAlarmCode().getId(),
|
||||
alarm.getCreatedTimestamp());
|
||||
throw new DsEntityNotFoundException("Alarm not found " +
|
||||
alarm.getCustomerId() + " " +
|
||||
alarm.getEquipmentId() + " " +
|
||||
alarm.getAlarmCode().getId() + " " +
|
||||
alarm.getCreatedTimestamp());
|
||||
}
|
||||
}
|
||||
|
||||
//make a copy so that we don't accidentally update caller's version by reference
|
||||
Alarm alarmCopy = alarm.clone();
|
||||
alarmCopy.setLastModifiedTimestamp(newLastModifiedTs);
|
||||
|
||||
LOG.debug("Updated Alarm {}", alarmCopy);
|
||||
|
||||
return alarmCopy;
|
||||
}
|
||||
|
||||
|
||||
public Alarm delete(int customerId, long equipmentId, AlarmCode alarmCode, long createdTimestamp) {
|
||||
Alarm ret = get(customerId, equipmentId, alarmCode, createdTimestamp);
|
||||
|
||||
this.jdbcTemplate.update(SQL_DELETE, customerId, equipmentId, alarmCode.getId(), createdTimestamp);
|
||||
|
||||
LOG.debug("Deleted Alarm {}", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public List<Alarm> delete(int customerId, long equipmentId) {
|
||||
List<Alarm> ret = get(customerId, Collections.singleton(equipmentId), null, -1);
|
||||
|
||||
this.jdbcTemplate.update(SQL_DELETE_BY_EQUIPMENT, customerId, equipmentId);
|
||||
|
||||
LOG.debug("Deleted Alarms {}", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public List<Alarm> get(int customerId, Set<Long> equipmentIds, Set<AlarmCode> alarmCodes,
|
||||
long createdAfterTimestamp) {
|
||||
|
||||
if(equipmentIds == null || equipmentIds.isEmpty()) {
|
||||
throw new IllegalArgumentException("equipmentIds must be provided");
|
||||
}
|
||||
|
||||
LOG.debug("Looking up Alarms for customer {} equipment {} codes {} createdAfter {}",
|
||||
customerId, equipmentIds, alarmCodes, createdAfterTimestamp);
|
||||
|
||||
String query = SQL_GET_BY_CUSTOMER_ID;
|
||||
|
||||
// add filters for the query
|
||||
ArrayList<Object> queryArgs = new ArrayList<>();
|
||||
queryArgs.add(customerId);
|
||||
|
||||
//add equipmentId filters
|
||||
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();
|
||||
}
|
||||
|
||||
//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 += strb.toString();
|
||||
}
|
||||
|
||||
if(createdAfterTimestamp > 0) {
|
||||
query += " and createdTimestamp > ?" ;
|
||||
queryArgs.add(createdAfterTimestamp);
|
||||
}
|
||||
|
||||
List<Alarm> ret = this.jdbcTemplate.query(query, queryArgs.toArray(),
|
||||
alarmRowMapper);
|
||||
|
||||
LOG.debug("Found {} Alarms for customer {} equipment {} codes {} createdAfter {}",
|
||||
ret.size(),
|
||||
customerId, equipmentIds, alarmCodes, createdAfterTimestamp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public List<Alarm> getAllForCustomer(int customerId) {
|
||||
LOG.debug("Looking up Alarms for customer {}", customerId);
|
||||
|
||||
List<Alarm> ret = this.jdbcTemplate.query(SQL_GET_BY_CUSTOMER_ID,
|
||||
alarmRowMapper, customerId);
|
||||
|
||||
LOG.debug("Found Alarms for customer {} : {}", customerId, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public PaginationResponse<Alarm> getForCustomer(int customerId,
|
||||
Set<Long> equipmentIds, Set<AlarmCode> alarmCodes, long createdAfterTimestamp,
|
||||
List<ColumnAndSort> sortBy, PaginationContext<Alarm> context) {
|
||||
|
||||
PaginationResponse<Alarm> ret = new PaginationResponse<>();
|
||||
ret.setContext(context.clone());
|
||||
|
||||
if (ret.getContext().isLastPage()) {
|
||||
// no more pages available according to the context
|
||||
LOG.debug(
|
||||
"No more pages available when looking up Alarms for customer {} with last returned page number {}",
|
||||
customerId, context.getLastReturnedPageNumber());
|
||||
return ret;
|
||||
}
|
||||
|
||||
LOG.debug("Looking up Alarms for customer {} with last returned page number {}",
|
||||
customerId, context.getLastReturnedPageNumber());
|
||||
|
||||
String query = SQL_GET_BY_CUSTOMER_ID;
|
||||
|
||||
// add filters for the query
|
||||
ArrayList<Object> queryArgs = new ArrayList<>();
|
||||
queryArgs.add(customerId);
|
||||
|
||||
//add equipmentId filters
|
||||
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();
|
||||
}
|
||||
|
||||
//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 += strb.toString();
|
||||
}
|
||||
|
||||
if(createdAfterTimestamp > 0) {
|
||||
query += " and createdTimestamp > ?" ;
|
||||
queryArgs.add(createdAfterTimestamp);
|
||||
}
|
||||
|
||||
// add sorting options for the query
|
||||
StringBuilder strbSort = new StringBuilder(100);
|
||||
strbSort.append(" order by ");
|
||||
|
||||
if (sortBy != null && !sortBy.isEmpty()) {
|
||||
|
||||
// use supplied sorting options
|
||||
for (ColumnAndSort column : sortBy) {
|
||||
if (!ALL_COLUMNS_LOWERCASE.contains(column.getColumnName().toLowerCase())) {
|
||||
// unknown column, skip it
|
||||
continue;
|
||||
}
|
||||
|
||||
strbSort.append(column.getColumnName());
|
||||
|
||||
if (column.getSortOrder() == SortOrder.desc) {
|
||||
strbSort.append(" desc");
|
||||
}
|
||||
|
||||
strbSort.append(",");
|
||||
}
|
||||
|
||||
// remove last ','
|
||||
strbSort.deleteCharAt(strbSort.length() - 1);
|
||||
|
||||
} else {
|
||||
// no sort order was specified - sort by id to have consistent
|
||||
// paging
|
||||
strbSort.append(" equipmentId, createdTimestamp");
|
||||
}
|
||||
|
||||
query += strbSort.toString();
|
||||
|
||||
// add pagination parameters for the query
|
||||
query += SQL_PAGING_SUFFIX ;
|
||||
|
||||
queryArgs.add(context.getMaxItemsPerPage());
|
||||
queryArgs.add(context.getTotalItemsReturned());
|
||||
|
||||
/*
|
||||
* https://www.citusdata.com/blog/2016/03/30/five-ways-to-paginate/
|
||||
* Choosing offset=1000 makes cost about 19 and has a 0.609 ms execution
|
||||
* time. Once offset=5,000,000 the cost goes up to 92734 and execution
|
||||
* time is 758.484 ms. - DT: still acceptable for our use case
|
||||
*/
|
||||
List<Alarm> pageItems = this.jdbcTemplate.query(query, queryArgs.toArray(),
|
||||
alarmRowMapper);
|
||||
|
||||
LOG.debug("Found {} Alarms for customer {} with last returned page number {}",
|
||||
pageItems.size(), customerId, context.getLastReturnedPageNumber());
|
||||
|
||||
ret.setItems(pageItems);
|
||||
|
||||
// adjust context for the next page
|
||||
ret.prepareForNextPage();
|
||||
|
||||
// startAfterItem is not used in RDBMS datastores, set it to null
|
||||
ret.getContext().setStartAfterItem(null);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIds, Set<AlarmCode> alarmCodes) {
|
||||
|
||||
ArrayList<Object> queryArgs = new ArrayList<>();
|
||||
queryArgs.add(customerId);
|
||||
|
||||
//build the query
|
||||
|
||||
StringBuilder query = new StringBuilder();
|
||||
if(equipmentIds == null || equipmentIds.isEmpty()) {
|
||||
query.append(SQL_COUNTS_BY_ALARM_CODE_HEADER);
|
||||
} else {
|
||||
query.append(SQL_COUNTS_BY_EQUIPMENT_AND_ALARM_CODE_HEADER);
|
||||
}
|
||||
|
||||
//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.append(strb);
|
||||
}
|
||||
|
||||
//add equipmentId filters
|
||||
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.append(strb);
|
||||
}
|
||||
|
||||
|
||||
if(equipmentIds == null || equipmentIds.isEmpty()) {
|
||||
query.append(SQL_COUNTS_BY_ALARM_CODE_FOOTER);
|
||||
} else {
|
||||
query.append(SQL_COUNTS_BY_EQUIPMENT_AND_ALARM_CODE_FOOTER);
|
||||
}
|
||||
|
||||
AlarmCounts alarmCounts = new AlarmCounts();
|
||||
alarmCounts.setCustomerId(customerId);
|
||||
|
||||
this.jdbcTemplate.query(query.toString(), queryArgs.toArray(),
|
||||
new RowCallbackHandler() {
|
||||
@Override
|
||||
public void processRow(ResultSet rs) throws SQLException {
|
||||
if(equipmentIds == null || equipmentIds.isEmpty()) {
|
||||
alarmCounts.addToCounter(0, AlarmCode.getById(rs.getInt(1)), rs.getInt(2));
|
||||
} else {
|
||||
alarmCounts.addToCounter(rs.getLong(1), AlarmCode.getById(rs.getInt(2)), rs.getInt(3));
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return alarmCounts;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.telecominfraproject.wlan.alarm.datastore.rdbms;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.telecominfraproject.wlan.core.server.jdbc.BaseDataSourceConfig;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
@Profile("!use_single_ds")
|
||||
@PropertySource({ "${alarm-ds.props:classpath:alarm-ds.properties}" })
|
||||
public class AlarmDataSourceConfig extends BaseDataSourceConfig {
|
||||
|
||||
|
||||
@Bean
|
||||
public AlarmDataSourceInterface alarmDataSourceInterface(){
|
||||
|
||||
AlarmDataSourceInterface ret = new AlarmDataSourceImpl(getDataSource(), getKeyColumnConverter());
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDataSourceName() {
|
||||
return "alarm-ds";
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.telecominfraproject.wlan.alarm.datastore.rdbms;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import com.telecominfraproject.wlan.core.server.jdbc.BaseJDbcDataSource;
|
||||
import com.telecominfraproject.wlan.core.server.jdbc.BaseKeyColumnConverter;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
* SQL DataSource that is used by Alarm Service
|
||||
*/
|
||||
public class AlarmDataSourceImpl extends BaseJDbcDataSource implements AlarmDataSourceInterface {
|
||||
|
||||
public AlarmDataSourceImpl(DataSource targetDataSource, BaseKeyColumnConverter keyColumnConverter){
|
||||
super(targetDataSource, keyColumnConverter);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.telecominfraproject.wlan.alarm.datastore.rdbms;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
* Marker interface to distinguish SQL DataSource that is used by Alarm Service
|
||||
*/
|
||||
public interface AlarmDataSourceInterface extends DataSource {
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
package com.telecominfraproject.wlan.alarm.datastore.rdbms;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
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.alarm.datastore.AlarmDatastore;
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCode;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCounts;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
public class AlarmDatastoreRdbms implements AlarmDatastore {
|
||||
|
||||
@Autowired AlarmDAO alarmDAO;
|
||||
|
||||
@Override
|
||||
public Alarm create(Alarm alarm) {
|
||||
return alarmDAO.create(alarm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Alarm getOrNull(int customerId, long equipmentId, AlarmCode alarmCode, long createdTimestamp) {
|
||||
return alarmDAO.getOrNull(customerId, equipmentId, alarmCode, createdTimestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Alarm update(Alarm alarm) {
|
||||
return alarmDAO.update(alarm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Alarm delete(int customerId, long equipmentId, AlarmCode alarmCode, long createdTimestamp) {
|
||||
return alarmDAO.delete(customerId, equipmentId, alarmCode, createdTimestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Alarm> delete(int customerId, long equipmentId) {
|
||||
return alarmDAO.delete(customerId, equipmentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Alarm> get(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet,
|
||||
long createdAfterTimestamp) {
|
||||
return alarmDAO.get(customerId, equipmentIdSet, alarmCodeSet, createdAfterTimestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaginationResponse<Alarm> getForCustomer(int customerId, Set<Long> equipmentIdSet,
|
||||
Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp, List<ColumnAndSort> sortBy,
|
||||
PaginationContext<Alarm> context) {
|
||||
|
||||
if(context == null) {
|
||||
context = new PaginationContext<>();
|
||||
}
|
||||
|
||||
return alarmDAO.getForCustomer(customerId, equipmentIdSet,
|
||||
alarmCodeSet, createdAfterTimestamp, sortBy,
|
||||
context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet) {
|
||||
return alarmDAO.getAlarmCounts(customerId, equipmentIdSet, alarmCodeSet);
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.telecominfraproject.wlan.alarm.datastore.rdbms;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCode;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmDetails;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmScopeType;
|
||||
import com.telecominfraproject.wlan.alarm.models.OriginatorType;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.status.models.StatusCode;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
*/
|
||||
|
||||
public class AlarmRowMapper implements RowMapper<Alarm> {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AlarmRowMapper.class);
|
||||
|
||||
public Alarm mapRow(ResultSet rs, int rowNum) throws SQLException {
|
||||
Alarm alarm = new Alarm();
|
||||
int colIdx=1;
|
||||
|
||||
//TODO: add columns from properties Alarm in here.
|
||||
//make sure order of fields is the same as defined in Alarm
|
||||
alarm.setCustomerId(rs.getInt(colIdx++));
|
||||
alarm.setEquipmentId(rs.getLong(colIdx++));
|
||||
alarm.setAlarmCode(AlarmCode.getById(rs.getInt(colIdx++)));
|
||||
alarm.setCreatedTimestamp(rs.getLong(colIdx++));
|
||||
|
||||
alarm.setOriginatorType(OriginatorType.getById(rs.getInt(colIdx++)));
|
||||
alarm.setSeverity(StatusCode.getById(rs.getInt(colIdx++)));
|
||||
alarm.setScopeType(AlarmScopeType.getById(rs.getInt(colIdx++)));
|
||||
alarm.setScopeId(rs.getString(colIdx++));
|
||||
|
||||
byte[] zippedBytes = rs.getBytes(colIdx++);
|
||||
if (zippedBytes !=null) {
|
||||
try {
|
||||
AlarmDetails details = BaseJsonModel.fromZippedBytes(zippedBytes, AlarmDetails.class);
|
||||
alarm.setDetails(details);
|
||||
} catch (RuntimeException exp) {
|
||||
LOG.error("Failed to decode AlarmDetails from database for {}", alarm);
|
||||
}
|
||||
}
|
||||
|
||||
alarm.setAcknowledged(rs.getBoolean(colIdx++));
|
||||
alarm.setLastModifiedTimestamp(rs.getLong(colIdx++));
|
||||
|
||||
return alarm;
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
create table if not exists alarm (
|
||||
customerId int not null,
|
||||
equipmentId bigint default 0 not null,
|
||||
alarmCode int not null,
|
||||
createdTimestamp bigint not null,
|
||||
|
||||
originatorType int not null,
|
||||
severity int not null,
|
||||
scopeType int not null,
|
||||
scopeId varchar(255) not null,
|
||||
details bytea,
|
||||
acknowledged boolean,
|
||||
|
||||
lastModifiedTimestamp bigint not null,
|
||||
|
||||
primary key (customerId, equipmentId, alarmCode, createdTimestamp)
|
||||
|
||||
);
|
||||
|
||||
create index if not exists idx_alarm_customerId on alarm (customerId);
|
||||
create index if not exists idx_alarm_equipmentId on alarm (equipmentId );
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
package com.telecominfraproject.wlan.alarm.datastore.rdbms;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase;
|
||||
|
||||
import com.telecominfraproject.wlan.core.server.jdbc.test.BaseJdbcTest;
|
||||
import com.telecominfraproject.wlan.core.server.jdbc.test.TestWithEmbeddedDB;
|
||||
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCode;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
*/
|
||||
@Import(value = {
|
||||
AlarmDatastoreRdbms.class,
|
||||
AlarmDataSourceConfig.class,
|
||||
AlarmDAO.class,
|
||||
BaseJdbcTest.Config.class
|
||||
})
|
||||
@TestWithEmbeddedDB
|
||||
public class AlarmDatastoreRdbmsPlumbingTests extends BaseJdbcTest {
|
||||
|
||||
@Autowired(required=false) private EmbeddedDatabase db;
|
||||
@Autowired private AlarmDatastoreRdbms alarmDatastore;
|
||||
@Autowired private AlarmDAO alarmDAO;
|
||||
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDataAccess() {
|
||||
if(db!=null){
|
||||
//this is a simple test to see if embedded db is working in test environment
|
||||
JdbcTemplate jdbcTemplate = new JdbcTemplate(db);
|
||||
Long ret = jdbcTemplate.queryForObject(
|
||||
"select equipmentId from alarm where customerId = ? and equipmentId = ? and alarmCode = ? and createdTimestamp = ?",
|
||||
Long.class, 1, 1L, 4, 1L);
|
||||
|
||||
assertEquals((Long)1L, ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testCreateUpdateDeleteAlarm() {
|
||||
|
||||
//GET by Id test
|
||||
assertNotNull(alarmDatastore.getOrNull(1, 1L, AlarmCode.AccessPointIsUnreachable, 1L));
|
||||
|
||||
//DELETE Test
|
||||
alarmDatastore.delete(1, 1L, AlarmCode.AccessPointIsUnreachable, 1L);
|
||||
|
||||
assertNull(alarmDatastore.getOrNull(1, 1L, AlarmCode.AccessPointIsUnreachable, 1L));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.telecominfraproject.wlan.alarm.datastore.rdbms;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.test.annotation.Rollback;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.telecominfraproject.wlan.core.server.jdbc.test.BaseJdbcTest;
|
||||
import com.telecominfraproject.wlan.core.server.jdbc.test.TestWithEmbeddedDB;
|
||||
|
||||
import com.telecominfraproject.wlan.alarm.datastore.BaseAlarmDatastoreTest;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.NONE, classes = BaseJdbcTest.Config.class)
|
||||
@Rollback(value = true)
|
||||
@Transactional
|
||||
@Import(value = { AlarmDatastoreRdbms.class, AlarmDataSourceConfig.class,
|
||||
AlarmDAO.class, BaseJdbcTest.Config.class })
|
||||
@TestWithEmbeddedDB
|
||||
public class AlarmDatastoreRdbmsTests extends BaseAlarmDatastoreTest {
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
drop table alarm if exists;
|
||||
|
||||
create table alarm (
|
||||
customerId int not null,
|
||||
equipmentId bigint default 0 not null,
|
||||
alarmCode int not null,
|
||||
createdTimestamp bigint not null,
|
||||
|
||||
originatorType int not null,
|
||||
severity int not null,
|
||||
scopeType int not null,
|
||||
scopeId varchar(255) not null,
|
||||
details varbinary(65535),
|
||||
acknowledged boolean,
|
||||
|
||||
lastModifiedTimestamp bigint not null,
|
||||
|
||||
primary key (customerId, equipmentId, alarmCode, createdTimestamp)
|
||||
|
||||
);
|
||||
|
||||
create index idx_alarm_customerId on alarm (customerId);
|
||||
create index idx_alarm_equipmentId on alarm (equipmentId );
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
insert into alarm (
|
||||
customerId,
|
||||
equipmentId,
|
||||
alarmCode,
|
||||
createdTimestamp,
|
||||
|
||||
originatorType,
|
||||
severity,
|
||||
scopeType,
|
||||
scopeId,
|
||||
|
||||
details,
|
||||
acknowledged,
|
||||
lastModifiedTimestamp
|
||||
) values (
|
||||
1,1,4,1,
|
||||
|
||||
1,1,1, '-1',
|
||||
|
||||
null,
|
||||
false,0
|
||||
);
|
||||
|
||||
1
alarm-models/.gitignore
vendored
Normal file
1
alarm-models/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>status-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>system-event-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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"),
|
||||
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"),
|
||||
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", "Metrics are not received from the equipment"),
|
||||
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;
|
||||
|
||||
@@ -5,14 +5,18 @@ import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.status.models.StatusCode;
|
||||
|
||||
public class AlarmCounts extends BaseJsonModel {
|
||||
|
||||
private static final long serialVersionUID = -8513006445975878351L;
|
||||
|
||||
private int customerId;
|
||||
private Boolean acknowledged;
|
||||
private Map<Long, Map<AlarmCode, AtomicInteger>> countsPerEquipmentIdMap = new HashMap<>();
|
||||
private Map<Long, AtomicInteger> totalCountsPerEquipmentIdMap = new HashMap<>();
|
||||
private Map<AlarmCode, AtomicInteger> totalCountsPerAlarmCodeMap = new HashMap<>();
|
||||
private Map<StatusCode, AtomicInteger> totalCountsBySeverityMap = new HashMap<>();
|
||||
|
||||
public int getCustomerId() {
|
||||
return customerId;
|
||||
@@ -20,20 +24,38 @@ public class AlarmCounts extends BaseJsonModel {
|
||||
public void setCustomerId(int customerId) {
|
||||
this.customerId = customerId;
|
||||
}
|
||||
public Map<Long, Map<AlarmCode, AtomicInteger>> getCountsPerEquipmentIdMap() {
|
||||
public Boolean getAcknowledged() {
|
||||
return acknowledged;
|
||||
}
|
||||
public void setAcknowledged(Boolean acknowledged) {
|
||||
this.acknowledged = acknowledged;
|
||||
}
|
||||
public Map<Long, Map<AlarmCode, AtomicInteger>> getCountsPerEquipmentIdMap() {
|
||||
return countsPerEquipmentIdMap;
|
||||
}
|
||||
public void setCountsPerEquipmentIdMap(Map<Long, Map<AlarmCode, AtomicInteger>> countsPerEquipmentIdMap) {
|
||||
this.countsPerEquipmentIdMap = countsPerEquipmentIdMap;
|
||||
}
|
||||
public Map<Long, AtomicInteger> getTotalCountsPerEquipmentIdMap() {
|
||||
return totalCountsPerEquipmentIdMap;
|
||||
}
|
||||
public void setTotalCountsPerEquipmentIdMap(Map<Long, AtomicInteger> totalCountsPerEquipmentIdMap) {
|
||||
this.totalCountsPerEquipmentIdMap = totalCountsPerEquipmentIdMap;
|
||||
}
|
||||
public Map<AlarmCode, AtomicInteger> getTotalCountsPerAlarmCodeMap() {
|
||||
return totalCountsPerAlarmCodeMap;
|
||||
}
|
||||
public void setTotalCountsPerAlarmCodeMap(Map<AlarmCode, AtomicInteger> totalCountsPerAlarmCodeMap) {
|
||||
this.totalCountsPerAlarmCodeMap = totalCountsPerAlarmCodeMap;
|
||||
}
|
||||
|
||||
public void addToCounter(long equipmentId, AlarmCode alarmCode, int valueToAdd) {
|
||||
public Map<StatusCode, AtomicInteger> getTotalCountsBySeverityMap() {
|
||||
return totalCountsBySeverityMap;
|
||||
}
|
||||
public void setTotalCountsBySeverityMap(Map<StatusCode, AtomicInteger> totalCountsBySeverityMap) {
|
||||
this.totalCountsBySeverityMap = totalCountsBySeverityMap;
|
||||
}
|
||||
|
||||
public void addToCounter(long equipmentId, AlarmCode alarmCode, int valueToAdd) {
|
||||
//update total counts
|
||||
AtomicInteger totalCount = totalCountsPerAlarmCodeMap.get(alarmCode);
|
||||
if (totalCount == null) {
|
||||
@@ -42,7 +64,23 @@ public class AlarmCounts extends BaseJsonModel {
|
||||
}
|
||||
totalCount.addAndGet(valueToAdd);
|
||||
|
||||
//update total counts by severity
|
||||
AtomicInteger totalBySeverityCount = totalCountsBySeverityMap.get(alarmCode.getSeverity());
|
||||
if (totalBySeverityCount == null) {
|
||||
totalBySeverityCount = new AtomicInteger();
|
||||
totalCountsBySeverityMap.put(alarmCode.getSeverity(), totalBySeverityCount);
|
||||
}
|
||||
totalBySeverityCount.addAndGet(valueToAdd);
|
||||
|
||||
if(equipmentId>0) {
|
||||
//update total counts by equipmentId
|
||||
AtomicInteger totalEquipmentIdCount = totalCountsPerEquipmentIdMap.get(equipmentId);
|
||||
if (totalEquipmentIdCount == null) {
|
||||
totalEquipmentIdCount = new AtomicInteger();
|
||||
totalCountsPerEquipmentIdMap.put(equipmentId, totalEquipmentIdCount);
|
||||
}
|
||||
totalEquipmentIdCount.addAndGet(valueToAdd);
|
||||
|
||||
//update per-equipmentId counts only for real equipmentIds
|
||||
Map<AlarmCode, AtomicInteger> perEquipmentMap = countsPerEquipmentIdMap.get(equipmentId);
|
||||
if(perEquipmentMap == null) {
|
||||
@@ -50,6 +88,7 @@ public class AlarmCounts extends BaseJsonModel {
|
||||
countsPerEquipmentIdMap.put(equipmentId, perEquipmentMap);
|
||||
}
|
||||
|
||||
//update counts by equipmentId and alarmCode
|
||||
AtomicInteger perEqCount = perEquipmentMap.get(alarmCode);
|
||||
if(perEqCount == null) {
|
||||
perEqCount = new AtomicInteger();
|
||||
@@ -63,6 +102,14 @@ public class AlarmCounts extends BaseJsonModel {
|
||||
public int getCounter(long equipmentId, AlarmCode alarmCode) {
|
||||
|
||||
if(equipmentId>0) {
|
||||
if (alarmCode == null) {
|
||||
AtomicInteger perEqTotalCount = totalCountsPerEquipmentIdMap.get(equipmentId);
|
||||
if (perEqTotalCount == null) {
|
||||
return 0;
|
||||
}
|
||||
return perEqTotalCount.get();
|
||||
}
|
||||
|
||||
//get from per-equipmentId counts only for real equipmentIds
|
||||
Map<AlarmCode, AtomicInteger> perEquipmentMap = countsPerEquipmentIdMap.get(equipmentId);
|
||||
if(perEquipmentMap == null) {
|
||||
@@ -88,6 +135,12 @@ public class AlarmCounts extends BaseJsonModel {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int getSeverityCounter(StatusCode severity) {
|
||||
AtomicInteger ret = totalCountsBySeverityMap.get(severity);
|
||||
if (ret == null) {
|
||||
return 0;
|
||||
}
|
||||
return ret.get();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,10 +10,29 @@ import com.telecominfraproject.wlan.systemevent.models.EquipmentEventWithPayload
|
||||
public class AlarmAddedEvent extends EquipmentEventWithPayload<Alarm> {
|
||||
private static final long serialVersionUID = 7142208487917559985L;
|
||||
|
||||
/**
|
||||
* Constructor with current event time stamp
|
||||
* @param alarm
|
||||
*/
|
||||
public AlarmAddedEvent(Alarm alarm){
|
||||
super(alarm.getCustomerId(), alarm.getEquipmentId(), alarm.getLastModifiedTimestamp(), alarm);
|
||||
super(alarm.getCustomerId(), alarm.getEquipmentId(), alarm);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor with explicit event time stamp. This constructor is used to
|
||||
* workaround the issue with how the System events are defined in the cassandra
|
||||
* schema: No two events can have the same combination of
|
||||
* customerId+equipmentId+dataType+eventTimestamp, so the application code must
|
||||
* work around this limitation by creating unique event time stamps if 2
|
||||
* alarms are raised at the same time.
|
||||
*
|
||||
* @param alarm
|
||||
* @param eventTimestamp
|
||||
*/
|
||||
public AlarmAddedEvent(Alarm alarm, long eventTimestamp){
|
||||
super(alarm.getCustomerId(), alarm.getEquipmentId(), eventTimestamp, alarm);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used by JSON
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@ public class AlarmChangedEvent extends EquipmentEventWithPayload<Alarm> {
|
||||
private static final long serialVersionUID = 7142209997917559985L;
|
||||
|
||||
public AlarmChangedEvent(Alarm alarm){
|
||||
super(alarm.getCustomerId(), alarm.getEquipmentId(), alarm.getLastModifiedTimestamp(), alarm);
|
||||
super(alarm.getCustomerId(), alarm.getEquipmentId(), alarm);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,7 @@ public class AlarmRemovedEvent extends EquipmentEventWithPayload<Alarm> {
|
||||
private static final long serialVersionUID = 7142208488887559985L;
|
||||
|
||||
public AlarmRemovedEvent(Alarm alarm){
|
||||
super(alarm.getCustomerId(), alarm.getEquipmentId(), System.currentTimeMillis(), alarm);
|
||||
super(alarm.getCustomerId(), alarm.getEquipmentId(), alarm);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
1
alarm-service-interface/.gitignore
vendored
Normal file
1
alarm-service-interface/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.telecominfraproject.wlan.alarm;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.json.GenericResponse;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.ColumnAndSort;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
@@ -104,21 +103,26 @@ 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
|
||||
* @param equipmentIdSet - if empty, then only total counts of all alarms for customer per alarm code will be counted
|
||||
* @param alarmCodeSet - can be empty, in which case all alarm codes will be counted
|
||||
* @param acknowledged - can be empty, in which case acknowledged would be ignored
|
||||
* @return alarm counts for the given filters
|
||||
*/
|
||||
AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet);
|
||||
AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet, Boolean acknowledged);
|
||||
|
||||
/**
|
||||
* In some datastores (i.e. Cassandra) it makes sense to store counts of alarms in a separate table for fast retrieval by UI.
|
||||
* Unfortunately, there are some situations where those counters get out of sync with the real alarm counts.
|
||||
* This method is here to re-calculate the counter values and bring them in-sync with the real alarms.
|
||||
* Retrieves a list of Alarms for the given alarm codes.
|
||||
*
|
||||
* @param alarmCodeSet - null or empty means include all alarm codes
|
||||
* @param createdAfterTimestamp
|
||||
* @return list of matching Alarm objects.
|
||||
* @throws IllegalArgumentException if supplied alarmCodeSet is null or empty
|
||||
*/
|
||||
GenericResponse resetAlarmCounters() ;
|
||||
List<Alarm> get(Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp);
|
||||
|
||||
|
||||
}
|
||||
|
||||
1
alarm-service-local/.gitignore
vendored
Normal file
1
alarm-service-local/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -8,7 +8,6 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.json.GenericResponse;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.ColumnAndSort;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
@@ -48,6 +47,10 @@ public class AlarmServiceLocal implements AlarmServiceInterface {
|
||||
return alarmController.getAllForEquipment(customerId, equipmentIdSet, alarmCodeSet, createdAfterTimestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Alarm> get(Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp) {
|
||||
return alarmController.getAllForAlarmCode(alarmCodeSet, createdAfterTimestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Alarm update(Alarm alarm) {
|
||||
@@ -69,20 +72,16 @@ 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
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet) {
|
||||
return alarmController.getAlarmCounts(customerId, equipmentIdSet, alarmCodeSet);
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet, Boolean acknowledged) {
|
||||
return alarmController.getAlarmCounts(customerId, equipmentIdSet, alarmCodeSet, acknowledged);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenericResponse resetAlarmCounters() {
|
||||
return alarmController.resetAlarmCounters();
|
||||
}
|
||||
}
|
||||
|
||||
1
alarm-service-remote/.gitignore
vendored
Normal file
1
alarm-service-remote/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,43 +15,54 @@
|
||||
<dependency>
|
||||
<artifactId>alarm-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>base-client</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.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.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.telecominfraproject.wlan.alarm.models.AlarmCode;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCounts;
|
||||
import com.telecominfraproject.wlan.core.client.BaseRemoteClient;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.core.model.json.GenericResponse;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.ColumnAndSort;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
|
||||
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
|
||||
@@ -62,22 +61,6 @@ public class AlarmServiceRemote extends BaseRemoteClient implements AlarmService
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenericResponse resetAlarmCounters() {
|
||||
|
||||
LOG.debug("calling resetAlarmCounters ");
|
||||
|
||||
ResponseEntity<GenericResponse> responseEntity = restTemplate.postForEntity(
|
||||
getBaseUrl() + "/resetCounts",
|
||||
null, GenericResponse.class);
|
||||
|
||||
GenericResponse ret = responseEntity.getBody();
|
||||
|
||||
LOG.debug("completed resetAlarmCounters {} ", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Alarm getOrNull(int customerId, long equipmentId, AlarmCode alarmCode, long createdTimestamp) {
|
||||
|
||||
@@ -137,9 +120,9 @@ public class AlarmServiceRemote extends BaseRemoteClient implements AlarmService
|
||||
}
|
||||
|
||||
@Override
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet) {
|
||||
public AlarmCounts getAlarmCounts(int customerId, Set<Long> equipmentIdSet, Set<AlarmCode> alarmCodeSet, Boolean acknowledged) {
|
||||
|
||||
LOG.debug("getAlarmCounts({}, {}, {})", customerId, equipmentIdSet, alarmCodeSet);
|
||||
LOG.debug("getAlarmCounts({}, {}, {}, {})", customerId, equipmentIdSet, alarmCodeSet, acknowledged);
|
||||
|
||||
String equipmentIdSetStr = null;
|
||||
if (equipmentIdSet != null && !equipmentIdSet.isEmpty()) {
|
||||
@@ -158,8 +141,8 @@ public class AlarmServiceRemote extends BaseRemoteClient implements AlarmService
|
||||
}
|
||||
|
||||
ResponseEntity<AlarmCounts> responseEntity = restTemplate.exchange(
|
||||
getBaseUrl() + "/counts?customerId={customerId}&equipmentIdSet={equipmentIdSetStr}&alarmCodeSet={alarmCodeSetStr}", HttpMethod.GET,
|
||||
null, AlarmCounts.class, customerId, equipmentIdSetStr, alarmCodeSetStr);
|
||||
getBaseUrl() + "/counts?customerId={customerId}&equipmentIdSet={equipmentIdSetStr}&alarmCodeSet={alarmCodeSetStr}&acknowledged={acknowledged}", HttpMethod.GET,
|
||||
null, AlarmCounts.class, customerId, equipmentIdSetStr, alarmCodeSetStr, acknowledged);
|
||||
|
||||
AlarmCounts ret = responseEntity.getBody();
|
||||
LOG.debug("completed getAlarmCounts {} ", ret);
|
||||
@@ -170,10 +153,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 +176,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());
|
||||
@@ -258,14 +241,45 @@ public class AlarmServiceRemote extends BaseRemoteClient implements AlarmService
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Alarm> get(Set<AlarmCode> alarmCodeSet, long createdAfterTimestamp) {
|
||||
LOG.debug("get({},{})", alarmCodeSet, createdAfterTimestamp);
|
||||
|
||||
if (alarmCodeSet == null || alarmCodeSet.isEmpty()) {
|
||||
throw new IllegalArgumentException("alarmCodeSet must be provided");
|
||||
}
|
||||
|
||||
String alarmCodeSetStr = alarmCodeSet.toString();
|
||||
// remove [] around the string, otherwise will get:
|
||||
// Failed to convert value of type 'java.lang.String' to required
|
||||
// type 'java.util.Set'; nested exception is
|
||||
// java.lang.NumberFormatException: For input string: "[690]"
|
||||
alarmCodeSetStr = alarmCodeSetStr.substring(1, alarmCodeSetStr.length() - 1);
|
||||
|
||||
try {
|
||||
ResponseEntity<List<Alarm>> responseEntity =
|
||||
restTemplate.exchange(getBaseUrl() + "/forAlarmCode?alarmCode={alarmCodeSetStr}&createdAfterTimestamp={createdAfterTimestamp}",
|
||||
HttpMethod.GET, null, Alarm_LIST_CLASS_TOKEN, alarmCodeSetStr, createdAfterTimestamp);
|
||||
|
||||
List<Alarm> result = responseEntity.getBody();
|
||||
if (null == result) {
|
||||
result = Collections.emptyList();
|
||||
}
|
||||
LOG.debug("get({},{}) return {} entries", alarmCodeSet, createdAfterTimestamp, result.size());
|
||||
return result;
|
||||
} catch (Exception exp) {
|
||||
LOG.error("getAllInSet({},{}) exception ", alarmCodeSet, createdAfterTimestamp, exp);
|
||||
throw exp;
|
||||
}
|
||||
}
|
||||
|
||||
public String getBaseUrl() {
|
||||
if(baseUrl==null) {
|
||||
baseUrl = environment.getProperty("tip.wlan.alarmServiceBaseUrl").trim()+"/api/alarm";
|
||||
}
|
||||
|
||||
return baseUrl;
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@@ -26,13 +27,19 @@ 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.cloudeventdispatcher.CloudEventDispatcherEmpty;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.EquipmentType;
|
||||
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.datastore.exceptions.DsConcurrentModificationException;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsEntityNotFoundException;
|
||||
import com.telecominfraproject.wlan.equipment.EquipmentServiceLocal;
|
||||
import com.telecominfraproject.wlan.equipment.datastore.inmemory.EquipmentDatastoreInMemory;
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.remote.tests.BaseRemoteTest;
|
||||
import com.telecominfraproject.wlan.status.models.StatusCode;
|
||||
|
||||
/**
|
||||
* @author dtoptygin
|
||||
@@ -43,10 +50,16 @@ import com.telecominfraproject.wlan.remote.tests.BaseRemoteTest;
|
||||
"integration_test",
|
||||
"no_ssl","http_digest_auth","rest-template-single-user-per-service-digest-auth",
|
||||
}) //NOTE: these profiles will be ADDED to the list of active profiles
|
||||
@Import(value = {
|
||||
EquipmentServiceLocal.class,
|
||||
EquipmentDatastoreInMemory.class,
|
||||
CloudEventDispatcherEmpty.class
|
||||
})
|
||||
public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
|
||||
|
||||
@Autowired AlarmServiceRemote remoteInterface;
|
||||
@Autowired EquipmentServiceLocal equipmentServicelocal;
|
||||
|
||||
@Before public void urlSetup(){
|
||||
configureBaseUrl("tip.wlan.alarmServiceBaseUrl");
|
||||
@@ -232,6 +245,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 +270,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 +309,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 +411,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 +422,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 +434,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,18 +458,69 @@ 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
|
||||
public void testAlarmCountsRetrieval() {
|
||||
//create some Alarms
|
||||
Alarm mdl;
|
||||
int customerId_1 = getNextCustomerId();
|
||||
int customerId_2 = getNextCustomerId();
|
||||
final int customerId_1 = getNextCustomerId();
|
||||
final int customerId_2 = getNextCustomerId();
|
||||
final long equipmentId_1 = createEquipmentObject(customerId_1).getId();
|
||||
|
||||
|
||||
int apNameIdx = 0;
|
||||
Set<Long> equipmentIds = new HashSet<>();
|
||||
@@ -369,11 +528,12 @@ public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
Set<Long> equipmentIds_AccessPointIsUnreachable = new HashSet<>();
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_1);
|
||||
mdl = createAlarmObject(customerId_1, createEquipmentObject(customerId_1).getId());
|
||||
mdl.setEquipmentId(createEquipmentObject(customerId_1).getId());
|
||||
mdl.setScopeId("qr_"+apNameIdx);
|
||||
if((i%2) == 0) {
|
||||
mdl.setAlarmCode(AlarmCode.CPUUtilization);
|
||||
mdl.setAcknowledged(true);
|
||||
equipmentIds_CPUUtilization.add(mdl.getEquipmentId());
|
||||
} else {
|
||||
equipmentIds_AccessPointIsUnreachable.add(mdl.getEquipmentId());
|
||||
@@ -384,70 +544,152 @@ public class AlarmServiceRemoteTest extends BaseRemoteTest {
|
||||
remoteInterface.create(mdl);
|
||||
}
|
||||
|
||||
{
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_1);
|
||||
mdl.setEquipmentId(0);
|
||||
mdl.setAlarmCode(AlarmCode.GenericError);
|
||||
|
||||
remoteInterface.create(mdl);
|
||||
}
|
||||
mdl = createAlarmObject(customerId_1, equipmentId_1);
|
||||
mdl.setCustomerId(customerId_1);
|
||||
mdl.setAlarmCode(AlarmCode.GenericError);
|
||||
|
||||
remoteInterface.create(mdl);
|
||||
|
||||
for(int i = 0; i< 50; i++){
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId_2);
|
||||
mdl.setScopeId("qr_"+apNameIdx);
|
||||
mdl = createAlarmObject(customerId_2, createEquipmentObject(customerId_2).getId());
|
||||
mdl.setScopeId("qr_"+apNameIdx);
|
||||
mdl.setAcknowledged(false);
|
||||
mdl.setAlarmCode(AlarmCode.GenericError);
|
||||
apNameIdx++;
|
||||
remoteInterface.create(mdl);
|
||||
}
|
||||
|
||||
Set<AlarmCode> alarmCodes = new HashSet<>(Arrays.asList(AlarmCode.AccessPointIsUnreachable, AlarmCode.GenericError, AlarmCode.CPUUtilization));
|
||||
|
||||
AlarmCounts alarmCounts = remoteInterface.getAlarmCounts(customerId_1, equipmentIds, alarmCodes);
|
||||
AlarmCounts alarmCounts = remoteInterface.getAlarmCounts(customerId_1, equipmentIds, alarmCodes, null);
|
||||
assertEquals(0, alarmCounts.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(25, alarmCounts.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(25, alarmCounts.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
|
||||
assertEquals(25, alarmCounts.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(25, alarmCounts.getSeverityCounter(StatusCode.error));
|
||||
equipmentIds_CPUUtilization.forEach(eqId -> assertEquals(1, alarmCounts.getCounter(eqId, AlarmCode.CPUUtilization)));
|
||||
equipmentIds_AccessPointIsUnreachable.forEach(eqId -> assertEquals(1, alarmCounts.getCounter(eqId, AlarmCode.AccessPointIsUnreachable)) );
|
||||
|
||||
AlarmCounts alarmCounts_noEq = remoteInterface.getAlarmCounts(customerId_1, null, alarmCodes);
|
||||
AlarmCounts alarmCounts_noEq = remoteInterface.getAlarmCounts(customerId_1, null, alarmCodes, null);
|
||||
assertEquals(1, alarmCounts_noEq.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(25, alarmCounts_noEq.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(25, alarmCounts_noEq.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(25, alarmCounts_noEq.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(26, alarmCounts_noEq.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_noEq.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(3, alarmCounts_noEq.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_noEq_1code = remoteInterface.getAlarmCounts(customerId_1, null, Collections.singleton(AlarmCode.CPUUtilization));
|
||||
AlarmCounts alarmCounts_noEq_1code = remoteInterface.getAlarmCounts(customerId_1, null, Collections.singleton(AlarmCode.CPUUtilization), null);
|
||||
assertEquals(0, alarmCounts_noEq_1code.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(25, alarmCounts_noEq_1code.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_noEq_1code.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(25, alarmCounts_noEq_1code.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(0, alarmCounts_noEq_1code.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_noEq_1code.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(1, alarmCounts_noEq_1code.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_1Eq_1code = remoteInterface.getAlarmCounts(customerId_1, Collections.singleton(equipmentIds.iterator().next()), Collections.singleton(AlarmCode.CPUUtilization));
|
||||
AlarmCounts alarmCounts_acknowledgedT = remoteInterface.getAlarmCounts(customerId_1, null, Collections.singleton(AlarmCode.CPUUtilization), true);
|
||||
assertTrue(alarmCounts_acknowledgedT.getAcknowledged());
|
||||
assertEquals(0, alarmCounts_acknowledgedT.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(25, alarmCounts_acknowledgedT.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_acknowledgedT.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(25, alarmCounts_acknowledgedT.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(0, alarmCounts_acknowledgedT.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_acknowledgedT.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(1, alarmCounts_acknowledgedT.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_acknowledgedF = remoteInterface.getAlarmCounts(customerId_1, null, Collections.singleton(AlarmCode.CPUUtilization), false);
|
||||
assertFalse(alarmCounts_acknowledgedF.getAcknowledged());
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_acknowledgedF.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(0, alarmCounts_acknowledgedF.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_acknowledgedF2 = remoteInterface.getAlarmCounts(customerId_2, null, Collections.singleton(AlarmCode.GenericError), false);
|
||||
assertFalse(alarmCounts_acknowledgedF2.getAcknowledged());
|
||||
assertEquals(50, alarmCounts_acknowledgedF2.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(0, alarmCounts_acknowledgedF2.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_acknowledgedF2.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(0, alarmCounts_acknowledgedF2.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(50, alarmCounts_acknowledgedF2.getSeverityCounter(StatusCode.error));
|
||||
assertTrue(alarmCounts_acknowledgedF2.getCountsPerEquipmentIdMap().isEmpty());
|
||||
assertEquals(1, alarmCounts_acknowledgedF2.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
AlarmCounts alarmCounts_1Eq_1code = remoteInterface.getAlarmCounts(customerId_1, Collections.singleton(equipmentIds.iterator().next()), Collections.singleton(AlarmCode.CPUUtilization), null);
|
||||
assertEquals(0, alarmCounts_1Eq_1code.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getCounter(equipmentIds.iterator().next(), AlarmCode.CPUUtilization));
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(0, alarmCounts_1Eq_1code.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(0, alarmCounts_1Eq_1code.getSeverityCounter(StatusCode.error));
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getCountsPerEquipmentIdMap().size());
|
||||
assertEquals(1, alarmCounts_1Eq_1code.getTotalCountsPerAlarmCodeMap().size());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlarmCountsForSingleEquipment() {
|
||||
//create some Alarms
|
||||
Alarm mdl;
|
||||
int customerId = getNextCustomerId();
|
||||
long equipmentId = getNextEquipmentId();
|
||||
|
||||
|
||||
mdl = createAlarmObject();
|
||||
mdl.setCustomerId(customerId);
|
||||
mdl.setEquipmentId(equipmentId);
|
||||
mdl.setAlarmCode(AlarmCode.CPUUtilization);
|
||||
remoteInterface.create(mdl);
|
||||
|
||||
mdl.setAlarmCode(AlarmCode.AccessPointIsUnreachable);
|
||||
remoteInterface.create(mdl);
|
||||
|
||||
Set<AlarmCode> alarmCodes = new HashSet<>(Arrays.asList(AlarmCode.AccessPointIsUnreachable, AlarmCode.GenericError, AlarmCode.CPUUtilization));
|
||||
|
||||
AlarmCounts alarmCounts = remoteInterface.getAlarmCounts(customerId, Collections.singleton(equipmentId), alarmCodes, null);
|
||||
assertEquals(0, alarmCounts.getCounter(0, AlarmCode.GenericError));
|
||||
assertEquals(1, alarmCounts.getCounter(0, AlarmCode.CPUUtilization));
|
||||
assertEquals(1, alarmCounts.getCounter(0, AlarmCode.AccessPointIsUnreachable));
|
||||
assertEquals(2, alarmCounts.getCounter(equipmentId, null));
|
||||
assertEquals(1, alarmCounts.getSeverityCounter(StatusCode.requiresAttention));
|
||||
assertEquals(1, alarmCounts.getSeverityCounter(StatusCode.error));
|
||||
|
||||
//clean up after the test
|
||||
remoteInterface.delete(customerId, equipmentId);
|
||||
|
||||
}
|
||||
|
||||
private Alarm createAlarmObject() {
|
||||
Alarm result = new Alarm();
|
||||
result.setCustomerId(getNextCustomerId());
|
||||
result.setEquipmentId(getNextEquipmentId());
|
||||
int customerId = getNextCustomerId();
|
||||
return createAlarmObject(customerId, createEquipmentObject(customerId).getId());
|
||||
}
|
||||
|
||||
private Alarm createAlarmObject(int customerId, long equipmentId) {
|
||||
Alarm result = new Alarm();
|
||||
result.setCustomerId(customerId);
|
||||
result.setAlarmCode(AlarmCode.AccessPointIsUnreachable);
|
||||
result.setCreatedTimestamp(System.currentTimeMillis());
|
||||
result.setEquipmentId(equipmentId);
|
||||
|
||||
result.setScopeId("test-scope-" + result.getEquipmentId());
|
||||
|
||||
AlarmDetails details = new AlarmDetails();
|
||||
details.setMessage("test-details-" + result.getEquipmentId());
|
||||
result.setDetails(details );
|
||||
result.setDetails(details );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private Equipment createEquipmentObject(int customerId)
|
||||
{
|
||||
Equipment equipment = new Equipment();
|
||||
equipment.setName("testName");
|
||||
equipment.setInventoryId("test-inv");
|
||||
equipment.setEquipmentType(EquipmentType.AP);
|
||||
equipment.setCustomerId(customerId);
|
||||
return equipmentServicelocal.create(equipment);
|
||||
}
|
||||
}
|
||||
|
||||
1
alarm-service/.gitignore
vendored
Normal file
1
alarm-service/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -1,53 +1,68 @@
|
||||
<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>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<name>alarm-service</name>
|
||||
<description>Server side implementation of the service.</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>base-container</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<name>alarm-service</name>
|
||||
<description>Server side implementation of the service.</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>base-container</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<dependency>
|
||||
<artifactId>alarm-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-interface</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>alarm-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-datastore-inmemory</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>cloud-event-dispatcher-empty</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -16,11 +16,11 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.telecominfraproject.wlan.cloudeventdispatcher.CloudEventDispatcherInterface;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.core.model.json.GenericResponse;
|
||||
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.datastore.exceptions.DsDataValidationException;
|
||||
import com.telecominfraproject.wlan.equipment.EquipmentServiceInterface;
|
||||
import com.telecominfraproject.wlan.systemevent.models.SystemEvent;
|
||||
|
||||
import com.telecominfraproject.wlan.alarm.datastore.AlarmDatastore;
|
||||
@@ -49,6 +49,7 @@ public class AlarmController {
|
||||
|
||||
@Autowired private AlarmDatastore alarmDatastore;
|
||||
@Autowired private CloudEventDispatcherInterface cloudEventDispatcher;
|
||||
@Autowired private EquipmentServiceInterface equipmentServiceInterface;
|
||||
|
||||
|
||||
/**
|
||||
@@ -67,9 +68,18 @@ public class AlarmController {
|
||||
LOG.error("Failed to create Alarm, request contains unsupported value: {}", alarm);
|
||||
throw new DsDataValidationException("Alarm contains unsupported value");
|
||||
}
|
||||
|
||||
if (alarm.getEquipmentId() != 0)
|
||||
{
|
||||
if (equipmentServiceInterface.getOrNull(alarm.getEquipmentId()) == null)
|
||||
{
|
||||
throw new DsDataValidationException(String.format("Unable to create alarm for non-existant equipment ID: %d", alarm.getEquipmentId()));
|
||||
}
|
||||
}
|
||||
|
||||
long ts = System.currentTimeMillis();
|
||||
if (alarm.getCreatedTimestamp() == 0) {
|
||||
long ts = alarm.getCreatedTimestamp();
|
||||
if (ts == 0) {
|
||||
ts = System.currentTimeMillis();
|
||||
alarm.setCreatedTimestamp(ts);
|
||||
}
|
||||
alarm.setLastModifiedTimestamp(ts);
|
||||
@@ -78,10 +88,9 @@ public class AlarmController {
|
||||
|
||||
LOG.debug("Created Alarm {}", ret);
|
||||
|
||||
AlarmAddedEvent event = new AlarmAddedEvent(ret);
|
||||
AlarmAddedEvent event = new AlarmAddedEvent(ret, ts);
|
||||
publishEvent(event);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -120,13 +129,32 @@ public class AlarmController {
|
||||
throw exp;
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/forAlarmCode", method = RequestMethod.GET)
|
||||
public ListOfAlarms getAllForAlarmCode(
|
||||
@RequestParam Set<AlarmCode> alarmCode,
|
||||
@RequestParam long createdAfterTimestamp) {
|
||||
LOG.debug("getAllForAlarmCode({}, {})", alarmCode, createdAfterTimestamp);
|
||||
try {
|
||||
List<Alarm> result = alarmDatastore.get(alarmCode, createdAfterTimestamp);
|
||||
LOG.debug("getAllForAlarmCode({},{}) return {} entries", alarmCode, createdAfterTimestamp, result.size());
|
||||
ListOfAlarms ret = new ListOfAlarms();
|
||||
ret.addAll(result);
|
||||
return ret;
|
||||
} catch (Exception exp) {
|
||||
LOG.error("getAllForAlarmCode({},{}) exception ", alarmCode, createdAfterTimestamp, exp);
|
||||
throw exp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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 +176,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());
|
||||
|
||||
@@ -233,22 +261,17 @@ public class AlarmController {
|
||||
@RequestMapping(value = "/counts", method = RequestMethod.GET)
|
||||
public AlarmCounts getAlarmCounts(@RequestParam int customerId,
|
||||
@RequestParam Set<Long> equipmentIdSet,
|
||||
@RequestParam Set<AlarmCode> alarmCodeSet) {
|
||||
@RequestParam Set<AlarmCode> alarmCodeSet,
|
||||
@RequestParam Boolean acknowledged) {
|
||||
|
||||
LOG.debug("Getting Alarm counts for {} {} {}", customerId, equipmentIdSet, alarmCodeSet);
|
||||
LOG.debug("Getting Alarm counts for {} {} {} {}", customerId, equipmentIdSet, alarmCodeSet, acknowledged);
|
||||
|
||||
AlarmCounts ret = alarmDatastore.getAlarmCounts(customerId, equipmentIdSet, alarmCodeSet);
|
||||
AlarmCounts ret = alarmDatastore.getAlarmCounts(customerId, equipmentIdSet, alarmCodeSet, acknowledged);
|
||||
|
||||
LOG.debug("Alarm counts: {}", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/resetCounts", method = RequestMethod.POST)
|
||||
public GenericResponse resetAlarmCounters() {
|
||||
alarmDatastore.resetAlarmCounters();
|
||||
return new GenericResponse(true, "");
|
||||
}
|
||||
|
||||
private void publishEvent(SystemEvent event) {
|
||||
if (event == null) {
|
||||
return;
|
||||
|
||||
@@ -262,11 +262,17 @@ components:
|
||||
customerId:
|
||||
type: integer
|
||||
format: int32
|
||||
acknowledged:
|
||||
type: boolean
|
||||
countsPerEquipmentIdMap:
|
||||
$ref: '#/components/schemas/CountsPerEquipmentIdPerAlarmCodeMap'
|
||||
totalCountsPerAlarmCodeMap:
|
||||
$ref: '#/components/schemas/CountsPerAlarmCodeMap'
|
||||
|
||||
totalCountsPerEquipmentIdMap:
|
||||
$ref: '#/components/schemas/CountsPerEquipmentIdMap'
|
||||
totalCountsBySeverityMap:
|
||||
$ref: '#/components/schemas/CountsBySeverityMap'
|
||||
|
||||
CountsPerAlarmCodeMap:
|
||||
description: map of AlarmCode to the integer count of alarms
|
||||
type: object
|
||||
@@ -279,6 +285,20 @@ components:
|
||||
type: object
|
||||
additionalProperties:
|
||||
$ref: '#/components/schemas/CountsPerAlarmCodeMap'
|
||||
|
||||
CountsPerEquipmentIdMap:
|
||||
description: map of equipmentId to integer count of alarms
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: integer
|
||||
format: int32
|
||||
|
||||
CountsBySeverityMap:
|
||||
description: map of severity to integer count of alarms
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: integer
|
||||
format: int32
|
||||
|
||||
#
|
||||
# Other related objects
|
||||
@@ -534,7 +554,7 @@ paths:
|
||||
- name: equipmentIdSet
|
||||
in: query
|
||||
description: Equipment ID Set
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
@@ -543,7 +563,7 @@ paths:
|
||||
- name: alarmCodeSet
|
||||
in: query
|
||||
description: Alarm Code Set
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
@@ -551,14 +571,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:
|
||||
@@ -623,6 +649,12 @@ paths:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/AlarmCode'
|
||||
- name: acknowledged
|
||||
in: query
|
||||
description: Acknowledged flag
|
||||
required: true
|
||||
schema:
|
||||
type: boolean
|
||||
responses:
|
||||
200:
|
||||
description: successful operation
|
||||
|
||||
@@ -17,7 +17,11 @@ import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.telecominfraproject.wlan.cloudeventdispatcher.CloudEventDispatcherEmpty;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.EquipmentType;
|
||||
import com.telecominfraproject.wlan.equipment.EquipmentServiceLocal;
|
||||
import com.telecominfraproject.wlan.equipment.controller.EquipmentController;
|
||||
import com.telecominfraproject.wlan.equipment.datastore.inmemory.EquipmentDatastoreInMemory;
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.alarm.datastore.inmemory.AlarmDatastoreInMemory;
|
||||
import com.telecominfraproject.wlan.alarm.models.Alarm;
|
||||
import com.telecominfraproject.wlan.alarm.models.AlarmCode;
|
||||
@@ -39,10 +43,14 @@ import com.telecominfraproject.wlan.alarm.models.AlarmDetails;
|
||||
CloudEventDispatcherEmpty.class,
|
||||
AlarmDatastoreInMemory.class,
|
||||
AlarmControllerTest.Config.class,
|
||||
EquipmentServiceLocal.class,
|
||||
EquipmentController.class,
|
||||
EquipmentDatastoreInMemory.class
|
||||
})
|
||||
public class AlarmControllerTest {
|
||||
|
||||
@Autowired private AlarmController alarmController;
|
||||
@Autowired EquipmentServiceLocal equipmentServicelocal;
|
||||
|
||||
|
||||
@Configuration
|
||||
@@ -59,8 +67,9 @@ public class AlarmControllerTest {
|
||||
|
||||
//Create new Alarm - success
|
||||
Alarm alarm = new Alarm();
|
||||
alarm.setCustomerId((int) testSequence.getAndIncrement());
|
||||
alarm.setEquipmentId(testSequence.getAndIncrement());
|
||||
int customerId = (int) testSequence.getAndIncrement();
|
||||
alarm.setCustomerId(customerId);
|
||||
alarm.setEquipmentId(createEquipmentObject(customerId).getId());
|
||||
alarm.setAlarmCode(AlarmCode.AccessPointIsUnreachable);
|
||||
alarm.setCreatedTimestamp(System.currentTimeMillis());
|
||||
|
||||
@@ -91,5 +100,14 @@ public class AlarmControllerTest {
|
||||
assertEquals(expected.getDetails(), actual.getDetails());
|
||||
//TODO: add more fields to check here
|
||||
}
|
||||
|
||||
|
||||
private Equipment createEquipmentObject(int customerId)
|
||||
{
|
||||
Equipment equipment = new Equipment();
|
||||
equipment.setName("testName");
|
||||
equipment.setInventoryId("test-inv");
|
||||
equipment.setEquipmentType(EquipmentType.AP);
|
||||
equipment.setCustomerId(customerId);
|
||||
return equipmentServicelocal.create(equipment);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.3.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.3.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": []
|
||||
}
|
||||
]
|
||||
@@ -57,6 +57,9 @@ OVSDB_DEVICE_RADIO_1="${OVSDB_DEVICE_RADIO_1:=radio1}"
|
||||
echo $OVSDB_DEVICE_RADIO_1
|
||||
OVSDB_DEVICE_RADIO_2="${OVSDB_DEVICE_RADIO_2:=radio2}"
|
||||
echo $OVSDB_DEVICE_RADIO_2
|
||||
OVSDB_OFF_CHANNEL_REPORTING_INTERVAL_SECONDS="${OVSDB_OFF_CHANNEL_REPORTING_INTERVAL_SECONDS:=120}"
|
||||
OVSDB_REPORTING_INTERVAL_SECONDS="${OVSDB_REPORTING_INTERVAL_SECONDS:=60}"
|
||||
|
||||
|
||||
echo Reading AP configuration from $OVSDB_CONFIG_FILE
|
||||
|
||||
@@ -150,6 +153,8 @@ OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-iface.default_radio2=$OVSDB_IF_D
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-device.radio0=$OVSDB_DEVICE_RADIO_0"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-device.radio1=$OVSDB_DEVICE_RADIO_1"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.wifi-device.radio2=$OVSDB_DEVICE_RADIO_2"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.defaultOffChannelReportingIntervalSeconds=$OVSDB_OFF_CHANNEL_REPORTING_INTERVAL_SECONDS"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.defaultReportingIntervalSeconds=$OVSDB_REPORTING_INTERVAL_SECONDS"
|
||||
|
||||
echo OVSDB_PROPS $OVSDB_PROPS
|
||||
|
||||
@@ -171,7 +176,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": []
|
||||
}
|
||||
]
|
||||
@@ -39,6 +39,8 @@ OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-iface.default_radio2=$OVSDB_IF_DEFAULT_RADI
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-device.radio0=$OVSDB_DEVICE_RADIO_0"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-device.radio1=$OVSDB_DEVICE_RADIO_1"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.wifi-device.radio2=$OVSDB_DEVICE_RADIO_2"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.defaultOffChannelReportingIntervalSeconds=$OVSDB_OFF_CHANNEL_REPORTING_INTERVAL_SECONDS"
|
||||
OVSDB_PROPS+=" -Dtip.wlan.defaultReportingIntervalSeconds=$OVSDB_REPORTING_INTERVAL_SECONDS"
|
||||
|
||||
echo OVSDB_PROPS $OVSDB_PROPS
|
||||
|
||||
@@ -59,6 +61,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
|
||||
1
all-cloud-and-opensync-gw-in-one-process/.gitignore
vendored
Normal file
1
all-cloud-and-opensync-gw-in-one-process/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -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.3.0-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -21,350 +21,344 @@
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>opensync-ext-cloud</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-services</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>customer-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>firmware-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>manufacturer-service-local</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>filestore-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>location-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>profile-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>portal-user-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>firmware-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>manufacturer-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>service-metric-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>system-event-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>alarm-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>status-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>client-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>routing-service</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>provisioning-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>dashboard-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>equipment-alarms-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<artifactId>adoption-metrics-sp</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
<version>1.3.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.3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.telecominfraproject.wlan.client.models.Client;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientDhcpDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionMetricDetails;
|
||||
import com.telecominfraproject.wlan.core.model.entity.CountryCode;
|
||||
import com.telecominfraproject.wlan.core.model.entity.MinMaxAvgValueInt;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.EquipmentType;
|
||||
@@ -46,6 +45,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 +65,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 +85,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 +106,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 +231,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 +282,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 +290,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 +312,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 +325,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 +668,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));
|
||||
|
||||
@@ -782,10 +810,10 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
sessionDetails.setRadioType(radioType);
|
||||
sessionDetails.setSecurityType(SecurityType.PSK);
|
||||
sessionDetails.setSsid(ssidConfig.getSsid());
|
||||
sessionDetails.setSessionId(System.currentTimeMillis());
|
||||
sessionDetails.setSessionId(Long.toUnsignedString(System.currentTimeMillis()));
|
||||
sessionDetails.setAssocTimestamp(System.currentTimeMillis() - getRandomLong(10000, 1000000));
|
||||
|
||||
ClientDhcpDetails dhcpDetails = new ClientDhcpDetails(System.currentTimeMillis());
|
||||
ClientDhcpDetails dhcpDetails = new ClientDhcpDetails(Long.toUnsignedString(System.currentTimeMillis()));
|
||||
dhcpDetails.setLeaseStartTimestamp(System.currentTimeMillis() - getRandomLong(0, TimeUnit.HOURS.toMillis(4)));
|
||||
dhcpDetails.setLeaseTimeInSeconds((int)TimeUnit.HOURS.toSeconds(4));
|
||||
try {
|
||||
@@ -800,16 +828,6 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
|
||||
sessionDetails.setDhcpDetails(dhcpDetails );
|
||||
|
||||
ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails();
|
||||
metricDetails.setRssi(getRandomInt(-60, -40));
|
||||
metricDetails.setRxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setTxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setRxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setTxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setSnr(getRandomInt(-90, -50));
|
||||
|
||||
sessionDetails.setMetricDetails(metricDetails);
|
||||
|
||||
clientSession.setDetails(sessionDetails);
|
||||
|
||||
this.clientServiceInterface.updateSession(clientSession);
|
||||
@@ -922,6 +940,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.3.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.3.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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user