zmgr/docs/ai/implementation-state.md
Till Wegmueller c00f2bbeed
Mark core commands as tested on illumos
create, destroy, import, boot, halt all verified on real illumos
hardware on 2026-03-22.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:50:07 +01:00

2.5 KiB

Implementation State

Completed

Core

  • Project scaffold (Cargo.toml, module structure)
  • KDL v2 parsing helpers (kdl_util.rs)
  • Error types with miette diagnostics (error.rs)
  • Global config loading (config.rs)
  • Template loading + defaults — multi-net support (template.rs)
  • IPAM pool loading, allocation, defaults — range + list modes (pool.rs)
  • Zone registry CRUD — multi-net support (zone.rs)
  • Publisher management (publisher.rs)
  • Exec layer for system commands (exec.rs)
  • Import logic from existing zones — multi-net parsing (import.rs)
  • Validation engine (validate.rs)

CLI Commands

  • init, create, destroy, list, status, import
  • boot, halt — thin wrappers around zoneadm
  • validate — checks KDL syntax, referential integrity, pool sanity, duplicate IPs
  • template list|show, pool list|show
  • publisher list|add|remove
  • completions <shell> — bash/zsh/fish shell completions

DX Features

  • --dry-run / -n flag for create and destroy
  • --yes / -y flag to skip confirmation (scripting)
  • --json flag for machine-readable output
  • --version flag
  • Destroy confirmation: type zone name to confirm (TTY detection)
  • Step-by-step numbered progress during create/destroy
  • Partial failure guidance: prints cleanup commands on create failure
  • Auto-sizing table columns (measures content before printing)
  • Dry-run notes that IP allocation is tentative
  • Publisher remove accepts publisher name or filename stem
  • Import uses current date + matches template net names
  • RFC 5737 comment on default public pool

Multi-Network

  • Templates define multiple net blocks, each referencing a pool
  • List-based IPAM pools (explicit addresses from hoster)
  • Default router template with internal + public nets
  • Backward compat: legacy flat pool field in templates

Tested on illumos (2026-03-22)

  • zmgr create
  • zmgr destroy
  • zmgr import
  • zmgr boot
  • zmgr halt

Dependencies

Crate Version Purpose
clap 4.6.0 CLI parsing (derive)
clap_complete 4.6.0 Shell completion generation
kdl 6.5.0 KDL v2 document parsing
miette 7.6.0 Diagnostic error reporting
thiserror 2.0.18 Error type derives
ipnet 2.12.0 IP network arithmetic
chrono 0.4.44 Date formatting
serde 1.0.228 Serialization framework
serde_json 1.0.149 JSON output