Ask for confirmation in these cases:
* autoconnect=yes and connection has not been saved yet
* autoconnect=yes, but saved connection had autoconnect=no
The confirmation can be switched off with
nmcli> nmcli save-confirmation no
Until now we have used a static width defined for each column for tabular
output. Even if this worked in most cases, it was not optimal, because by
using too wide columns we wasted space, and in case of a too narrow column the
alignment broke. So, we need to know the longest string in a column to be able
to align columns in the tabular output. Thus, the printing has to be postponed
till we have all data available, and can find the widest column. This value is
then used for aligning while printing the data.
Arrays of NmcOutputField (rows) are inserted into output_data array. When all
data have been added, print_data() can be used to print the whole output_data
array with proper alignment.
A single row can be printed using print_required_fields().
Also, output flags are redone to better match the new output_data array.
The flags are needed for every row (in tabular output); they are stored in
the first field (NmcOutputField) for the whole row.
Addapted set_val_str() and set_val_arr() to set value type (char * x char **).
Added set_val_strc(), set_val_arrc() for const values that should not be freed.
output_data takes ownership of the data added to it and takes care of freeing
the memory.
See e.g.
https://bugzilla.gnome.org/show_bug.cgi?id=699503
The command didn't delete the connection, because nmcli exited before NM could
check permissions (actually ConsoleKit didn't see the process).
Now nmcli waits for "Removed" signal or D-Bus return (error) message on "Delete"
method call.
Field values can now be string arrays. print_fields() recognizes the format and
prints values accordingly.
Setter functions was added to facilitate setting string vs. array:
set_val_str(), set_val_arr()
nmcli gets NM version and compares it with its own and complains
when they differ. This is to indicate that the results are not reliable,
because the API could differ. '--nocheck' switches the checks off.
Originally, nm-remote-settings was used by the daemon to monitor the
user settings service, and its subclass nm-remote-settings-system was
used by NM clients to monitor the system settings service. With user
settings services gone, this distinction is no longer needed. Simplify
things a bit and merge the classes.
Remove all support for user settings services from nmcli. Update its
manpage to reflect this.
Manpage edits also anticipate changes to be made in regards to how
secrets are managed.
Option '--multiline' was replaced with '--mode tabular|multiline'.
It was neccessary to be able to switch to tabular output mode for
'dev list' and 'con list id|uuid' commands as they now print out
in multiline mode by default. All other commands are in tabular
mode by default.
Modifications are mainly for multiline mode to ease parsing - each
field name is prefixed with a section name.
'dev list' now also supports printing particular sections specifed via
'--fields' option.
The output is basically tabular with fields (columns) presenting specific pieces of info.
Each line represents a single object. It's possible to switch to multiline output using
'--multiline' option. In that mode single object is presented on more lines - each field
on its line.
Terse mode now uses ':' as field separator. It also escapes all occurences of ':' and '\'
inside field values to ease parsing. The escaping behaviour can be controlled through
'--escape' option. By default, escaping is switched on in tabular mode. When using terse
mode ('--terse'), '--fields' option is mandatory for specifying required fields. That helps
for flexibility and backwards compatibility.
Not all output is converted yet.