nmcli: add overview option to skip default values in output

System Internals / NetworkManager - Beniamino Galvani [redhat.com] - 13 April 2018 15:02 EDT

Add a new 'overview' command line option to make the output more compact and display only properties that have non-default
values. Currently the option has only effect for the "connection show $CON" sub-command.

$ nmcli -o connection show wifi-home connection.id: wifi-home connection.uuid: 8308c425-f2a7-4021-9afc-37bde7253c6d connection.type: 802-11-wireless connection.timestamp: 1519264421 connection.permissions: user:me 802-11-wireless.ssid: home 802-11-wireless.mode: infrastructure 802-11-wireless-security.key-mgmt: wpa-psk 802-11-wireless-security.auth-alg: open ipv4.method: auto ipv6.method: auto

https://bugzilla.redhat.com/show_bug.cgi?id=1434527

9a19bbcb2 nmcli: add overview option to skip default values in output
clients/cli/nmcli.c | 16 ++++++++++++----
clients/cli/nmcli.h | 1 +
clients/cli/utils.c | 13 +++++++++++--
3 files changed, 24 insertions(+), 6 deletions(-)

Upstream: cgit.freedesktop.org


  • Share