Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhcp: T7052: Refactor kea dhcp op-mode functions to vyos.kea #4307

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

indrajitr
Copy link
Contributor

Relocate the kea dhcp op-mode functions to kea helper functions in vyos.kea. This allows the functions to be reused by other scripts, not just op-mode wrappers.

This moves the source of truth for the op-mode commands to the actual running kea instance, rather than VyOS config path.

Also, apply some minor code cleanup, rename show_pool_statistics to show_server_pool_statistics, and make some of the mappings consistent across the functions.

Change summary

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

How to test / Smoketest result

Try op-mode commands:

show dhcp server static-mappings
show dhcp server leases
show dhcp server statistics

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Copy link

github-actions bot commented Jan 16, 2025

👍
No issues in PR Title / Commit Title

Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it's a good idea to move warning text to constants, if it appears in more than one place.

@indrajitr
Copy link
Contributor Author

I wonder if it's a good idea to move warning text to constants, if it appears in more than one place.

Of course! I missed that part. Update coming up shortly.

@indrajitr indrajitr force-pushed the kea-refactor branch 2 times, most recently from f5b23de to db74f89 Compare January 16, 2025 22:51
Relocate the kea dhcp op-mode functions to kea helper
functions in vyos.kea. This allows the functions to
be reused by other scripts, not just op-mode wrappers.

This moves the source of truth for the op-mode
commands to the actual running kea instance,
rather than VyOS config path.

Also, apply some minor code cleanup and make some
of the mappings consistent across the functions.
Copy link

CI integration 👍 passed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

@c-po c-po merged commit b6e8243 into vyos:current Jan 20, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants