libnm: Add support to pass options to AddAndActivateConnection
This adds the new methods nm_client_add_and_activate_connection_options_* and ports the existing methods to use the new AddAndActivateConnection2 call rather than AddAndActivateConnection, allowing further parameters to be passed in.
This commit is contained in:

committed by
Thomas Haller

parent
eb883e34a5
commit
00236ef977
@@ -1341,6 +1341,12 @@ class NetworkManager(ExportedObj):
|
||||
|
||||
@dbus.service.method(dbus_interface=IFACE_NM, in_signature='a{sa{sv}}oo', out_signature='oo')
|
||||
def AddAndActivateConnection(self, con_hash, devpath, specific_object):
|
||||
return self.AddAndActivateConnection2(con_hash, devpath, specific_object, dict())
|
||||
|
||||
@dbus.service.method(dbus_interface=IFACE_NM, in_signature='a{sa{sv}}ooa{sv}', out_signature='oo')
|
||||
def AddAndActivateConnection2(self, con_hash, devpath, specific_object, options):
|
||||
# TODO: Do some processing of the "options" parameter.
|
||||
|
||||
device = self.find_device_first(path = devpath, require = BusErr.UnknownDeviceException)
|
||||
conpath = gl.settings.AddConnection(con_hash)
|
||||
return (conpath, self.ActivateConnection(conpath, devpath, specific_object))
|
||||
|
Reference in New Issue
Block a user