NM.SettingHostname¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class NM.SettingHostname(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Hostname settings
New in version 1.30.
- classmethod new()¶
- Returns:
the new empty
NM.SettingHostnameobject- Return type:
Creates a new
NM.SettingHostnameobject with default values.New in version 1.42.
- get_from_dhcp()¶
- Returns:
the ‘from-dhcp’ property value
- Return type:
Returns the value contained in the
NM.SettingHostname:from-dhcpproperty.New in version 1.30.
- get_from_dns_lookup()¶
- Returns:
the ‘from-dns-lookup’ property value
- Return type:
Returns the value contained in the
NM.SettingHostname:from-dns-lookupproperty.New in version 1.30.
- get_only_from_default()¶
- Returns:
the ‘only-from-default’ property value
- Return type:
Returns the value contained in the
NM.SettingHostname:only-from-defaultproperty.New in version 1.30.
- get_priority()¶
- Returns:
the ‘priority’ property value
- Return type:
Returns the value contained in the
NM.SettingHostname:priorityproperty.New in version 1.30.
Property Details¶
- NM.SettingHostname.props.from_dhcp¶
- Name:
from-dhcp- Type:
- Default Value:
- Flags:
Whether the system hostname can be determined from DHCP on this connection.
When set to
NM.Ternary.DEFAULT, the value from global configuration is used. If the property doesn’t have a value in the global configuration, NetworkManager assumes the value to beNM.Ternary.TRUE.New in version 1.30.
- NM.SettingHostname.props.from_dns_lookup¶
- Name:
from-dns-lookup- Type:
- Default Value:
- Flags:
Whether the system hostname can be determined from reverse DNS lookup of addresses on this device.
When set to
NM.Ternary.DEFAULT, the value from global configuration is used. If the property doesn’t have a value in the global configuration, NetworkManager assumes the value to beNM.Ternary.TRUE.New in version 1.30.
- NM.SettingHostname.props.only_from_default¶
- Name:
only-from-default- Type:
- Default Value:
- Flags:
If set to
NM.Ternary.TRUE, NetworkManager attempts to get the hostname via DHCPv4/DHCPv6 or reverse DNS lookup on this device only when the device has the default route for the given address family (IPv4/IPv6).If set to
NM.Ternary.FALSE, the hostname can be set from this device even if it doesn’t have the default route.When set to
NM.Ternary.DEFAULT, the value from global configuration is used. If the property doesn’t have a value in the global configuration, NetworkManager assumes the value to beNM.Ternary.FALSE.New in version 1.30.
- NM.SettingHostname.props.priority¶
- Name:
priority- Type:
- Default Value:
0- Flags:
The relative priority of this connection to determine the system hostname. A lower numerical value is better (higher priority). A connection with higher priority is considered before connections with lower priority.
If the value is zero, it can be overridden by a global value from NetworkManager configuration. If the property doesn’t have a value in the global configuration, the value is assumed to be 100.
Negative values have the special effect of excluding other connections with a greater numerical priority value; so in presence of at least one negative priority, only connections with the lowest priority value will be used to determine the hostname.
New in version 1.30.