f-55: lab: provision générique des nœuds, rôle host, two installé par test/e2e #55

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-12 15:44:07 +02:00
commit f713f482fa
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
22 changed files with 481 additions and 369 deletions

View file

@ -34,17 +34,19 @@ type SegmentPlan struct {
}
type NodePlan struct {
Name string
Role string
Image string
CPUs int
Memory int
SSHPort int
Secondary map[string][]netip.Prefix
Loopback netip.Prefix
FRR string
Release string
Agent string
Name string
Role string
Image string
CPUs int
Memory int
SSHPort int
Secondary map[string][]netip.Prefix
Loopback netip.Prefix
FRR string
Provision string
PostProvision string
Files map[string]string
Services []string
}
type Cable struct {
@ -71,15 +73,17 @@ func Compute(t *Topology) (*Plan, error) {
p := &Plan{Name: t.Name, Images: append([]Image(nil), t.Images...)}
for i, n := range t.Nodes {
node := NodePlan{
Name: n.Name,
Role: n.Role,
Image: n.Image,
CPUs: n.CPUs,
Memory: n.Memory,
SSHPort: SSHBasePort + i,
FRR: n.FRR,
Release: n.Release,
Agent: n.Agent,
Name: n.Name,
Role: n.Role,
Image: n.Image,
CPUs: n.CPUs,
Memory: n.Memory,
SSHPort: SSHBasePort + i,
FRR: n.FRR,
Provision: n.Provision,
PostProvision: n.PostProvision,
Files: n.Files,
Services: n.Services,
}
for segment, raws := range n.Secondary {
for _, raw := range raws {