mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-01 19:17:52 +00:00
[WIFI-3165] Keep last stats received timestamp in gateway client session map
Add API call to controller to get timestamp. Signed-off-by: Mike Hansen <mike.hansen@connectus.ai>
This commit is contained in:
@@ -25,6 +25,7 @@ import org.springframework.security.web.bind.annotation.AuthenticationPrincipal;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.telecominfraproject.wlan.core.client.PingClient;
|
||||
@@ -242,6 +243,18 @@ public class OpensyncCloudGatewayController {
|
||||
public GatewayDefaults retrieveGatewayDefaults() {
|
||||
return new GatewayDefaults();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/lastReceivedStatsTimestamp", method = RequestMethod.GET)
|
||||
public Long lastReceivedStatsTimestamp(@RequestParam String apId) {
|
||||
Long ret = null;
|
||||
if (ovsdbSessionMapInterface.getSession(apId) != null) {
|
||||
ret = ovsdbSessionMapInterface.getSession(apId).getMostRecentStatsTimestamp();
|
||||
LOG.debug("lastReceivedStatsTimestamp for apId {} {}",apId,ret);
|
||||
} else {
|
||||
LOG.warn("lastReceivedStatsTimestamp found no session for {}, cannot get timestamp",apId);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify a route to customer equipment
|
||||
|
||||
Reference in New Issue
Block a user