f-46: watchdog: reconcile the served dhcp state against the database #46
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
a220cce77e
commit
7d4d856c95
8 changed files with 584 additions and 39 deletions
|
|
@ -2,6 +2,7 @@ package dhcpbackend
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"git.g3e.fr/syonad/two/internal/dhcp"
|
||||
"git.g3e.fr/syonad/two/pkg/systemd"
|
||||
|
|
@ -125,3 +126,7 @@ func (b Dnsmasq) DelVM(s Subnet, vmName string, _ []Reservation) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b Dnsmasq) ConfigPath(s Subnet) string {
|
||||
return filepath.Join(b.confDir(), s.Instance()+".conf")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,3 +137,11 @@ func (b Two) DelVM(s Subnet, vmName string, res []Reservation) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b Two) StatePath(s Subnet) string {
|
||||
return b.statePath(s)
|
||||
}
|
||||
|
||||
func (b Two) State(s Subnet) (dhcpapi.State, string, error) {
|
||||
return b.client(s).GetState()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue