UI : vocabulaire unifié, comptes + mots de passe, choix par élément, clé AES auto

This commit is contained in:
claude Bot committed 2026-10-23 18:47:04 +02:00
1 parent ee8343c69f
commit 2ca2f87307
19 files changed
+377 -143

No files matched your search

+6 -6
View File
@@ -315,7 +315,7 @@ type ClientPlan struct {
// Plans returns the plans of the given clients restricted to the given objects
// (empty: everything), as a dry-run shows them and an apply checks them.
func (st *State) Plans(keys []string) []ClientPlan {
func (st *State) Plans(keys []string, skip []model.Kind) []ClientPlan {
var out []ClientPlan
for _, c := range st.Clients {
cp := ClientPlan{Client: c.Name}
@@ -325,7 +325,7 @@ func (st *State) Plans(keys []string) []ClientPlan {
case c.Error != "":
cp.Error = c.Error
default:
cp.Plan = engine.Filter(c.Plan, keys)
cp.Plan = engine.Skip(c.Plan, keys, skip)
cp.Digest = cp.Plan.Digest()
cp.SDN = cp.Plan.HasSDN()
}
@@ -336,7 +336,7 @@ func (st *State) Plans(keys []string) []ClientPlan {
// Apply writes one plan on a client, then checks that the selected objects are
// in line with the reference (same reference objects as the plan).
func (st *State) Apply(ctx context.Context, cp ClientPlan, keys []string, log func(engine.Step)) error {
func (st *State) Apply(ctx context.Context, cp ClientPlan, keys []string, skip []model.Kind, log func(engine.Step)) error {
cl, ok := st.cfg.Client(cp.Client)
if !ok {
return fmt.Errorf("unknown client %q", cp.Client)
@@ -351,7 +351,7 @@ func (st *State) Apply(ctx context.Context, cp ClientPlan, keys []string, log fu
}
start := time.Now()
err = engine.Verify(ctx, c, func(actual []model.Object) engine.Plan {
return engine.Filter(engine.MakePlan(st.cfg, cl, st.ref, actual), keys)
return engine.Skip(engine.MakePlan(st.cfg, cl, st.ref, actual), keys, skip)
}, st.cfg.Kinds)
s := engine.Step{At: start.UTC(), Action: "verify"}
if err != nil {
@@ -394,7 +394,7 @@ func CheckCluster(ctx context.Context, cl config.Cluster, pinTLS, trust bool) Ch
cl.Fingerprint, res.TLSFingerprint = fp, fp
}
if cl.Insecure {
res.Warnings = append(res.Warnings, "certificat TLS non vérifié (labo uniquement)")
res.Warnings = append(res.Warnings, "TLS certificate not verified (lab only)")
}
key := cl.SSHHostKey
cl.SSHHostKey = "" // API only for now
@@ -433,7 +433,7 @@ func CheckCluster(ctx context.Context, cl config.Cluster, pinTLS, trust bool) Ch
if strings.Contains(err.Error(), "host key mismatch") {
_, fp, _ := sshx.Scan(ctx, o)
res.SSHMismatch, res.SSHFingerprint = true, fp
return fail(fmt.Errorf("SSH: le nœud %s présente la clé d'hôte %s au lieu de %s enregistrée", o.Host, fp, sshx.Fingerprint(key)))
return fail(fmt.Errorf("SSH: node %s presents host key %s instead of the recorded %s", o.Host, fp, sshx.Fingerprint(key)))
}
return fail(fmt.Errorf("SSH: %w", err))
}