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 2cb7c05d88
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
16 changed files with 394 additions and 310 deletions

View file

@ -22,15 +22,17 @@ func (p *Plan) Write(w io.Writer) error {
var extras []NodePlan
for _, n := range p.Nodes {
if len(n.Secondary) > 0 || n.Loopback.IsValid() || n.FRR != "" || n.Release != "" || n.Agent != "" {
if len(n.Secondary) > 0 || n.Loopback.IsValid() || n.FRR != "" || n.Provision != "" || n.PostProvision != "" || len(n.Files) > 0 || len(n.Services) > 0 {
extras = append(extras, n)
}
}
if len(extras) > 0 {
fmt.Fprintf(tw, "\nroles\n")
fmt.Fprintf(tw, " name\tloopback\tsecondary\tfrr\trelease\tagent\n")
fmt.Fprintf(tw, " name\tloopback\tsecondary\tfrr\tprovision\tpost_provision\tfiles\tservices\n")
for _, n := range extras {
fmt.Fprintf(tw, " %s\t%s\t%s\t%s\t%s\t%s\n", n.Name, orDash(loopback(n)), orDash(secondary(n)), orDash(filepath.Base(n.FRR)), orDash(n.Release), orDash(filepath.Base(n.Agent)))
fmt.Fprintf(tw, " %s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", n.Name, orDash(loopback(n)), orDash(secondary(n)),
orDash(filepath.Base(n.FRR)), orDash(filepath.Base(n.Provision)), orDash(filepath.Base(n.PostProvision)),
orDash(strings.Join(sortedKeys(n.Files), ",")), orDash(strings.Join(n.Services, ",")))
}
}