Thomas Haller
4f69c1e85e
cli: prettify check_activated() to by using switch() statement
...
No change in behavior.
2017-05-24 22:00:05 +02:00
Beniamino Galvani
c73b39c3a6
clients: fix typo
2017-05-24 10:42:33 +02:00
Beniamino Galvani
f15fd1e504
clients: fix meta setting descriptor for connection.autoconnect-slaves
...
Don't specify .get_gtype for properties of enum type.
https://bugzilla.redhat.com/show_bug.cgi?id=1455061
Fixes: c55561d303
2017-05-24 10:41:37 +02:00
Thomas Haller
c72a07a604
clients: implement wifi-sec.wep-key-type as enum property
...
This way, we get tab completion for the enum values, and
can reuse existing code.
This requires a pre-set-notify hook, that is invoked before
setting the property.
2017-05-23 13:37:10 +02:00
Thomas Haller
d6bdf6d9dc
clients: fix error message for setting flags enums
...
The min/max for flags must be unsigned. We need to keep track of
whether we have flags or an enum, and adjust min/max.
2017-05-23 13:37:10 +02:00
Thomas Haller
cfc9f5a9fd
clients: implement team.config as string property
...
... with separate validation function.
2017-05-23 13:37:10 +02:00
Thomas Haller
9a68123827
clients: implement serial.parity as enum property
...
Previously we would only consider the first character of
value. For example, "Nonsense" was also allowed. Don't do
that anymore.
2017-05-23 13:37:10 +02:00
Thomas Haller
6c4428324e
clients: implement proxy.pac-script as string property
...
... with separate validation function.
2017-05-23 13:37:10 +02:00
Thomas Haller
df388ea7d5
clients/trivial: rename nmc_vlan_parse_priority_maps function
2017-05-23 13:37:10 +02:00
Thomas Haller
14aefa1d7f
clients: implement dcb priorities as int property
2017-05-23 13:37:10 +02:00
Thomas Haller
e086cf1887
clients: add value_infos for int getter
...
This allows to implement a pretty alias for numbers,
like "default" for 0.
2017-05-23 13:37:10 +02:00
Thomas Haller
b6d9bdcee8
clients: combine int property setters
...
Instead of having 3 implementations for setting an int (int, uint, int64), combine
them. Also, make them more configurable by allowing to specify min/max/base, outside
of GParamSpec.
2017-05-23 13:37:10 +02:00
Thomas Haller
35d6802724
clients: add validate_fcn for string property
2017-05-23 13:37:10 +02:00
Thomas Haller
6c4b12418b
clients: implement macsec.mode property as enum
2017-05-23 13:37:10 +02:00
Thomas Haller
bd180e489d
clients: implement macsec.validation property as enum
2017-05-23 13:37:10 +02:00
Thomas Haller
ebdc7a6ce7
clients: implement proxy.method property as enum
2017-05-23 13:37:10 +02:00
Thomas Haller
772225f8cf
clients: implement ip-tunnel.mode property as enum
2017-05-23 13:37:10 +02:00
Thomas Haller
c55561d303
clients: implement connection.autoconnect-slaves property as enum
2017-05-23 13:37:10 +02:00
Thomas Haller
8c87a4b8a8
clients: replace nmc_string_to_int() by _nm_utils_ascii_str_to_int64()
2017-05-23 13:37:10 +02:00
Thomas Haller
1e5c5bd4a6
clients: cleanup parse_ip_route
2017-05-23 13:37:10 +02:00
Thomas Haller
5183399744
clients: cleanup parse_ip_address
2017-05-23 13:37:10 +02:00
Thomas Haller
9a3e35cc0e
clients: don't use nmc_string_to_int_base() and nmc_string_to_uint_base() util
...
They are redundant.
2017-05-23 13:37:10 +02:00
Thomas Haller
1371116ea2
clients: implement wireless.mac-address-randomization property as enum
2017-05-23 13:37:10 +02:00
Thomas Haller
cc79b1a554
clients: implement wired.wake-on-lan property as enum
2017-05-23 13:37:10 +02:00
Thomas Haller
d48998b4e8
clients: implement tun.mode property as enum
2017-05-23 13:37:10 +02:00
Thomas Haller
3341e89e7c
clients: implement macvlan.mode property as enum
2017-05-23 13:37:10 +02:00
Thomas Haller
5a98837b23
clients/trivial: whitespace
2017-05-23 13:37:10 +02:00
Thomas Haller
d76c190dc7
clients: fix appending integer to result in nmc_property_set_bytes()
2017-05-23 13:27:24 +02:00
Beniamino Galvani
30393ee236
clients: fix setter for 802-1x.password-raw
...
The property is a GBytes, not a GByteArray.
https://bugzilla.gnome.org/show_bug.cgi?id=782836
2017-05-23 13:27:24 +02:00
Thomas Haller
ae81216ae0
merge: cli pager
2017-05-15 23:25:14 +02:00
Lubomir Rintel
7c24a2cb39
cli: allow the GNU option format
...
$ nmcli --fields=all c
Error: Option '-fields=all' is unknown, try 'nmcli -help'.
What a shame. Let's fix this.
2017-05-15 19:19:49 +02:00
Lubomir Rintel
24c079e4b2
cli: spawn a pager when running on a terminal
...
This makes it a lot more convenient to deal with long outputs (such as
"nmcli c show id ...").
The implementation is essentially jacked from systemd. The bugs are
mine.
2017-05-15 17:23:51 +02:00
Thomas Haller
234bc0adcf
cli: fix use-after-free in _get_fcn_gobject_enum()
...
Fixes: ddfff04a45
2017-05-15 15:16:22 +02:00
Lubomir Rintel
6fde475b27
cli: shorten setting names to aliases in "nmcli c show" connection list
...
This basically uses "wifi" in place of "802-11-wireless" and analogously
for other setting types that have aliases unless a --terse option was
specified.
Apart from looking nicer it makes the default output less wide,
hopefully avoiding line breaks on 80 column terminals in basic use
cases.
2017-05-15 14:46:05 +02:00
Lubomir Rintel
2899bb3429
cli: add support for the WPS property
2017-05-15 12:59:55 +02:00
Lubomir Rintel
e6f95b50c8
setting-wireless: add wps-method property
...
This property will be used to decide if it makes sense to attempt a WPS
enrollment on connection activation.
2017-05-15 12:59:55 +02:00
Thomas Haller
a6c84e2ea0
cli: fix redundant "const const" declaration in nmcli.h
...
Fixes: bfb9fd0d2f
2017-05-12 14:06:49 +02:00
Beniamino Galvani
00df57a066
clients: print expected route syntax on parsing failure
...
Now that routes can include optional attributes, print the expected
syntax in case of parsing failure.
$ nmcli connection modify dummy ipv4.routes a
Error: failed to modify ipv4.routes: invalid route: Invalid IPv4
address 'a'. The valid syntax is: 'ip[/prefix] [next-hop] [metric]
[attribute=val]... [,ip[/prefix] ...]'.
2017-05-08 10:09:30 +02:00
Beniamino Galvani
6181f41d8d
cli: support for wifi-sec.pmf property
2017-04-28 09:46:06 +02:00
Beniamino Galvani
60a3809815
libnm-core: add pmf property to wireless-security setting
...
Add a 'pmf' property to enable or disable Protected Management Frames
(802.11w) for the connection.
2017-04-28 09:46:05 +02:00
Thomas Haller
da5a6534bc
cli: fix _values_fcn_gobject_enum() for flag types
...
For flags, the integer is cast to "unsigned", hence, the min/max
range must be different.
Fixes: f53218ed7c
2017-04-27 17:59:51 +02:00
Thomas Haller
83a6f36207
cli: don't mark field names for translation
...
Before refactoring nmcli recently, field names were marked for translation.
Note that for the property names, marking them had no effect as only
plain strings can be marked with N_().
Note how --fields are also an input argument. The input should be
independent of the locale and not translated. Likewise, when printing
the header names, they should not be translated to match the --fields
option.
$ LANG=de_DE.utf8 nmcli --fields GENERAL.DEVICE device show enp0s25
GENERAL.GERÄT: enp0s25
Drop the translation marks.
2017-04-23 23:45:02 +02:00
Thomas Haller
7aab314cef
cli: fix marking settings docs for translation
...
Text for translation cannot contain defines (or variables). We must
generate the description docs with plain N_() values.
2017-04-23 23:45:02 +02:00
Thomas Haller
b20092b51e
cli: fix marking setting pretty name for translation
2017-04-23 23:45:02 +02:00
Thomas Haller
9fcbe4ff71
cli: don't use #define for translation texts
...
Text for translation cannot contain defines (or variables).
2017-04-23 23:45:02 +02:00
Beniamino Galvani
ed824102ff
cli: fix completion of connection types
...
Return only main settings and the special slave types.
2017-04-20 14:34:20 +02:00
Beniamino Galvani
07cba18036
cli: accept special slave connection types in editor
2017-04-20 14:34:20 +02:00
Beniamino Galvani
032a3b4712
cli: only return main setting names as connection types
...
Also, return the special slave types.
2017-04-20 14:34:20 +02:00
Beniamino Galvani
243061edb6
cli: normalize function name
2017-04-20 14:34:20 +02:00
Francesco Giudici
4bdb6b026a
nmcli: show secrets when the --show-secrets option is put after the connection id
...
'nmcli connection show <con_id1> --show-secrets'
secrets were not shown.
'nmcli connection show <con_id1> --show-secrets <con_id2>'
secrets were shown only for connection ids following the
"--show-secrets" option (so only for 'con_id2').
Fix these behaviors showing secrets for all connections also
if the "--show-secrets" option is put after the connection ids.
2017-04-20 12:41:08 +02:00