Skip to content

Check for ISC DHCP plugin availability before querying for leases#487

Merged
Snuffy2 merged 3 commits intotravisghansen:mainfrom
Snuffy2:Support-removal-of-ISC-DHCP
Feb 7, 2026
Merged

Check for ISC DHCP plugin availability before querying for leases#487
Snuffy2 merged 3 commits intotravisghansen:mainfrom
Snuffy2:Support-removal-of-ISC-DHCP

Conversation

@Snuffy2
Copy link
Collaborator

@Snuffy2 Snuffy2 commented Feb 1, 2026

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:

  • Added a new _get_check async method to custom_components/opnsense/pyopnsense/__init__.py to verify API path accessibility before making requests. This improves error handling and prevents unnecessary calls.
  • Updated the _get_isc_dhcpv4_leases and _get_isc_dhcpv6_leases methods to use _get_check before attempting to retrieve leases, ensuring the respective services are running and accessible. [1] [2]

Documentation standards update:

  • Revised the AGENTS.md project structure expectations to require NumPy-style docstrings for all files, classes, and methods, including private methods, improving code documentation consistency.

Fixes #486

@Snuffy2 Snuffy2 force-pushed the Support-removal-of-ISC-DHCP branch from 6437e62 to 1c6811f Compare February 1, 2026 17:14
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2026

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  custom_components/opnsense/pyopnsense
  __init__.py 677
Project Total  

This report was generated by python-coverage-comment-action

@Snuffy2 Snuffy2 force-pushed the Support-removal-of-ISC-DHCP branch from f45251c to 0156333 Compare February 1, 2026 17:22
@Snuffy2 Snuffy2 force-pushed the Support-removal-of-ISC-DHCP branch from 0156333 to 8fc20be Compare February 7, 2026 00:13
@Snuffy2 Snuffy2 changed the title Check for dhcpv4/6 plugin before querying it Check for ISC DHCP plugin availability before querying for leases Feb 7, 2026
@Snuffy2 Snuffy2 merged commit 5c62484 into travisghansen:main Feb 7, 2026
6 checks passed
@Snuffy2 Snuffy2 deleted the Support-removal-of-ISC-DHCP branch February 7, 2026 00:45
@Snuffy2 Snuffy2 added enhancement Enhancing existing functionality bugfix Fix something that isn't working labels Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix something that isn't working enhancement Enhancing existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: OPNSense 26.1 DHCP lease reporting (ISC Legacy deprecation)

1 participant