Update settings on a NM.RemoteConnection with python



Hi,

I found that there is NM.RemoteConnection.replace_settings that takes a
GLib.Variant but I can't figure out what it needs to contain.

Take the below SimpleConnection for a bluetooth dun connection how would
I update for example the apn?

conn = NM.SimpleConnection()
sett_conn = conn_sett = NM.SettingConnection(type='bluetooth', id='someid')
sett_bt = NM.SettingBluetooth(type='dun', bdaddr='bdaddr')
sett_gsm = NM.SettingGsm(apn='apn', number='number')

conn.add_setting(sett_conn)
conn.add_setting(sett_gsm)
conn.add_setting(sett_bt)

#add connection with client

remote_conn = client.get_connection_by_id('someid')
remote_conn.replace_settings(???????)

What is the correct format string for the GLib.Variant and could you
give an example for updating the apn?

Thanks
~infirit




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]