diff options
author | Thomas Haller <thaller@redhat.com> | 2018-08-08 20:48:25 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-08-10 10:38:19 +0200 |
commit | 9e7c960fadfc166ea27fd17e42d590d1d5bc1b55 (patch) | |
tree | c7cc1b9c10390c27626a6c2294ee6e30f24ee2ee /clients | |
parent | 582ee91145a5369222b709fb8ee8d367dea85ed7 (diff) | |
download | NetworkManager-9e7c960fadfc166ea27fd17e42d590d1d5bc1b55.tar.gz |
cli: hide ethtool options form `nmcli connection show "$PROFILE"` output
We will add a large number of offload features. That means, the output
of `nmcli connection show "$PROFILE"` would be very verbose, in case
the profile has a [ethtool] option.
Since this is newly added API, don't do that. Don't show ethtool properties
that are left unset.
A minor problem here is, that it becomes no longer obvious which
properties exist. We should however counter that by documentation.
Also, one could do:
$ nmcli connection modify "$PROFILE" ethtool.xxx x
Error: invalid property 'xxx': 'xxx' not among [feature-gro, feature-gso, feature-lro, feature-ntuple, feature-rx, feature-rxhash, feature-rxvlan, feature-sg, feature-tso, feature-tx, feature-txvlan, feature-tx-tcp6-segmentation, feature-tx-tcp-segmentation].
Likewise, bash completion still works as one would expect.
$ nmcli --complete-args connection modify "$PROFILE" ethtool.
ethtool.feature-gro
ethtool.feature-gso
ethtool.feature-lro
[...]
Note the output of
$ nmcli -f ethtool.feature-gro connection show "$PROFILE"
gives now nothing (if there is an ethtool section, but not this
particular feature). Maybe this shouldn't be like that. On the other
hand, specifying a connection setting that doesn't exist also gives
no output:
$ nmcli -f bond connection show "$PROFILE"
So, maybe this behavior is fine.
Diffstat (limited to 'clients')
-rw-r--r-- | clients/common/nm-meta-setting-desc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 0595640ef2..505c764b6e 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -4842,6 +4842,7 @@ _get_fcn_ethtool (ARGS_GET_FCN) else { s = NULL; NM_SET_OUT (out_is_default, TRUE); + *out_flags |= NM_META_ACCESSOR_GET_OUT_FLAGS_HIDE; } if (s && get_type == NM_META_ACCESSOR_GET_TYPE_PRETTY) |