get_radius_clients() and get_radius_users() (napalm_opnsense/opnsense.py, lines 1206–1215 and 1252–1262 at 521f7c5) catch every exception and return []. So a caller cannot tell "FreeRADIUS has no clients" from "the firewall did not answer".
netOrk now asks these getters whether a RADIUS entry whose add was cut off is on the device (NetOrk/netork#2162, PR NetOrk/netork#2546). On an empty list it would have forgotten a client the device still has, with its shared secret live on FreeRADIUS. netOrk now never trusts an empty list from this driver, so such an entry can only be settled once the device lists other entries.
Fix:
Both getters raise when the request fails or the answer has no rows list, instead of returning []. An empty list then means the device answered with none.
The driver declares it with RADIUS_READS_RAISE = True on the class, which netOrk reads before it trusts an empty list.
create_radius_client() and create_radius_user() keep answering success after a saved add whose id lookup fails. The add went through, and the id stays None, as it does today when the name is not found.
Tests first: a failed request and a malformed answer raise; an empty rows list is []; a saved add whose lookup fails still answers success.
Prio P2: a failed read is taken as "nothing there", which can leave a NAS client with its shared secret on the firewall while netOrk forgets it.
`get_radius_clients()` and `get_radius_users()` (`napalm_opnsense/opnsense.py`, lines 1206–1215 and 1252–1262 at `521f7c5`) catch every exception and return `[]`. So a caller cannot tell "FreeRADIUS has no clients" from "the firewall did not answer".
netOrk now asks these getters whether a RADIUS entry whose add was cut off is on the device (NetOrk/netork#2162, PR NetOrk/netork#2546). On an empty list it would have forgotten a client the device still has, with its shared secret live on FreeRADIUS. netOrk now never trusts an empty list from this driver, so such an entry can only be settled once the device lists other entries.
**Fix:**
- Both getters raise when the request fails or the answer has no `rows` list, instead of returning `[]`. An empty list then means the device answered with none.
- The driver declares it with `RADIUS_READS_RAISE = True` on the class, which netOrk reads before it trusts an empty list.
- `create_radius_client()` and `create_radius_user()` keep answering `success` after a saved add whose id lookup fails. The add went through, and the id stays `None`, as it does today when the name is not found.
**Tests first:** a failed request and a malformed answer raise; an empty `rows` list is `[]`; a saved add whose lookup fails still answers `success`.
**Prio P2:** a failed read is taken as "nothing there", which can leave a NAS client with its shared secret on the firewall while netOrk forgets it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
get_radius_clients()andget_radius_users()(napalm_opnsense/opnsense.py, lines 1206–1215 and 1252–1262 at521f7c5) catch every exception and return[]. So a caller cannot tell "FreeRADIUS has no clients" from "the firewall did not answer".netOrk now asks these getters whether a RADIUS entry whose add was cut off is on the device (NetOrk/netork#2162, PR NetOrk/netork#2546). On an empty list it would have forgotten a client the device still has, with its shared secret live on FreeRADIUS. netOrk now never trusts an empty list from this driver, so such an entry can only be settled once the device lists other entries.
Fix:
rowslist, instead of returning[]. An empty list then means the device answered with none.RADIUS_READS_RAISE = Trueon the class, which netOrk reads before it trusts an empty list.create_radius_client()andcreate_radius_user()keep answeringsuccessafter a saved add whose id lookup fails. The add went through, and the id staysNone, as it does today when the name is not found.Tests first: a failed request and a malformed answer raise; an empty
rowslist is[]; a saved add whose lookup fails still answerssuccess.Prio P2: a failed read is taken as "nothing there", which can leave a NAS client with its shared secret on the firewall while netOrk forgets it.