After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740749 - [RFE] nmcli connection add should support setting more/all options
[RFE] nmcli connection add should support setting more/all options
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nmcli
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on: 750590
Blocks:
 
 
Reported: 2014-11-26 13:26 UTC by Thomas Haller
Modified: 2015-07-02 07:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2014-11-26 13:26:04 UTC
Currently, many options cannot be set during `nmcli connection add`. The workaround is to modify the connection in a second step.


I'd think it makes sense to add more options to configure a connection during creation.
For example, if a unknowing user adds a connection (which is autoconnect=yes by default), the connection could already be activating when he is calling `nmcli connection modify`.


But instead of adding supporting parameters one-by-one in `nmcli connection add`, how about the following:


nmcli connection \
  add COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS IP_OPTIONS -- MODIFY_OPTIONS


This effectively combines add+modify in one command line. Any MODIFY_OPTIONS are of course optional. But when specifying them, the '--' becomes mandatory (otherwise command line parsing and completion becomes difficult and possibly ambiguous).


It should be simple to implement too by reusing large parts of the modify command handling.



One downside is, that bash completion how it is implemented for `connection modfiy` will not work with these new options. It'd be quite difficult for bash completion to figure out which options are valid for the not yet existing connection. The solution for this is RFE in bug 724860.
Comment 1 Thomas Haller 2015-01-25 12:03:48 UTC
Possible duplicate: bug 698076
Comment 2 Thomas Haller 2015-06-11 11:52:23 UTC
implemented by bug 750590
Comment 3 Lubomir Rintel 2015-07-02 07:38:40 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.

In master you can now "nmcli c add ... -- <property> <value> ..."