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

66 lines
2.5 KiB
Markdown

# Implementation State
## Completed
### Core
- [x] Project scaffold (Cargo.toml, module structure)
- [x] KDL v2 parsing helpers (`kdl_util.rs`)
- [x] Error types with miette diagnostics (`error.rs`)
- [x] Global config loading (`config.rs`)
- [x] Template loading + defaults — multi-net support (`template.rs`)
- [x] IPAM pool loading, allocation, defaults — range + list modes (`pool.rs`)
- [x] Zone registry CRUD — multi-net support (`zone.rs`)
- [x] Publisher management (`publisher.rs`)
- [x] Exec layer for system commands (`exec.rs`)
- [x] Import logic from existing zones — multi-net parsing (`import.rs`)
- [x] Validation engine (`validate.rs`)
### CLI Commands
- [x] `init`, `create`, `destroy`, `list`, `status`, `import`
- [x] `boot`, `halt` — thin wrappers around zoneadm
- [x] `validate` — checks KDL syntax, referential integrity, pool sanity, duplicate IPs
- [x] `template list|show`, `pool list|show`
- [x] `publisher list|add|remove`
- [x] `completions <shell>` — bash/zsh/fish shell completions
### DX Features
- [x] `--dry-run` / `-n` flag for create and destroy
- [x] `--yes` / `-y` flag to skip confirmation (scripting)
- [x] `--json` flag for machine-readable output
- [x] `--version` flag
- [x] Destroy confirmation: type zone name to confirm (TTY detection)
- [x] Step-by-step numbered progress during create/destroy
- [x] Partial failure guidance: prints cleanup commands on create failure
- [x] Auto-sizing table columns (measures content before printing)
- [x] Dry-run notes that IP allocation is tentative
- [x] Publisher remove accepts publisher name or filename stem
- [x] Import uses current date + matches template net names
- [x] RFC 5737 comment on default public pool
### Multi-Network
- [x] Templates define multiple `net` blocks, each referencing a pool
- [x] List-based IPAM pools (explicit addresses from hoster)
- [x] Default router template with internal + public nets
- [x] Backward compat: legacy flat `pool` field in templates
## Tested on illumos (2026-03-22)
- [x] `zmgr create`
- [x] `zmgr destroy`
- [x] `zmgr import`
- [x] `zmgr boot`
- [x] `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 |