Re: daierxin gmail com>
- From: Dan Williams <dcbw redhat com>
- To: kiran <kiranbhat2006 gmail com>
- Cc: networkmanager-list gnome org
- Subject: Re: daierxin gmail com>
- Date: Wed, 24 Feb 2010 15:53:51 -0800
On Mon, 2010-02-22 at 08:05 +0530, kiran wrote:
> Thanks
AddConnection has always been present; but originally it was present
only on the org.freedesktop.NetworkManagerSettings.System interface.
It's now generic on the org.freedesktop.NetworkManagerSettings interface
which is implemented by both system and user settings.
Dan
>
> On Sat, Feb 20, 2010 at 8:37 PM, kiran <kiranbhat2006 gmail com>
> wrote:
> Thanks jklimes
> But what i found is that AddConnection Api is
> present in Network Manager 0.8 dbus interface and not on
> Network Manager 0.7 Dbus interface, is that true or i am
> missing something.
> Even the dbus interface Documentation of
> NetworkManager says that.
>
> regards
> kiran
>
>
>
>
>
>
>
> On Thu, Feb 11, 2010 at 7:28 PM, Jirka Klimes
> <jklimes redhat com> wrote:
>
> On Thursday 11 of February 2010 12:45:33 kiran wrote:
> > Hi
> >
> > How can i add new network
> Connection (cdma,gsm) to the
> > system-settings connection list through Dbus Api
> Interface exported by the
> > "System settings" Service.
> >
> >
> > regards
> > kiran
> >
>
>
> Hi kiran,
>
> yes, it's possible. You would use
> AddConnection(connection) method of
> org.freedesktop.NetworkManagerSettings interface.
> You can use attached python example.
>
> However, be sure that you use 'keyfile' plugin,
> otherwise you won't be able to
> store the connection (just keyfile plugin supports
> it).
>
> (/etc/NetworkManager/nm-system-settings.conf
> should contain keyfile keyword:
> [main]
> plugins=ifcfg-rh, keyfile
> )
>
> Jirka
>
>
> ---- cut here ----
> #!/usr/bin/python
>
> import dbus
>
> uuid = "f375c550-564a-4235-be1d-74a2c0c0bdd1"
>
> s_con = { 'id': 'My GSM connection',
> 'uuid': uuid,
> 'type': 'gsm',
> 'autoconnect': False }
>
> s_gsm = { 'username': 'user_name',
> 'apn': 'epc.tmobile.com',
> 'number': '*99#' }
>
> s_ip4 = { 'method': 'auto' }
>
> s_ppp = { 'noauth': True }
>
> s_serial = { 'baud': 115200 }
>
>
> con = { 'connection': s_con,
> 'gsm': s_gsm,
> 'ppp': s_ppp,
> 'serial': s_serial,
> 'ipv4': s_ip4 }
>
>
> sys_bus = dbus.SystemBus()
> proxy =
> sys_bus.get_object("org.freedesktop.NetworkManagerSystemSettings",
> "/org/freedesktop/NetworkManagerSettings")
> iface = dbus.Interface(proxy,
> "org.freedesktop.NetworkManagerSettings")
>
> try:
> iface.AddConnection(con)
> except Exception, e:
> print e
> ---- cut here ----
>
>
>
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]