feat: NetBox insights, host tools and configurable TUI
Test / test (pull_request) Successful in 4m15s

- info/open/whois: NetBox details (site, nested locations, rack units,
  role, platform, tenant, IPs per interface), web page, reverse IP lookup
- cache status, site, role, platform, tenant, location chain and rack;
  ask before connecting to hosts in ssh.warn_status (--force skips)
- ssh rules and command restrictions match site/role/platform/tenant/status
- tui.columns selects what the TUI shows; optional TCP reachability column;
  detail view (Ctrl+L), NetBox page (Ctrl+G), status/location filters
- resolver.fallback tries other strategies' addresses when unreachable
- copy-id, known-hosts reset and address-change notices
- export ansible (YAML/INI) and export ssh-config
- token: keyring stores NetBox tokens in the system keyring
- fix stale menu number in testenv configure test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-18 12:33:59 +01:00
1 parent e5bde9c61f
commit 1660bb3098
39 files changed
+4868 -96

No files matched your search

+16
View File
@@ -1,5 +1,21 @@
# Changelog
## v1.2.0
- Add `netssh info HOST` and `Ctrl+L` in the TUI: site, rack/U, role, platform, tenant, device type, serial, VM resources and all IP addresses per interface from NetBox; `--json` for scripts.
- Add `netssh open HOST` and `Ctrl+G` in the TUI to open the host's NetBox page (`--print` prints the URL).
- Add `netssh whois ADDRESS|HOSTNAME`: the device or VM, interface, DNS name and containing prefixes of an address across all NetBox instances, plus matching cached hosts.
- Cache NetBox ID, status, site, role, platform and tenant. Ask before connecting to hosts whose status is in `ssh.warn_status` (default: offline, planned, staged, failed, inventory, decommissioning); `--force` skips the question, non-interactive callers get a warning. The TUI shows a status badge and filters by `status:`, `site:`, `role:`, `platform:` and `tenant:`.
- `ssh.rules` and command restrictions match `site`, `role`, `platform`, `tenant` and `status` (name or slug), e.g. legacy key exchange for `platform: junos`. The wizard edits the new selectors.
- Show where a device is: site › all nested NetBox locations › rack › rack unit. `netssh info` and the TUI detail view add `Location`, `Rack` (units, height, face) and `Path`; the TUI gets a `location` column and `location:`/`rack:` filters; Ansible exports add `netbox_location`, `netbox_rack`, `netbox_position` and `--group-by location,rack`. Each location is fetched once per run.
- Add `tui.columns` to choose what the TUI shows next to each host and in which order: `alias`, `ip`, `kind`, `source`, `status`, `site`, `location`, `role`, `platform`, `tenant`, `cluster`, `tags`, `reachability` (default `[alias, ip, source, status]`). Also in `netssh configure`.
- Optional TUI reachability check (`reachability` column, off by default): listed hosts are probed on their SSH port and marked ✓/✗ (`tui.reachability_timeout`); hosts behind a jump host are skipped.
- Add `resolver.fallback`: when the chosen address does not answer, connect to the first answering address of the other strategies (or the other primary IP) for this connection.
- Add `netssh copy-id` to run ssh-copy-id with netssh's address, user, port, jump host and options, for single hosts, `tag:`, `cluster:` and `@group`.
- Report changed host addresses on connect and in `netssh cache refresh`, offer to remove the old known_hosts entry, and add `netssh known-hosts reset HOST...`.
- Add `netssh export ansible` (YAML or INI inventory with groups by tag/site/role/platform/… and `netbox_*` host variables) and `netssh export ssh-config`.
- Add keyring token storage: `token: keyring` reads the NetBox token from the system keyring; `netssh token set|migrate|delete|status` manage it, `netssh doctor` checks it.
## v1.1.0
- Add local post-disconnect/post-command scripts, execution timeouts, cancellation, per-command confirmation and host restrictions.