mirror of
https://github.com/CloudNebulaProject/zmgr.git
synced 2026-04-10 13:10:42 +00:00
Rust CLI that creates/destroys/imports illumos zones from KDL template configs with automatic IP allocation from named pools. Registry lives under /etc/zmgr as flat KDL files — zone entries double as the IPAM ledger. Includes default templates for ipkg (OI) and nlipkg (OFL) brands, matching the existing shell scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.3 KiB
1.3 KiB
Implementation State
Completed
- Project scaffold (Cargo.toml, module structure)
- KDL parsing helpers (
kdl_util.rs) - Error types with miette diagnostics (
error.rs) - Global config loading (
config.rs) - Template loading + defaults (
template.rs) - IPAM pool loading, allocation, defaults (
pool.rs) - Zone registry CRUD (
zone.rs) - Publisher management (
publisher.rs) - Exec layer for system commands (
exec.rs) - Import logic from existing zones (
import.rs) - CLI commands: init, create, destroy, list, status, import
- CLI commands: template list/show, pool list/show
- CLI commands: publisher list/add/remove
- Clean build (zero warnings)
- Tested: init, template list, pool list/show, publisher list, list
Not Yet Tested on illumos
zmgr create(requires illumos with zonecfg/zoneadm/dladm)zmgr destroyzmgr importzmgr status(requires zoneadm)
Dependencies
| Crate | Version | Purpose |
|---|---|---|
| clap | 4.6.0 | CLI parsing (derive) |
| 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 |