Cover the network-facing CLI command modules with unit tests:
- tests/unit/commands/test_netbox.py: extend the existing exit-code
tests with the Sync error-classification helpers
(_check_netbox_instance, _check_netbox_connectivity), table building
(_build_netbox_table), the --list/--check/--no-wait/--filter paths
of Sync.take_action, argument assembly in Ironic and Manage,
Versions, the nbcli bootstrap and argument quoting in Console, and
the device lookup fallback chain and report formatting in Dump.
- tests/unit/commands/test_sonic.py: SonicCommandBase helpers (device
lookup, config context filtering, SSH connection details, backup
filename probing, the exec-command helpers) and the take_action
control flow of Load, Backup, Ztp, Reload, Reboot, Reset, Show,
Console, and Dump.
- tests/unit/commands/test_sonic_validate.py: source collection and
config acquisition of Validate (_collect_sources,
_configs_from_export_dir, _config_from_netbox,
_config_from_generate), its exit-code contract and report
formatting, and the provision-state derivation and sorting of List.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Christian Berendt <berendt@osism.tech>