NetworkManager/clients
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
..
cli cli: don't wait for connection change on update failure 2019-04-24 16:18:25 +02:00
common cli: cleanup and fix handling of unset/empty "ipv4.dns-options" 2019-04-25 08:13:02 +02:00
tests cli: cleanup and fix handling of unset/empty "ipv4.dns-options" 2019-04-25 08:13:02 +02:00
tui build/meson: rename "nm_core_dep" to "libnm_core_dep" 2019-04-18 18:59:09 +02:00
meson.build build/meson: rename "nm_core_dep" to "libnm_core_dep" 2019-04-18 18:59:09 +02:00
nm-online.c nm-online: sort options in man page and program help 2018-11-05 09:32:20 +01:00