How luora/ninja-pce works
ninja-pce is an external RSVP-TE path-computation and topology-reconciliation tool, not a PCEP controller. Operators provide a topology/TED, service demands, and device inventory; the CLI computes and ranks feasible CSPF paths, renders review artifacts, and can deliver approved configuration. Reconciliation and daemon operation add change detection, persistent state, audit, and policy-gated delivery. Some implementation excerpts are partial, so the graph includes documented capabilities while omitting uncertain internal wiring.
Main entry points: cli.py CLI Commands · reconcile.py Reconciliation Cycle · render.py Config Renderer · loaders.py Input Loaders
Components 19
Inputs and Models
- Input Loaders
src/ninja_pce/loaders.py - Domain Models
src/ninja_pce/models.py - Inventory Validation
src/ninja_pce/inventory.py
Path Computation
- CSPF Engine
src/ninja_pce/cspf.py
Render and Delivery
- Config Renderer
src/ninja_pce/render.py - Platform Templates
src/ninja_pce/templates - Plans and Summaries
src/ninja_pce/render.py - Push Planning
src/ninja_pce/southbound.py
Reconcile and Operate
- CLI Commands
src/ninja_pce/cli.py - Reconciliation Cycle
src/ninja_pce/reconcile.py - State and Audit
src/ninja_pce/reconcile.py - Multi-demand Daemon
src/ninja_pce/daemon.py
Other components
- Network Operator
- Topology TED
- Service Demand
- Device Inventory
- Managed Routers
- Netmiko
- Health Consumers
Connections 25
- Network Operator → CLI Commands: invokes
- Network Operator → Topology TED: supplies
- Network Operator → Service Demand: supplies
- Network Operator → Device Inventory: supplies
- CLI Commands → Input Loaders: loads inputs
- Input Loaders → Domain Models: builds models
- CLI Commands → Inventory Validation: validates mapping
- CLI Commands → CSPF Engine: computes paths
- CSPF Engine → Domain Models: uses models
- CLI Commands → Config Renderer: writes outputs
- Config Renderer → Platform Templates: renders with
- Config Renderer → Plans and Summaries: writes artifacts
- CLI Commands → Push Planning: plans delivery
- Push Planning → Config Renderer: renders config
- CLI Commands → Netmiko: executes approved push
- Netmiko → Managed Routers: configures and checks
- CLI Commands → Reconciliation Cycle: starts cycle
- Reconciliation Cycle → Input Loaders: loads inputs
- Reconciliation Cycle → Inventory Validation: validates mapping
- Reconciliation Cycle → CSPF Engine: computes desired path
- Reconciliation Cycle → Push Planning: plans and pushes
- Reconciliation Cycle → State and Audit: reads and writes
- Reconciliation Cycle → Plans and Summaries: writes artifacts
- Multi-demand Daemon → Reconciliation Cycle: reconciles demands
- Multi-demand Daemon → Health Consumers: serves health metrics