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

Create/Update DHCP Services (Lease Times & DHCP Options) #176

Closed
crawc opened this issue Nov 9, 2021 · 2 comments · Fixed by #172
Closed

Create/Update DHCP Services (Lease Times & DHCP Options) #176

crawc opened this issue Nov 9, 2021 · 2 comments · Fixed by #172
Labels
feature request New feature or request

Comments

@crawc
Copy link

crawc commented Nov 9, 2021

Is your feature request related to existing pfSense functionality that is missing from the API? Please describe.
A URL or documentation about the requested functionality. Ex. /firewall_rule.php [...]
/services_dhcp.php?if=opt1
When you GET the DHCP these fields are return but it doesn't appear that they can be set when creating/updating DHCP services:

        "defaultleasetime": "2592000",
        "maxleasetime": "2678400",
        "numberoptions": {
            "item": [
                {
                    "number": "66",
                    "type": "string",
                    "value": "IlRoaXMgaXMgbXkgb3B0aW9uIDY2IGluIGJhc2U2NCI="
                }
            ]
        }

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Currently unable to set these options using the API

Describe the solution you'd like
A clear and concise description of what you want to happen.
Implement these fields when creating/updating DHCP services.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
After using the API to create the service I must use the pfSense interface (/services_dhcp.php?if=opt1) to set them and restart DHCP.

Additional context
Add any other context or screenshots about the feature request here.
Great work on this! Very helpful.

@crawc crawc added backlog Issues backlogged for inclusion in future releases feature request New feature or request labels Nov 9, 2021
@jaredhendrickson13 jaredhendrickson13 linked a pull request Dec 22, 2021 that will close this issue
@jaredhendrickson13 jaredhendrickson13 removed the backlog Issues backlogged for inclusion in future releases label Dec 22, 2021
@jaredhendrickson13
Copy link
Owner

Hey!

These features have been implemented on the v1.4.0 (#172) branch and are live on the v1.4.0beta_4 build that is posted on that pull request. Feel free to try it out. We are likely 1-2 months away from v1.4.0 being released as a production release.

Thanks!

@crawc
Copy link
Author

crawc commented Dec 27, 2021

**Awesome work! @jaredhendrickson13 **

Both the Lease times and other DHCP options seem to work great. I've tested mostly with stings for the DHCP options.
"item": [ { "number": "66", "type": "string", "value": "\"https://boot.myserver.com/boot/\"" } ] }

Would it be possible to add the NTP servers too?
"ntpserver": [ "0.pool.ntp.org", "1.pool.ntp.org", "2.pool.ntp.org" ]

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

Successfully merging a pull request may close this issue.

2 participants