kea-manage/ipv4/reservation/reservation.go
Matthew Stobbs a78f001a41 working configuration for reservations
- Make ipv4 reservations in kea by directly writing to the database
- uses same configuration file as database configuration under the
heading reservationV4
2024-09-24 14:43:54 -06:00

26 lines
443 B
Go

package reservation
import (
"git.staur.ca/stobbsm/kea-manage/lib/types"
)
type ReservationV4 struct {
Type int
SubnetID int
MacAddr string
Ipv4 string
Hostname string
}
func ReserveV4MacAddr(rtype string, mac string, addr string, hostname string, subnet int) *ReservationV4 {
r := &ReservationV4{
MacAddr: mac,
Type: types.Lookup(rtype),
SubnetID: subnet,
Ipv4: addr,
Hostname: hostname,
}
return r
}