Update settings on a NM.RemoteConnection with python
- From: infirit <infirit gmail com>
- To: networkmanager-list gnome org
- Subject: Update settings on a NM.RemoteConnection with python
- Date: Sat, 18 Aug 2018 00:20:53 +0000
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]