Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli/status: add netplan status --diff
netplan status --diff will use the state_diff module to output inconsistencies in the network configuration. status: split display in multiple methods status: refactoring: fix typo and drop unused code status: refactor _display_routes Drop unused code and make use of the new route table name lookup. tests: add a test file for netplan status --diff tests: add some shallow cli tests All the output tests are in test_status_diff. Adding some very shallow cli tests for coverage sake. status/diff: use the unspecified address to for missing DHCP addresses Instead of "Missing DHCP address" it will show "0.0.0.0/0 (dhcp)" for IPv4 and "::/0 (dhcp)" for IPv6. status/diff: make it work with a single targeted interface netplan status --diff <interface> will only display the configuration for a single interface. status/diff: mute field names as well when there is no diff status/diff: make json/yaml output work with a single targeted interface netplan status --diff -f json <interface> will only display the configuration for a single interface. status: refactoring Move common code to a single place and drop duplication. Don't display a linebreak in the end of the output. Some minor code style changes. cli:status: _get_missing_property_str to return '' in failure case cli:status: avoid showing a MISSING state
- Loading branch information