NM.SettingUser¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class NM.SettingUser(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
General User Profile Settings
New in version 1.8.
- classmethod check_key(key)¶
- Parameters:
key (
str
) – the key to check- Raises:
- Returns:
True
if key is a valid user data key.- Return type:
Checks whether key is a valid user data key. This means, key is not
None
, not too large and valid ASCII. Also, only digits and numbers are allowed with a few special characters. The key must contain at least one ‘.’ and look like a fully qualified DNS name.New in version 1.8.
- classmethod check_val(val)¶
- Parameters:
val (
str
) – the value to check- Raises:
- Returns:
True
if val is a valid user data value.- Return type:
Checks whether val is a valid user data value. This means, value is not
None
, not too large and valid UTF-8.New in version 1.8.
- classmethod new()¶
- Returns:
the new empty
NM.SettingUser
object- Return type:
Creates a new
NM.SettingUser
object with default values.New in version 1.8.
- get_data(key)¶
- Parameters:
key (
str
) – the key to lookup- Returns:
the value associated with key or
None
if no such value exists.- Return type:
New in version 1.8.
- get_keys()¶
-
New in version 1.8.
- set_data(key, val)¶
- Parameters:
- Raises:
- Returns:
True
if the operation was successful. The operation can fail if key or val are not valid strings according toNM.SettingUser.check_key
() andNM.SettingUser.check_val
().- Return type:
New in version 1.8.
Property Details¶
- NM.SettingUser.props.data¶
- Name:
data
- Type:
- Default Value:
- Flags:
A dictionary of key/value pairs with user data. This data is ignored by NetworkManager and can be used at the users discretion. The keys only support a strict ascii format, but the values can be arbitrary UTF8 strings up to a certain length.
New in version 1.8.