Commit Graph

80 Commits

Author SHA1 Message Date
Jiří Klimeš
591908c8bd nmcli: add support for bridge multicast-snooping property 2015-02-26 09:08:14 +01:00
Bastien Nocera
06535fca29 man: fix small typo in nmcli man page
https://bugzilla.gnome.org/show_bug.cgi?id=745007
2015-02-23 14:21:26 +01:00
Jiří Klimeš
758e488f13 nmcli: add global '--colors' option for controlling color output
nmcli -c auto  ->  colors will only be used when stdout is a terminal
nmcli -c yes   ->  colors will be enabled unconditionally
nmcli -c no    ->  colors will be disabled unconditionally
2015-02-23 09:24:21 +01:00
Jiří Klimeš
40e98f5d68 nmcli: add --order option for 'nmcli connection show'
The option allows you to specify custom sorting order.
Default order (when no --order is provided) corresponds to -o "active:name:path"

Examples:
nmcli con show -o name
nmcli con show -o +name
  - sort connections by name alphabetically
nmcli con show -o -name
  - sort connections by name alphabetically in reverse order
mmcli con show -o active:name
  - sort connections first by active status, then by name
mmcli con show -o -path
  - sort connections by D-Bus path in reverse order
2015-02-23 09:24:21 +01:00
Jiří Klimeš
4a7c88621d cli: fix deactivation for multiple connections (bgo #740775) (rh #1168383)
$ nmcli connection down aa bb cc

It has been broken by commit 20566c76de.

Fixups by dcbw.

https://bugzilla.gnome.org/show_bug.cgi?id=740775
https://bugzilla.redhat.com/show_bug.cgi?id=1168383
2014-12-03 10:54:49 +01:00
Jiří Klimeš
3a551664df cli: add 'nmcli agent' command (bgo #739568)
Synopsis:
nmcli agent { secret | polkit | all }

The command runs separate NetworkManager secret agent or session polkit agent, or both.
It is useful when
- no other secret agent is available (such as GUI nm-applet, gnome-shell, KDE applet)
- no other polkit agent is available (such as polkit-gnome-authentication-agent-1,
  polkit-kde-authentication-agent-1 or lxpolkit)

https://bugzilla.gnome.org/show_bug.cgi?id=739568
2014-11-07 11:58:25 +01:00
Jiří Klimeš
252c8bf4ed man: document/clarify --ask option in relation to password prompting 2014-11-07 09:57:36 +01:00
Jiří Klimeš
3c9b8671fa cli: add 'passwd-file' option for 'nmcli connection up' to provide passwords
It is useful for running nmcli without --ask option, i.e. non-interactively.

Example contents of the file:
wifi.psk: s e c r e t 12345
802-1x.password:kili manjaro
802-1x.pin:987654321
2014-11-07 09:32:32 +01:00
Lubomir Rintel
1f275a980a Merge branch 'lr/ap'
https://bugzilla.gnome.org/show_bug.cgi?id=738439
2014-10-31 15:35:20 +01:00
Jiří Klimeš
1a64683802 cli: add '--show-secrets' option for 'nmcli connection show'
It can be used to display connection secrets (passwords).  When used, it will
get secrets for the connection profile and merge it into the connection's
settings before displaying it.

Example:
nmcli con show -s hotel-wifi
2014-10-30 09:11:43 +01:00
Lubomir Rintel
1c9b16b2f2 cli: Add mode option for wifi connecitons
Only default (infrastructure) mode connections can be created and as it's not
possible to write mode=ap connections with ifcfg-rh plugins, they can't be
switched to mode=ap.
2014-10-23 18:34:39 +02:00
Jiří Klimeš
c7a567ca90 cli: add 'nmcli device delete <ifname>' command (rh #1034150)
It only works for software devices. When called for a hardware device,
an error is returned and the device is not deleted.

https://bugzilla.redhat.com/show_bug.cgi?id=1034150
2014-07-22 14:24:43 +02:00
Jiří Klimeš
e88979a354 cli: add optional 'mac' argument for 'nmcli con add type bridge'
This allows setting bridge MAC either on command-line
nmcli con add type bridge con-name mybridge mac 11:22:33:44:55:66
or provide it when asked
nmcli -a con add type bridge con-name mybridge
2014-05-30 17:02:31 +02:00
Jiří Klimeš
d7216505bb cli: do not restrict VPN type of created connections (rh #1100750)
There may be third-party VPN plugins nmcli is not aware of.
We still print a warning if nmcli doesn't know the type. It helps to catch up
typos.

https://bugzilla.redhat.com/show_bug.cgi?id=1100750
2014-05-28 09:37:15 +02:00
Jiří Klimeš
d7e1ec9183 cli: accept prefix "ifname/", "uuid/" or "id/" for 'master' argument
nmcli con add type team-slave ifname em2 master team-master0
nmcli con add type team-slave ifname em2 master id/team-master0

It helps to disambiguate values for cases where they may overlap,
e.g. "team0" -> "ifname/team0" or "id/team0"
2014-03-12 10:32:37 +01:00
Jiří Klimeš
90c02cafdc cli: allow specifying 'master' for slaves as connection ID (rh #1057494)
nmcli con add type *-slave ifname em1 master <ifname|UUID|name>

'master' property of 'connection' setting has to be either interface name or
connection UUID of master connection. However, to make nmcli more convenient
for users, we also allow specifying connection name and translating it to UUID
automatically.

https://bugzilla.redhat.com/show_bug.cgi?id=1057494
2014-03-12 10:32:11 +01:00
Jiří Klimeš
e3176dfa0d man: add a note about hostname to nmcli manual page 2014-02-28 14:44:22 +01:00
Thomas Haller
bdc60d433d cli/man: indicate that nmcli connection delete accepts more then one connections
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-02-28 14:17:32 +01:00
Jiří Klimeš
2ef197983f man: update nmcli manual page to stress that we can remove values by name 2014-02-28 11:19:13 +01:00
Jiří Klimeš
c1ace1b5b2 cli: support removing items from container-type properties in 'nmcli con modify'
Synopsis:
nmcli con modify -<property>.<setting> <value>

'value' can be empty ("") to remove the whole property value value (in this
case the behaviour is the same as without '-').
Or the 'value' is an index of the item to remove, or an option name (for a few
properties that have option names, like bond.options or ethernet.s390-options).

$ nmcli con mod myeth ipv4.dns "10.0.0.55 10.0.0.66 8.8.8.8 8.8.4.4"
---> ipv4.dns: 10.0.0.55, 10.0.0.66, 8.8.8.8, 8.8.4.4
$ nmcli con mod myeth -ipv4.dns 1
---> ipv4.dns: 10.0.0.55, 8.8.8.8, 8.8.4.4

---> bond.options: mode=balance-rr
$ nmcli con mod bond0 +bond.options "mii=500, downdelay=800"
---> bond.options: downdelay=800,miimon=500,mode=balance-rr
$ nmcli con mod bond0 -bond.options downdelay
---> bond.options: miimon=500,mode=balance-rr
2014-02-28 10:31:41 +01:00
Jiří Klimeš
363ec8de68 man: update nmcli manual page - 'nmcli con modify' description 2014-02-28 10:31:41 +01:00
Jiří Klimeš
2d523bd800 cli: allow creating temporary (unsaved) connection with 'nmcli con add' 2014-01-30 10:49:51 +01:00
Jiří Klimeš
ee7615e147 man: document the default value for autoconnect 'nmcli con add' argument 2014-01-24 12:21:52 +01:00
Jiří Klimeš
26f8889286 cli: consolidate active and configured connections (rh #997999)
Handle connection profiles in a single 'show' command instead of 'show active'
and 'show configured'.

nmcli con show [--active] [[id|uuid|path|apath] <bla>]

nmcli con show           : display all connection profiles
nmcli con show --active  : only display active connection profiles
                           (filters out inactive profiles)

nmcli con show myeth     : display details of "myeth" profile, and also active
                           connection info (if the profile is active)
nmcli -f profile con show myeth : only display "myeth"'s static configuration
nmcli -f active  con show myeth : only display active details of "myeth"
nmcli -f connection.id,ipv4,general con show myeth
                                          : display "connection.id"a property
                                            "ipv4" setting and "GENERAL" group
                                            of active data

https://bugzilla.redhat.com/show_bug.cgi?id=997999
2014-01-23 13:45:46 +01:00
Thomas Haller
600763e773 man/cli: add NOTES section with disclaimer for name abbreviations
Make clear, that only full names are guaranteed to work in future
versions. The use of some abbreviations might break as new options
get added.

It would be rather complicated, to ensure, that abbreviations always
continue to work, at the additional disadvantage, that they no longer
uniquely identify an option. Instead, clearly state that using
them is not guaranteed to work in the future. Users that care about
long term compatibility should instead spell out the full names.
Abbreviations are mainly here for interactive use.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-12-18 16:50:59 +01:00
Jiří Klimeš
107fdd6b01 cli: support PPPoE connection types in 'nmcli con add' 2013-12-18 16:45:59 +01:00
Jiří Klimeš
d79b56a7e9 cli: 'id' option for 'nmcli con add type vlan' is mandatory (rh #953397)
So update documentation accordingly.

https://bugzilla.redhat.com/show_bug.cgi?id=953397
2013-12-18 15:49:10 +01:00
Jiří Klimeš
72922f2068 cli: fix description of connection parameters and specify some default values 2013-12-13 09:50:09 +01:00
Jiří Klimeš
00de4a920a man: fix 'connection add' arguments descriptions in nmcli manual page 2013-12-12 13:27:09 +01:00
Dan Winship
461920bb96 cli: add NMC_RESULT_ERROR_NOT_FOUND and use as appropriate
This will allow callers to distinguish "no such connection" from
"connection failed to activate", etc.

https://bugzilla.redhat.com/show_bug.cgi?id=1022256
2013-11-22 13:51:25 -05:00
Dan Winship
9a532db182 cli: add "nmcli con load file..."
https://bugzilla.gnome.org/show_bug.cgi?id=709830
2013-11-15 13:39:40 -05:00
Jiří Klimeš
79ac1cf089 cli: add support for getting/setting hostname to nmcli (rh #1018510)
https://bugzilla.redhat.com/show_bug.cgi?id=1018510
2013-11-13 12:19:51 +01:00
Dan Williams
7d57386e04 cli: add support for 'nmcli dev connect ifname XXX' 2013-10-31 15:45:21 -05:00
Dan Williams
42c7ea85a1 cli: add support for 'nmcli con up ifname XXX'
Passes a NULL connection to nm_client_activate_connection() allowing
NetworkManager to pick the best available connection for the interface.
2013-10-31 15:45:20 -05:00
Jiří Klimeš
20a9723c70 man: fix 'nmcli con reload' description in nmcli manual page
Pointed out by swadeley@redhat.com
2013-10-31 14:14:03 +01:00
Stephen Wadeley
b752252fc4 man: some improvements to language and style in nmcli manual page
Signed-off-by: Stephen Wadeley <swadeley@redhat.com>
2013-10-31 13:19:53 +01:00
Yuri Chornoivan
61de24ba35 Fix typos
https://bugzilla.gnome.org/show_bug.cgi?id=710505
2013-10-19 11:49:18 -04:00
Jiří Klimeš
62d113f6c2 cli: accept 'primary' bonding option 2013-10-02 11:48:07 +02:00
Jiří Klimeš
641526781a man: update nmcli manual page for 'nmcli networking connectivity' 2013-09-12 15:48:03 +02:00
Thomas Haller
c3ea945c19 nmcli: fix errors in nmcli help output and man page
Fix some spelling errors and wrong parameter description. Also add the
team connection to the manual page.

https://bugzilla.redhat.com/show_bug.cgi?id=997566

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-08-28 15:26:50 +02:00
Thomas Haller
253b783129 man: reword nmcli manual page introducation
See https://bugzilla.redhat.com/show_bug.cgi?id=960071

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-08-20 14:51:51 +02:00
Thomas Haller
2fedf0a3f4 man: fix spelling error in man/nmcli.1.in
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-08-19 11:42:42 +02:00
Dan Williams
ff40555e84 man: clarify connections and devices in nmcli 2013-08-13 15:31:06 -05:00
Dan Williams
55c00a299c man: minor cleanups
Move object descriptions onto the same line as the object name.
2013-08-13 15:31:06 -05:00
Thomas Haller
244548b790 man: reword description for man nmcli (connection down)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-08-09 09:06:54 +02:00
Jiří Klimeš
6993b5b2a1 man: add 'nmcli-examples' manual page with examples of nmcli usage
(and add a reference to 'nmcli-examples' to other man pages)
2013-07-22 13:43:54 +02:00
Jiří Klimeš
5ee7f488e7 man: update nmcli manual page for 'connection modify' 2013-07-22 13:37:17 +02:00
Jiří Klimeš
44debdf4ce man: update nmcli manual page for 'connection edit' 2013-07-22 13:37:17 +02:00
Jiří Klimeš
74d0fcb97b man: update/fix options for 'nmcli con add' in nmcli manual page 2013-07-22 10:30:07 +02:00
Dan Winship
1f81851017 core: add monitor-connection-files=false and ReloadConnections
Add a "monitor-connection-files" config option, which can be set to
"false" to disable automatic reloading of connections on file change.

To go with this, add a new ReloadConnections method on
o.fd.NM.Settings that can be used to manually reload connections, and
add an nm-cli command to call it.
2013-06-14 12:57:47 -03:00