Commit Graph

86 Commits

Author SHA1 Message Date
Beniamino Galvani
1ff712d5d0 ip-tunnel: add a MTU property
Add a new ip-tunnel.mtu property which can be used to change the MTU
of the tunnel interface.
2015-12-19 12:06:33 +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š
89db31bf7b cli: enable TAB-completion for macvlan.mode in editor 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
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
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š
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
Beniamino Galvani
64c6b124d2 cli: add support for tun settings
Add nmcli support for adding and modifying TUN/TAP connections.
2015-11-25 11:39:57 +01:00
Beniamino Galvani
cba0f4e3c4 cli: add ipv4.dhcp-fqdn property 2015-11-23 22:09:06 +01:00
Dan Williams
06442276c9 cli: add support for GSM setting device-id, sim-id, and sim-operator-id properties 2015-11-18 15:50:52 +01:00
Dan Williams
3ac82f2c75 nmcli: add support for WiFi MAC address randomization property 2015-11-18 15:37:42 +01:00
Jiří Klimeš
b92397f925 all: fix typos in the code and update translations for that (bgo #758102)
Found by Anders Jonsson <anders.jonsson@norsjovallen.se>

https://bugzilla.gnome.org/show_bug.cgi?id=758102
2015-11-16 14:29:14 +01:00
Lubomir Rintel
4d6649fa0e cli: add addr-gen-mode property 2015-11-02 20:27:00 +01:00
Jiří Klimeš
689de5c94a vlan: (all) add VLAN MVRP flag
http://patchwork.ozlabs.org/patch/219364/
2015-10-27 17:17:05 +01:00
Beniamino Galvani
e587dcb16e wake-on-lan: add option to keep existing settings
Add a new 'ignore' option to NMSettingWired.wake-on-lan which disables
management of wake-on-lan by NetworkManager (i.e. the pre-existing
option will not be touched). Also, change the default behavior to be
'ignore' instead of 'disabled'.

https://bugzilla.gnome.org/show_bug.cgi?id=755182
2015-10-16 17:11:26 +02:00
Beniamino Galvani
0d31b95343 cli: add support for 'connection.lldp' property 2015-10-12 14:44:31 +02:00
Lubomir Rintel
7d1b2efc52 cli: add support for ipv4.dhcp-timeout property
https://bugzilla.redhat.com/show_bug.cgi?id=1262922
2015-10-06 14:16:55 +02:00
Jiří Klimeš
9294962cc4 cli: remove static width parameter from fields definition
The width is no longer needed because the actual field's width is computed
dynamically just before printing.
(as of commit e6870789b5)
2015-09-25 12:09:51 +02:00
Jiří Klimeš
431cc8a517 cli: support vpn.timeout property in nmcli 2015-09-21 16:59:04 +02:00
Jiří Klimeš
4485b4ec2f nmcli: wake-on-lan property set/get fixes
- accept a numeric value (decimal or hex (0x prefix))
- display a numeric value of the property in addition to the strings
- add/accept spaces between string names

to behave similar to other flags' properties.
2015-09-15 11:46:37 +02:00
Jiří Klimeš
f88ce92b25 nmcli: allow "none" value for ethernet.wake-on-lan property (rh #1260584)
Aliases "disable" and "disabled" are accepted too.

nmcli> set 802-3-ethernet.wake-on-lan none

It was possible to remove flags by setting a string containing just white
spaces, but it was user unfriendly and non-intuitive.

https://bugzilla.redhat.com/show_bug.cgi?id=1260584
2015-09-15 11:46:37 +02:00
Beniamino Galvani
04e29df47d cli: describe usage of the 'connection.metered' property 2015-09-04 10:45:04 +02:00
Dan Winship
22e1a97e12 all: drop includes to <glib/gi18n.h> for "nm-default.h"
The localization headers are now included via "nm-default.h".

Also fixes several places, where we wrongly included <glib/gi18n-lib.h>
instead of <glib/gi18n.h>. For example under "clients/" directory.
2015-08-05 15:35:51 +02:00
Thomas Haller
19c3ea948a all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
Dan Winship
3452ee2a0e all: rename nm-glib-compat.h to nm-glib.h, use everywhere
Rather than randomly including one or more of <glib.h>,
<glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include
"nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
nm-glib.h, include <gio/gio.h> from there, and then change all .c
files in NM to include "nm-glib.h" rather than including the glib
headers directly.

(Public headers files still have to include the real glib headers,
since nm-glib.h isn't installed...)

Also, remove glib includes from header files that are already
including a base object header file (which must itself already include
the glib headers).
2015-07-24 13:25:47 -04:00
Beniamino Galvani
de92df6c9f cli: add support for Wake-on-LAN settings 2015-07-24 14:02:59 +02:00
Jiří Klimeš
94b1b53a91 cli: fix verifying flag-based properties (rh #1244048)
Some of the properties changed from GParamSpecUInt to GParamSpecFlags, namely
NM_SETTING_VLAN_FLAGS
NM_SETTING_DCB_APP_FCOE_FLAGS
NM_SETTING_DCB_APP_ISCSI_FLAGS
NM_SETTING_DCB_APP_FIP_FLAGS
NM_SETTING_DCB_PRIORITY_FLOW_CONTROL_FLAGS
NM_SETTING_DCB_PRIORITY_GROUP_FLAGS

(commit fcfb4b40ba)

https://bugzilla.redhat.com/show_bug.cgi?id=1244048
2015-07-17 11:36:03 +02:00
Jiří Klimeš
c3093d9391 cli: add support for connection.autoconnect-slaves property 2015-06-19 09:32:58 +02:00
Thomas Haller
5eba53cd53 cli: fix metered to string property
nmc_property_connection_get_metered() must return non-localized strings
that can be parsed by nmc_property_connection_set_metered().

Fixes: f0aebfd746
2015-06-10 11:49:46 +02:00
Beniamino Galvani
f0aebfd746 cli: add support for 'metered' connection property 2015-06-09 18:15:20 +02:00
Thomas Haller
230099aa52 cli: show dns-options default value
You can reset the default value via

  $ nmcli connection modify id CON ipv4.dns-options ""

and set an empty value with

  $ nmcli connection modify id CON ipv4.dns-options " "
2015-06-05 12:26:48 +02:00
Thomas Haller
f81d7242c3 cli: add DEFINE_GETTER_WITH_DEFAULT() macro 2015-06-05 12:26:48 +02:00
Thomas Haller
350900d0a5 cli: stack allocate search string in nmc_properties_find() 2015-06-05 12:26:48 +02:00
Thomas Haller
035e31327b cli: refactor nmc_add_prop_funcs() to use variadic macro
The advantage of this is that if we later add another function
pointer we don't have to touch any existing calls which would
only pass NULL to that argument.

Using a variadic argument and partial initialization of an
auto variable gives us that flexibility.
2015-06-05 12:26:48 +02:00
Thomas Haller
16f089ce64 cli: do not create a copy of static strings for nmc_properties hash
The keys of the hash are static strings. No need to make a copy of it.
If we ever need dynamics properties, we should intern those strings.
2015-06-05 12:26:48 +02:00
Thomas Haller
8a14851f93 cli: refactor property to string conversion
Instead of having a get_func() and out2in_func(), have only one
get_func() that accepts an argument of the output format.

This way, a conversion to parsable input format, doesn't have to go
first thourgh get_func() and mangle the pretty string in out2in_func().

This fixes conversions via nmc_property_out2in_cut_paren().
For example, nmc_property_802_1X_get_private_key_password_flags()
would return a localized string _("0 (none)"). There is no guarantee
that out2in_func() would find the expected output format after
localizing.

This also fixes nmc_property_out2in_routes() which expected
a format "dst =" (would be "ip =") and expects mandatory
'nh' and 'mt' arguments. In fact, the regex didn't match and
nmc_property_out2in_routes() always failed.

While at it, also combine the implementation of
nmc_property_ipv4_get_routes() and nmc_property_ipv6_get_routes().
2015-06-05 12:26:48 +02:00
Thomas Haller
b8b1a01d96 build: rename file "include/nm-utils-internal.h" to "nm-macros-internal.h"
We already have "nm-utils*.h" and "NetworkManagerUtils.h" headers. Rename
"include/nm-utils-internal.h" to "nm-macros-internal.h". I think that
name is better, because this file is header-only, internal, and
repository-wide.

Also, it will never contain non-header-only declarations because
there is no backing object file under "include/".
It will only contain macros and inline functions.
2015-06-01 14:47:08 +02:00
Jiří Klimeš
bf01da1a08 cli: add missing nmc_property_802_1X_allowed_eap() function 2015-05-28 10:13:52 +02:00
Jiří Klimeš
188d6cbaf3 cli: change function for allowed values to return array of strings 2015-05-28 10:13:51 +02:00
Beniamino Galvani
7467e25593 cli: add support for DNS options 2015-05-13 17:15:34 +02:00
Jiří Klimeš
85afd9a69d cli: (trivial) move DEFINE_SETTER_STR_LIST_MULTI to the right place 2015-05-05 10:08:09 +02:00
Yuri Chornoivan
f851a741a6 fix typo and do not translate an empty string
https://bugzilla.gnome.org/show_bug.cgi?id=748906
2015-05-04 18:36:54 +02:00
Jiří Klimeš
7271e168b0 cli: fix allowed slave-types 2015-04-22 08:51:29 +02:00
Thomas Haller
a49680dacd libnm: add define for cert scheme prefix file:// for NMSetting8021x 2015-03-12 18:12:27 +01:00
Jiří Klimeš
591908c8bd nmcli: add support for bridge multicast-snooping property 2015-02-26 09:08:14 +01:00
Thomas Haller
fdd09340ce cli: fix memleak in nmc_setting_get_valid_properties() 2015-02-09 11:51:04 +01:00
Dan Williams
c3e319266c cli: add support for wifi.powersave setting 2015-01-21 14:31:14 -06:00