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

[general question] listing dhcp leases #52

Open
patanne opened this issue Apr 17, 2024 · 4 comments · May be fixed by #54
Open

[general question] listing dhcp leases #52

patanne opened this issue Apr 17, 2024 · 4 comments · May be fixed by #54

Comments

@patanne
Copy link

patanne commented Apr 17, 2024

I just stumbled across this project and am extremely interested. Is there a CLI to query the current leases or should we be hitting the SQL database directly? Side note. I saw the API request for lease info. That is clearly of interest as it is applicable here.

With our existing tools we keep two lists. Dynamic leases and static (reserved). We treat them differently for measuring lease block/range saturation. Looking at the migrations there is no field that flags dynamic vs static. Will we be able to get that info without having to cross reference the config file?

@leshow
Copy link
Collaborator

leshow commented Apr 21, 2024

Right now you have to talk to sqlite directly for dynamic leases and the config file for static leases.

If this is of interest to more than one person, I'll try to add it soon. If we had /leases/static and /leases/dynamic as an endpoint you could curl, would that work?

@patanne
Copy link
Author

patanne commented Apr 22, 2024

that would be absolutely perfect for me.

@patanne
Copy link
Author

patanne commented May 8, 2024

thinking about this further, if we had just one endpoint /leases, that would be adequate so long as what was returned had a field indicating whether it was reserved or not.

@leshow leshow linked a pull request May 10, 2024 that will close this issue
@leshow
Copy link
Collaborator

leshow commented May 10, 2024

That sounds fine, I've got a draft started for this currently unfinished. We may as well add a /config endpoint or something to fetch the current config while we're at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants