mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-03-20 21:39:21 +00:00
Compare commits
1 Commits
release/v1
...
WIFI-7580-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98760bbfda |
@@ -48,16 +48,16 @@ public class AlarmCode implements EnumWithId {
|
||||
private static final Map<Integer, AlarmCode> ELEMENTS = new ConcurrentHashMap<>();
|
||||
private static final Map<String, AlarmCode> ELEMENTS_BY_NAME = new ConcurrentHashMap<>();
|
||||
private static final Map<Integer, AlarmCode> VALID_VALUES = new ConcurrentHashMap<>();
|
||||
private static final Map<Integer, AlarmCode> USER_VISIBLE_VALUES = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
public static final AlarmCode
|
||||
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", true),
|
||||
NoiseFloor2G = new AlarmCode(7, "NoiseFloor2G", "Noise floor is too high on 2G radio", StatusCode.requiresAttention, "Investigate interference sources", true),
|
||||
ChannelUtilization2G = new AlarmCode(8, "ChannelUtilization2G", "Channel utilization is too high on 2G radio", StatusCode.requiresAttention, "Consider adding more APs", true),
|
||||
NoiseFloor5G = new AlarmCode(9, "NoiseFloor5G", "Noise floor is too high on 5G radio", StatusCode.requiresAttention, "Investigate interference sources", true),
|
||||
ChannelUtilization5G = new AlarmCode(10, "ChannelUtilization5G", "Channel utilization is too high on 5G radio", StatusCode.requiresAttention, "Consider adding more APs", true),
|
||||
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"),
|
||||
@@ -66,10 +66,10 @@ public class AlarmCode implements EnumWithId {
|
||||
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", true),
|
||||
MemoryUtilization = new AlarmCode(20, "MemoryUtilization", "Memory utilization is too high", StatusCode.requiresAttention, "Contact Tech Suport", true),
|
||||
Disconnected = new AlarmCode(22, "Disconnected", "Equipment is not connected to the cloud", StatusCode.error, "Service AP and verify networking path to cloud", true),
|
||||
CPUTemperature = new AlarmCode(23, "CPUTemperature", "CPU Temperature is too high", StatusCode.requiresAttention, "Verify AP location", true),
|
||||
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", StatusCode.error, "Service AP"),
|
||||
HardwareIssueDiagnostic = new AlarmCode(29, "HardwareIssueDiagnostic", "Hardware issue encountered on equipment", StatusCode.error, "Reboot AP and contact tech support for RMA"),
|
||||
@@ -131,29 +131,17 @@ public class AlarmCode implements EnumWithId {
|
||||
private final StatusCode severity;
|
||||
private final String recommendedAction;
|
||||
private final AlarmCategory category;
|
||||
private final boolean propagateFast;
|
||||
private final boolean userVisible;
|
||||
private final boolean propagateFast;
|
||||
|
||||
protected AlarmCode(int id, String name, String description){
|
||||
this(id, name, description, StatusCode.error, "", AlarmCategory.CustomerNetworkAffecting, false, false);
|
||||
}
|
||||
|
||||
protected AlarmCode(int id, String name, String description, boolean userVisible){
|
||||
|
||||
this(id, name, description, StatusCode.error, "", AlarmCategory.CustomerNetworkAffecting, false, userVisible);
|
||||
|
||||
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, false);
|
||||
}
|
||||
|
||||
protected AlarmCode(int id, String name, String description, StatusCode severity, String recommendedAction, boolean userVisible){
|
||||
this(id, name, description, severity, recommendedAction, AlarmCategory.CustomerNetworkAffecting, false, userVisible);
|
||||
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, boolean userVisible){
|
||||
protected AlarmCode(int id, String name, String description, StatusCode severity, String recommendedAction, AlarmCategory category, boolean propagateFast){
|
||||
|
||||
synchronized(lock) {
|
||||
|
||||
@@ -166,7 +154,6 @@ public class AlarmCode implements EnumWithId {
|
||||
this.recommendedAction = recommendedAction;
|
||||
this.category = category;
|
||||
this.propagateFast = propagateFast;
|
||||
this.userVisible = userVisible;
|
||||
|
||||
ELEMENTS_BY_NAME.values().forEach(s -> {
|
||||
if(s.getName().equals(name)) {
|
||||
@@ -192,9 +179,6 @@ public class AlarmCode implements EnumWithId {
|
||||
|
||||
if (!field.isAnnotationPresent(Deprecated.class)) {
|
||||
VALID_VALUES.put(id, this);
|
||||
if (userVisible) {
|
||||
USER_VISIBLE_VALUES.put(id, this);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -248,11 +232,6 @@ public class AlarmCode implements EnumWithId {
|
||||
public boolean isPropagateFast() {
|
||||
return propagateFast;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isUserVisible() {
|
||||
return userVisible;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String name() {
|
||||
@@ -290,10 +269,6 @@ public class AlarmCode implements EnumWithId {
|
||||
public static boolean isUnsupported(AlarmCode value) {
|
||||
return (UNSUPPORTED.equals(value));
|
||||
}
|
||||
|
||||
public static List<AlarmCode> getUserVisibleValues() {
|
||||
return new ArrayList<>(USER_VISIBLE_VALUES.values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.SecurityType;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.SteerType;
|
||||
@@ -33,7 +32,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
private InetAddress ipAddress;
|
||||
private String radiusUsername;
|
||||
private String ssid;
|
||||
private MacAddress bssid;
|
||||
private RadioType radioType;
|
||||
private Long lastEventTimestamp;
|
||||
private String hostname;
|
||||
@@ -412,14 +410,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
public void setFirstFailureDetails(ClientFailureDetails firstFailureDetails) {
|
||||
this.firstFailureDetails = firstFailureDetails;
|
||||
}
|
||||
|
||||
public MacAddress getBssid() {
|
||||
return bssid;
|
||||
}
|
||||
|
||||
public void setBssid(MacAddress bssid) {
|
||||
this.bssid = bssid;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isTerminated() {
|
||||
@@ -536,7 +526,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
lastEventTimestamp, lastFailureDetails, lastRxTimestamp, lastTxTimestamp,
|
||||
portEnabledTimestamp, previousValidSessionId, priorEquipmentId, priorSessionId, radioType,
|
||||
radiusUsername, securityType, sessionId, ssid, steerType, timeoutTimestamp, userAgentStr,
|
||||
associationState, bssid);
|
||||
associationState);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -581,8 +571,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
&& sessionId == other.sessionId && Objects.equals(ssid, other.ssid) && steerType == other.steerType
|
||||
&& Objects.equals(timeoutTimestamp, other.timeoutTimestamp)
|
||||
&& Objects.equals(userAgentStr, other.userAgentStr)
|
||||
&& Objects.equals(associationState, other.associationState)
|
||||
&& Objects.equals(bssid, other.bssid);
|
||||
&& Objects.equals(associationState, other.associationState);
|
||||
|
||||
}
|
||||
|
||||
@@ -735,10 +724,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
if (null != latest.getUserAgentStr()) {
|
||||
this.userAgentStr = latest.getUserAgentStr();
|
||||
}
|
||||
|
||||
if (null != latest.getBssid()) {
|
||||
this.bssid = latest.bssid;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -181,8 +181,6 @@ components:
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
bssid:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
radioType:
|
||||
$ref: '#/components/schemas/RadioType'
|
||||
lastEventTimestamp:
|
||||
|
||||
@@ -391,13 +391,11 @@ public class FirmwareServiceRemote extends BaseRemoteClient implements FirmwareS
|
||||
@Override
|
||||
public CustomerFirmwareTrackSettings updateDefaultCustomerTrackSetting(CustomerFirmwareTrackSettings defaultSettings) {
|
||||
LOG.debug("calling updateDefaultCustomerTrackSetting {} ", defaultSettings);
|
||||
|
||||
HttpEntity<String> request = new HttpEntity<String>( defaultSettings.toString(), headers );
|
||||
|
||||
ResponseEntity<CustomerFirmwareTrackSettings> responseEntity = restTemplate.exchange(
|
||||
getBaseUrl()
|
||||
+"/customerTrack/default", HttpMethod.PUT, request,
|
||||
CustomerFirmwareTrackSettings.class);
|
||||
+"/customerTrack/default", HttpMethod.PUT, null,
|
||||
CustomerFirmwareTrackSettings.class, defaultSettings);
|
||||
|
||||
CustomerFirmwareTrackSettings ret = responseEntity.getBody();
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.telecominfraproject.wlan.datastore.exceptions.DsConcurrentModificatio
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsDuplicateEntityException;
|
||||
import com.telecominfraproject.wlan.datastore.exceptions.DsEntityNotFoundException;
|
||||
import com.telecominfraproject.wlan.firmware.models.CustomerFirmwareTrackRecord;
|
||||
import com.telecominfraproject.wlan.firmware.models.CustomerFirmwareTrackSettings;
|
||||
import com.telecominfraproject.wlan.firmware.models.CustomerFirmwareTrackSettings.TrackFlag;
|
||||
import com.telecominfraproject.wlan.firmware.models.FirmwareTrackAssignmentDetails;
|
||||
import com.telecominfraproject.wlan.firmware.models.FirmwareTrackAssignmentRecord;
|
||||
@@ -277,47 +276,6 @@ public class FirmwareServiceRemoteTest extends BaseRemoteTest {
|
||||
assertNull(res);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateUpdateDefaultCustomerFirmwareTrackSettings() {
|
||||
// test initialization
|
||||
FirmwareTrackRecord ftr = new FirmwareTrackRecord();
|
||||
ftr.setTrackName("DEFAULT");
|
||||
ftr = remoteInterface.createFirmwareTrack(ftr);
|
||||
CustomerFirmwareTrackSettings track1 = remoteInterface.getDefaultCustomerTrackSetting();
|
||||
|
||||
assertEquals(TrackFlag.NEVER, track1.getAutoUpgradeDeprecatedOnBind());
|
||||
assertEquals(TrackFlag.NEVER, track1.getAutoUpgradeUnknownOnBind());
|
||||
assertEquals(TrackFlag.NEVER, track1.getAutoUpgradeDeprecatedDuringMaintenance());
|
||||
assertEquals(TrackFlag.NEVER, track1.getAutoUpgradeUnknownDuringMaintenance());
|
||||
|
||||
// test persistent save
|
||||
CustomerFirmwareTrackRecord defaultCustomerSettings = remoteInterface.getCustomerFirmwareTrackRecord(0);
|
||||
assertEquals(track1, defaultCustomerSettings.getSettings());
|
||||
|
||||
// test update
|
||||
track1.setAutoUpgradeDeprecatedOnBind(TrackFlag.ALWAYS);
|
||||
CustomerFirmwareTrackSettings track2 = remoteInterface.updateDefaultCustomerTrackSetting(track1);
|
||||
|
||||
assertEquals(TrackFlag.ALWAYS, track2.getAutoUpgradeDeprecatedOnBind());
|
||||
assertEquals(TrackFlag.NEVER, track2.getAutoUpgradeUnknownOnBind());
|
||||
assertEquals(TrackFlag.NEVER, track2.getAutoUpgradeDeprecatedDuringMaintenance());
|
||||
assertEquals(TrackFlag.NEVER, track2.getAutoUpgradeUnknownDuringMaintenance());
|
||||
|
||||
defaultCustomerSettings = remoteInterface.getCustomerFirmwareTrackRecord(0);
|
||||
assertEquals(track2, defaultCustomerSettings.getSettings());
|
||||
|
||||
// Delete test
|
||||
remoteInterface.deleteCustomerFirmwareTrackRecord(0);
|
||||
|
||||
// test update initialization
|
||||
CustomerFirmwareTrackSettings track3 = remoteInterface.updateDefaultCustomerTrackSetting(track2);
|
||||
assertEquals(track3, track2);
|
||||
|
||||
// Clean up test
|
||||
remoteInterface.deleteCustomerFirmwareTrackRecord(0);
|
||||
remoteInterface.deleteFirmwareTrackRecord(ftr.getRecordId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateUpdateDeleteFirmwareTrackAssignment() {
|
||||
|
||||
@@ -4398,8 +4398,6 @@ components:
|
||||
type: string
|
||||
ssid:
|
||||
type: string
|
||||
bssid:
|
||||
$ref: '#/components/schemas/MacAddress'
|
||||
radioType:
|
||||
$ref: '#/components/schemas/RadioType'
|
||||
lastEventTimestamp:
|
||||
|
||||
Reference in New Issue
Block a user