From 41b8a476fae2511592829d4a7ffa960799e473f3 Mon Sep 17 00:00:00 2001 From: Danilo Egea Gondolfo Date: Wed, 28 Feb 2024 10:54:08 +0000 Subject: [PATCH] docs: add status --diff to the docs Update the manpage and autocomplete files. --- doc/netplan-status.md | 13 +++++++++++++ netplan.completions | 2 +- tools/completely.yaml | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/netplan-status.md b/doc/netplan-status.md index c957d6d6b..a9036771e 100644 --- a/doc/netplan-status.md +++ b/doc/netplan-status.md @@ -34,6 +34,19 @@ Currently, **`netplan status`** depends on `systemd-networkd` as a source of dat `-a`, `--all` : Show all interface data including inactive. +`--diff` +: Analyze and display differences between the current system configuration and interface definitions present in the YAML files. + The configuration analyzed includes IP addresses, routes, MAC addresses, DNS addresses and search domains and missing network interfaces. + +`--diff-only` +: Same as `--diff` but omits all the information that is not a difference. + +`--root-dir` +: Read YAML files from this root instead of `/`. + +`--verbose` +: Show extra information. + `-f` *`FORMAT`*, `--format` *`FORMAT`* : Output in machine-readable `json` or `yaml` format. diff --git a/netplan.completions b/netplan.completions index c544f7dbe..58bcaf14c 100644 --- a/netplan.completions +++ b/netplan.completions @@ -37,7 +37,7 @@ _netplan_completions() { ;; 'status'*) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_netplan_completions_filter "-h --help --debug -a --all -f --format $(ls /sys/class/net 2> /dev/null)")" -- "$cur" ) + while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_netplan_completions_filter "-h --help --debug -a --all --diff --diff-only --root-dir --verbose -f --format $(ls /sys/class/net 2> /dev/null)")" -- "$cur" ) ;; 'apply'*) diff --git a/tools/completely.yaml b/tools/completely.yaml index ce0dddd5c..44cc49387 100644 --- a/tools/completely.yaml +++ b/tools/completely.yaml @@ -78,6 +78,10 @@ netplan status: - --debug - -a - --all +- --diff +- --diff-only +- --root-dir +- --verbose - -f - --format - $(ls /sys/class/net 2> /dev/null)