Commit graph

6 commits

Author SHA1 Message Date
Till Wegmueller
6e2915fdc9
Improve DX: JSON output, boot/halt, tables, publisher fix
Batch 2 of developer experience improvements:

- Add --json flag for machine-readable output on list/show/status commands
- Add boot and halt subcommands as thin wrappers around zoneadm
- Publisher remove now accepts publisher name (not just filename stem)
- Tables auto-size columns based on content instead of hardcoded widths
- Import uses current date for created field and matches template net names
- Default public pool includes RFC 5737 documentation comment
- Template list uses proper table format with separate columns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:34:04 +01:00
Till Wegmueller
382823b228
Improve DX: confirmations, progress, validate, completions
Batch 1 of developer experience improvements:

- Destroy requires typing zone name to confirm (or --yes/-y for scripts)
- Non-interactive (non-TTY) mode refuses destructive ops without --yes
- Create/destroy print numbered step-by-step progress
- Partial failure during create prints cleanup guidance (orphaned VNICs etc)
- New `zmgr validate` checks KDL syntax, referential integrity, gateway
  in network, range in network, duplicate IPs, pool utilization warnings
- New `zmgr completions <shell>` generates bash/zsh/fish completions
- Added --version flag
- Dry-run notes that IP allocation is tentative

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:30:02 +01:00
Till Wegmueller
430be11b13
Add multi-network zones and list-based IPAM pools
Templates now define named `net` blocks instead of a single pool
reference, allowing zones like a router to attach to both internal and
public networks. Pools support an `addresses` block with explicit IPs
as an alternative to contiguous range-start/range-end — useful for
hoster-assigned public addresses.

Default init now includes a router template (internal + public) and a
public pool with example addresses. Zone registry entries store per-net
address/VNIC/stub/gateway. Import parses multiple net blocks from
zonecfg info. Backward compatible with legacy single-pool templates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 14:04:15 +01:00
Till Wegmueller
50a6586f90
Remove template scripts
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-03-22 12:17:58 +01:00
Till Wegmueller
5242450dd3
Add --dry-run (-n) flag to create and destroy commands
Shows the exact dladm/zonecfg/zoneadm commands, IPAM allocation, and
registry writes that would happen — without executing anything. Useful
for validating template + pool config before committing to a zone install.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 12:16:02 +01:00
Till Wegmueller
abdce9c927
Add zmgr: illumos zone manager with IPAM and flat-file registry
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>
2026-03-22 12:14:09 +01:00