[Sugar-devel] [PATCH v4] Simple NetworkManager-0.9 port

Simon Schampijer simon at schampijer.de
Wed Nov 16 05:20:43 EST 2011


El 15/11/11 21:47, Daniel Drake escribió:
> Adapt sugar to NetworkManager-0.9 API changes.
>
> The major change here is the removal of the user-level connections
> mechanism; instead of storing connection information in Sugar,
> NetworkManager now Manages our Networks for us.
>
> However, some level of interfacing/monitoring NM is now needed,
> implemented with the Connections and Connection classes in
> jarabe.model.network.
>
> If found, connections in sugar's connections.cfg are automatically
> migrated, and then connections.cfg is deleted. Similarly, if modem
> connection details are found in gconf, they are migrated into NM
> and then the gconf keys are unset.
>
> The existing network code is far from perfect and actually quite messy.
> In this port I've tried not to make fundamental changes to improve this,
> in order to keep task complexity down and aid review.
> In the medium term I do plan to improve this code, by moving it to
> use gobject-introspection on libnm, and rewriting/restructuring at the
> same time. By letting libnm do most of the work for us, this layer can
> be greatly simplified. However, libnm and gobject-introspection
> improvements are needed first, which I will continue to work on.
>
> Modem PUK configuration has been removed as NetworkManager no longer
> has configuration for this. It hasn't been used (and was marked
> deprecated) throughout the NM-0.8 release series.
> ---
>   data/sugar.schemas.in                            |   24 +-
>   extensions/cpsection/modemconfiguration/model.py |  107 ++--
>   extensions/cpsection/modemconfiguration/view.py  |  206 ++-----
>   extensions/cpsection/network/model.py            |   16 +-
>   extensions/deviceicon/network.py                 |  178 +++---
>   src/jarabe/desktop/keydialog.py                  |   32 +-
>   src/jarabe/desktop/meshbox.py                    |   63 +-
>   src/jarabe/desktop/networkviews.py               |  167 ++---
>   src/jarabe/model/adhoc.py                        |  115 ++--
>   src/jarabe/model/network.py                      |  763 +++++++++++----------
>   src/jarabe/model/olpcmesh.py                     |  158 +++--
>   11 files changed, 859 insertions(+), 970 deletions(-)
>
> v2: handle review comments from Simon and Sascha's Oct 24 mail. Only non-minor
> resulting change is a refactoring of modem setting handling so that undo
> is supported again.
>
> v3: minor changes from Simon's review
>
> v4: convert the final error in the secrets requesting path into an Exception,
> and don't choke if we aren't able to remove a specific connection (e.g. because
> of permissions issues)

Ok, great - looks good. Thanks for all the follow -ups. Let's get it in 
and get some testing!

Acked-by: Simon Schampijer <simon at laptop.org>

Regards,
    Simon


More information about the Sugar-devel mailing list