NetworkManager/clients/cli
Lubomir Rintel c5324ed285 nmcli: streamline connection addition
This is a huge refactoring in attempt to 1.) reduce the horrible redundancy in
the connection addition path and 2.) reduce confusion between various sources
of property value (command line, properties, interactive mode).

* The conversions from the strings was done all over the place:
  settings.c already does for all sensible properties.
  The rest is removed.

* The validations are done randomly and redundantly:
  server does some validation, and per-property client validations
  useful for interactive mode are done in settings.c
  The rest is removed.

* The information about defaults and required options was redundantly
  scattered in per-type completion functions and interactive mode
  questionnaries. This is now driven by the option_info[] table.

In general, we do our best to just map the command line options to
properties and allow mixing them. For the rest there's the
check_and_set() callbacks (basically to keep compatibility with previous
nmcli versions). This this is now all possible:

$ nmcli c add type ethernet ifname '*'
  This always worked

$ nmcli c add type bond-slave save no -- connection.autoconnect no
  The "save" and "--" still work

$ nmcli c add connection.type ethernet ifname eth0
  Properties can now be used

$ nmcli c add type ethernet ip4 1.2.3.4 mac 80:86:66:77:88:99 con-name whatever
  There's no implementation mandated order of the properties (the type
  still must be known to determine which properties make sense)

$ nmcli --ask c add type ethernet ip4 1.2.3.4 mac 80:86:66:77:88:99 con-name whatever
  The interactive mode asks only for properties that weren't specified
  on command line
2016-06-21 18:40:13 +02:00
..
agent.c cli: remove version check against NM 2016-04-28 09:35:20 +02:00
agent.h cli: add 'nmcli agent' command (bgo #739568) 2014-11-07 11:58:25 +01:00
common.c cli: declare external variable nm_cli in <nmcli.h> header 2016-05-03 11:53:15 +02:00
common.h cli: do not echo passwords on terminal when asking for them 2015-12-07 14:14:58 +01:00
connections.c nmcli: streamline connection addition 2016-06-21 18:40:13 +02:00
connections.h cli: add nmcli monitor 2015-12-05 12:16:23 +01:00
devices.c build: avoid compiler warnings about non-constant format strings (-Wformat-nonliteral) 2016-06-05 12:22:01 +02:00
devices.h cli: add nmcli monitor 2015-12-05 12:16:23 +01:00
general.c build: avoid compiler warnings about non-constant format strings (-Wformat-nonliteral) 2016-06-05 12:22:01 +02:00
general.h cli: add nmcli monitor 2015-12-05 12:16:23 +01:00
Makefile.am build: disable deprecation checks for internal compilation 2016-04-05 22:22:58 +02:00
nmcli-completion nmcli: improve connection autocompletion (2/2) 2016-06-21 16:28:48 +02:00
nmcli.c nmcli: improve connection autocompletion (2/2) 2016-06-21 16:28:48 +02:00
nmcli.h nmcli: enable connection autocompletion for 802.1x properties 2016-06-21 16:28:48 +02:00
polkit-agent.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
polkit-agent.h cli: add 'nmcli agent' command (bgo #739568) 2014-11-07 11:58:25 +01:00
settings-docs.xsl clients: reorganize source tree, put all the installed clients together 2014-07-30 15:56:19 -04:00
settings.c nmcli: streamline connection addition 2016-06-21 18:40:13 +02:00
settings.h cli: refactor property to string conversion 2015-06-05 12:26:48 +02:00
utils.c build: avoid compiler warnings about non-constant format strings (-Wformat-nonliteral) 2016-06-05 12:22:01 +02:00
utils.h macros: add macro _nm_printf() for function attribute 2016-06-05 12:22:01 +02:00