[Schema] Add unique constraint on InfraVLAN.vlan_id for human_friendly_id #45

Closed
opened 2026-02-09 18:09:11 +00:00 by Damien · 1 comment
Owner

🔴 Critique — Validation Infrahub échoue

Problème

InfraVLAN utilise vlan_id__value comme human_friendly_id mais vlan_id n'a pas unique: true. Infrahub exige cette contrainte pour tout attribut référencé dans human_friendly_id.

Correction

# schemas/vlan_vxlan.yml — InfraVLAN
attributes:
  - name: vlan_id
    kind: Number
    unique: true  # ← ajouter
    description: VLAN ID (1-4094)

Fichier

  • schemas/vlan_vxlan.yml

Validation

  • infrahubctl schema check schemas/
## 🔴 Critique — Validation Infrahub échoue ### Problème `InfraVLAN` utilise `vlan_id__value` comme `human_friendly_id` mais `vlan_id` n'a pas `unique: true`. Infrahub exige cette contrainte pour tout attribut référencé dans `human_friendly_id`. ### Correction ```yaml # schemas/vlan_vxlan.yml — InfraVLAN attributes: - name: vlan_id kind: Number unique: true # ← ajouter description: VLAN ID (1-4094) ``` ### Fichier - `schemas/vlan_vxlan.yml` ### Validation - `infrahubctl schema check schemas/` ## Related - Sub-task of: #41 - **⚡ Ordre d'exécution : 3/7** - Depends on: #44
Damien added the phase-2-minimal-reconciler label 2026-02-09 18:10:27 +00:00
Damien added this to the Fabric Orchestrator project 2026-02-09 19:03:29 +00:00
Damien moved this to In Progress in Fabric Orchestrator on 2026-02-09 19:03:47 +00:00
Damien added reference feature/41-infrahub-schema 2026-02-13 10:48:49 +00:00
Author
Owner

Implémenté

Commit: 82af2da

Changements dans schemas/vlan_vxlan.yml

  • Ajout unique: true sur InfraVLAN.vlan_id

Cela satisfait l'exigence Infrahub : tout attribut référencé dans human_friendly_id doit avoir unique: true.

Validation

Schema check passé.

## Implémenté ✅ **Commit:** [`82af2da`](https://gitea.arnodo.fr/Damien/fabric-orchestrator/commit/82af2daafc66cfa847ba44998d1243a4ec237add) ### Changements dans `schemas/vlan_vxlan.yml` - Ajout `unique: true` sur `InfraVLAN.vlan_id` Cela satisfait l'exigence Infrahub : tout attribut référencé dans `human_friendly_id` doit avoir `unique: true`. ### Validation Schema check passé.
Damien moved this to Done in Fabric Orchestrator on 2026-02-25 13:59:07 +00:00
Sign in to join this conversation.