mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-01 11:07:49 +00:00
WIFI-1192 Reboot AP from cloud SDK does not work
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user