mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-03 12:08:07 +00:00
TW-208: Table State Changes to EquipmentStatus
This commit is contained in:
@@ -143,7 +143,8 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
||||
rowContents.put("if_name", newRow.getStringColumn("if_name"));
|
||||
rowContents.put("freq_band",
|
||||
ovsdbDao.getSingleValueFromSet(newRow, "freq_band"));
|
||||
rowContents.put("country", newRow.getStringColumn("country"));
|
||||
rowContents.put("country",
|
||||
newRow.getSetColumn("country").toString());
|
||||
|
||||
extIntegrationInterface.wifiRadioStatusDbTableUpdate(
|
||||
rowContents, key,
|
||||
@@ -257,7 +258,8 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
||||
rowContents.put("if_name", newRow.getStringColumn("if_name"));
|
||||
rowContents.put("security",
|
||||
newRow.getMapColumn("security").toString());
|
||||
rowContents.put("bridge", newRow.getStringColumn("bridge"));
|
||||
rowContents.put("bridge", newRow.getSetColumn("bridge")
|
||||
.iterator().next().toString());
|
||||
|
||||
Set<Long> channel = newRow.getSetColumn("channel");
|
||||
if (!channel.isEmpty()) {
|
||||
@@ -282,7 +284,8 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
||||
rowContents.put("if_name", oldRow.getStringColumn("if_name"));
|
||||
rowContents.put("security",
|
||||
oldRow.getMapColumn("security").toString());
|
||||
rowContents.put("bridge", oldRow.getStringColumn("bridge"));
|
||||
rowContents.put("bridge", oldRow.getSetColumn("bridge")
|
||||
.iterator().next().toString());
|
||||
Set<Long> channel = oldRow.getSetColumn("channel");
|
||||
if (!channel.isEmpty()) {
|
||||
rowContents.put("channel",
|
||||
@@ -307,7 +310,8 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
||||
rowContents.put("if_name", newRow.getStringColumn("if_name"));
|
||||
rowContents.put("security",
|
||||
newRow.getMapColumn("security").toString());
|
||||
rowContents.put("bridge", newRow.getStringColumn("bridge"));
|
||||
rowContents.put("bridge", newRow.getSetColumn("bridge")
|
||||
.iterator().next().toString());
|
||||
Set<Long> channel = newRow.getSetColumn("channel");
|
||||
if (!channel.isEmpty()) {
|
||||
rowContents.put("channel",
|
||||
@@ -464,6 +468,7 @@ public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiVifStateDbTable);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiInetStateDbTable);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.awlanNodeDbTable);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiAssociatedClientsDbTable);
|
||||
} catch (OvsdbClientException e) {
|
||||
LOG.warn("Could not cancel Monitor {}", e);
|
||||
}
|
||||
|
||||
@@ -1385,7 +1385,7 @@ public class OvsdbDao {
|
||||
com.vmware.ovsdb.protocol.operation.notation.Map<String, Integer> thresholds = com.vmware.ovsdb.protocol.operation.notation.Map
|
||||
.of(thresholdMap);
|
||||
|
||||
if (!provisionedWifiStatsConfigs.containsKey("2.4G_device_null")) {
|
||||
if (!provisionedWifiStatsConfigs.containsKey("2.4G_device_on-chan")) {
|
||||
//
|
||||
// updateColumns.put("channel_list", channels );
|
||||
updateColumns.put("radio_type", new Atom<>("2.4G"));
|
||||
@@ -1469,7 +1469,7 @@ public class OvsdbDao {
|
||||
//
|
||||
}
|
||||
|
||||
if (!provisionedWifiStatsConfigs.containsKey("5GL_client_null")) {
|
||||
if (!provisionedWifiStatsConfigs.containsKey("5GL_client_on-chan")) {
|
||||
//
|
||||
updateColumns = new HashMap<>();
|
||||
// updateColumns.put("channel_list", channels );
|
||||
@@ -1488,7 +1488,7 @@ public class OvsdbDao {
|
||||
//
|
||||
}
|
||||
|
||||
if (!provisionedWifiStatsConfigs.containsKey("5GU_client_null")) {
|
||||
if (!provisionedWifiStatsConfigs.containsKey("5GU_client_on-chan")) {
|
||||
//
|
||||
updateColumns = new HashMap<>();
|
||||
// updateColumns.put("channel_list", channels );
|
||||
@@ -1524,7 +1524,7 @@ public class OvsdbDao {
|
||||
//
|
||||
}
|
||||
|
||||
if (!provisionedWifiStatsConfigs.containsKey("2.4G_client_null")) {
|
||||
if (!provisionedWifiStatsConfigs.containsKey("2.4G_client_on-chan")) {
|
||||
//
|
||||
updateColumns = new HashMap<>();
|
||||
// updateColumns.put("channel_list", channels );
|
||||
@@ -1594,22 +1594,22 @@ public class OvsdbDao {
|
||||
//
|
||||
}
|
||||
|
||||
// for (String band : new String[] { "2.4G", "5GL", "5G" }) {
|
||||
// if (!provisionedWifiStatsConfigs.containsKey(band + "_rssi_onChannel")) {
|
||||
// updateColumns = new HashMap<>();
|
||||
// updateColumns.put("radio_type", new Atom<>(band));
|
||||
// updateColumns.put("reporting_interval", new Atom<>(120));
|
||||
// updateColumns.put("sampling_interval", new Atom<>(10));
|
||||
// updateColumns.put("report_type", new Atom<>("average"));
|
||||
// updateColumns.put("stats_type", new Atom<>("rssi"));
|
||||
// updateColumns.put("survey_interval_ms", new Atom<>(0));
|
||||
// updateColumns.put("survey_type", new Atom<>("on-chan"));
|
||||
// row = new Row(updateColumns);
|
||||
//
|
||||
// operations.add(new Update(wifiStatsConfigDbTable, row));
|
||||
// }
|
||||
//
|
||||
// }
|
||||
for (String band : new String[] { "2.4G", "5GL", "5G" }) {
|
||||
if (!provisionedWifiStatsConfigs.containsKey(band + "_rssi_on-chan")) {
|
||||
updateColumns = new HashMap<>();
|
||||
updateColumns.put("radio_type", new Atom<>(band));
|
||||
updateColumns.put("reporting_interval", new Atom<>(120));
|
||||
updateColumns.put("sampling_interval", new Atom<>(10));
|
||||
updateColumns.put("report_type", new Atom<>("average"));
|
||||
updateColumns.put("stats_type", new Atom<>("rssi"));
|
||||
updateColumns.put("survey_interval_ms", new Atom<>(0));
|
||||
updateColumns.put("survey_type", new Atom<>("on-chan"));
|
||||
row = new Row(updateColumns);
|
||||
|
||||
operations.add(new Insert(wifiStatsConfigDbTable, row));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!operations.isEmpty()) {
|
||||
CompletableFuture<OperationResult[]> fResult = ovsdbClient.transact(ovsdbName, operations);
|
||||
|
||||
Reference in New Issue
Block a user