def AddActiveConnection(self, devices, connection_device, specific_object, name, state):
    '''Add an active connection to an existing WiFi device.

    You have to a list of the involved WiFi devices, the connection path,
    the access point path, ActiveConnection object name and connection
    state.

    Please note that this does not set any global properties.

    Returns the new object path.
    '''

    conn_obj = dbusmock.get_object(connection_device)
    settings = conn_obj.settings
    conn_uuid = settings['connection']['uuid']
    conn_type = settings['connection']['type']

    device_objects = [dbus.ObjectPath(dev) for dev in devices]

    active_connection_path = '/org/freedesktop/NetworkManager/ActiveConnection/' + name
    self.AddObject(active_connection_path,
                   ACTIVE_CONNECTION_IFACE,
                   {
                       'Devices': dbus.Array(device_objects, signature='o'),
                       'Default6': False,
                       'Default': True,
                       'Type': conn_type,
                       'Vpn': (conn_type == 'vpn'),
                       'Connection': dbus.ObjectPath(connection_device),
                       'Master': dbus.ObjectPath('/'),
                       'SpecificObject': dbus.ObjectPath(specific_object),
                       'Uuid': conn_uuid,
                       'State': dbus.UInt32(state),
                   },
                   [])

    for dev_path in devices:
        self.SetDeviceActive(dev_path, active_connection_path)

    self.object_manager_emit_added(active_connection_path)

    NM = dbusmock.get_object(MANAGER_OBJ)
    active_connections = NM.Get(MANAGER_IFACE, 'ActiveConnections')
    active_connections.append(dbus.ObjectPath(active_connection_path))
    NM.SetProperty(MANAGER_OBJ, MANAGER_IFACE, 'ActiveConnections', active_connections)

    return active_connection_path
Add an active connection to an existing WiFi device.

    You have to a list of the involved WiFi devices, the connection path,
    the access point path, ActiveConnection object name and connection
    state.

    Please note that this does not set any global properties.

    Returns the new object path.