#59 — Checklist Cutover (40 points)
PLANIFIÉ
Priorité: 🟠 HAUTE · Type: TYPE B · Conteneur: rgz-api · Code: app/api/v1/endpoints/cutover.pyDépendances: #1 rgz-api
Description
La checklist cutover est un questionnaire de 40 points validant la readiness d'un nouveau revendeur ou site avant sa migration en production. Regroupés en 6 catégories (Infrastructure, Réseau, Sécurité, Billing, Monitoring, Communication), ces points garantissent que toutes les dépendances sont satisfaites : connectivité testée, configurations appliquées, alertes en place, et processus documentés.
Aucun revendeur ne peut passer en statut "active" (go-live étape 6 du #56 onboarding) sans une validation à 40/40. La checklist peut être remplie progressivement par le revendeur et validée par la NOC. Des rappels SMS sont envoyés si certaines étapes traînent.
Architecture Interne
Checklist = 40 points groupés en 6 domaines
DOMAINE 1: INFRASTRUCTURE (10 points)
1. [ ] CPE Ubiquiti LiteBeam AC-M2 reçue et déballée
2. [ ] Boîtier alimenté en 24V (PoE injector testé)
3. [ ] Antenne connectée et orientée (direction compass fournie)
4. [ ] Câble Ethernet Cat-6 >15m testé (pas de coupures)
5. [ ] Liaison SSID visible en WiFi scan depuis client test
6. [ ] Accès Web console CPE à https://10.{vlan}.0.1/
7. [ ] Firmware CPE à version stable (≥ 8.7.8 LiteBeam)
8. [ ] Sauvegardes config CPE exportées (format .backup)
9. [ ] Photo installation terrain (antenne, cables, boîtier)
10. [ ] LED Power + Link verts (pas clignotements anormaux)
DOMAINE 2: RÉSEAU (8 points)
11. [ ] Adresse IP CPE fixe 10.{vlan}.0.2 assignée (static ARP)
12. [ ] DHCP Kea pool 10.{vlan}.0.50-200 actif (test client connexion)
13. [ ] DNS fonctionne (ping 8.8.8.8 depuis CPE)
14. [ ] Latence vers hub RGZ < 100ms (ping central depuis CPE)
15. [ ] Débit DL ≥ 5 Mbps, UL ≥ 1 Mbps (iperf3 test #79)
16. [ ] Perte paquets < 1% sur liaison principal
17. [ ] Bande passante suffit pour concurrent users (min 5 users simultanés)
18. [ ] IPv6 optionnel mais documenté si déployé
DOMAINE 3: SÉCURITÉ (7 points)
19. [ ] Mot de passe admin CPE changé (min 16 chars, stocké vault)
20. [ ] RADIUS secret configuré et matchant RADIUS server
21. [ ] Firewall CPE activé (deny-all inbound par défaut)
22. [ ] VLAN tagging activé (802.1Q sur AP)
23. [ ] WPA3 ou WPA2 AES activé (pas WEP, pas open)
24. [ ] Certificat SSL self-signed valide sur console CPE
25. [ ] SSH accès limité à IPs autorisées (list blanche RGZ NOC)
DOMAINE 4: FACTURATION & BILLING (5 points)
26. [ ] KKiaPay webhook URL enregistrée (test avec mock payment)
27. [ ] Premier forfait crédité (accès test 1 mois gratuit)
28. [ ] Balance display visible sur portail (revendeur peut voir solde)
29. [ ] Rapport facturation pilote généré (facture PDF sample)
30. [ ] Commission revendeur calculée (50/50 split, 1.5% commission test)
DOMAINE 5: MONITORING & ALERTES (5 points)
31. [ ] SNMP v3 configuré sur CPE (poll interval 5min)
32. [ ] Prometheus scrape job ajouté pour revendeur (status UP)
33. [ ] SLA probe (ICMP + TCP) validé (latency + loss % visible)
34. [ ] Grafana dashboard pour revendeur créé et accessible
35. [ ] Alertes Prometheus seuils définis (latency, CPU, RAM, RSSI)
DOMAINE 6: COMMUNICATION & PROCESSUS (5 points)
36. [ ] Contact NOC revendeur enregistré (email + phone)
37. [ ] Procédure incident revendeur expliquée + RMA workflow documenté
38. [ ] Escalade Tier 1→2 SLA communiquée (5min P0, 15min P1)
39. [ ] Dashboard revendeur (#51) accès granted et login testé
40. [ ] Signature document acceptation conditions (ARCEP compliance)
STATUS GLOBAL:
- 0-15 points: 🔴 ROUGE (Not Ready)
- 16-30 points: 🟡 JAUNE (In Progress)
- 31-39 points: 🟠 ORANGE (Almost Ready)
- 40-40 points: 🟢 VERT (Ready for Production)Modèles de Données
class CutoverItemStatus(str, Enum):
NOT_STARTED = "not_started"
IN_PROGRESS = "in_progress"
COMPLETED = "completed"
BLOCKED = "blocked" # Bloquée par dépendance
class CutoverChecklistCategory(str, Enum):
INFRASTRUCTURE = "infrastructure"
NETWORK = "network"
SECURITY = "security"
BILLING = "billing"
MONITORING = "monitoring"
COMMUNICATION = "communication"
# Table DB
cutover_checklists:
- id UUID PK
- reseller_id UUID FK UNIQUE
- total_items INT DEFAULT 40
- completed_items INT DEFAULT 0
- blocked_items INT DEFAULT 0
- completion_percentage INT (0-100)
- ready_for_approval BOOLEAN DEFAULT false
- approved_by UUID FK users NULL
- approved_at TIMESTAMP NULL
- created_at TIMESTAMP
- updated_at TIMESTAMP
cutover_checklist_items:
- id UUID PK
- checklist_id UUID FK
- category VARCHAR(50) CHECK(infrastructure|network|security|billing|monitoring|communication)
- item_number INT (1-40)
- title TEXT
- description TEXT
- status CHECK(not_started|in_progress|completed|blocked)
- evidence_url VARCHAR(255) NULL (photo, log file, screenshot)
- evidence_notes TEXT NULL (détails validations)
- assigned_to UUID FK users NULL (revendeur ou NOC)
- required_for_approval BOOLEAN DEFAULT true
- completed_at TIMESTAMP NULL
- completed_by UUID FK users NULL
- updated_at TIMESTAMP
cutover_approval_log:
- id UUID PK
- checklist_id UUID FK
- approved_by UUID FK users
- total_score INT
- approval_status VARCHAR(20) (approved|rejected|pending)
- notes TEXT
- approved_at TIMESTAMPConfiguration
# .env.example
CUTOVER_APPROVAL_REQUIRED=true
CUTOVER_MIN_SCORE_PERCENT=100 # Must be 40/40
CUTOVER_REMINDER_SMS_DAYS=7 # Si pas complété après 7j
CUTOVER_INFRASTRUCTURE_WEIGHT=10
CUTOVER_NETWORK_WEIGHT=8
CUTOVER_SECURITY_WEIGHT=7
CUTOVER_BILLING_WEIGHT=5
CUTOVER_MONITORING_WEIGHT=5
CUTOVER_COMMUNICATION_WEIGHT=5Endpoints API
| Méthode | Route | Requête | Réponse | Notes |
|---|---|---|---|---|
| GET | /api/v1/cutover/{reseller_id}/checklist | — | {total_items, completed, blocked, percentage, items:[{id, title, status, category, evidence_url}], ready_approval:bool} | 200 OK |
| PUT | /api/v1/cutover/{reseller_id}/checklist/ | 200 OK | ||
| POST | /api/v1/cutover/{reseller_id}/checklist/{item_id}/evidence | 201 CREATED | ||
| GET | /api/v1/cutover/{reseller_id}/checklist/score | — | 200 OK | |
| POST | /api/v1/cutover/{reseller_id}/approve | 201 CREATED | ||
| GET | /api/v1/cutover/{reseller_id}/approve/history | — | {items:[{approved_by, approved_at, notes, total_score}], total} | 200 OK |
| GET | /api/v1/cutover/pending-approval | — | {items:[{reseller_id, raison_sociale, percentage, completed_at}], total} | 200 OK |
Workflows Recommandés
Jour 1 (Revendeur): Complète domaines 1-2 (infrastructure, réseau) → prend photos Jour 2 (NOC): Valide items 1-18, éventuellement appelle revendeur pour ajustements Jour 3 (Revendeur): Complète domaines 3-4 (sécurité, billing) → test KKiaPay mock Jour 4 (NOC): Configure monitoring → items 31-35 → crée dashboard Grafana Jour 5 (Revendeur): Accepte conditions, accès dashboard → items 36-40 Jour 6 (NOC): Valide items finaux, approuve 40/40 Jour 7: Passage étape 6 onboarding → go-live
Commandes Utiles
# Récupérer checklist revendeur
curl http://localhost:8000/api/v1/cutover/550e8400-e29b/checklist \
-H "Authorization: Bearer REVENDEUR_TOKEN" | jq '.'
# Marquer item comme complété (revendeur)
curl -X PUT http://localhost:8000/api/v1/cutover/550e8400-e29b/checklist/item-1 \
-H "Authorization: Bearer REVENDEUR_TOKEN" \
-d '{
"status": "completed",
"notes": "CPE received, unboxed, powered on. LED green.",
"evidence_url": "https://s3.rgz.bj/photos/cpe-setup-550e.jpg"
}'
# Upload photo preuve (CPE installation)
curl -X POST http://localhost:8000/api/v1/cutover/550e8400-e29b/checklist/item-9/evidence \
-H "Authorization: Bearer REVENDEUR_TOKEN" \
-d '{
"file_base64": "iVBORw0KGgoAAAANSUhEUgAAA...",
"file_type": "photo"
}'
# Vérifier score completion
curl http://localhost:8000/api/v1/cutover/550e8400-e29b/checklist/score \
-H "Authorization: Bearer REVENDEUR_TOKEN" | jq '.percentage'
# Valider item (NOC)
curl -X PUT http://localhost:8000/api/v1/cutover/550e8400-e29b/checklist/item-15 \
-H "Authorization: Bearer NOC_TOKEN" \
-d '{
"status": "completed",
"notes": "Iperf3 test confirmed: DL=7.2 Mbps, UL=2.1 Mbps. ✓",
"completed_by": "noc-engineer-001"
}'
# Approuver cutover (NOC - après 40/40)
curl -X POST http://localhost:8000/api/v1/cutover/550e8400-e29b/approve \
-H "Authorization: Bearer NOC_ADMIN_TOKEN" \
-d '{"noc_notes": "All 40 items validated. Ready for production go-live."}'
# Afficher checklists en attente d'approbation (admin)
curl http://localhost:8000/api/v1/cutover/pending-approval \
-H "Authorization: Bearer ADMIN_TOKEN" | jq '.items | map({reseller_id, percentage})'Intégration Avec Autres Outils
- #56 onboarding-reseller: Checklist MUST pass avant étape 6 (go-live)
- #51 dashboard-reseller: Widget cutover progress affiche score + items pending
- #52 dashboard-noc: Queue items à valider par NOC
- #79 iperf3-test-auto: Appelé pour items 15-16 (validation débit)
- #63 email-notification: Reminder emails revendeur si pas complété après 3j
- #48 audit-trail: Chaque validation loggée
Implémentation TODO
- [ ] Initialiser 40 items pour chaque revendeur (migration)
- [ ] CRUD items (mark completed, upload evidence)
- [ ] Calcul score percentage
- [ ] Blocage approval si < 40/40
- [ ] Notification NOC items pending
- [ ] Reminder SMS revendeur (delay > 3 jours)
- [ ] Evidence file storage (S3 ou volume Docker)
- [ ] Dashboard revendeur progress widget
- [ ] Dashboard NOC validation queue
- [ ] Audit trail approvals
- [ ] Tests: completer tous 40 items → approve
Dernière mise à jour: 2026-02-21