diff options
author | Thomas Haller <thaller@redhat.com> | 2013-11-29 13:13:41 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-06-30 18:35:46 +0200 |
commit | 2deaa5397a879a31c8ec0ca34553c0a97eaea69b (patch) | |
tree | 262f14267e96682c25a1ea59a319bc964be4d3c5 /libnm-util/nm-setting-private.h | |
parent | de5656a5707a5d2b23ec3f2738476ad59d9edd04 (diff) | |
download | NetworkManager-2deaa5397a879a31c8ec0ca34553c0a97eaea69b.tar.gz |
libnm-util: normalize virtual_iface_name in NMSettings
Some type-specific NMSetting implementations (bond, bridge, team, vlan)
have their own 'interface-name' property. This property will be
deprecated in favour of 'interface-name' in NMSettingConnection.
Change verify() and normalize() to check that the redundant
values match and repair/normalize the properties.
Force the virtual interface name of the type-specific setting to be
equal to NMSettingConnection:interface_name. This way, the depreacted
field stays valid and backward compatible.
NMSettingInfiniband is special, because it does not have a backing
property for the interface name, although it implements
get_virtual_iface_name(). To account for this, some special handling
is needed in order not to change the behaviour of get_virtual_iface_name().
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'libnm-util/nm-setting-private.h')
-rw-r--r-- | libnm-util/nm-setting-private.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libnm-util/nm-setting-private.h b/libnm-util/nm-setting-private.h index d1131133f7..fae03762f2 100644 --- a/libnm-util/nm-setting-private.h +++ b/libnm-util/nm-setting-private.h @@ -108,6 +108,16 @@ NMSetting *nm_setting_find_in_list (GSList *settings_list, const char *setting_n const char *nm_setting_ip4_config_get_address_label (NMSettingIP4Config *setting, guint32 i); gboolean nm_setting_ip4_config_add_address_with_label (NMSettingIP4Config *setting, NMIP4Address *address, const char *label); +NMSettingVerifyResult _nm_setting_verify_deprecated_virtual_iface_name (const char *interface_name, + gboolean allow_missing, + const char *setting_name, + const char *setting_property, + GQuark error_quark, + gint e_invalid_property, + gint e_missing_property, + GSList *all_settings, + GError **error); + NMSettingVerifyResult _nm_setting_verify (NMSetting *setting, GSList *all_settings, GError **error); |