Commit Graph

370 Commits

Author SHA1 Message Date
Jiří Klimeš
6391a20114 cli: add bash completion for arguments of tun, ip-tunnel, macvlan, vxlan
for 'nmcli connection add type ...'
2015-12-17 16:28:42 +01:00
Jiří Klimeš
016db38ce2 cli: use '|' instead of ',' for delimiting the modes
to be consistent with other options
2015-12-17 16:20:10 +01:00
Jiří Klimeš
81dcf9b218 cli: really fix the description this time
Fixes: 3a6cd8204f
2015-12-17 16:10:32 +01:00
Thomas Haller
0959109b19 cli: fix spelling in user visible texts
https://bugzilla.gnome.org/show_bug.cgi?id=759555

Reported-by: Anders Jonsson <anders.jonsson@norsjovallen.se>
2015-12-17 12:25:26 +01:00
Jiří Klimeš
d0d96c1a13 cli: check ip-tunnel mode right after it is read 2015-12-16 16:12:24 +01:00
Jiří Klimeš
89db31bf7b cli: enable TAB-completion for macvlan.mode in editor 2015-12-16 16:10:08 +01:00
Jiří Klimeš
f8ed5ed239 cli: enable TAB-completion for "MACVLAN mode: " in nmcli -a con add type macvlan 2015-12-16 16:10:08 +01:00
Jiří Klimeš
835bdaaf1f cli: enable TAB-completion for ip-tunnel.mode in editor 2015-12-16 15:52:43 +01:00
Jiří Klimeš
9fb2a02b3a cli: enable TAB-completion for "Tunnel mode: " in nmcli -a con add type ip-tun 2015-12-16 14:36:28 +01:00
Jiří Klimeš
ff38790b12 cli: there are 5 optional arguments for vxlan connections 2015-12-16 14:21:15 +01:00
Jiří Klimeš
3a6cd8204f cli: remove stray space from help description 2015-12-16 14:20:05 +01:00
Jiří Klimeš
39f0ecbd36 cli: (trivial) fix a copy-paste error in a comment
Fixes: c3e6e25239
2015-12-16 14:18:47 +01:00
Beniamino Galvani
36f055fad9 cli: document ip-tunnel connection type 2015-12-16 14:03:28 +01:00
Beniamino Galvani
f4dd37fdcb cli: allow specifying a 'dev' option when adding IP tunnels 2015-12-16 14:03:26 +01:00
Beniamino Galvani
e62c0c2547 cli: fix error handling in creation of IP tunnels
Fixes: 7da440b798
2015-12-16 11:42:19 +01:00
Jiří Klimeš
56518bb8a1 cli: monitor whether NetworkManager is running
Print a message when NetworkManager is not running upon 'nmcli monitor' start.
2015-12-14 16:37:57 +01:00
Jiří Klimeš
800bd1aa18 cli: primary connection is not NMConnection, but NMActiveConnection
And use nm_client_get_primary_connection() accessor function instead of reading
NM_CLIENT_PRIMARY_CONNECTION property directly.

(process:31760): libnm-CRITICAL **: nm_connection_get_id: assertion 'NM_IS_CONNECTION (connection)' failed
(process:31760): libnm-CRITICAL **: nm_connection_get_uuid: assertion 'NM_IS_CONNECTION (connection)' failed

Fixes: d03f347b9d
2015-12-14 16:04:49 +01:00
Jiří Klimeš
fb62fc76cb cli: do not present secrets from openconnect to the user for confirmation
It is pointless to present them and require user to press Return for each
password prompt.
2015-12-12 20:06:35 +01:00
Jiří Klimeš
45fc268890 cli: make asking VPN secrets for OpenConnect really work
by running nm_vpn_openconnect_authenticate_helper() and filling the obtained
secrets to the array sent to NM.
2015-12-12 20:06:17 +01:00
Beniamino Galvani
7da440b798 cli: add vxlan support 2015-12-09 16:36:46 +01:00
Beniamino Galvani
c3e6e25239 cli: add macvlan support 2015-12-09 14:30:08 +01:00
Jiří Klimeš
3e5fea9820 cli: TAB-complete yes/no for boolean properties in the editor 2015-12-09 09:31:36 +01:00
Jiří Klimeš
e29b844f42 cli: produce new line after readline when echoing was off
The new line was missing.
Adding termios_new.c_lflag |= (ECHONL | ICANON); did not help. Why?

Fixes: a14306c2ce
2015-12-07 17:33:03 +01:00
Jiří Klimeš
629de4e689 cli: add global --show-secrets option
- it controls echoing passwords input on terminal
- it replaces --show-secrets in 'nmcli connection show', which is deprecated now
- it replaces --show-password in 'nmcli device wifi hotspot', which is deprecated now
2015-12-07 14:14:58 +01:00
Jiří Klimeš
23aff47826 cli: use nmc_readline_echo() for asking password in 'nmcli con add' 2015-12-07 14:14:58 +01:00
Jiří Klimeš
1056408fd4 cli: use nmc_readline_echo() for asking password in 'nmcli dev wifi connect' 2015-12-07 14:14:58 +01:00
Jiří Klimeš
02388060c1 cli: use new nmc_readline_echo() in polkit agent 2015-12-07 14:14:58 +01:00
Jiří Klimeš
a14306c2ce cli: do not echo passwords on terminal when asking for them
adds nmc_readline_echo() function that can disable displaying characters.
2015-12-07 14:14:58 +01:00
Lubomir Rintel
da528b5ccd cli: drop an extra newline 2015-12-07 11:23:39 +01:00
Lubomir Rintel
b38a5f4cb4 cli: avoid using tmp template after it goes out of scope
Fixes: 3892b839af
2015-12-07 11:05:52 +01:00
Lubomir Rintel
4ffed27959 cli: improve the error reporting a bit 2015-12-07 10:51:49 +01:00
Jiří Klimeš
3892b839af cli: add 'nmcli connection export' (rh #1034105)
Synopsis:
  nmcli connection export [ id | uuid | path] <ID> [<output file>]

for exporting VPN connections.

https://bugzilla.redhat.com/show_bug.cgi?id=1034105
2015-12-07 09:11:20 +01:00
Jiří Klimeš
9a0e4bae47 cli: add 'nmcli connection import' (rh #1034105)
Synopsis:
  nmcli connection import [--temporary] type <type> file <file to import>

Only VPN configurations can be imported at the moment.

https://bugzilla.redhat.com/show_bug.cgi?id=1034105
2015-12-07 09:11:06 +01:00
Lubomir Rintel
d03f347b9d cli: add nmcli monitor
https://bugzilla.redhat.com/show_bug.cgi?id=1034158
2015-12-05 12:16:23 +01:00
Lubomir Rintel
e92e06bdc7 cli,connections: add connection monitor 2015-12-05 12:16:06 +01:00
Lubomir Rintel
9b49284f0c cli,devices: add device monitor 2015-12-05 12:16:04 +01:00
Lubomir Rintel
2a646a74dd cli,devices: factor out parsing of the interface list
This is duplicated already and the monitor will use it.
2015-12-05 12:05:17 +01:00
Lubomir Rintel
225f6594c4 cli,devices: factor out device_state_to_color()
We'll use this for device status monitor too.
2015-12-05 12:05:17 +01:00
Lubomir Rintel
88ae8d2b13 cli: turn should_wait into a semaphore
Count the exit blockers. We'll want to terminate the device monitor in case all
monitored devices vanish.
2015-12-05 12:05:17 +01:00
Lubomir Rintel
67caad44c3 cli: move the decision whether to use colors to nmc_colorize()
This allows us to use a conditionally colorized output outside
print_required_fields().
2015-12-05 12:05:17 +01:00
Jiří Klimeš
4c437863fa cli: remove duplicated checks for running Networkmanager
It is already performed in do_connections().
2015-12-03 16:12:26 +01:00
Beniamino Galvani
b614a5ec61 cli: add support for IP tunnel settings 2015-12-01 17:39:41 +01:00
Jiří Klimeš
cb049d2500 cli: allow TAB-completion for tun.mode in nmcli editor
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Jiří Klimeš
d374352b99 cli: allow TAB-completion of "Mode:" in 'nmcli -a con add type tun'
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Jiří Klimeš
18b7a9a42f cli: ask user before requiring optional parameters for 'nmcli -a con add type tun'
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Jiří Klimeš
6ffe4b61f7 cli: fix an error in setting s390-options in nmcli editor
nmcli> set eth.s390-options portno=
(process:4711): libnm-CRITICAL **: nm_setting_wired_add_s390_option: assertion 'value_len > 0 && value_len < 200' failed
2015-11-28 19:48:02 +01:00
Jiří Klimeš
5f9b8b887d cli: fix an error in nmcli editor when setting vpn.data/vpn.secrets
nmcli> set vpn.data haha=
(process:3951): libnm-CRITICAL **: nm_setting_vpn_add_data_item: assertion 'strlen (item) > 0' failed
nmcli> set vpn.secrets haha=
(process:3951): libnm-CRITICAL **: nm_setting_vpn_add_secret: assertion 'strlen (secret) > 0' failed
2015-11-28 19:48:02 +01:00
Jiří Klimeš
1b0be2bab0 cli: fix a crash in 'nmcli -a con clone'
when providing empty arguments.

Fixes: 0c65b28960
2015-11-28 19:48:02 +01:00
Jiří Klimeš
4a06701e88 cli: add 'strongswan' and 'fortisslvpn' to known VPN types 2015-11-25 17:14:02 +01:00
Jiří Klimeš
579fd36566 cli: improve error messages for 'nmcli device set'
Fixes: 4dffbf8f6a
2015-11-25 16:39:00 +01:00