mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-02 11:37:49 +00:00
WIFI-1443: OSGW add default delay, duration to Command_Config, set timestamp to current time (UTC)
This commit is contained in:
@@ -62,6 +62,12 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.preventClientCnAlteration:false}")
|
@org.springframework.beans.factory.annotation.Value("${tip.wlan.preventClientCnAlteration:false}")
|
||||||
private boolean preventClientCnAlteration;
|
private boolean preventClientCnAlteration;
|
||||||
|
|
||||||
|
@org.springframework.beans.factory.annotation.Value("${tip.wlan.defaultCommandDuration:3600}")
|
||||||
|
private long defaultCommandDurationSec;
|
||||||
|
|
||||||
|
@org.springframework.beans.factory.annotation.Value("${tip.wlan.defaultCommandDelay:60}")
|
||||||
|
private long defaultCommandDelaySec;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SslContext sslContext;
|
private SslContext sslContext;
|
||||||
|
|
||||||
@@ -813,17 +819,11 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
try {
|
try {
|
||||||
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
||||||
OvsdbClient ovsdbClient = session.getOvsdbClient();
|
OvsdbClient ovsdbClient = session.getOvsdbClient();
|
||||||
|
|
||||||
// TODO: need to establish what the command will be to start debug
|
|
||||||
// logging, on the AP side
|
|
||||||
// For now, use start_debug_engine
|
|
||||||
// Map will have gateway_host and gateway_port for now
|
|
||||||
// Delay/Duration TBD, just use 0s for now
|
|
||||||
Map<String, String> payload = new HashMap<>();
|
Map<String, String> payload = new HashMap<>();
|
||||||
payload.put("gateway_hostname", gatewayHostname);
|
payload.put("gateway_hostname", gatewayHostname);
|
||||||
payload.put("gateway_port", gatewayPort.toString());
|
payload.put("gateway_port", gatewayPort.toString());
|
||||||
ovsdbDao.configureCommands(ovsdbClient, OvsdbDao.StartDebugEngineApCommand, payload, Long.valueOf(0L),
|
ovsdbDao.configureCommands(ovsdbClient, OvsdbDao.StartDebugEngineApCommand, payload, defaultCommandDelaySec,
|
||||||
Long.valueOf(0L));
|
defaultCommandDurationSec);
|
||||||
|
|
||||||
LOG.debug("Started debug engine on AP {} with gateway {} port {}", apId, gatewayHostname, gatewayPort);
|
LOG.debug("Started debug engine on AP {} with gateway {} port {}", apId, gatewayHostname, gatewayPort);
|
||||||
return "Started debug engine on AP " + apId + " with gateway " + gatewayHostname + " port " + gatewayPort;
|
return "Started debug engine on AP " + apId + " with gateway " + gatewayHostname + " port " + gatewayPort;
|
||||||
|
|||||||
@@ -2562,8 +2562,8 @@ public class OvsdbDao {
|
|||||||
commandConfigColumns.put("payload", com.vmware.ovsdb.protocol.operation.notation.Map.of(payload));
|
commandConfigColumns.put("payload", com.vmware.ovsdb.protocol.operation.notation.Map.of(payload));
|
||||||
|
|
||||||
commandConfigColumns.put("delay", new Atom<>(delay));
|
commandConfigColumns.put("delay", new Atom<>(delay));
|
||||||
commandConfigColumns.put("duration", new Atom<>(delay));
|
commandConfigColumns.put("duration", new Atom<>(duration));
|
||||||
|
commandConfigColumns.put("timestamp", new Atom<>(System.currentTimeMillis()));
|
||||||
Row row = new Row(commandConfigColumns);
|
Row row = new Row(commandConfigColumns);
|
||||||
if (getProvisionedCommandConfigs(ovsdbClient).containsKey(command)) {
|
if (getProvisionedCommandConfigs(ovsdbClient).containsKey(command)) {
|
||||||
operations.add(new Update(commandConfigDbTable, conditions, row));
|
operations.add(new Update(commandConfigDbTable, conditions, row));
|
||||||
|
|||||||
Reference in New Issue
Block a user