mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-03-20 19:39:19 +00:00
Compare commits
11 Commits
change_ses
...
WIFI-3201
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1018bafa0e | ||
|
|
3085c34cde | ||
|
|
35fd038113 | ||
|
|
7c387f1940 | ||
|
|
abb9b59659 | ||
|
|
7f0497754c | ||
|
|
82095510f7 | ||
|
|
0afd414870 | ||
|
|
41add1922b | ||
|
|
90ac57b988 | ||
|
|
0cc90764c6 |
@@ -259,7 +259,7 @@ public class AlarmServiceRemote extends BaseRemoteClient implements AlarmService
|
||||
|
||||
try {
|
||||
ResponseEntity<List<Alarm>> responseEntity =
|
||||
restTemplate.exchange(getBaseUrl() + "/forAlarmCode?alarmCodeSet={alarmCodeSetStr}&createdAfterTimestamp={createdAfterTimestamp}",
|
||||
restTemplate.exchange(getBaseUrl() + "/forAlarmCode?alarmCode={alarmCodeSetStr}&createdAfterTimestamp={createdAfterTimestamp}",
|
||||
HttpMethod.GET, null, Alarm_LIST_CLASS_TOKEN, alarmCodeSetStr, createdAfterTimestamp);
|
||||
|
||||
List<Alarm> result = responseEntity.getBody();
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
private Boolean is11VUsed;
|
||||
private SecurityType securityType;
|
||||
private SteerType steerType;
|
||||
private Long previousValidSessionId;
|
||||
private String previousValidSessionId;
|
||||
private ClientFailureDetails lastFailureDetails;
|
||||
private ClientFailureDetails firstFailureDetails;
|
||||
private Integer associationStatus;
|
||||
@@ -413,11 +413,11 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
this.steerType = steerType;
|
||||
}
|
||||
|
||||
public Long getPreviousValidSessionId() {
|
||||
public String getPreviousValidSessionId() {
|
||||
return previousValidSessionId;
|
||||
}
|
||||
|
||||
public void setPreviousValidSessionId(Long previousValidSessionId) {
|
||||
public void setPreviousValidSessionId(String previousValidSessionId) {
|
||||
this.previousValidSessionId = previousValidSessionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -234,8 +234,7 @@ components:
|
||||
steerType:
|
||||
$ref: '#/components/schemas/SteerType'
|
||||
previousValidSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
lastFailureDetails:
|
||||
$ref: '#/components/schemas/ClientFailureDetails'
|
||||
firstFailureDetails:
|
||||
@@ -250,8 +249,7 @@ components:
|
||||
type: integer
|
||||
format: int32
|
||||
priorSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
priorEquipmentId:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
@@ -1132,8 +1132,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -1151,8 +1150,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -1627,8 +1625,7 @@ components:
|
||||
steerType:
|
||||
$ref: '#/components/schemas/SteerType'
|
||||
previousValidSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
lastFailureDetails:
|
||||
$ref: '#/components/schemas/ClientFailureDetails'
|
||||
firstFailureDetails:
|
||||
@@ -1643,8 +1640,7 @@ components:
|
||||
type: integer
|
||||
format: int32
|
||||
priorSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
priorEquipmentId:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
@@ -83,7 +83,10 @@ public class EquipmentServiceRemoteTest extends BaseRemoteTest {
|
||||
equipment.setName("testName-"+getNextEquipmentId());
|
||||
equipment.setInventoryId("test-inv-"+getNextEquipmentId());
|
||||
equipment.setEquipmentType(EquipmentType.AP);
|
||||
|
||||
equipment.setLocationId(1);
|
||||
equipment.setProfileId(1);
|
||||
equipment.setCustomerId(1);
|
||||
|
||||
Equipment ret = remoteInterface.create(equipment);
|
||||
assertNotNull(ret);
|
||||
|
||||
@@ -631,6 +634,9 @@ public class EquipmentServiceRemoteTest extends BaseRemoteTest {
|
||||
equipment.setName("testName-"+getNextEquipmentId());
|
||||
equipment.setInventoryId("test-inv-"+getNextEquipmentId());
|
||||
equipment.setEquipmentType(EquipmentType.AP);
|
||||
equipment.setCustomerId(1);
|
||||
equipment.setLocationId(1);
|
||||
equipment.setProfileId(1);
|
||||
equipment.setDetails(ApElementConfiguration.createWithDefaults());
|
||||
|
||||
ElementRadioConfiguration element2dot4RadioConfig = ((ApElementConfiguration)equipment.getDetails()).getRadioMap().get(RadioType.is2dot4GHz);
|
||||
|
||||
@@ -258,7 +258,10 @@ public class EquipmentController {
|
||||
|
||||
LOG.debug("Updating Equipment {}", equipment);
|
||||
|
||||
if (BaseJsonModel.hasUnsupportedValue(equipment)) {
|
||||
if (BaseJsonModel.hasUnsupportedValue(equipment)
|
||||
|| equipment.getCustomerId() == 0
|
||||
|| equipment.getLocationId() == 0
|
||||
|| equipment.getProfileId() == 0) {
|
||||
LOG.error("Failed to update Equipment, request contains unsupported value: {}", equipment);
|
||||
throw new DsDataValidationException("Equipment contains unsupported value");
|
||||
}
|
||||
@@ -280,14 +283,15 @@ public class EquipmentController {
|
||||
LOG.debug("Updated Equipment {}", ret);
|
||||
|
||||
EquipmentChangedEvent event;
|
||||
if ((equipment.getProfileId() != existingEquipment.getProfileId()) || (existingApElementConfig != null && updatedApElementConfig != null &&
|
||||
if (ret.getCustomerId() != existingEquipment.getCustomerId()) {
|
||||
publishEvent(new EquipmentCustomerChangedEvent(existingEquipment, ret));
|
||||
}
|
||||
if ((ret.getProfileId() != existingEquipment.getProfileId()) || (existingApElementConfig != null && updatedApElementConfig != null &&
|
||||
updatedApElementConfig.needsToBeUpdatedOnDevice(existingApElementConfig))) {
|
||||
event = new EquipmentApImpactingChangedEvent(ret);
|
||||
} else if (existingApElementConfig != null && existingApElementConfig.isBlinkAllLEDs() != updatedApElementConfig.isBlinkAllLEDs()) {
|
||||
LOG.debug("Updated BlinkingLEDs {}", ret);
|
||||
event = new EquipmentBlinkLEDsEvent(ret);
|
||||
} else if (equipment.getCustomerId() != existingEquipment.getCustomerId()) {
|
||||
event = new EquipmentCustomerChangedEvent(existingEquipment, ret);
|
||||
} else {
|
||||
event = new EquipmentChangedEvent(ret);
|
||||
}
|
||||
@@ -296,7 +300,6 @@ public class EquipmentController {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
private void validateChannelNum(Equipment equipment) {
|
||||
if (equipment.getDetails() instanceof ApElementConfiguration) {
|
||||
ApElementConfiguration apElementConfiguration = (ApElementConfiguration) equipment.getDetails();
|
||||
|
||||
@@ -4434,8 +4434,7 @@ components:
|
||||
steerType:
|
||||
$ref: '#/components/schemas/SteerType'
|
||||
previousValidSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
lastFailureDetails:
|
||||
$ref: '#/components/schemas/ClientFailureDetails'
|
||||
firstFailureDetails:
|
||||
@@ -4450,8 +4449,7 @@ components:
|
||||
type: integer
|
||||
format: int32
|
||||
priorSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
priorEquipmentId:
|
||||
type: integer
|
||||
format: int64
|
||||
@@ -10336,8 +10334,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -10359,8 +10356,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -10380,8 +10376,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
|
||||
@@ -148,7 +148,7 @@ public class PortalUserDatastoreInMemory extends BaseInMemoryDatastore implement
|
||||
PortalUser ret = null;
|
||||
|
||||
for (PortalUser mdl : idToPortalUserMap.values()) {
|
||||
if(mdl.getCustomerId() == customerId && mdl.getUsername().equals(username)) {
|
||||
if(mdl.getCustomerId() == customerId && mdl.getUsername().toLowerCase().equals(username.toLowerCase())) {
|
||||
ret = mdl.clone();
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ public class PortalUserDatastoreInMemory extends BaseInMemoryDatastore implement
|
||||
List<PortalUser> listOfPortalUsers = new ArrayList<>();
|
||||
|
||||
for (PortalUser portalUser : idToPortalUserMap.values()) {
|
||||
if (portalUser.getUsername().equals(username)) {
|
||||
if (portalUser.getUsername().toLowerCase().equals(username.toLowerCase())) {
|
||||
listOfPortalUsers.add(portalUser);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,6 @@ public class PortalUserDAO extends BaseJdbcDao {
|
||||
|
||||
public static final Set<String> ALL_COLUMNS_LOWERCASE = new HashSet<>();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
//use this for queries where multiple tables are involved
|
||||
public static final String ALL_COLUMNS_WITH_PREFIX;
|
||||
|
||||
@@ -135,10 +134,10 @@ public class PortalUserDAO extends BaseJdbcDao {
|
||||
private static final String SQL_GET_BY_USERNAME =
|
||||
"select " + ALL_COLUMNS +
|
||||
" from " + TABLE_NAME + " " +
|
||||
" where username = ? ";
|
||||
" where lower(username) = ? ";
|
||||
|
||||
private static final String SQL_GET_BY_CUSTOMERID_AND_USERNAME = SQL_GET_BY_CUSTOMER_ID +
|
||||
" and username = ?";
|
||||
" and lower(username) = ?";
|
||||
|
||||
private static final String SQL_GET_LASTMOD_BY_ID =
|
||||
"select lastModifiedTimestamp " +
|
||||
@@ -463,7 +462,7 @@ public class PortalUserDAO extends BaseJdbcDao {
|
||||
try{
|
||||
PortalUser portalUser = this.jdbcTemplate.queryForObject(
|
||||
SQL_GET_BY_CUSTOMERID_AND_USERNAME,
|
||||
portalUserRowMapper, customerId, username);
|
||||
portalUserRowMapper, customerId, username.toLowerCase());
|
||||
|
||||
LOG.debug("Found PortalUser {}", portalUser);
|
||||
|
||||
@@ -478,7 +477,7 @@ public class PortalUserDAO extends BaseJdbcDao {
|
||||
LOG.debug("Looking up PortalUsers for username {} {}", username);
|
||||
|
||||
List<PortalUser> ret = this.jdbcTemplate.query(SQL_GET_BY_USERNAME,
|
||||
portalUserRowMapper, username);
|
||||
portalUserRowMapper, username.toLowerCase());
|
||||
|
||||
LOG.debug("Found List of Portal Users {}", ret);
|
||||
|
||||
|
||||
@@ -1149,8 +1149,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -1168,8 +1167,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -1185,8 +1183,7 @@ components:
|
||||
allOf:
|
||||
$ref: '#/components/schemas/RealTimeEvent'
|
||||
videoSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sessionId:
|
||||
type: string
|
||||
clientMac:
|
||||
@@ -1641,8 +1638,7 @@ components:
|
||||
steerType:
|
||||
$ref: '#/components/schemas/SteerType'
|
||||
previousValidSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
lastFailureDetails:
|
||||
$ref: '#/components/schemas/ClientFailureDetails'
|
||||
firstFailureDetails:
|
||||
@@ -1657,8 +1653,7 @@ components:
|
||||
type: integer
|
||||
format: int32
|
||||
priorSessionId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
priorEquipmentId:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
Reference in New Issue
Block a user