mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-12-02 10:13:50 +00:00
TW-208: ChannelInfoReport from Survey, RSSI metrics enable
This commit is contained in:
@@ -66,11 +66,13 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
|||||||
|
|
||||||
public void listenForConnections() {
|
public void listenForConnections() {
|
||||||
|
|
||||||
// This class is only used here, therefore changed it back to an inner class,
|
// This class is only used here, therefore changed it back to an inner
|
||||||
|
// class,
|
||||||
// removed the package level class.
|
// removed the package level class.
|
||||||
// All calling classes related to OVSDB are calling the MonitorCallback
|
// All calling classes related to OVSDB are calling the MonitorCallback
|
||||||
// interface, so the implementation can remain
|
// interface, so the implementation can remain
|
||||||
// hidden. This also gives handy access to the Autowired instances in the
|
// hidden. This also gives handy access to the Autowired instances in
|
||||||
|
// the
|
||||||
// container class.
|
// container class.
|
||||||
|
|
||||||
class ConnectusMonitorCallback implements MonitorCallback {
|
class ConnectusMonitorCallback implements MonitorCallback {
|
||||||
@@ -86,29 +88,30 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
|||||||
Set<String> tableNames = tableUpdates.getTableUpdates().keySet();
|
Set<String> tableNames = tableUpdates.getTableUpdates().keySet();
|
||||||
|
|
||||||
for (String name : tableNames) {
|
for (String name : tableNames) {
|
||||||
LOG.debug("Receive update for table {}", name);
|
LOG.trace("Receive update for table {}", name);
|
||||||
|
|
||||||
Map<UUID, RowUpdate> updates = tableUpdates.getTableUpdates().get(name).getRowUpdates();
|
Map<UUID, RowUpdate> updates = tableUpdates.getTableUpdates().get(name).getRowUpdates();
|
||||||
|
|
||||||
for (UUID id : updates.keySet()) {
|
for (UUID id : updates.keySet()) {
|
||||||
|
|
||||||
LOG.debug("Receive row update for uuid {}", id);
|
LOG.trace("Receive row update for uuid {}", id);
|
||||||
|
|
||||||
RowUpdate rowUpdate = updates.get(id);
|
RowUpdate rowUpdate = updates.get(id);
|
||||||
|
|
||||||
Row newRow = rowUpdate.getNew();
|
Row newRow = rowUpdate.getNew();
|
||||||
|
if (newRow != null) {
|
||||||
Set<String> newRowColumns = newRow.getColumns().keySet();
|
Set<String> newRowColumns = newRow.getColumns().keySet();
|
||||||
|
|
||||||
Row oldRow = rowUpdate.getOld();
|
Row oldRow = rowUpdate.getOld();
|
||||||
|
|
||||||
for (String column : newRowColumns) {
|
for (String column : newRowColumns) {
|
||||||
|
|
||||||
Value oldVal = null;
|
Value oldVal = null;
|
||||||
if (oldRow != null && oldRow.getColumns().containsKey(column)) oldVal = oldRow.getColumns().get(column);
|
if (oldRow != null && oldRow.getColumns().containsKey(column))
|
||||||
|
oldVal = oldRow.getColumns().get(column);
|
||||||
|
|
||||||
Value newVal = newRow.getColumns().get(column);
|
Value newVal = newRow.getColumns().get(column);
|
||||||
|
|
||||||
LOG.debug("For column {} previous value {} is now {}", column, oldVal, newVal);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -116,18 +119,22 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get session information for this client
|
// get session information for this client
|
||||||
// OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(connectedClientId);
|
// OvsdbSession ovsdbSession =
|
||||||
|
// ovsdbSessionMapInterface.getSession(connectedClientId);
|
||||||
// if (ovsdbSession == null) {
|
// if (ovsdbSession == null) {
|
||||||
// throw new IllegalStateException("AP with id " + connectedClientId + " is not connected");
|
// throw new IllegalStateException("AP with id " +
|
||||||
|
// connectedClientId + " is not connected");
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// OvsdbClient ovsdbClient = ovsdbSession.getOvsdbClient();
|
// OvsdbClient ovsdbClient = ovsdbSession.getOvsdbClient();
|
||||||
// OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(connectedClientId);
|
// OpensyncAPConfig opensyncAPConfig =
|
||||||
|
// extIntegrationInterface.getApConfig(connectedClientId);
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// example wifiVifStateDbTable get MAC ADDRESS via ovsdbClient from
|
// example wifiVifStateDbTable get MAC ADDRESS via ovsdbClient
|
||||||
// Wifi_Associated_Clients given the associated UUID for the client
|
// from
|
||||||
|
// Wifi_Associated_Clients given the associated UUID for the
|
||||||
|
// client
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// Changes from other Status (Wifi, Inet, etc.) tables?
|
// Changes from other Status (Wifi, Inet, etc.) tables?
|
||||||
@@ -152,9 +159,12 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
|||||||
|
|
||||||
ConnectNodeInfo connectNodeInfo = ovsdbDao.getConnectNodeInfo(ovsdbClient);
|
ConnectNodeInfo connectNodeInfo = ovsdbDao.getConnectNodeInfo(ovsdbClient);
|
||||||
|
|
||||||
// successfully connected - register it in our connectedClients table
|
// successfully connected - register it in our
|
||||||
// In Plume's environment clientCn is not unique that's why we are augmenting it
|
// connectedClients table
|
||||||
// with the serialNumber and using it as a key (equivalent of KDC unique qrCode)
|
// In Plume's environment clientCn is not unique that's why
|
||||||
|
// we are augmenting it
|
||||||
|
// with the serialNumber and using it as a key (equivalent
|
||||||
|
// of KDC unique qrCode)
|
||||||
String key = clientCn + "_" + connectNodeInfo.serialNumber;
|
String key = clientCn + "_" + connectNodeInfo.serialNumber;
|
||||||
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.newSession(key, ovsdbClient);
|
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.newSession(key, ovsdbClient);
|
||||||
extIntegrationInterface.apConnected(key, connectNodeInfo);
|
extIntegrationInterface.apConnected(key, connectNodeInfo);
|
||||||
@@ -197,10 +207,13 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
|||||||
|
|
||||||
String clientCn = SslUtil.extractCN(subjectDn);
|
String clientCn = SslUtil.extractCN(subjectDn);
|
||||||
|
|
||||||
// disconnected - deregister ovsdbClient from our connectedClients table
|
// disconnected - deregister ovsdbClient from our
|
||||||
// unfortunately we only know clientCn at this point, but in Plume's environment
|
// connectedClients table
|
||||||
|
// unfortunately we only know clientCn at this point, but in
|
||||||
|
// Plume's environment
|
||||||
// they are not unique
|
// they are not unique
|
||||||
// so we are doing a reverse lookup here, and then if we find the key we will
|
// so we are doing a reverse lookup here, and then if we find
|
||||||
|
// the key we will
|
||||||
// remove the entry from the connectedClients.
|
// remove the entry from the connectedClients.
|
||||||
String key = ConnectusOvsdbClient.this.ovsdbSessionMapInterface.lookupClientId(ovsdbClient);
|
String key = ConnectusOvsdbClient.this.ovsdbSessionMapInterface.lookupClientId(ovsdbClient);
|
||||||
|
|
||||||
@@ -235,7 +248,8 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
|||||||
|
|
||||||
ovsdbDao.configureStats(ovsdbClient);
|
ovsdbDao.configureStats(ovsdbClient);
|
||||||
|
|
||||||
// Check if device stats is configured in Wifi_Stats_Config table, provision it
|
// Check if device stats is configured in Wifi_Stats_Config table,
|
||||||
|
// provision it
|
||||||
// if needed
|
// if needed
|
||||||
if (ovsdbDao.getDeviceStatsReportingInterval(ovsdbClient) != collectionIntervalSecDeviceStats) {
|
if (ovsdbDao.getDeviceStatsReportingInterval(ovsdbClient) != collectionIntervalSecDeviceStats) {
|
||||||
ovsdbDao.updateDeviceStatsReportingInterval(ovsdbClient, collectionIntervalSecDeviceStats);
|
ovsdbDao.updateDeviceStatsReportingInterval(ovsdbClient, collectionIntervalSecDeviceStats);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user