Compare commits

...

17 Commits

Author SHA1 Message Date
Lynn Shi
cd60273495 Wifi 4732 EquipmentPortalController resets to defaults channels for equipment country change 2021-10-20 15:28:33 -04:00
norm-traxler
704f5c6047 Merge pull request #24 from Telecominfraproject/WIFI-4415
[WIFI 4415] update LedStatus to pass tests
2021-09-27 16:12:30 -04:00
Thomas-Leung2021
b7d396c6ce [WIFI-4415] remove unnecessary code 2021-09-27 13:25:06 -04:00
Thomas Leung
e8dd8724fb Merged in NETEXP-2959 (pull request #3)
[NETEXP-2959] update LedStatus to pass tests

Approved-by: mike.hansen
2021-09-24 16:53:44 -04:00
norm-traxler
267fb477a3 Merge pull request #19 from Telecominfraproject/WIFI-3224-Remote-client-mediatype
[WIFI-3224] change BaseRemoteClient from json contentType from UTF-8 …
2021-07-23 11:54:14 -04:00
Norm Traxler
04c844c2e2 [WIFI-3224] change BaseRemoteClient from json contentType from UTF-8 to UTF-16 (default) 2021-07-23 11:42:19 -04:00
Mike Hansen
72da490a3b Merge pull request #18 from Telecominfraproject/WIFI-3022
[WIFI-3022] fix for getting 00:00:00:00:00:00 mac address
2021-07-14 14:21:48 -04:00
Thomas-Leung2021
bb9c3ba1eb [WIFI-3022] add null checks convertMacStringToLongValue() 2021-07-14 13:53:49 -04:00
Thomas-Leung2021
7dd594644e [WIFI-3022] fix for getting 00:00:00:00:00:00 mac address 2021-07-13 17:33:46 -04:00
Mike Hansen
4c15a9650b Merge pull request #17 from Telecominfraproject/add-http-client-exception-to-tip-error-handler
add basePackes property back to CommonControllerAdvice. Add HttpClien…
2021-06-15 10:22:20 -04:00
Thomas Currie
5c3bf48780 add basePackes property back to CommonControllerAdvice. Add HttpClientErrorException to ExceptionPropogatingErrorHandler. 2021-06-14 18:16:21 -04:00
Mike Hansen
be09681087 Merge pull request #16 from Telecominfraproject/revert-15-WIFI-2633-Change-scope-of-CommonControllerAdvice
Revert "WIFI-2633  Change scope of CommonControllerAdvice"
2021-06-14 17:08:32 -04:00
Mike Hansen
a7076e523b Revert "WIFI-2633 Change scope of CommonControllerAdvice" 2021-06-14 17:04:37 -04:00
norm-traxler
6232b8db7b Merge pull request #15 from Telecominfraproject/WIFI-2633-Change-scope-of-CommonControllerAdvice
WIFI-2633  Change scope of CommonControllerAdvice
2021-06-14 11:06:46 -04:00
Thomas Currie
2bfab69a3a add 'basePackage' attribute to @ControllerAdvice 2021-06-11 09:59:39 -04:00
Mike Hansen
fef03f4bbe AP: ON_CHANNEL survey report sometimes has no information
Signed-off-by: Mike Hansen <mike.hansen@connectus.ai>
2021-06-02 09:07:24 -04:00
norm-traxler
b6a02439b8 Merge pull request #14 from Telecominfraproject/WIFI-2434
WIFI 2434: Update SDK master to use image tag 1.2.0-SNAPSHOT
2021-05-26 21:04:06 -04:00
7 changed files with 46 additions and 9 deletions

View File

@@ -1,7 +1,5 @@
package com.telecominfraproject.wlan.core.client;
import java.nio.charset.StandardCharsets;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpHeaders;
@@ -22,7 +20,8 @@ public abstract class BaseRemoteClient {
protected HttpHeaders headers = new HttpHeaders();
{
headers.setContentType(new MediaType("application", "json", StandardCharsets.UTF_8));
// Note: APPLICATION_JSON_UTF8 is deprecated
headers.setContentType(MediaType.APPLICATION_JSON);
//Accept-Encoding: gzip,deflate
headers.set("Accept-Encoding", "gzip,deflate");
}

View File

@@ -8,6 +8,7 @@ import org.springframework.core.task.TaskRejectedException;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.HttpServerErrorException;
import org.springframework.web.client.ResponseErrorHandler;
@@ -38,7 +39,7 @@ public class ExceptionPropagatingErrorHandler extends DefaultResponseErrorHandle
public void handleError(ClientHttpResponse response) throws IOException {
try {
super.handleError(response);
} catch (HttpServerErrorException e) {
} catch (HttpServerErrorException | HttpClientErrorException e) {
// look in the response object, and if it contains any of the
// exceptions we recognize - throw that exception instead of the
// HttpServerErrorException

View File

@@ -20,7 +20,7 @@ import com.telecominfraproject.wlan.core.model.json.JsonSerializedException;
/**
* @author dtoptygin
*/
@ControllerAdvice
@ControllerAdvice(basePackages = "com.telecominfraproject")
public class CommonControllerAdvice {
private static final Logger LOG = LoggerFactory.getLogger(CommonControllerAdvice.class);

View File

@@ -0,0 +1,9 @@
package com.telecominfraproject.wlan.core.model.equipment;
public enum LedStatus {
led_on,
led_off,
led_blink,
UNKNOWN;
}

View File

@@ -82,9 +82,10 @@ public class MacAddress extends BaseJsonModel implements Comparable<MacAddress>
}
sb.setLength(sb.length() - 1);
return sb.toString();
}
return sb.toString();
return null;
}
@JsonIgnore
@@ -163,7 +164,7 @@ public class MacAddress extends BaseJsonModel implements Comparable<MacAddress>
private static byte[] stringToByteArray(String str) {
if (str == null)
if (str == null || str.equals(""))
{
return null;
}
@@ -300,7 +301,7 @@ public class MacAddress extends BaseJsonModel implements Comparable<MacAddress>
byte[] bval = stringToByteArray(macStr);
if (bval.length >= 6) {
if (bval != null && bval.length >= 6) {
long mac = 0;
for (var i = 0; i < 6; i++) {
long t = (bval[i] & 0xffL) << ((5 - i) * 8);

View File

@@ -73,5 +73,19 @@ public enum RadioType {
return false;
}
public static String getRadioDisplayString(RadioType radioType) {
// This display format matches UI
switch (radioType) {
case is2dot4GHz:
return "2.4GHz";
case is5GHz:
return "5GHz";
case is5GHzU:
return "5GHz (U)";
case is5GHzL:
return "5GHz (L)";
default:
return radioType.name();
}
}
}

View File

@@ -0,0 +1,13 @@
package com.telecominfraproject.wlan.core.model.json.interfaces;
/**
* Marker interface that tells if current object can provide a timestamp from its source data (i.e. timestamp for stats report used to generate a ServiceMetric)
* @author mikehansen1970
*
*/
public interface HasSourceTimestamp {
/**
* @return the timestamp of the source data for this object (i.e. for the stats that were used for a ServiceMetric)
*/
public long getSourceTimestampMs();
}