Merge pull request #20 from Telecominfraproject/WIFI-1192

WIFI-1192 Reboot AP from cloud SDK does not work
This commit is contained in:
Mike Hansen
2020-12-12 16:49:51 -05:00
committed by GitHub

View File

@@ -197,6 +197,8 @@ public class OvsdbDao {
public long upgradeDlTimerSeconds; public long upgradeDlTimerSeconds;
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.awlan-node.upgrade_timer:90}") @org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.awlan-node.upgrade_timer:90}")
public long upgradeTimerSeconds; public long upgradeTimerSeconds;
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.awlan-node.reboot_or_reset_timer:10}")
public long rebootOrResetTimerSeconds;
@org.springframework.beans.factory.annotation.Value("${tip.wlan.externalFileStoreURL:https://localhost:9096}") @org.springframework.beans.factory.annotation.Value("${tip.wlan.externalFileStoreURL:https://localhost:9096}")
private String externalFileStoreURL; private String externalFileStoreURL;
@@ -4978,10 +4980,12 @@ public class OvsdbDao {
public void rebootOrResetAp(OvsdbClient ovsdbClient, String desiredApAction) { public void rebootOrResetAp(OvsdbClient ovsdbClient, String desiredApAction) {
try { try {
LOG.debug("rebootOrResetAp on AP perform {}.", desiredApAction, upgradeTimerSeconds); LOG.debug("rebootOrResetAp on AP perform {}, setting timer for {} seconds.", desiredApAction,
rebootOrResetTimerSeconds);
List<Operation> operations = new ArrayList<>(); List<Operation> operations = new ArrayList<>();
Map<String, Value> updateColumns = new HashMap<>(); Map<String, Value> updateColumns = new HashMap<>();
updateColumns.put("firmware_url", new Atom<>(desiredApAction)); updateColumns.put("firmware_url", new Atom<>(desiredApAction));
updateColumns.put("upgrade_timer", new Atom<>(rebootOrResetTimerSeconds));
Row row = new Row(updateColumns); Row row = new Row(updateColumns);
operations.add(new Update(awlanNodeDbTable, row)); operations.add(new Update(awlanNodeDbTable, row));
CompletableFuture<OperationResult[]> fResult = ovsdbClient.transact(ovsdbName, operations); CompletableFuture<OperationResult[]> fResult = ovsdbClient.transact(ovsdbName, operations);