NetworkManager/clients/common
Thomas Haller 655a920577 cli: cleanup and fix handling of unset/empty "ipv4.dns-options"
"ipv4.dns-options" and "ipv6.dns-options" are special, in that they can
be either unset/default or an empty list of options. That means, nmcli
must treat these two options differently.

For the (terse) getter, it returns "" for default and " " for empty.
The setter must likewise support and distingish between these two cases.

Cleanup the handling of such options. This only applies to properties of
type "multilist". Hence, add multilist.clear_emptyunset_fcn() handler
that indicates that the property is of that kind.

Try:

  nmcli connection modify "$PROFILE" ipv4.dns-options ''
  nmcli connection modify "$PROFILE" ipv4.dns-options ' '

and compare the output:

  nmcli connection show "$PROFILE" | sed -n '/ipv4.dns-options/ s/.*/<\0>/p'
  nmcli -t connection show "$PROFILE" | sed -n '/ipv4.dns-options/ s/.*/<\0>/p'
  nmcli -o connection show "$PROFILE" | sed -n '/ipv4.dns-options/ s/.*/<\0>/p'
2019-04-25 08:13:02 +02:00
..
tests cli: refactor team-link-watcher to/from strings 2019-04-25 07:50:47 +02:00
meson.build shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core 2019-04-18 20:07:44 +02:00
nm-client-utils.c cli: don't treat empty string as valid number in nmc_string_to_uint_base() 2019-03-25 09:12:32 +01:00
nm-client-utils.h shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core 2019-04-18 20:07:44 +02:00
nm-meta-setting-access.c clients: only ask secrets for settings that require them 2019-04-02 11:20:28 +02:00
nm-meta-setting-access.h clients: only ask secrets for settings that require them 2019-04-02 11:20:28 +02:00
nm-meta-setting-desc.c cli: cleanup and fix handling of unset/empty "ipv4.dns-options" 2019-04-25 08:13:02 +02:00
nm-meta-setting-desc.h cli: cleanup and fix handling of unset/empty "ipv4.dns-options" 2019-04-25 08:13:02 +02:00
nm-polkit-listener.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-polkit-listener.h docs: misc. typos 2018-09-15 09:08:03 +02:00
nm-secret-agent-simple.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-secret-agent-simple.h libnm: add NMWireGuardPeer and libnm support for peers 2019-02-22 11:00:10 +01:00
nm-vpn-helpers.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-vpn-helpers.h cli/wireguard: add import functionality for WireGuard 2019-03-07 22:22:39 +01:00
settings-docs.h.in all: support bridge vlan ranges 2019-04-18 09:53:18 +02:00
settings-docs.xsl cli: fix marking settings docs for translation 2017-04-23 23:45:02 +02:00