Compare commits

..

11 Commits

Author SHA1 Message Date
Kareem Dabbour
1018bafa0e WIFI-3201 Equipments cusId/locId/profIds can no longer be updated to 0 with REST API 2021-07-21 14:08:25 -04:00
Mike Hansen
3085c34cde Merge pull request #135 from Telecominfraproject/WIFI-3180-portal-user-search-case-insensitive
[WIFI-3180] Adding case insensitivity to Portal User API Search
2021-07-20 11:53:47 -04:00
Mike Hansen
35fd038113 [WIFI-3166] Session ID is a -ve number in opensyncgw logs and on UI logs
Signed-off-by: Mike Hansen <mike.hansen@connectus.ai>
2021-07-20 11:31:07 -04:00
ralphlee
7c387f1940 [WIFI-3180] Adding case insensitivity to Portal User API Search 2021-07-20 10:38:04 -04:00
Mike Hansen
abb9b59659 Gateway pushes the threshholds as empty which causes AP not to connect any client
Signed-off-by: Mike Hansen <mike.hansen@connectus.ai>
2021-07-20 10:02:59 -04:00
norm-traxler
7f0497754c Merge pull request #134 from Telecominfraproject/WIFI-3042-alarm-remote-fix
[WIFI-3042] Fix alarmCode get url parameter
2021-07-20 08:30:40 -04:00
Norm Traxler
82095510f7 [WIFI-3042] Fix alarmCode get url parameter 2021-07-20 08:23:58 -04:00
Mike Hansen
0afd414870 Merge pull request #133 from Telecominfraproject/change_sessionId_to_String
[WIFI-3166] Session ID is a -ve number in opensyncgw logs and on UI logs
2021-07-19 19:30:42 -04:00
Mike Hansen
41add1922b Merge pull request #132 from Telecominfraproject/WIFI-3041
[WIFI-3041] move if statusment for custmerId check to a different location
2021-07-19 17:54:58 -04:00
Thomas-Leung2021
90ac57b988 [WIFI-3041] move if statement to make it more logical 2021-07-19 17:52:49 -04:00
Thomas-Leung2021
0cc90764c6 [WIFI-3041] move if statusment for custmerId check to a different location 2021-07-19 17:00:54 -04:00
10 changed files with 41 additions and 49 deletions

View File

@@ -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();

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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

View File

@@ -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);

View File

@@ -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();

View File

@@ -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:

View File

@@ -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);
}
}

View File

@@ -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);

View File

@@ -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