NM.SettingHostname

g GObject.Object GObject.Object NM.Setting NM.Setting GObject.Object->NM.Setting NM.SettingHostname NM.SettingHostname NM.Setting->NM.SettingHostname

Subclasses:

None

Methods

Inherited:

NM.Setting (21), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_from_dhcp ()

get_from_dns_lookup ()

get_only_from_default ()

get_priority ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

NM.Setting (1)

Name

Type

Flags

Short Description

from-dhcp

NM.Ternary

r/w/en

from-dns-lookup

NM.Ternary

r/w/en

only-from-default

NM.Ternary

r/w/en

priority

int

r/w/en

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class NM.SettingHostname(**kwargs)
Bases:

NM.Setting

Abstract:

No

Structure:

NM.SettingHostnameClass

Hostname settings

New in version 1.30.

classmethod new()
Returns:

the new empty NM.SettingHostname object

Return type:

NM.Setting

Creates a new NM.SettingHostname object with default values.

New in version 1.42.

get_from_dhcp()
Returns:

the ‘from-dhcp’ property value

Return type:

NM.Ternary

Returns the value contained in the NM.SettingHostname :from-dhcp property.

New in version 1.30.

get_from_dns_lookup()
Returns:

the ‘from-dns-lookup’ property value

Return type:

NM.Ternary

Returns the value contained in the NM.SettingHostname :from-dns-lookup property.

New in version 1.30.

get_only_from_default()
Returns:

the ‘only-from-default’ property value

Return type:

NM.Ternary

Returns the value contained in the NM.SettingHostname :only-from-default property.

New in version 1.30.

get_priority()
Returns:

the ‘priority’ property value

Return type:

int

Returns the value contained in the NM.SettingHostname :priority property.

New in version 1.30.

Property Details

NM.SettingHostname.props.from_dhcp
Name:

from-dhcp

Type:

NM.Ternary

Default Value:

NM.Ternary.DEFAULT

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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 be NM.Ternary.TRUE.

New in version 1.30.

NM.SettingHostname.props.from_dns_lookup
Name:

from-dns-lookup

Type:

NM.Ternary

Default Value:

NM.Ternary.DEFAULT

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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 be NM.Ternary.TRUE.

New in version 1.30.

NM.SettingHostname.props.only_from_default
Name:

only-from-default

Type:

NM.Ternary

Default Value:

NM.Ternary.DEFAULT

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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 be NM.Ternary.FALSE.

New in version 1.30.

NM.SettingHostname.props.priority
Name:

priority

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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.