Compare commits

..

1 Commits

Author SHA1 Message Date
Thomas Leung
551db33074 Merged in NETEXP-3230 (pull request #21)
[NETEXP-3230] fix for not populating Node_Config table

Approved-by: Ralph.lee
2021-10-20 12:52:30 -04:00
2 changed files with 19 additions and 4 deletions

View File

@@ -1152,8 +1152,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
continue;
}
LOG.debug("Values from Vif State Mac (BSSID) {} SSID {} AssociatedClients {} Channel {}", bssid, ssid,
vifState.getAssociatedClients(), channel);
LOG.debug("Values from Vif State Mac (BSSID) {} SSID {} AssociatedClients {} Channel {}", bssid, ssid, vifState.getAssociatedClients());
RadioType radioType = null;
Map<RadioType, RfElementConfiguration> rfElementMap = rfConfig.getRfConfigMap();
@@ -1405,7 +1404,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
apElementConfiguration.getRadioMap().get(radioState.getFreqBand()).setAllowedChannelsPowerLevels(channelPowerLevels);
}
LOG.debug("Updated AllowedChannels from Wifi_Radio_State table change for AP {} configStateMismatch {}", apId, configStateMismatch);
LOG.debug("Updated AllowedChannels from Wifi_Radio_State table change for AP {}", apId);
return configStateMismatch;
}

View File

@@ -145,8 +145,24 @@ public class OvsdbNodeConfig extends OvsdbDaoBase {
List.of(new Condition("module", Function.EQUALS, new Atom<>("led"))), new Row(columns)));
CompletableFuture<OperationResult[]> fResult = ovsdbClient.transact(ovsdbName, operations);
OperationResult[] result = fResult.get(ovsdbTimeoutSec, TimeUnit.SECONDS);
long numUpdates = 0;
for (OperationResult res : result) {
LOG.debug("processLedControlEnabled result {}", res);
if (res instanceof UpdateResult) {
numUpdates += ((UpdateResult) res).getCount();
LOG.debug("processLedControlEnabled update result {}", res);
}
}
if (numUpdates == 0) {
// no records existed, insert the row instead
operations.clear();
operations.add(new Insert(nodeConfigTable, new Row(columns)));
fResult = ovsdbClient.transact(ovsdbName, operations);
result = fResult.get(ovsdbTimeoutSec, TimeUnit.SECONDS);
for (OperationResult res : result) {
if (res instanceof InsertResult) {
LOG.debug("processLedControlEnabled insert result {}", res);
}
}
}
} catch (OvsdbClientException | InterruptedException | ExecutionException | TimeoutException e) {
throw new RuntimeException(e);