sssd_test_framework.utils.sbus

Manage D-Bus operations

Classes

DBUSDestination(*args, **kwargs)

Create a destination object associated to a bus and a name.

DBUSKnownBus

Weel-known D-Bus buses.

DBUSObject(host, *, dest, objpath, bus)

A D-Bus object accesible as a Python object.

ProxyMethod(host, dest, objpath, bus, /[, ...])

A D-Bus method accessible as an object

ProxyObject(host, dest, objpath, bus, /[, ...])

Abstract class representing a D-Bus object (method or property).

ProxyProperty(host, dest, objpath, bus, /, ...)

A D-Bus property accessible as an object

class sssd_test_framework.utils.sbus.DBUSDestination(*args, **kwargs)

Bases: MultihostUtility[MultihostHost]

Create a destination object associated to a bus and a name.

Example
monitor = DBUSDestination(client.host, dest="sssd.monitor", bus=DBUSKnownBus.MONITOR)

paths = monitor.getObjectPaths()
assert len(paths) == 2
assert "/" in paths
assert "/sssd" in paths

sssd = monitor.getObject(objpath="/sssd")
sssd.debug_level = 0x0070
assert sssd.debug_level == 0x0070

A few more examples can be seen in the test code.

Parameters:
  • host (MultihostHost) – The host where the D-Bus serices run.

  • dest (str) – Destination application to contact.

  • bus (str | DBUSBus, optional) – The bus to use for the communications. Defaults to DBUSBus.SYSTEM. For other cases, a string can be provided with the explicit bus path.

getObjectPaths() list[str]

Returns the list of the paths available at this destination.

getObject(objpath: str) DBUSObject

Creates and returns an object representing the D-Bus object and object path associated to the destination.

Parameters:

objpath (str) – The path to the object at destination.

class sssd_test_framework.utils.sbus.DBUSKnownBus

Bases: str

Weel-known D-Bus buses.

SYSTEM: Final = '--SYSTEM--'

The system bus

SESSION: Final = '--SESSION--'

The session bus

MONITOR: Final = 'unix:path=/var/lib/sss/pipes/private/sbus-monitor'

Monitor’s private bus