mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-03 12:08:07 +00:00
WIFI-1195: JsonSerializedException for MacAddress with Client Interface
This commit is contained in:
@@ -21,6 +21,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.telecominfraproject.wlan.client.ClientServiceInterface;
|
import com.telecominfraproject.wlan.client.ClientServiceInterface;
|
||||||
import com.telecominfraproject.wlan.client.info.models.ClientInfoDetails;
|
import com.telecominfraproject.wlan.client.info.models.ClientInfoDetails;
|
||||||
|
import com.telecominfraproject.wlan.client.models.Client;
|
||||||
import com.telecominfraproject.wlan.client.models.ClientType;
|
import com.telecominfraproject.wlan.client.models.ClientType;
|
||||||
import com.telecominfraproject.wlan.client.session.models.AssociationState;
|
import com.telecominfraproject.wlan.client.session.models.AssociationState;
|
||||||
import com.telecominfraproject.wlan.client.session.models.ClientDhcpDetails;
|
import com.telecominfraproject.wlan.client.session.models.ClientDhcpDetails;
|
||||||
@@ -92,6 +93,9 @@ import com.telecominfraproject.wlan.status.equipment.models.VLANStatusData;
|
|||||||
import com.telecominfraproject.wlan.status.equipment.report.models.ActiveBSSID;
|
import com.telecominfraproject.wlan.status.equipment.report.models.ActiveBSSID;
|
||||||
import com.telecominfraproject.wlan.status.equipment.report.models.ActiveBSSIDs;
|
import com.telecominfraproject.wlan.status.equipment.report.models.ActiveBSSIDs;
|
||||||
import com.telecominfraproject.wlan.status.equipment.report.models.ClientConnectionDetails;
|
import com.telecominfraproject.wlan.status.equipment.report.models.ClientConnectionDetails;
|
||||||
|
import com.telecominfraproject.wlan.status.equipment.report.models.EquipmentScanDetails;
|
||||||
|
import com.telecominfraproject.wlan.status.equipment.report.models.OperatingSystemPerformance;
|
||||||
|
import com.telecominfraproject.wlan.status.equipment.report.models.RadioUtilizationReport;
|
||||||
import com.telecominfraproject.wlan.status.models.Status;
|
import com.telecominfraproject.wlan.status.models.Status;
|
||||||
import com.telecominfraproject.wlan.status.models.StatusCode;
|
import com.telecominfraproject.wlan.status.models.StatusCode;
|
||||||
import com.telecominfraproject.wlan.status.models.StatusDataType;
|
import com.telecominfraproject.wlan.status.models.StatusDataType;
|
||||||
@@ -186,7 +190,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
ce.setEquipmentType(EquipmentType.AP);
|
ce.setEquipmentType(EquipmentType.AP);
|
||||||
ce.setInventoryId(apId);
|
ce.setInventoryId(apId);
|
||||||
try {
|
try {
|
||||||
ce.setBaseMacAddress(new MacAddress(connectNodeInfo.macAddress));
|
ce.setBaseMacAddress(MacAddress.valueOf(connectNodeInfo.macAddress));
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
LOG.warn("Auto-provisioning: cannot parse equipment mac address {}", connectNodeInfo.macAddress);
|
LOG.warn("Auto-provisioning: cannot parse equipment mac address {}", connectNodeInfo.macAddress);
|
||||||
}
|
}
|
||||||
@@ -280,7 +284,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
|
|
||||||
MacAddress reportedMacAddress = null;
|
MacAddress reportedMacAddress = null;
|
||||||
try {
|
try {
|
||||||
reportedMacAddress = new MacAddress(connectNodeInfo.macAddress);
|
reportedMacAddress = MacAddress.valueOf(connectNodeInfo.macAddress);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
LOG.warn("AP connect: cannot parse equipment mac address {}", connectNodeInfo.macAddress);
|
LOG.warn("AP connect: cannot parse equipment mac address {}", connectNodeInfo.macAddress);
|
||||||
}
|
}
|
||||||
@@ -569,7 +573,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
// need to make sure that this AP didn't accidentally get registered as
|
// need to make sure that this AP didn't accidentally get registered as
|
||||||
// a client previously via a partial DHCP lease event
|
// a client previously via a partial DHCP lease event
|
||||||
LOG.info("Checking for non-wifi client types for Equipment {}", ce);
|
LOG.info("Checking for non-wifi client types for Equipment {}", ce);
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(ce.getCustomerId(),
|
Client client = clientServiceInterface.getOrNull(ce.getCustomerId(),
|
||||||
ce.getBaseMacAddress());
|
ce.getBaseMacAddress());
|
||||||
|
|
||||||
if (client != null) {
|
if (client != null) {
|
||||||
@@ -874,7 +878,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
ret.setCaptiveProfiles(profileServiceInterface.get(captiveProfileIds));
|
ret.setCaptiveProfiles(profileServiceInterface.get(captiveProfileIds));
|
||||||
ret.setBonjourGatewayProfiles(profileServiceInterface.get(bonjourGatewayProfileIds));
|
ret.setBonjourGatewayProfiles(profileServiceInterface.get(bonjourGatewayProfileIds));
|
||||||
|
|
||||||
List<com.telecominfraproject.wlan.client.models.Client> blockedClients = clientServiceInterface
|
List<Client> blockedClients = clientServiceInterface
|
||||||
.getBlockedClients(customerId);
|
.getBlockedClients(customerId);
|
||||||
List<MacAddress> blockList = Lists.newArrayList();
|
List<MacAddress> blockList = Lists.newArrayList();
|
||||||
if ((blockedClients != null) && !blockedClients.isEmpty()) {
|
if ((blockedClients != null) && !blockedClients.isEmpty()) {
|
||||||
@@ -1395,15 +1399,21 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (OpensyncWifiAssociatedClients opensyncWifiAssociatedClients : wifiAssociatedClients) {
|
for (OpensyncWifiAssociatedClients opensyncWifiAssociatedClients : wifiAssociatedClients) {
|
||||||
com.telecominfraproject.wlan.client.models.Client clientInstance = clientServiceInterface
|
|
||||||
.getOrNull(customerId, new MacAddress(opensyncWifiAssociatedClients.getMac()));
|
LOG.info("opensyncWifiAssociatedClients {}", opensyncWifiAssociatedClients.toPrettyString());
|
||||||
|
|
||||||
|
String mMac = opensyncWifiAssociatedClients.mac;
|
||||||
|
MacAddress macAddress = MacAddress.valueOf(mMac);
|
||||||
|
|
||||||
|
Client clientInstance = clientServiceInterface
|
||||||
|
.getOrNull(customerId, macAddress);
|
||||||
|
|
||||||
boolean isReassociation = true;
|
boolean isReassociation = true;
|
||||||
if (clientInstance == null) {
|
if (clientInstance == null) {
|
||||||
clientInstance = new com.telecominfraproject.wlan.client.models.Client();
|
clientInstance = new Client();
|
||||||
|
|
||||||
clientInstance.setCustomerId(customerId);
|
clientInstance.setCustomerId(customerId);
|
||||||
clientInstance.setMacAddress(new MacAddress(opensyncWifiAssociatedClients.getMac()));
|
clientInstance.setMacAddress(MacAddress.valueOf(mMac));
|
||||||
clientInstance.setDetails(new ClientInfoDetails());
|
clientInstance.setDetails(new ClientInfoDetails());
|
||||||
clientInstance = clientServiceInterface.create(clientInstance);
|
clientInstance = clientServiceInterface.create(clientInstance);
|
||||||
|
|
||||||
@@ -1715,10 +1725,10 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(deletedClientMac));
|
MacAddress.valueOf(deletedClientMac));
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(deletedClientMac));
|
MacAddress.valueOf(deletedClientMac));
|
||||||
|
|
||||||
if (client != null) {
|
if (client != null) {
|
||||||
if (clientSession != null && clientSession.getDetails() != null
|
if (clientSession != null && clientSession.getDetails() != null
|
||||||
@@ -1734,9 +1744,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
if (clientSession != null) {
|
if (clientSession != null) {
|
||||||
|
|
||||||
clientSession = clientServiceInterface.deleteSession(customerId, equipmentId,
|
clientSession = clientServiceInterface.deleteSession(customerId, equipmentId,
|
||||||
new MacAddress(deletedClientMac));
|
MacAddress.valueOf(deletedClientMac));
|
||||||
|
|
||||||
LOG.info("No client {} found, delete session {}", new MacAddress(deletedClientMac), clientSession);
|
LOG.info("No client {} found, delete session {}", MacAddress.valueOf(deletedClientMac), clientSession);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1783,9 +1793,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
MacAddress clientMacAddress = new MacAddress(dhcpLeasedIps.get("hwaddr"));
|
MacAddress clientMacAddress = MacAddress.valueOf(dhcpLeasedIps.get("hwaddr"));
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
clientMacAddress);
|
clientMacAddress);
|
||||||
|
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
@@ -1875,9 +1885,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MacAddress clientMacAddress = new MacAddress(dhcpLeasedIps.get("hwaddr"));
|
MacAddress clientMacAddress = MacAddress.valueOf(dhcpLeasedIps.get("hwaddr"));
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
clientMacAddress);
|
clientMacAddress);
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
LOG.info("Cannot find client instance for {}", clientMacAddress);
|
LOG.info("Cannot find client instance for {}", clientMacAddress);
|
||||||
@@ -2107,4 +2117,77 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
|
|
||||||
// TODO: will handle changes from Command_State table
|
// TODO: will handle changes from Command_State table
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearEquipmentStatus(String apId) {
|
||||||
|
|
||||||
|
OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(apId);
|
||||||
|
|
||||||
|
if (ovsdbSession == null) {
|
||||||
|
LOG.debug("clearEquipmentStatus::Cannot get Session for AP {}", apId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int customerId = ovsdbSession.getCustomerId();
|
||||||
|
long equipmentId = ovsdbSession.getEquipmentId();
|
||||||
|
|
||||||
|
if ((customerId < 0) || (equipmentId < 0)) {
|
||||||
|
LOG.debug("clearEquipmentStatus::Cannot get valid CustomerId {} or EquipmentId {} for AP {}",
|
||||||
|
customerId, equipmentId, apId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Equipment ce = equipmentServiceInterface.getOrNull(equipmentId);
|
||||||
|
|
||||||
|
if (ce == null) {
|
||||||
|
LOG.debug("clearEquipmentStatus Cannot get customer Equipment for {}", apId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Status> statusesToClear = new ArrayList<>();
|
||||||
|
|
||||||
|
Status activeBssids = statusServiceInterface.getOrNull(customerId, equipmentId, StatusDataType.ACTIVE_BSSIDS);
|
||||||
|
if (activeBssids != null) {
|
||||||
|
activeBssids.setDetails(new ActiveBSSIDs());
|
||||||
|
statusesToClear.add(activeBssids);
|
||||||
|
}
|
||||||
|
Status clientDetails = statusServiceInterface.getOrNull(customerId, equipmentId, StatusDataType.CLIENT_DETAILS);
|
||||||
|
if (clientDetails != null) {
|
||||||
|
clientDetails.setDetails(new ClientConnectionDetails());
|
||||||
|
statusesToClear.add(clientDetails);
|
||||||
|
}
|
||||||
|
Status radioUtilization = statusServiceInterface.getOrNull(customerId, equipmentId,
|
||||||
|
StatusDataType.RADIO_UTILIZATION);
|
||||||
|
if (radioUtilization != null) {
|
||||||
|
radioUtilization.setDetails(new RadioUtilizationReport());
|
||||||
|
statusesToClear.add(radioUtilization);
|
||||||
|
}
|
||||||
|
Status neighbourScanDetails = statusServiceInterface.getOrNull(customerId, equipmentId,
|
||||||
|
StatusDataType.NEIGHBOUR_SCAN);
|
||||||
|
if (neighbourScanDetails != null) {
|
||||||
|
neighbourScanDetails.setDetails(new EquipmentScanDetails());
|
||||||
|
statusesToClear.add(neighbourScanDetails);
|
||||||
|
}
|
||||||
|
Status operatingSystemPerformance = statusServiceInterface.getOrNull(customerId, equipmentId,
|
||||||
|
StatusDataType.OS_PERFORMANCE);
|
||||||
|
if (operatingSystemPerformance != null) {
|
||||||
|
operatingSystemPerformance.setDetails(new OperatingSystemPerformance());
|
||||||
|
statusesToClear.add(operatingSystemPerformance);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Status> clearedStatus = statusServiceInterface.update(statusesToClear);
|
||||||
|
|
||||||
|
|
||||||
|
clearedStatus.stream().forEach(s -> {
|
||||||
|
LOG.info("Cleared Status {}", s.toPrettyString());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
List<Status> customerDashboardStatus = statusServiceInterface.getForEquipment(customerId, Set.of(equipmentId), Set.of(StatusDataType.CUSTOMER_DASHBOARD));
|
||||||
|
for (Status status : customerDashboardStatus) {
|
||||||
|
LOG.info("Updated status {}", statusServiceInterface.update(status) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -396,12 +396,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
|
|
||||||
if (clientConnectEvent.hasStaMac()) {
|
if (clientConnectEvent.hasStaMac()) {
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(clientConnectEvent.getStaMac()));
|
MacAddress.valueOf(clientConnectEvent.getStaMac()));
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
|
|
||||||
client.setCustomerId(customerId);
|
client.setCustomerId(customerId);
|
||||||
client.setMacAddress(new MacAddress(clientConnectEvent.getStaMac()));
|
client.setMacAddress(MacAddress.valueOf(clientConnectEvent.getStaMac()));
|
||||||
|
|
||||||
client.setDetails(new ClientInfoDetails());
|
client.setDetails(new ClientInfoDetails());
|
||||||
|
|
||||||
@@ -410,7 +410,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(clientConnectEvent.getStaMac()));
|
MacAddress.valueOf(clientConnectEvent.getStaMac()));
|
||||||
|
|
||||||
if (clientSession == null) {
|
if (clientSession == null) {
|
||||||
clientSession = new ClientSession();
|
clientSession = new ClientSession();
|
||||||
@@ -419,7 +419,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
clientSession.setCustomerId(customerId);
|
clientSession.setCustomerId(customerId);
|
||||||
clientSession.setEquipmentId(equipmentId);
|
clientSession.setEquipmentId(equipmentId);
|
||||||
clientSession.setLocationId(locationId);
|
clientSession.setLocationId(locationId);
|
||||||
clientSession.setMacAddress(new MacAddress(clientConnectEvent.getStaMac()));
|
clientSession.setMacAddress(MacAddress.valueOf(clientConnectEvent.getStaMac()));
|
||||||
|
|
||||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||||
clientSessionDetails.setSessionId(apEventClientSession.getSessionId());
|
clientSessionDetails.setSessionId(apEventClientSession.getSessionId());
|
||||||
@@ -530,12 +530,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
if (clientDisconnectEvent.hasStaMac()) {
|
if (clientDisconnectEvent.hasStaMac()) {
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(clientDisconnectEvent.getStaMac()));
|
MacAddress.valueOf(clientDisconnectEvent.getStaMac()));
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
|
|
||||||
client.setCustomerId(customerId);
|
client.setCustomerId(customerId);
|
||||||
client.setMacAddress(new MacAddress(clientDisconnectEvent.getStaMac()));
|
client.setMacAddress(MacAddress.valueOf(clientDisconnectEvent.getStaMac()));
|
||||||
|
|
||||||
client.setDetails(new ClientInfoDetails());
|
client.setDetails(new ClientInfoDetails());
|
||||||
|
|
||||||
@@ -544,7 +544,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(clientDisconnectEvent.getStaMac()));
|
MacAddress.valueOf(clientDisconnectEvent.getStaMac()));
|
||||||
|
|
||||||
if (clientSession == null) {
|
if (clientSession == null) {
|
||||||
clientSession = new ClientSession();
|
clientSession = new ClientSession();
|
||||||
@@ -553,7 +553,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
clientSession.setCustomerId(customerId);
|
clientSession.setCustomerId(customerId);
|
||||||
clientSession.setEquipmentId(equipmentId);
|
clientSession.setEquipmentId(equipmentId);
|
||||||
clientSession.setLocationId(locationId);
|
clientSession.setLocationId(locationId);
|
||||||
clientSession.setMacAddress(new MacAddress(clientDisconnectEvent.getStaMac()));
|
clientSession.setMacAddress(MacAddress.valueOf(clientDisconnectEvent.getStaMac()));
|
||||||
|
|
||||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||||
|
|
||||||
@@ -612,12 +612,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
if (clientAuthEvent.hasStaMac()) {
|
if (clientAuthEvent.hasStaMac()) {
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(clientAuthEvent.getStaMac()));
|
MacAddress.valueOf(clientAuthEvent.getStaMac()));
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
|
|
||||||
client.setCustomerId(customerId);
|
client.setCustomerId(customerId);
|
||||||
client.setMacAddress(new MacAddress(clientAuthEvent.getStaMac()));
|
client.setMacAddress(MacAddress.valueOf(clientAuthEvent.getStaMac()));
|
||||||
|
|
||||||
client.setDetails(new ClientInfoDetails());
|
client.setDetails(new ClientInfoDetails());
|
||||||
|
|
||||||
@@ -626,7 +626,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(clientAuthEvent.getStaMac()));
|
MacAddress.valueOf(clientAuthEvent.getStaMac()));
|
||||||
|
|
||||||
if (clientSession == null) {
|
if (clientSession == null) {
|
||||||
clientSession = new ClientSession();
|
clientSession = new ClientSession();
|
||||||
@@ -635,7 +635,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
clientSession.setCustomerId(customerId);
|
clientSession.setCustomerId(customerId);
|
||||||
clientSession.setEquipmentId(equipmentId);
|
clientSession.setEquipmentId(equipmentId);
|
||||||
clientSession.setLocationId(locationId);
|
clientSession.setLocationId(locationId);
|
||||||
clientSession.setMacAddress(new MacAddress(clientAuthEvent.getStaMac()));
|
clientSession.setMacAddress(MacAddress.valueOf(clientAuthEvent.getStaMac()));
|
||||||
|
|
||||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||||
|
|
||||||
@@ -671,12 +671,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
for (ClientAssocEvent clientAssocEvent : apEventClientSession.getClientAssocEventList()) {
|
for (ClientAssocEvent clientAssocEvent : apEventClientSession.getClientAssocEventList()) {
|
||||||
if (clientAssocEvent.hasStaMac()) {
|
if (clientAssocEvent.hasStaMac()) {
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(clientAssocEvent.getStaMac()));
|
MacAddress.valueOf(clientAssocEvent.getStaMac()));
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
|
|
||||||
client.setCustomerId(customerId);
|
client.setCustomerId(customerId);
|
||||||
client.setMacAddress(new MacAddress(clientAssocEvent.getStaMac()));
|
client.setMacAddress(MacAddress.valueOf(clientAssocEvent.getStaMac()));
|
||||||
|
|
||||||
client.setDetails(new ClientInfoDetails());
|
client.setDetails(new ClientInfoDetails());
|
||||||
|
|
||||||
@@ -685,7 +685,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(clientAssocEvent.getStaMac()));
|
MacAddress.valueOf(clientAssocEvent.getStaMac()));
|
||||||
|
|
||||||
if (clientSession == null) {
|
if (clientSession == null) {
|
||||||
clientSession = new ClientSession();
|
clientSession = new ClientSession();
|
||||||
@@ -693,7 +693,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
clientSession.setCustomerId(customerId);
|
clientSession.setCustomerId(customerId);
|
||||||
clientSession.setEquipmentId(equipmentId);
|
clientSession.setEquipmentId(equipmentId);
|
||||||
clientSession.setLocationId(locationId);
|
clientSession.setLocationId(locationId);
|
||||||
clientSession.setMacAddress(new MacAddress(clientAssocEvent.getStaMac()));
|
clientSession.setMacAddress(MacAddress.valueOf(clientAssocEvent.getStaMac()));
|
||||||
|
|
||||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||||
if (clientAssocEvent.hasUsing11K()) {
|
if (clientAssocEvent.hasUsing11K()) {
|
||||||
@@ -745,12 +745,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
if (clientFailureEvent.hasStaMac()) {
|
if (clientFailureEvent.hasStaMac()) {
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(clientFailureEvent.getStaMac()));
|
MacAddress.valueOf(clientFailureEvent.getStaMac()));
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
|
|
||||||
client.setCustomerId(customerId);
|
client.setCustomerId(customerId);
|
||||||
client.setMacAddress(new MacAddress(clientFailureEvent.getStaMac()));
|
client.setMacAddress(MacAddress.valueOf(clientFailureEvent.getStaMac()));
|
||||||
|
|
||||||
client.setDetails(new ClientInfoDetails());
|
client.setDetails(new ClientInfoDetails());
|
||||||
|
|
||||||
@@ -759,7 +759,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(clientFailureEvent.getStaMac()));
|
MacAddress.valueOf(clientFailureEvent.getStaMac()));
|
||||||
|
|
||||||
if (clientSession == null) {
|
if (clientSession == null) {
|
||||||
clientSession = new ClientSession();
|
clientSession = new ClientSession();
|
||||||
@@ -768,7 +768,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
clientSession.setCustomerId(customerId);
|
clientSession.setCustomerId(customerId);
|
||||||
clientSession.setEquipmentId(equipmentId);
|
clientSession.setEquipmentId(equipmentId);
|
||||||
clientSession.setLocationId(locationId);
|
clientSession.setLocationId(locationId);
|
||||||
clientSession.setMacAddress(new MacAddress(clientFailureEvent.getStaMac()));
|
clientSession.setMacAddress(MacAddress.valueOf(clientFailureEvent.getStaMac()));
|
||||||
|
|
||||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||||
|
|
||||||
@@ -807,12 +807,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
if (clientFirstDataEvent.hasStaMac()) {
|
if (clientFirstDataEvent.hasStaMac()) {
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(clientFirstDataEvent.getStaMac()));
|
MacAddress.valueOf(clientFirstDataEvent.getStaMac()));
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
|
|
||||||
client.setCustomerId(customerId);
|
client.setCustomerId(customerId);
|
||||||
client.setMacAddress(new MacAddress(clientFirstDataEvent.getStaMac()));
|
client.setMacAddress(MacAddress.valueOf(clientFirstDataEvent.getStaMac()));
|
||||||
|
|
||||||
client.setDetails(new ClientInfoDetails());
|
client.setDetails(new ClientInfoDetails());
|
||||||
|
|
||||||
@@ -821,7 +821,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(clientFirstDataEvent.getStaMac()));
|
MacAddress.valueOf(clientFirstDataEvent.getStaMac()));
|
||||||
|
|
||||||
if (clientSession == null) {
|
if (clientSession == null) {
|
||||||
clientSession = new ClientSession();
|
clientSession = new ClientSession();
|
||||||
@@ -830,7 +830,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
clientSession.setCustomerId(customerId);
|
clientSession.setCustomerId(customerId);
|
||||||
clientSession.setEquipmentId(equipmentId);
|
clientSession.setEquipmentId(equipmentId);
|
||||||
clientSession.setLocationId(locationId);
|
clientSession.setLocationId(locationId);
|
||||||
clientSession.setMacAddress(new MacAddress(clientFirstDataEvent.getStaMac()));
|
clientSession.setMacAddress(MacAddress.valueOf(clientFirstDataEvent.getStaMac()));
|
||||||
|
|
||||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||||
|
|
||||||
@@ -866,12 +866,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
if (clientIdEvent.hasCltMac()) {
|
if (clientIdEvent.hasCltMac()) {
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(clientIdEvent.getCltMac()));
|
MacAddress.valueOf(clientIdEvent.getCltMac()));
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
|
|
||||||
client.setCustomerId(customerId);
|
client.setCustomerId(customerId);
|
||||||
client.setMacAddress(new MacAddress(clientIdEvent.getCltMac()));
|
client.setMacAddress(MacAddress.valueOf(clientIdEvent.getCltMac()));
|
||||||
|
|
||||||
client.setDetails(new ClientInfoDetails());
|
client.setDetails(new ClientInfoDetails());
|
||||||
|
|
||||||
@@ -880,7 +880,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(clientIdEvent.getCltMac()));
|
MacAddress.valueOf(clientIdEvent.getCltMac()));
|
||||||
|
|
||||||
if (clientSession == null) {
|
if (clientSession == null) {
|
||||||
clientSession = new ClientSession();
|
clientSession = new ClientSession();
|
||||||
@@ -889,7 +889,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
clientSession.setCustomerId(customerId);
|
clientSession.setCustomerId(customerId);
|
||||||
clientSession.setEquipmentId(equipmentId);
|
clientSession.setEquipmentId(equipmentId);
|
||||||
clientSession.setLocationId(locationId);
|
clientSession.setLocationId(locationId);
|
||||||
clientSession.setMacAddress(new MacAddress(clientIdEvent.getCltMac()));
|
clientSession.setMacAddress(MacAddress.valueOf(clientIdEvent.getCltMac()));
|
||||||
|
|
||||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||||
|
|
||||||
@@ -915,12 +915,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
if (clientIpEvent.hasStaMac()) {
|
if (clientIpEvent.hasStaMac()) {
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(clientIpEvent.getStaMac()));
|
MacAddress.valueOf(clientIpEvent.getStaMac()));
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
|
|
||||||
client.setCustomerId(customerId);
|
client.setCustomerId(customerId);
|
||||||
client.setMacAddress(new MacAddress(clientIpEvent.getStaMac()));
|
client.setMacAddress(MacAddress.valueOf(clientIpEvent.getStaMac()));
|
||||||
|
|
||||||
client.setDetails(new ClientInfoDetails());
|
client.setDetails(new ClientInfoDetails());
|
||||||
|
|
||||||
@@ -929,7 +929,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(clientIpEvent.getStaMac()));
|
MacAddress.valueOf(clientIpEvent.getStaMac()));
|
||||||
|
|
||||||
if (clientSession == null) {
|
if (clientSession == null) {
|
||||||
clientSession = new ClientSession();
|
clientSession = new ClientSession();
|
||||||
@@ -938,7 +938,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
clientSession.setCustomerId(customerId);
|
clientSession.setCustomerId(customerId);
|
||||||
clientSession.setEquipmentId(equipmentId);
|
clientSession.setEquipmentId(equipmentId);
|
||||||
clientSession.setLocationId(locationId);
|
clientSession.setLocationId(locationId);
|
||||||
clientSession.setMacAddress(new MacAddress(clientIpEvent.getStaMac()));
|
clientSession.setMacAddress(MacAddress.valueOf(clientIpEvent.getStaMac()));
|
||||||
|
|
||||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||||
|
|
||||||
@@ -972,12 +972,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
if (clientTimeoutEvent.hasStaMac()) {
|
if (clientTimeoutEvent.hasStaMac()) {
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||||
new MacAddress(clientTimeoutEvent.getStaMac()));
|
MacAddress.valueOf(clientTimeoutEvent.getStaMac()));
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
|
|
||||||
client.setCustomerId(customerId);
|
client.setCustomerId(customerId);
|
||||||
client.setMacAddress(new MacAddress(clientTimeoutEvent.getStaMac()));
|
client.setMacAddress(MacAddress.valueOf(clientTimeoutEvent.getStaMac()));
|
||||||
|
|
||||||
client.setDetails(new ClientInfoDetails());
|
client.setDetails(new ClientInfoDetails());
|
||||||
|
|
||||||
@@ -986,7 +986,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(clientTimeoutEvent.getStaMac()));
|
MacAddress.valueOf(clientTimeoutEvent.getStaMac()));
|
||||||
|
|
||||||
if (clientSession == null) {
|
if (clientSession == null) {
|
||||||
clientSession = new ClientSession();
|
clientSession = new ClientSession();
|
||||||
@@ -995,7 +995,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
clientSession.setCustomerId(customerId);
|
clientSession.setCustomerId(customerId);
|
||||||
clientSession.setEquipmentId(equipmentId);
|
clientSession.setEquipmentId(equipmentId);
|
||||||
clientSession.setLocationId(locationId);
|
clientSession.setLocationId(locationId);
|
||||||
clientSession.setMacAddress(new MacAddress(clientTimeoutEvent.getStaMac()));
|
clientSession.setMacAddress(MacAddress.valueOf(clientTimeoutEvent.getStaMac()));
|
||||||
|
|
||||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||||
|
|
||||||
@@ -1621,7 +1621,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
List<MacAddress> clientMacList = new ArrayList<>();
|
List<MacAddress> clientMacList = new ArrayList<>();
|
||||||
clientMacs.forEach(macStr -> {
|
clientMacs.forEach(macStr -> {
|
||||||
try {
|
try {
|
||||||
clientMacList.add(new MacAddress(macStr));
|
clientMacList.add(MacAddress.valueOf(macStr));
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
LOG.warn("Cannot parse mac address from MQTT ClientReport {} ", macStr);
|
LOG.warn("Cannot parse mac address from MQTT ClientReport {} ", macStr);
|
||||||
}
|
}
|
||||||
@@ -1926,12 +1926,12 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
|
|
||||||
LOG.debug("Processing ClientReport from AP {}", cl.getMacAddress());
|
LOG.debug("Processing ClientReport from AP {}", cl.getMacAddress());
|
||||||
|
|
||||||
ServiceMetric smr = new ServiceMetric(customerId, equipmentId, new MacAddress(cl.getMacAddress()));
|
ServiceMetric smr = new ServiceMetric(customerId, equipmentId, MacAddress.valueOf(cl.getMacAddress()));
|
||||||
smr.setLocationId(locationId);
|
smr.setLocationId(locationId);
|
||||||
metricRecordList.add(smr);
|
metricRecordList.add(smr);
|
||||||
|
|
||||||
smr.setCreatedTimestamp(clReport.getTimestampMs());
|
smr.setCreatedTimestamp(clReport.getTimestampMs());
|
||||||
smr.setClientMac(new MacAddress(cl.getMacAddress()).getAddressAsLong());
|
smr.setClientMac(MacAddress.valueOf(cl.getMacAddress()).getAddressAsLong());
|
||||||
|
|
||||||
// clReport.getChannel();
|
// clReport.getChannel();
|
||||||
ClientMetrics cMetrics = new ClientMetrics();
|
ClientMetrics cMetrics = new ClientMetrics();
|
||||||
@@ -2058,7 +2058,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
nr.setChannel(nBss.getChannel());
|
nr.setChannel(nBss.getChannel());
|
||||||
nr.setMacAddress(new MacAddress(nBss.getBssid()));
|
nr.setMacAddress(MacAddress.valueOf(nBss.getBssid()));
|
||||||
nr.setNetworkType(NetworkType.AP);
|
nr.setNetworkType(NetworkType.AP);
|
||||||
nr.setPacketType(NeighborScanPacketType.BEACON);
|
nr.setPacketType(NeighborScanPacketType.BEACON);
|
||||||
nr.setPrivacy(((nBss.getSsid() == null) || nBss.getSsid().isEmpty()) ? true : false);
|
nr.setPrivacy(((nBss.getSsid() == null) || nBss.getSsid().isEmpty()) ? true : false);
|
||||||
@@ -2085,7 +2085,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
equipmentId, locationId, client.getMacAddress());
|
equipmentId, locationId, client.getMacAddress());
|
||||||
|
|
||||||
com.telecominfraproject.wlan.client.models.Client clientInstance = clientServiceInterface
|
com.telecominfraproject.wlan.client.models.Client clientInstance = clientServiceInterface
|
||||||
.getOrNull(customerId, new MacAddress(client.getMacAddress()));
|
.getOrNull(customerId, MacAddress.valueOf(client.getMacAddress()));
|
||||||
|
|
||||||
boolean isReassociation = true;
|
boolean isReassociation = true;
|
||||||
if (clientInstance == null) {
|
if (clientInstance == null) {
|
||||||
@@ -2293,7 +2293,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
statusDetails = (ActiveBSSIDs) activeBssidsStatus.getDetails();
|
statusDetails = (ActiveBSSIDs) activeBssidsStatus.getDetails();
|
||||||
for (ActiveBSSID activeBSSID : ((ActiveBSSIDs) activeBssidsStatus.getDetails()).getActiveBSSIDs()) {
|
for (ActiveBSSID activeBSSID : ((ActiveBSSIDs) activeBssidsStatus.getDetails()).getActiveBSSIDs()) {
|
||||||
if (activeBSSID.getRadioType().equals(radioType)) {
|
if (activeBSSID.getRadioType().equals(radioType)) {
|
||||||
ssidStatistics.setBssid(new MacAddress(activeBSSID.getBssid()));
|
ssidStatistics.setBssid(MacAddress.valueOf(activeBSSID.getBssid()));
|
||||||
// ssid value, in case not in stats, else will take
|
// ssid value, in case not in stats, else will take
|
||||||
// stats value after
|
// stats value after
|
||||||
ssid = activeBSSID.getSsid();
|
ssid = activeBSSID.getSsid();
|
||||||
@@ -2346,7 +2346,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
// disconnect occured during this window
|
// disconnect occured during this window
|
||||||
if (client.hasMacAddress()) {
|
if (client.hasMacAddress()) {
|
||||||
ClientSession session = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
ClientSession session = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||||
new MacAddress(client.getMacAddress()));
|
MacAddress.valueOf(client.getMacAddress()));
|
||||||
|
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
if ((session.getDetails().getAssociationState() != null) && !session.getDetails()
|
if ((session.getDetails().getAssociationState() != null) && !session.getDetails()
|
||||||
|
|||||||
@@ -493,10 +493,10 @@ public class OpensyncExternalIntegrationCloudTest {
|
|||||||
|
|
||||||
Mockito.when(statusServiceInterface.update(ArgumentMatchers.any(Status.class))).thenReturn(bssidStatus);
|
Mockito.when(statusServiceInterface.update(ArgumentMatchers.any(Status.class))).thenReturn(bssidStatus);
|
||||||
com.telecominfraproject.wlan.client.models.Client clientInstance = new com.telecominfraproject.wlan.client.models.Client();
|
com.telecominfraproject.wlan.client.models.Client clientInstance = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
clientInstance.setMacAddress(new MacAddress("7C:AB:60:E6:EA:4D"));
|
clientInstance.setMacAddress(MacAddress.valueOf("7C:AB:60:E6:EA:4D"));
|
||||||
clientInstance.setDetails(new ClientInfoDetails());
|
clientInstance.setDetails(new ClientInfoDetails());
|
||||||
com.telecominfraproject.wlan.client.models.Client clientInstance2 = new com.telecominfraproject.wlan.client.models.Client();
|
com.telecominfraproject.wlan.client.models.Client clientInstance2 = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
clientInstance2.setMacAddress(new MacAddress("C0:9A:D0:76:A9:69"));
|
clientInstance2.setMacAddress(MacAddress.valueOf("C0:9A:D0:76:A9:69"));
|
||||||
clientInstance2.setDetails(new ClientInfoDetails());
|
clientInstance2.setDetails(new ClientInfoDetails());
|
||||||
Mockito.when(
|
Mockito.when(
|
||||||
clientServiceInterface.getOrNull(ArgumentMatchers.anyInt(), ArgumentMatchers.any(MacAddress.class)))
|
clientServiceInterface.getOrNull(ArgumentMatchers.anyInt(), ArgumentMatchers.any(MacAddress.class)))
|
||||||
@@ -506,10 +506,10 @@ public class OpensyncExternalIntegrationCloudTest {
|
|||||||
.thenReturn(clientInstance).thenReturn(clientInstance2);
|
.thenReturn(clientInstance).thenReturn(clientInstance2);
|
||||||
|
|
||||||
ClientSession clientSession = new ClientSession();
|
ClientSession clientSession = new ClientSession();
|
||||||
clientSession.setMacAddress(new MacAddress("7C:AB:60:E6:EA:4D"));
|
clientSession.setMacAddress(MacAddress.valueOf("7C:AB:60:E6:EA:4D"));
|
||||||
clientSession.setDetails(new ClientSessionDetails());
|
clientSession.setDetails(new ClientSessionDetails());
|
||||||
ClientSession clientSession2 = new ClientSession();
|
ClientSession clientSession2 = new ClientSession();
|
||||||
clientSession2.setMacAddress(new MacAddress("C0:9A:D0:76:A9:69"));
|
clientSession2.setMacAddress(MacAddress.valueOf("C0:9A:D0:76:A9:69"));
|
||||||
clientSession2.setDetails(new ClientSessionDetails());
|
clientSession2.setDetails(new ClientSessionDetails());
|
||||||
Mockito.when(clientServiceInterface.getSessionOrNull(ArgumentMatchers.anyInt(), ArgumentMatchers.anyLong(),
|
Mockito.when(clientServiceInterface.getSessionOrNull(ArgumentMatchers.anyInt(), ArgumentMatchers.anyLong(),
|
||||||
ArgumentMatchers.any(MacAddress.class))).thenReturn(clientSession).thenReturn(clientSession2);
|
ArgumentMatchers.any(MacAddress.class))).thenReturn(clientSession).thenReturn(clientSession2);
|
||||||
|
|||||||
@@ -210,10 +210,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessorTest {
|
|||||||
|
|
||||||
Mockito.when(statusServiceInterface.update(ArgumentMatchers.any(Status.class))).thenReturn(bssidStatus);
|
Mockito.when(statusServiceInterface.update(ArgumentMatchers.any(Status.class))).thenReturn(bssidStatus);
|
||||||
com.telecominfraproject.wlan.client.models.Client clientInstance = new com.telecominfraproject.wlan.client.models.Client();
|
com.telecominfraproject.wlan.client.models.Client clientInstance = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
clientInstance.setMacAddress(new MacAddress("7C:AB:60:E6:EA:4D"));
|
clientInstance.setMacAddress(MacAddress.valueOf("7C:AB:60:E6:EA:4D"));
|
||||||
clientInstance.setDetails(new ClientInfoDetails());
|
clientInstance.setDetails(new ClientInfoDetails());
|
||||||
com.telecominfraproject.wlan.client.models.Client clientInstance2 = new com.telecominfraproject.wlan.client.models.Client();
|
com.telecominfraproject.wlan.client.models.Client clientInstance2 = new com.telecominfraproject.wlan.client.models.Client();
|
||||||
clientInstance2.setMacAddress(new MacAddress("C0:9A:D0:76:A9:69"));
|
clientInstance2.setMacAddress(MacAddress.valueOf("C0:9A:D0:76:A9:69"));
|
||||||
clientInstance2.setDetails(new ClientInfoDetails());
|
clientInstance2.setDetails(new ClientInfoDetails());
|
||||||
Mockito.when(
|
Mockito.when(
|
||||||
clientServiceInterface.getOrNull(ArgumentMatchers.anyInt(), ArgumentMatchers.any(MacAddress.class)))
|
clientServiceInterface.getOrNull(ArgumentMatchers.anyInt(), ArgumentMatchers.any(MacAddress.class)))
|
||||||
@@ -223,10 +223,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessorTest {
|
|||||||
.thenReturn(clientInstance).thenReturn(clientInstance2);
|
.thenReturn(clientInstance).thenReturn(clientInstance2);
|
||||||
|
|
||||||
ClientSession clientSession = new ClientSession();
|
ClientSession clientSession = new ClientSession();
|
||||||
clientSession.setMacAddress(new MacAddress("7C:AB:60:E6:EA:4D"));
|
clientSession.setMacAddress(MacAddress.valueOf("7C:AB:60:E6:EA:4D"));
|
||||||
clientSession.setDetails(new ClientSessionDetails());
|
clientSession.setDetails(new ClientSessionDetails());
|
||||||
ClientSession clientSession2 = new ClientSession();
|
ClientSession clientSession2 = new ClientSession();
|
||||||
clientSession2.setMacAddress(new MacAddress("C0:9A:D0:76:A9:69"));
|
clientSession2.setMacAddress(MacAddress.valueOf("C0:9A:D0:76:A9:69"));
|
||||||
clientSession2.setDetails(new ClientSessionDetails());
|
clientSession2.setDetails(new ClientSessionDetails());
|
||||||
Mockito.when(clientServiceInterface.getSessionOrNull(ArgumentMatchers.anyInt(), ArgumentMatchers.anyLong(),
|
Mockito.when(clientServiceInterface.getSessionOrNull(ArgumentMatchers.anyInt(), ArgumentMatchers.anyLong(),
|
||||||
ArgumentMatchers.any(MacAddress.class))).thenReturn(clientSession).thenReturn(clientSession2);
|
ArgumentMatchers.any(MacAddress.class))).thenReturn(clientSession).thenReturn(clientSession2);
|
||||||
|
|||||||
@@ -51,4 +51,6 @@ public interface OpensyncExternalIntegrationInterface {
|
|||||||
void dhcpLeasedIpDbTableUpdate(List<Map<String,String>> dhcpAttributes, String apId, RowUpdateOperation rowUpdateOperation);
|
void dhcpLeasedIpDbTableUpdate(List<Map<String,String>> dhcpAttributes, String apId, RowUpdateOperation rowUpdateOperation);
|
||||||
|
|
||||||
void commandStateDbTableUpdate(List<Map<String,String>> commandStateAttributes, String apId, RowUpdateOperation rowUpdateOperation);
|
void commandStateDbTableUpdate(List<Map<String,String>> commandStateAttributes, String apId, RowUpdateOperation rowUpdateOperation);
|
||||||
|
|
||||||
|
void clearEquipmentStatus(String apId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,4 +275,10 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearEquipmentStatus(String apId) {
|
||||||
|
LOG.info("Received clearEquipmentStatus for ap {}",apId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,6 +199,8 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||||
|
|
||||||
|
extIntegrationInterface.clearEquipmentStatus(apId);
|
||||||
|
|
||||||
OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(apId);
|
OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(apId);
|
||||||
|
|
||||||
if (opensyncAPConfig != null) {
|
if (opensyncAPConfig != null) {
|
||||||
@@ -273,6 +275,10 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||||
|
|
||||||
|
|
||||||
|
extIntegrationInterface.clearEquipmentStatus(apId);
|
||||||
|
|
||||||
|
|
||||||
ovsdbDao.configureWifiRadios(ovsdbClient, opensyncAPConfig);
|
ovsdbDao.configureWifiRadios(ovsdbClient, opensyncAPConfig);
|
||||||
ovsdbDao.configureWifiRrm(ovsdbClient, opensyncAPConfig);
|
ovsdbDao.configureWifiRrm(ovsdbClient, opensyncAPConfig);
|
||||||
ovsdbDao.configureGreTunnels(ovsdbClient, opensyncAPConfig);
|
ovsdbDao.configureGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||||
|
|||||||
Reference in New Issue
Block a user