f-41: subnet: export du préfixe dans la VRF, suppression refusée tant qu'une VM l'utilise #41

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-11 20:28:16 +02:00
commit fe27d45262
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
12 changed files with 253 additions and 2 deletions

View file

@ -79,6 +79,14 @@ func (f *fakeHost) DeleteLink(name string) error {
return f.record("del " + name)
}
func (f *fakeHost) TableRouteVia(table uint32, dst *net.IPNet, gw net.IP, iface string) error {
return f.record(fmt.Sprintf("table %d route %s via %s dev %s", table, dst, gw, iface))
}
func (f *fakeHost) TableRouteDel(table uint32, dst *net.IPNet) error {
return f.record(fmt.Sprintf("table %d del %s", table, dst))
}
func (f *fakeHost) ApplyVRF(v frr.VRF) error {
return f.record(fmt.Sprintf("frr apply asn=%d id=%s vni=%d vtep=%s supernet=%s", v.ASN, v.ID, v.L3VNI, v.VTEP, v.Supernet))
}