NM.SettingConnection

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

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

class

new ()

add_permission (ptype, pitem, detail)

add_secondary (sec_uuid)

get_auth_retries ()

get_autoconnect ()

get_autoconnect_ports ()

get_autoconnect_priority ()

get_autoconnect_retries ()

get_autoconnect_slaves ()

get_connection_type ()

get_controller ()

get_dns_over_tls ()

get_down_on_poweroff ()

get_gateway_ping_timeout ()

get_id ()

get_interface_name ()

get_lldp ()

get_llmnr ()

get_master ()

get_mdns ()

get_metered ()

get_mptcp_flags ()

get_mud_url ()

get_multi_connect ()

get_num_permissions ()

get_num_secondaries ()

get_permission (idx, out_ptype, out_pitem, out_detail)

get_port_type ()

get_read_only ()

get_secondary (idx)

get_slave_type ()

get_stable_id ()

get_timestamp ()

get_uuid ()

get_wait_activation_delay ()

get_wait_device_timeout ()

get_zone ()

is_slave_type (type)

permissions_user_allowed (uname)

remove_permission (idx)

remove_permission_by_value (ptype, pitem, detail)

remove_secondary (idx)

remove_secondary_by_value (sec_uuid)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

NM.Setting (1)

Name

Type

Flags

Short Description

auth-retries

int

r/w/en

autoconnect

bool

r/w/en

autoconnect-ports

int

r/w/en

autoconnect-priority

int

r/w/en

autoconnect-retries

int

r/w/en

autoconnect-slaves

NM.SettingConnectionAutoconnectSlaves

r/w/en

controller

str

r/w/en

dns-over-tls

int

r/w/en

down-on-poweroff

int

r/w/en

gateway-ping-timeout

int

r/w/en

id

str

r/w/en

interface-name

str

r/w/en

lldp

int

r/w/en

llmnr

int

r/w/en

master

str

r/w/en

mdns

int

r/w/en

metered

NM.Metered

r/w/en

mptcp-flags

int

r/w/en

mud-url

str

r/w/en

multi-connect

int

r/w/en

permissions

[str]

r/w

port-type

str

r/w/en

read-only

bool

r/w/en

deprecated

secondaries

[str]

r/w/en

slave-type

str

r/w/en

stable-id

str

r/w/en

timestamp

int

r/w

type

str

r/w/en

uuid

str

r/w/en

wait-activation-delay

int

r/w/en

wait-device-timeout

int

r/w/en

zone

str

r/w/en

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class NM.SettingConnection(**kwargs)
Bases:

NM.Setting

Abstract:

No

Structure:

NM.SettingConnectionClass

General Connection Profile Settings

classmethod new()
Returns:

the new empty NM.SettingConnection object

Return type:

NM.Setting

Creates a new NM.SettingConnection object with default values.

add_permission(ptype, pitem, detail)
Parameters:
  • ptype (str) – the permission type; at this time only “user” is supported

  • pitem (str) – the permission item formatted as required for ptype

  • detail (str or None) – unused at this time; must be None

Returns:

True if the permission was unique and was successfully added to the list, False if ptype or pitem was invalid. If the permission was already present in the list, it will not be added a second time but True will be returned. Note that before 1.28, in this case False would be returned.

Return type:

bool

Adds a permission to the connection’s permission list. At this time, only the “user” permission type is supported, and pitem must be a username. See NM.SettingConnection :permissions: for more details.

add_secondary(sec_uuid)
Parameters:

sec_uuid (str) – the secondary connection UUID to add

Returns:

True if the secondary connection UUID was added; False if the UUID was already present

Return type:

bool

Adds a new secondary connection UUID to the setting.

get_auth_retries()
Returns:

the configured authentication retries. Zero means infinity and -1 means a global default value.

Return type:

int

Returns the value contained in the NM.SettingConnection :auth-retries property.

New in version 1.10.

get_autoconnect()
Returns:

the connection’s autoconnect behavior

Return type:

bool

Returns the NM.SettingConnection :autoconnect property of the connection.

get_autoconnect_ports()
Returns:

whether ports of the connection should be activated together with the connection.

Return type:

NM.Ternary

Returns the NM.SettingConnection :autoconnect-ports property of the connection.

New in version 1.46.

get_autoconnect_priority()
Returns:

the connection’s autoconnect priority

Return type:

int

Returns the NM.SettingConnection :autoconnect-priority property of the connection. The higher number, the higher priority.

get_autoconnect_retries()
Returns:

the connection’s autoconnect retries

Return type:

int

Returns the NM.SettingConnection :autoconnect-retries property of the connection. Zero means infinite, -1 means the global default value.

New in version 1.6.

get_autoconnect_slaves()
Returns:

whether slaves of the connection should be activated together with the connection.

Return type:

NM.SettingConnectionAutoconnectSlaves

Returns the NM.SettingConnection :autoconnect-slaves property of the connection.

New in version 1.2.

Deprecated since version 1.46.: Use NM.SettingConnection.get_autoconnect_ports() instead, this is just an alias.

get_connection_type()
Returns:

the connection type

Return type:

str

Returns the NM.SettingConnection :type property of the connection.

get_controller()
Returns:

interface name of the controller device or UUID of the controller connection.

Return type:

str

Returns the NM.SettingConnection :controller property of the connection.

New in version 1.46.

get_dns_over_tls()
Returns:

the NM.SettingConnection :dns-over-tls property of the setting.

Return type:

NM.SettingConnectionDnsOverTls

New in version 1.34.

get_down_on_poweroff()
Returns:

whether the connection will be brought down before the system is powered off.

Return type:

NM.SettingConnectionDownOnPoweroff

Returns the NM.SETTING_CONNECTION_DOWN_ON_POWEROFF property.

New in version 1.48.

get_gateway_ping_timeout()
Returns:

the value contained in the NM.SettingConnection :gateway-ping-timeout property.

Return type:

int

get_id()
Returns:

the connection ID

Return type:

str

Returns the NM.SettingConnection :id property of the connection.

get_interface_name()
Returns:

the connection’s interface name

Return type:

str

Returns the NM.SettingConnection :interface-name property of the connection.

get_lldp()
Returns:

a NM.SettingConnectionLldp which indicates whether LLDP must be enabled for the connection.

Return type:

NM.SettingConnectionLldp

Returns the NM.SettingConnection :lldp property of the connection.

New in version 1.2.

get_llmnr()
Returns:

the NM.SettingConnection :llmnr property of the setting.

Return type:

NM.SettingConnectionLlmnr

New in version 1.14.

get_master()
Returns:

interface name of the master device or UUID of the master connection.

Return type:

str

Returns the NM.SettingConnection :master property of the connection.

Deprecated since version 1.46.: Use NM.SettingConnection.get_master() instead which is just an alias.

get_mdns()
Returns:

the NM.SettingConnection :mdns property of the setting.

Return type:

NM.SettingConnectionMdns

New in version 1.12.

get_metered()
Returns:

the NM.SettingConnection :metered property of the setting.

Return type:

NM.Metered

New in version 1.2.

get_mptcp_flags()
Returns:

the NM.SettingConnection :mptcp-flags property of the setting.

Return type:

NM.MptcpFlags

New in version 1.42.

get_mud_url()
Return type:

str

Returns the value contained in the NM.SettingConnection :mud-url property.

New in version 1.26.

get_multi_connect()
Returns:

the NM.SettingConnection :multi-connect property of the connection.

Return type:

NM.ConnectionMultiConnect

New in version 1.14.

get_num_permissions()
Returns:

the number of permissions entries

Return type:

int

Returns the number of entries in the NM.SettingConnection :permissions property of this setting.

get_num_secondaries()
Returns:

the number of configured secondary connection UUIDs

Return type:

int

get_permission(idx, out_ptype, out_pitem, out_detail)
Parameters:
  • idx (int) – the zero-based index of the permissions entry

  • out_ptype (str) – on return, the permission type. This is currently always “user”, unless the entry is invalid, in which case it returns “invalid”.

  • out_pitem (str) – on return, the permission item (formatted according to ptype, see NM.SettingConnection :permissions for more detail

  • out_detail (str) – on return, the permission detail (at this time, always None)

Returns:

True if a permission was returned, False if idx was invalid

Return type:

bool

Retrieve one of the entries of the NM.SettingConnection :permissions property of this setting.

get_port_type()
Returns:

the type of port this connection is, if any.

Return type:

str

Returns the NM.SettingConnection :port-type property of the connection.

New in version 1.46.

get_read_only()
Returns:

True if the connection is read-only, False if it is not

Return type:

bool

Returns the NM.SettingConnection :read-only property of the connection.

Deprecated since version 1.44: This property is deprecated and has no meaning.

get_secondary(idx)
Parameters:

idx (int) – the zero-based index of the secondary connection UUID entry. Access one past the length of secondaries is ok and will return None. Otherwise, it is a user error.

Returns:

the secondary connection UUID at index idx or None if idx is the number of secondaries.

Return type:

str

get_slave_type()
Returns:

the type of slave this connection is, if any

Return type:

str

Returns the NM.SettingConnection :slave-type property of the connection.

Deprecated since version 1.46.: Use NM.SettingConnection.get_port_type() instead which is just an alias.

get_stable_id()
Returns:

the stable-id for the connection

Return type:

str

Returns the #NMSettingConnection:stable_id property of the connection.

New in version 1.4.

get_timestamp()
Returns:

the connection’s timestamp

Return type:

int

Returns the NM.SettingConnection :timestamp property of the connection.

get_uuid()
Returns:

the connection UUID

Return type:

str

Returns the NM.SettingConnection :uuid property of the connection.

get_wait_activation_delay()
Returns:

the NM.SETTING_CONNECTION_WAIT_ACTIVATION_DELAY property with the delay in milliseconds. -1 is the default.

Return type:

int

New in version 1.40.

get_wait_device_timeout()
Returns:

the NM.SETTING_CONNECTION_WAIT_DEVICE_TIMEOUT property with the timeout in milliseconds. -1 is the default.

Return type:

int

New in version 1.20.

get_zone()
Returns:

the trust level of a connection

Return type:

str

Returns the NM.SettingConnection :zone property of the connection.

is_slave_type(type)
Parameters:

type (str) – the setting name (ie NM.SETTING_BOND_SETTING_NAME) to be matched against self's slave type

Returns:

True if connection is of the given slave type

Return type:

bool

Deprecated since version 1.46..

permissions_user_allowed(uname)
Parameters:

uname (str) – the user name to check permissions for

Returns:

True if the requested user is allowed to view this connection, False if the given user is not allowed to view this connection

Return type:

bool

Checks whether the given username is allowed to view/access this connection.

remove_permission(idx)
Parameters:

idx (int) – the zero-based index of the permission to remove

Removes the permission at index idx from the connection.

remove_permission_by_value(ptype, pitem, detail)
Parameters:
  • ptype (str) – the permission type; at this time only “user” is supported

  • pitem (str) – the permission item formatted as required for ptype

  • detail (str or None) – unused at this time; must be None

Returns:

True if the permission was found and removed; False if it was not.

Return type:

bool

Removes the permission from the connection. At this time, only the “user” permission type is supported, and pitem must be a username. See NM.SettingConnection :permissions: for more details.

remove_secondary(idx)
Parameters:

idx (int) – index number of the secondary connection UUID

Removes the secondary connection UUID at index idx.

remove_secondary_by_value(sec_uuid)
Parameters:

sec_uuid (str) – the secondary connection UUID to remove

Returns:

True if the secondary connection UUID was found and removed; False if it was not.

Return type:

bool

Removes the secondary connection UUID sec_uuid.

Property Details

NM.SettingConnection.props.auth_retries
Name:

auth-retries

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The number of retries for the authentication. Zero means to try indefinitely; -1 means to use a global default. If the global default is not set, the authentication retries for 3 times before failing the connection.

Currently, this only applies to 802-1x authentication.

New in version 1.10.

NM.SettingConnection.props.autoconnect
Name:

autoconnect

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. True to automatically activate the connection, False to require manual intervention to activate the connection.

Autoconnect happens when the circumstances are suitable. That means for example that the device is currently managed and not active. Autoconnect thus never replaces or competes with an already active profile.

Note that autoconnect is not implemented for VPN profiles. See NM.SettingConnection :secondaries as an alternative to automatically connect VPN profiles.

If multiple profiles are ready to autoconnect on the same device, the one with the better “connection.autoconnect-priority” is chosen. If the priorities are equal, then the most recently connected profile is activated. If the profiles were not connected earlier or their “connection.timestamp” is identical, the choice is undefined.

Depending on “connection.multi-connect”, a profile can (auto)connect only once at a time or multiple times.

NM.SettingConnection.props.autoconnect_ports
Name:

autoconnect-ports

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether or not ports of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for controller connections. The properties NM.SettingConnection :autoconnect, NM.SettingConnection :autoconnect-priority and NM.SettingConnection :autoconnect-retries are unrelated to this setting. The permitted values are: 0: leave port connections untouched, 1: activate all the port connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-ports is read to determine the real value. If it is default as well, this fallbacks to 0.

New in version 1.46.

NM.SettingConnection.props.autoconnect_priority
Name:

autoconnect-priority

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The autoconnect priority in range -999 to 999. If the connection is set to autoconnect, connections with higher priority will be preferred. The higher number means higher priority. Defaults to 0. Note that this property only matters if there are more than one candidate profile to select for autoconnect. In case of equal priority, the profile used most recently is chosen.

NM.SettingConnection.props.autoconnect_retries
Name:

autoconnect-retries

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The number of times a connection should be tried when autoactivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden). Setting this to 1 means to try activation only once before blocking autoconnect. Note that after a timeout, NetworkManager will try to autoconnect again.

NM.SettingConnection.props.autoconnect_slaves
Name:

autoconnect-slaves

Type:

NM.SettingConnectionAutoconnectSlaves

Default Value:

NM.SettingConnectionAutoconnectSlaves.DEFAULT

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The properties NM.SettingConnection :autoconnect, NM.SettingConnection :autoconnect-priority and NM.SettingConnection :autoconnect-retries are unrelated to this setting. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0.

Deprecated 1.46. Use NM.SettingConnection :autoconnect-ports instead, this is just an alias.

New in version 1.2.

NM.SettingConnection.props.controller
Name:

controller

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Interface name of the controller device or UUID of the controller connection.

NM.SettingConnection.props.dns_over_tls
Name:

dns-over-tls

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether DNSOverTls (dns-over-tls) is enabled for the connection. DNSOverTls is a technology which uses TLS to encrypt dns traffic.

The permitted values are: “yes” (2) use DNSOverTls and disabled fallback, “opportunistic” (1) use DNSOverTls but allow fallback to unencrypted resolution, “no” (0) don’t ever use DNSOverTls. If unspecified “default” depends on the plugin used. Systemd-resolved uses global setting.

This feature requires a plugin which supports DNSOverTls. Otherwise, the setting has no effect. One such plugin is dns-systemd-resolved.

New in version 1.34.

NM.SettingConnection.props.down_on_poweroff
Name:

down-on-poweroff

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the connection will be brought down before the system is powered off. The default value is NM.SettingConnectionDownOnPoweroff.DEFAULT. When the default value is specified, then the global value from NetworkManager configuration is looked up, if not set, it is considered as NM.SettingConnectionDownOnPoweroff.NO.

New in version 1.48.

NM.SettingConnection.props.gateway_ping_timeout
Name:

gateway-ping-timeout

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping.

NM.SettingConnection.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

A human readable unique identifier for the connection, like “Work Wi-Fi” or “T-Mobile 3G”.

NM.SettingConnection.props.interface_name
Name:

interface-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings).

For software devices this specifies the name of the created device.

For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface.

NM.SettingConnection.props.lldp
Name:

lldp

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether LLDP is enabled for the connection.

New in version 1.2.

NM.SettingConnection.props.llmnr
Name:

llmnr

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether Link-Local Multicast Name Resolution (LLMNR) is enabled for the connection. LLMNR is a protocol based on the Domain Name System (DNS) packet format that allows both IPv4 and IPv6 hosts to perform name resolution for hosts on the same local link.

The permitted values are: “yes” (2) register hostname and resolving for the connection, “no” (0) disable LLMNR for the interface, “resolve” (1) do not register hostname but allow resolving of LLMNR host names If unspecified, “default” ultimately depends on the DNS plugin (which for systemd-resolved currently means “yes”).

This feature requires a plugin which supports LLMNR. Otherwise, the setting has no effect. One such plugin is dns-systemd-resolved.

New in version 1.14.

NM.SettingConnection.props.master
Name:

master

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Interface name of the master device or UUID of the master connection.

Deprecated 1.46. Use NM.SettingConnection :controller instead, this is just an alias.

NM.SettingConnection.props.mdns
Name:

mdns

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether mDNS is enabled for the connection.

The permitted values are: “yes” (2) register hostname and resolving for the connection, “no” (0) disable mDNS for the interface, “resolve” (1) do not register hostname but allow resolving of mDNS host names and “default” (-1) to allow lookup of a global default in NetworkManager.conf. If unspecified, “default” ultimately depends on the DNS plugin.

This feature requires a plugin which supports mDNS. Otherwise, the setting has no effect. Currently the only supported DNS plugin is systemd-resolved. For systemd-resolved, the default is configurable via MulticastDNS= setting in resolved.conf.

New in version 1.12.

NM.SettingConnection.props.metered
Name:

metered

Type:

NM.Metered

Default Value:

NM.Metered.UNKNOWN

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the connection is metered.

When updating this property on a currently activated connection, the change takes effect immediately.

New in version 1.2.

NM.SettingConnection.props.mptcp_flags
Name:

mptcp-flags

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to configure MPTCP endpoints and the address flags. If MPTCP is enabled in NetworkManager, it will configure the addresses of the interface as MPTCP endpoints. Note that IPv4 loopback addresses (127.0.0.0/8), IPv4 link local addresses (169.254.0.0/16), the IPv6 loopback address (::1), IPv6 link local addresses (fe80::/10), IPv6 unique local addresses (ULA, fc00::/7) and IPv6 privacy extension addresses (rfc3041, ipv6.ip6-privacy) will be excluded from being configured as endpoints.

If “disabled” (0x1), MPTCP handling for the interface is disabled and no endpoints are registered.

The “enabled” (0x2) flag means that MPTCP handling is enabled. This flag can also be implied from the presence of other flags.

Even when enabled, MPTCP handling will by default still be disabled unless “/proc/sys/net/mptcp/enabled” sysctl is on. NetworkManager does not change the sysctl and this is up to the administrator or distribution. To configure endpoints even if the sysctl is disabled, “also-without-sysctl” (0x4) flag can be used. In that case, NetworkManager doesn’t look at the sysctl and configures endpoints regardless.

Even when enabled, NetworkManager will only configure MPTCP endpoints for a certain address family, if there is a unicast default route (0.0.0.0/0 or ::/0) in the main routing table. The flag “also-without-default-route” (0x8) can override that.

When MPTCP handling is enabled then endpoints are configured with the specified address flags “signal” (0x10), “subflow” (0x20), “backup” (0x40), “fullmesh” (0x80). See ip-mptcp(8) manual for additional information about the flags.

If the flags are zero (0x0), the global connection default from NetworkManager.conf is honored. If still unspecified, the fallback is “enabled,subflow”. Note that this means that MPTCP is by default done depending on the “/proc/sys/net/mptcp/enabled” sysctl.

NetworkManager does not change the MPTCP limits nor enable MPTCP via “/proc/sys/net/mptcp/enabled”. That is a host configuration which the admin can change via sysctl and ip-mptcp.

Strict reverse path filtering (rp_filter) breaks many MPTCP use cases, so when MPTCP handling for IPv4 addresses on the interface is enabled, NetworkManager would loosen the strict reverse path filtering (1) to the loose setting (2).

New in version 1.40.

NM.SettingConnection.props.mud_url
Name:

mud-url

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

If configured, set to a Manufacturer Usage Description (MUD) URL that points to manufacturer-recommended network policies for IoT devices. It is transmitted as a DHCPv4 or DHCPv6 option. The value must be a valid URL starting with “https://”.

The special value “none” is allowed to indicate that no MUD URL is used.

If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the ultimate default is “none”.

New in version 1.26.

NM.SettingConnection.props.multi_connect
Name:

multi-connect

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Specifies whether the profile can be active multiple times at a particular moment. The value is of type NM.ConnectionMultiConnect.

New in version 1.14.

NM.SettingConnection.props.permissions
Name:

permissions

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE

An array of strings defining what access a given user has to this connection. If this is None or empty, all users are allowed to access this connection; otherwise users are allowed if and only if they are in this list. When this is not empty, the connection can be active only when one of the specified users is logged into an active session. Each entry is of the form “[type]:[id]:[reserved]”; for example, “user:dcbw:py:data::blah<NM.SettingConnection.props.blah>".

At this time only the “user” [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the “:” character. Any [reserved] information present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8.

NM.SettingConnection.props.port_type
Name:

port-type

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Setting name of the device type of this port’s controller connection (eg, NM.SETTING_BOND_SETTING_NAME), or None if this connection is not a port.

New in version 1.46.

NM.SettingConnection.props.read_only
Name:

read-only

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

This property is deprecated and has no meaning.

Deprecated since version 1.44: This property is deprecated and has no meaning.

NM.SettingConnection.props.secondaries
Name:

secondaries

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

List of connection UUIDs that should be activated when the base connection itself is activated. Currently, only VPN connections are supported.

NM.SettingConnection.props.slave_type
Name:

slave-type

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Setting name of the device type of this slave’s master connection (eg, NM.SETTING_BOND_SETTING_NAME), or None if this connection is not a slave.

Deprecated 1.46. Use NM.SettingConnection :port-type instead, this is just an alias.

NM.SettingConnection.props.stable_id
Name:

stable-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

This represents the identity of the connection used for various purposes. It allows to configure multiple profiles to share the identity. Also, the stable-id can contain placeholders that are substituted dynamically and deterministically depending on the context.

The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. It is also used to derive the DHCP client identifier with ipv4.dhcp-client-id=stable, the DHCPv6 DUID with ipv6.dhcp-duid=stable-[llt,ll,uuid] and the DHCP IAID with ipv4.iaid=stable and ipv6.iaid=stable.

Note that depending on the context where it is used, other parameters are also seeded into the generation algorithm. For example, a per-host key is commonly also included, so that different systems end up generating different IDs. Or with ipv6.addr-gen-mode=stable-privacy, also the device’s name is included, so that different interfaces yield different addresses. The per-host key is the identity of your machine and stored in /var/lib/NetworkManager/secret_key. See NetworkManager(8) manual about the secret-key and the host identity.

The ‘$’ character is treated special to perform dynamic substitutions at activation time. Currently, supported are “${CONNECTION}”, “${DEVICE}”, “${MAC}”, “${NETWORK_SSID}”, “${BOOT}”, “${RANDOM}”. These effectively create unique IDs per-connection, per-device, per-SSID, per-boot, or every time. The “${CONNECTION}” uses the profile’s connection.uuid, the “${DEVICE}” uses the interface name of the device and “${MAC}” the permanent MAC address of the device. “${NETWORK_SSID}” uses the SSID for Wi-Fi networks and falls back to “${CONNECTION}” on other networks. Any unrecognized patterns following ‘$’ are treated verbatim, however are reserved for future use. You are thus advised to avoid ‘$’ or escape it as “$$”. For example, set it to “${CONNECTION}-${BOOT}-${DEVICE}” to create a unique id for this connection that changes with every reboot and differs depending on the interface where the profile activates.

If the value is unset, a global connection default is consulted. If the value is still unset, the default is “default${CONNECTION}” go generate an ID unique per connection profile.

New in version 1.4.

NM.SettingConnection.props.timestamp
Name:

timestamp

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated.

NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved).

NM.SettingConnection.props.type
Name:

type

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Base type of the connection. For hardware-dependent connections, should contain the setting name of the hardware-type specific setting (ie, “802-3-ethernet” or “802-11-wireless” or “bluetooth”, etc), and for non-hardware dependent connections like VPN or otherwise, should contain the setting name of that setting type (ie, “vpn” or “bridge”, etc).

NM.SettingConnection.props.uuid
Name:

uuid

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

A universally unique identifier for the connection, for example generated with libuuid. It should be assigned when the connection is created, and never changed as long as the connection still applies to the same network. For example, it should not be changed when the NM.SettingConnection :id property or NM.SettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or NM.SettingConnection :type property changes.

The UUID must be in the format “2815492f-7e56-435e-b2e9-246bd7cdc664” (ie, contains only hexadecimal characters and “-“). A suitable UUID may be generated by NM.utils_uuid_generate() or nm_uuid_generate_from_string_str().

NM.SettingConnection.props.wait_activation_delay
Name:

wait-activation-delay

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Time in milliseconds to wait for connection to be considered activated. The wait will start after the pre-up dispatcher event.

The value 0 means no wait time. The default value is -1, which currently has the same meaning as no wait time.

New in version 1.40.

NM.SettingConnection.props.wait_device_timeout
Name:

wait-device-timeout

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Timeout in milliseconds to wait for device at startup. During boot, devices may take a while to be detected by the driver. This property will cause to delay NetworkManager-wait-online.service and nm-online to give the device a chance to appear. This works by waiting for the given timeout until a compatible device for the profile is available and managed.

The value 0 means no wait time. The default value is -1, which currently has the same meaning as no wait time.

New in version 1.20.

NM.SettingConnection.props.zone
Name:

zone

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The trust level of a the connection. Free form case-insensitive string (for example “Home”, “Work”, “Public”). None or unspecified zone means the connection will be placed in the default zone as defined by the firewall.

When updating this property on a currently activated connection, the change takes effect immediately.