Check for ISC DHCP plugin availability before querying for leases#487
Merged
Snuffy2 merged 3 commits intotravisghansen:mainfrom Feb 7, 2026
Merged
Conversation
6437e62 to
1c6811f
Compare
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
f45251c to
0156333
Compare
0156333 to
8fc20be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to both the codebase. The main changes include enhanced API accessibility checks before retrieving DHCP leases and new utility methods.
API access checks and new utility method:
_get_checkasync method tocustom_components/opnsense/pyopnsense/__init__.pyto verify API path accessibility before making requests. This improves error handling and prevents unnecessary calls._get_isc_dhcpv4_leasesand_get_isc_dhcpv6_leasesmethods to use_get_checkbefore attempting to retrieve leases, ensuring the respective services are running and accessible. [1] [2]Documentation standards update:
AGENTS.mdproject structure expectations to require NumPy-style docstrings for all files, classes, and methods, including private methods, improving code documentation consistency.Fixes #486