fix(radius): the getters raise when the firewall does not answer (#49)
driver / standard (pull_request) Failing after 17s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / lowest (pull_request) Successful in 32s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m3s
CI / driver (pull_request) Failing after 2m21s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Failing after 17s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / lowest (pull_request) Successful in 32s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m3s
CI / driver (pull_request) Failing after 2m21s
driver / publish (pull_request) Skipped
get_radius_clients() and get_radius_users() caught every exception and returned [], so a caller could not tell no entries from no answer. netOrk asks them whether an entry whose add was cut off is on the firewall, and an empty list would have made it forget a NAS client still live there. Both now raise for a failed request or an answer without rows; an empty list is the firewall's answer, which RADIUS_READS_RAISE = True declares. A saved add whose id lookup fails still answers success, with no id. Closes #49
This commit is contained in:
1 parent
521f7c5d73
commit
9c31afd5d7
3 files changed
+72
-18
No files matched your search
@@ -37,6 +37,10 @@ All notable changes to this driver. The format follows
|
||||
uploaded config.xml.
|
||||
|
||||
### Fixed
|
||||
- `get_radius_clients()` and `get_radius_users()` raise when the firewall does not
|
||||
answer or the answer holds no `rows`, instead of returning `[]`, so an empty list
|
||||
means FreeRADIUS has none (#49). `RADIUS_READS_RAISE = True` on the driver says so.
|
||||
A saved add whose id lookup fails still answers `success`, with no id.
|
||||
- `get_ntp_servers()` lists the configured servers of config.xml, the same list as
|
||||
`get_time_sync()`. It read a `peers` field `/api/ntpd/service/status` does not
|
||||
have -- the endpoint answers with ntpq's associations as `rows` -- and so found no
|
||||
|
||||
Reference in new issue
Block a user