Other interfaces
Non-device interfaces implemented by NetworkManager.
- class sdbus_async.networkmanager.NetworkManagerInterfaceAsync
Main network manager interface
- async reload(flags=0)
D-Bus Method
Reload NetworkManager configuration
Flags control what to reload.
Use
NetworkManagerReloadFlags
to create flags.- Parameters:
flags (int) – What to reload.
- Return type:
None
- async get_devices()
D-Bus Method
Get list of device object paths known
- Return type:
List[str]
- async get_all_devices()
D-Bus Method
Get list of device object paths with placeholders
- Return type:
List[str]
- async get_device_by_ip_iface(iface)
D-Bus Method
Get device object path by interface name
- Parameters:
iface (str) –
- Return type:
str
- async activate_connection(connection='/', device='/', specific_object='/')
D-Bus Method
Activate the connection.
- Returns:
Activated connection object path.
- Parameters:
connection (str) –
device (str) –
specific_object (str) –
- Return type:
str
- async add_and_activate_connection(connection, device, specific_object)
D-Bus Method
Add a new connection and activate
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
device (str) –
specific_object (str) –
- Return type:
Tuple[str, str]
- async add_and_activate_connection2(connection, device, specific_object, options)
D-Bus Method
Add a new connection and activate
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
device (str) –
specific_object (str) –
options (Dict[str, Tuple[str, Any]]) –
- Return type:
Tuple[str, str, Dict[str, Tuple[str, Any]]]
- async deactivate_connection(active_connection)
D-Bus Method
Deactivate connection by given path
- Parameters:
active_connection (str) –
- Return type:
None
- async sleep(sleep)
D-Bus Method
Intended for system suspend/resume tracking not user
- Parameters:
sleep (bool) –
- Return type:
None
- async enable(enable)
D-Bus Method
Disables all networking when set to false
- Parameters:
enable (bool) –
- Return type:
None
- async get_permissions()
D-Bus Method
Returns the permissions of caller
- Return type:
Dict[str, str]
- async set_logging(level, domains)
D-Bus Method
Set logging verbosity and which operations are logged
- Parameters:
level (str) –
domains (str) –
- Return type:
None
- async get_logging()
D-Bus Method
Get current logging settings
- Return type:
Tuple[str, str]
- async check_connectivity()
D-Bus Method
Get current connectivity state
See
ConnectivityState
.- Return type:
int
- async get_state()
D-Bus Method
Get current NetworkManager state
See
NetworkManagerState
.- Return type:
int
- async checkpoint_create(devices, rollback_timeout, flags)
D-Bus Method
Create configuration checkpoint for given devices
- Returns:
New checkpoint object path
- Parameters:
devices (List[str]) –
rollback_timeout (int) –
flags (int) –
- Return type:
str
- async checkpoint_destroy(checkpoint)
D-Bus Method
Destroy given checkpoint
- Parameters:
checkpoint (str) –
- Return type:
None
- async checkpoint_rollback(checkpoint)
D-Bus Method
Use given checkpoint to rollback configuration
- Parameters:
checkpoint (str) –
- Return type:
Dict[str, int]
- async checkpoint_adjust_rollback_timeout(checkpoint, add_timeout)
D-Bus Method
Adjust checkpoint rollback timeout
- Parameters:
checkpoint (str) –
add_timeout (int) –
- Return type:
None
- devices
D-Bus property
Python type: List[str]
D-Bus type: ao
List of all current devices
- all_devices
D-Bus property
Python type: List[str]
D-Bus type: ao
List of all current and un-realized devices
- checkpoints
D-Bus property
Python type: List[str]
D-Bus type: ao
List of all checkpoint objects
- networking_enabled
D-Bus property
Python type: bool
D-Bus type: b
Whether networking enabled or not
- wireless_enabled
D-Bus property
Python type: bool
D-Bus type: b
Whether wireless enabled or not
- wireless_hardware_enabled
D-Bus property
Python type: bool
D-Bus type: b
Whether wireless hardware enabled with RF kill switch
- wwan_enabled
D-Bus property
Python type: bool
D-Bus type: b
Whether mobile broadband devices enabled
- wwan_hardware_enabled
D-Bus property
Python type: bool
D-Bus type: b
Whether mobile hardware devices enabled with RF kill switch
- active_connections
D-Bus property
Python type: List[str]
D-Bus type: ao
List of active connection paths
- primary_connection
D-Bus property
Python type: str
D-Bus type: o
Object path for primary connection
- primary_connection_type
D-Bus property
Python type: str
D-Bus type: s
Primary connection type
- metered
D-Bus property
Python type: int
D-Bus type: u
Primary connection metered status
See
DeviceMetered
.
- activating_connection
D-Bus property
Python type: str
D-Bus type: o
Primary connection activating connection
- startup
D-Bus property
Python type: bool
D-Bus type: b
Whether NetworkManager is still activating
- version
D-Bus property
Python type: str
D-Bus type: s
NetworkManager version
- capabilities
D-Bus property
Python type: List[int]
D-Bus type: au
NetworkManager capabilities
1 Team devices
2 OpenVSwitch
- state
D-Bus property
Python type: int
D-Bus type: u
Overall state of NetworkManager
See
NetworkManagerState
.
- connectivity
D-Bus property
Python type: int
D-Bus type: u
Overall state of connectivity
See
ConnectivityState
.
- connectivity_check_enabled
D-Bus property
Python type: bool
D-Bus type: b
Whether the connectivity checking is enabled
Can be written.
- connectivity_check_uri
D-Bus property
Python type: str
D-Bus type: s
URI that network manager will hit to check internet connection
- global_dns_configuration
D-Bus property
Python type: Dict[str, Tuple[str, Any]]
D-Bus type: a{sv}
Global DNS connection settings
- check_permissions
D-Bus signal
Python type: None
D-Bus type:
System authorization changed
- state_changed
D-Bus signal
Python type: int
D-Bus type: u
NetworkManager state changed
See
NetworkManagerState
.
- device_added
D-Bus signal
Python type: str
D-Bus type: o
Signal when new device has been added with path
- device_removed
D-Bus signal
Python type: str
D-Bus type: o
Signal when device had been removed with path
- async add_and_activate_connection_profile(profile, device_path='/', specific_object='/')
Adds new connection using the profile object as template.
- param ConnectionProfile profile:
Connection profile to update with.
- Parameters:
device_path (str) – Object path of device to be activated using the given connection
specific_object (str) –
The path of a connection-type-specific object this activation should use.
This parameter is currently ignored for wired and mobile broadband connections, and the value of “/” should be used.
profile (ConnectionProfile) –
- Returns:
Object path of new connection and path of active connection.
- Return type:
Tuple[str, str]
- class sdbus_async.networkmanager.NetworkManagerWifiP2PPeerInterfaceAsync
Interface of a peer in Wi-Fi P2P connection
- name
D-Bus property
Python type: str
D-Bus type: s
Device name
- flags
D-Bus property
Python type: int
D-Bus type: u
Flags describing capabilities of the point
- manufacturer
D-Bus property
Python type: str
D-Bus type: s
Manufacturer of the Wi-Fi P2P peer.
- model
D-Bus property
Python type: str
D-Bus type: s
Peer model
- model_number
D-Bus property
Python type: str
D-Bus type: s
Peer model number
- serial
D-Bus property
Python type: str
D-Bus type: s
Peer serial
- wfd_i_es
D-Bus property
Python type: bytes
D-Bus type: ay
Wi-Fi Display Information Elements of the peer
- strength
D-Bus property
Python type: int
D-Bus type: y
Current signal quality of the peer, in percent.
- last_seen
D-Bus property
Python type: int
D-Bus type: i
Timestamp in CLOCK_BOOTTIME seconds since last seen in scan
Value of -1 means that the point was never found in scans.
- class sdbus_async.networkmanager.NetworkManagerVPNPluginInterfaceAsync
Interface provided by VPN plugins
- async connect(connection)
D-Bus Method
Connect to described connection
Interactive secrets requests not allowed.
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
- Return type:
None
- async connect_interactive(connection, details)
D-Bus Method
Connect to described connection
Interactive secrets requests allowed. (emits secrets_required signal)
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
details (Dict[str, Tuple[str, Any]]) –
- Return type:
None
- async need_secrets(settings)
D-Bus Method
Asks plugin if connection will require secrets
- Returns:
Setting name that requires secrets
- Parameters:
settings (Dict[str, Dict[str, Tuple[str, Any]]]) –
- Return type:
str
- async disconnect()
D-Bus Method
Disconnect from VPN
- Return type:
None
- async set_config(config)
D-Bus Method
Set generic connection details
- Parameters:
config (Dict[str, Tuple[str, Any]]) –
- Return type:
None
- async set_ip4_config(config)
D-Bus Method
Set IPv4 settings
- Parameters:
config (Dict[str, Tuple[str, Any]]) –
- Return type:
None
- async set_ip6_config(config)
D-Bus Method
Set IPv6 settings
- Parameters:
config (Dict[str, Tuple[str, Any]]) –
- Return type:
None
- async set_failure(reason)
D-Bus Method
Set the plugin failure reason
- Parameters:
reason (str) –
- Return type:
None
- async new_secrets(connection)
D-Bus Method
Called in response to secrets_required signal
param: Describes the connection including the new secrets.
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
- Return type:
None
- state
D-Bus property
Python type: int
D-Bus type: u
VPN state
See
VpnServiceState
.
- state_changed
D-Bus signal
Python type: int
D-Bus type: u
Signal when VPN state changed with new VPN state.
See
VpnServiceState
.
- secrets_required
D-Bus signal
Python type: Tuple[str, List[str]]
D-Bus type: sas
Signal when secrest are required during ongoing connection
- config
D-Bus signal
Python type: Dict[str, Tuple[str, Any]]
D-Bus type: a{sv}
Signal when plugin obtained generic configuration
- ip4_config
D-Bus signal
Python type: Dict[str, Tuple[str, Any]]
D-Bus type: a{sv}
Signal when plugin obtained IPv4 configuration
- ip6_config
D-Bus signal
Python type: Dict[str, Tuple[str, Any]]
D-Bus type: a{sv}
Signal when plugin obtained IPv6 configuration
- login_banner
D-Bus signal
Python type: str
D-Bus type: s
Signal when plugin receives login banner from VPN service
- failure
D-Bus signal
Python type: int
D-Bus type: u
Signal when VPN failure occurs
See
VpnFailure
.
- class sdbus_async.networkmanager.NetworkManagerSettingsInterfaceAsync
Global NetworkManager settings
- async list_connections()
D-Bus Method
List of connection object paths
- Return type:
List[str]
- async get_connection_by_uuid(uuid)
D-Bus Method
Get connection path by UUID
- Parameters:
uuid (str) –
- Return type:
str
- async add_connection(connection)
D-Bus Method
Add connection and save to disk
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
- Return type:
str
- async add_connection_unsaved(connection)
D-Bus Method
Add connection and do not save
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
- Return type:
str
- async add_connection2(settings, flags, args)
D-Bus Method
Add connection. Flags indicate whether to save or not
- Parameters:
settings (Dict[str, Dict[str, Tuple[str, Any]]]) –
flags (int) –
args (Dict[str, Tuple[str, Any]]) –
- Return type:
Tuple[str, Dict[str, Tuple[str, Any]]]
- async load_connections(filenames)
D-Bus Method
Load connections from filenames
- Returns:
Tuple of success and list of failed connection filenames.
- Parameters:
filenames (List[str]) –
- Return type:
Tuple[bool, List[str]]
- async reload_connections()
D-Bus Method
Reload all connection from disk
- Return type:
bool
- async save_hostname(hostname)
D-Bus Method
Save hostname to persistent configuration
If blank hostname is cleared.
- Parameters:
hostname (str) –
- Return type:
None
- connections
D-Bus property
Python type: List[str]
D-Bus type: ao
List of paths to connection objects
- hostname
D-Bus property
Python type: str
D-Bus type: s
Current hostname
- can_modify
D-Bus property
Python type: bool
D-Bus type: b
If true adding and modifying connections is supported
- new_connection
D-Bus signal
Python type: str
D-Bus type: o
Signal when new connection has been added with the path
- connection_removed
D-Bus signal
Python type: str
D-Bus type: o
Signal when connection was removed with the path
- async add_connection_profile(profile, save_to_disk=False)
Add new connection using the profile object.
- param ConnectionProfile profile:
Connection profile to update with.
- Parameters:
save_to_disk (bool) –
Make changes permanent by saving updated values to disk.
By default changes are temporary. (saved only to RAM)
profile (ConnectionProfile) –
- Returns:
Object path of new connection and None
- Return type:
Tuple[str, None]
- class sdbus_async.networkmanager.NetworkManagerSettingsConnectionInterfaceAsync
Represents a single network connection
- async update(properties)
D-Bus Method
Update connection settings.
Replaces all previous settings and properties.
- Parameters:
properties (Dict[str, Dict[str, Tuple[str, Any]]]) –
- Return type:
None
- async update_unsaved(properties)
D-Bus Method
Update connection settings but do not save to disk
- Parameters:
properties (Dict[str, Dict[str, Tuple[str, Any]]]) –
- Return type:
None
- async delete()
D-Bus Method
Delete connection
- Return type:
None
- async get_settings()
D-Bus Method
Get connection settings
- Return type:
Dict[str, Dict[str, Tuple[str, Any]]]
- async get_secrets(setting_name)
D-Bus Method
Get connection secrets
- Parameters:
setting_name (str) –
- Return type:
Dict[str, Dict[str, Tuple[str, Any]]]
- async clear_secrets()
D-Bus Method
Clear connection secrets
- Return type:
None
- async save()
D-Bus Method
Save connection settings to storage
- Return type:
None
- async update2(settings, flags, args)
D-Bus Method
Update connection settings
- Parameters:
settings (Dict[str, Dict[str, Tuple[str, Any]]]) –
flags (int) –
args (Dict[str, Tuple[str, Any]]) –
- Return type:
Dict[str, Tuple[str, Any]]
- unsaved
D-Bus property
Python type: bool
D-Bus type: b
If true some settings are not saved to disk
- flags
D-Bus property
Python type: int
D-Bus type: u
Connection flags
- filename
D-Bus property
Python type: str
D-Bus type: s
File that stores connection settings
- updated
D-Bus signal
Python type: None
D-Bus type:
Signal when connection updated
- removed
D-Bus signal
Python type: None
D-Bus type:
Signal when connection is removed
- async update_profile(profile, save_to_disk=False)
Update connection using the profile dataclass.
- Parameters:
profile (ConnectionProfile) – Connection profile to update with.
save_to_disk (bool) –
Make changes permanent by saving updated values to disk.
By default changes are temporary. (saved only to RAM)
- Return type:
None
- async get_profile(fetch_secrets=True)
Get the connection settings as the profile object.
- Parameters:
fetch_secrets (bool) – Retrieve secret values. (like VPN passwords) Makes additional calls to NetworkManager.
- Return type:
ConnectionProfile
- class sdbus_async.networkmanager.NetworkManagerSecretAgentInterfaceAsync
D-Bus interface that stores secrets such as Wi-Fi passwords
- async get_secrets(connection, connection_path, setting_name, hints, flags)
D-Bus Method
Retrieve stored secrets
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
connection_path (str) –
setting_name (str) –
hints (List[str]) –
flags (int) –
- Return type:
Dict[str, Dict[str, Tuple[str, Any]]]
- async cancel_get_secrets(connection_path, setting_name)
D-Bus Method
Cancel pending get_secrets request
- Parameters:
connection_path (str) –
setting_name (str) –
- Return type:
None
- async save_secrets(connection, connection_path)
D-Bus Method
Save given secrets
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
connection_path (str) –
- Return type:
None
- async delete_secrets(connection, connection_path)
D-Bus Method
Delete secrets
- Parameters:
connection (Dict[str, Dict[str, Tuple[str, Any]]]) –
connection_path (str) –
- Return type:
None
- class sdbus_async.networkmanager.NetworkManagerIP6ConfigInterfaceAsync
IPv6 configuration
- address_data
D-Bus property
Python type: List[Dict[str, Tuple[str, Any]]]
D-Bus type: aa{sv}
Array of IP address data objects
Each dictionary includes
'address'
item with IP address string and'prefix'
with an int of prefix. Some addresses may include additional attributes.
- gateway
D-Bus property
Python type: str
D-Bus type: s
Gateway in use
- route_data
D-Bus property
Python type: List[Dict[str, Tuple[str, Any]]]
D-Bus type: aa{sv}
Array of route data objects
Each dictionary includes ‘dest’ (IP address string), ‘prefix’ (int). Some routes may include ‘next-hop’, ‘metric’ and additional attributes.
- nameservers
D-Bus property
Python type: List[bytes]
D-Bus type: aay
Nameservers in use
- domains
D-Bus property
Python type: List[str]
D-Bus type: as
List of domains this address belongs to.
- searches
D-Bus property
Python type: List[str]
D-Bus type: as
List of DNS searches
- dns_options
D-Bus property
Python type: List[str]
D-Bus type: as
List of dns options
- dns_priority
D-Bus property
Python type: int
D-Bus type: i
Relative priority of DNS servers
- class sdbus_async.networkmanager.NetworkManagerIP4ConfigInterfaceAsync
IPv4 configuration state
- address_data
D-Bus property
Python type: List[Dict[str, Tuple[str, Any]]]
D-Bus type: aa{sv}
Array of IP address data objects
Each dictionary includes
'address'
item with IP address string and'prefix'
with an int of prefix. Some addresses may include additional attributes.
- gateway
D-Bus property
Python type: str
D-Bus type: s
Gateway in use
- route_data
D-Bus property
Python type: List[Dict[str, Tuple[str, Any]]]
D-Bus type: aa{sv}
Array of route data objects
Each dictionary includes ‘dest’ (IP address string), ‘prefix’ (int). Some routes may include ‘next-hop’, ‘metric’ and additional attributes.
- nameserver_data
D-Bus property
Python type: List[Dict[str, Tuple[str, Any]]]
D-Bus type: aa{sv}
List of nameserver objects
Currently, each dictionary only has the ‘address’ value. (string of IP address)
- domains
D-Bus property
Python type: List[str]
D-Bus type: as
List of domains this address belongs to.
- searches
D-Bus property
Python type: List[str]
D-Bus type: as
List of DNS searches
- dns_options
D-Bus property
Python type: List[str]
D-Bus type: as
List of dns options
- dns_priority
D-Bus property
Python type: int
D-Bus type: i
Relative priority of DNS servers
- wins_server_data
D-Bus property
Python type: List[str]
D-Bus type: as
Windows Internet Name Service servers
- class sdbus_async.networkmanager.NetworkManagerDnsManagerInterfaceAsync
DNS configuration state
- mode
D-Bus property
Python type: str
D-Bus type: s
Current DNS processing mode
- rc_manager
D-Bus property
Python type: str
D-Bus type: s
Current resolv.conf management mode
- class sdbus_async.networkmanager.NetworkManagerDHCP6ConfigInterfaceAsync
DHCPv6 configuration
- options
D-Bus property
Python type: Dict[str, Tuple[str, Any]]
D-Bus type: a{sv}
Options and configurations returned by DHCPv6 server
- class sdbus_async.networkmanager.NetworkManagerDHCP4ConfigInterfaceAsync
DHCPv4 configuration
- options
D-Bus property
Python type: Dict[str, Tuple[str, Any]]
D-Bus type: a{sv}
Options and configurations returned by DHCPv4 server
- class sdbus_async.networkmanager.NetworkManagerVPNConnectionInterfaceAsync
VPN connection interface
- vpn_state
D-Bus property
Python type: int
D-Bus type: u
VPN connection state
See
VpnConnectionState
.
- banner
D-Bus property
Python type: str
D-Bus type: s
Banner string of VPN connection
- vpn_state_changed
D-Bus signal
Python type: Tuple[int, int]
D-Bus type: uu
Signal when VPN state changed
Tuple of new state and reason. See
VpnConnectionState
andVpnConnectionStateReason
.
- class sdbus_async.networkmanager.NetworkManagerConnectionActiveInterfaceAsync
Represents an attempt to connect to network
- connection
D-Bus property
Python type: str
D-Bus type: o
Path of connection object
- specific_object
D-Bus property
Python type: str
D-Bus type: o
Specific object associated with active connection
- id
D-Bus property
Python type: str
D-Bus type: s
Connection id
- uuid
D-Bus property
Python type: str
D-Bus type: s
Connection UUID
- connection_type
D-Bus property
Python type: str
D-Bus type: s
Connection type
- devices
D-Bus property
Python type: List[str]
D-Bus type: ao
Array of devices object paths which are part of connection
- state
D-Bus property
Python type: int
D-Bus type: u
Connection state
- state_flags
D-Bus property
Python type: int
D-Bus type: u
Connection state flags
See
ActivationStateFlags
.
- default
D-Bus property
Python type: bool
D-Bus type: b
Whether or not this connection owns default IPv4 route
- ip4_config
D-Bus property
Python type: str
D-Bus type: o
Object path to Ip4Config object
Only valid if connection state is ACTIVATED
- dhcp4_config
D-Bus property
Python type: str
D-Bus type: o
Object path to Dhcp4Config object
Only valid if connection state is ACTIVATED
- default6
D-Bus property
Python type: bool
D-Bus type: b
Whether or not this connection owns default IPv6 route
- ip6_config
D-Bus property
Python type: str
D-Bus type: o
Object path to Ip4Config object
Only valid if connection state is ACTIVATED
- dhcp6_config
D-Bus property
Python type: str
D-Bus type: o
Object path to Dhcp6Config object
Only valid if connection state is ACTIVATED
- vpn
D-Bus property
Python type: bool
D-Bus type: b
Whether this connection is a VPN
- master
D-Bus property
Python type: str
D-Bus type: o
Path to master device if this connection is a slave
- state_changed
D-Bus signal
Python type: Tuple[int, int]
D-Bus type: uu
Signal of the new state and the reason
- class sdbus_async.networkmanager.NetworkManagerCheckpointInterfaceAsync
Network Manager configuration snapshot interface
- devices
D-Bus property
Python type: List[str]
D-Bus type: ao
List of devices which are part of this checkpoint
- created
D-Bus property
Python type: int
D-Bus type: x
Snapohot creation time in CLOCK_BOOTTIME milliseconds
- rollback_timeout
D-Bus property
Python type: int
D-Bus type: u
Automatic tollback timeout in seconds or zero
- class sdbus_async.networkmanager.NetworkManagerSecretAgentManagerInterfaceAsync
Secret Agent Manager
- async register(identifier)
D-Bus Method
Identifies an agent.
Only one agent in each user session may use same identifier.
- Parameters:
identifier (str) –
- Return type:
None
- async register_with_capabilities(identifier, capabilities)
D-Bus Method
Same as register() but with agent capabilities
See
SecretAgentCapabilitiesFlags
.- Parameters:
identifier (str) –
capabilities (int) –
- Return type:
None
- async unregister()
D-Bus Method
Notify NetworkManager that secret agent is no longer active
- Return type:
None