update upower template to 0.9/1.0

Bug #1245955 reported by Martin Pitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNOME Settings Daemon
New
Undecided
Unassigned
python-dbusmock
Fix Released
Medium
Martin Pitt
python-dbusmock (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

upower's API recently has been split into the 0.9 branch (that our template represents now), and an 1.0 branch with a lot of obsolete features removed and some new properties. We need to provide a new template for that or add a parameter to the existing one to mock one or the other API, whichever is easier/better.

Martin Pitt (pitti)
Changed in python-dbusmock:
status: New → Triaged
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
Martin Pitt (pitti)
Changed in python-dbusmock:
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

In http://bazaar.launchpad.net/~pitti/python-dbusmock/trunk/revision/139 I fixed the tests to get along with an 1.0 API "upower" tool.

In http://bazaar.launchpad.net/~pitti/python-dbusmock/trunk/revision/140 I added the first cut of providing the 1.0 API in the upower template if the "DaemonVersion" property/template parameter gets set to >= '0.99'. It also adds a DisplayDevice, but there are no convenience methods yet to configure it. For now you need to use the normal Set() dbus.PROPERTIES_IFACE method to change properties. Perhaps you can tell me which properties usually need to be changed on the DisplayDevice, and I'll add a new convenience method ConfigureDisplayDevice() for it?

Revision history for this message
Bastien Nocera (hadess-deactivatedaccount) wrote :

The properties set for the DisplayDevice are documented:
http://cgit.freedesktop.org/upower/tree/src/org.freedesktop.UPower.xml#n60

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for the pointer!

http://bazaar.launchpad.net/~pitti/python-dbusmock/trunk/revision/141 adds the defined DisplayDevice properties, and http://bazaar.launchpad.net/~pitti/python-dbusmock/trunk/revision/142 adds a SetupDisplayDevice() convenience method which avoids writing some boilerplate and makes sure that you don't forget to set a property.

Tested with upower 0.9.23 and 0.99.0 client tools, and everything has automatic tests, too. Please let me know if you want to see anything else, like more convenience methods which simplify common scenarios.

Changed in python-dbusmock:
status: In Progress → Fix Committed
Changed in python-dbusmock (Ubuntu):
status: New → Fix Committed
importance: Undecided → Wishlist
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in python-dbusmock:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-dbusmock - 0.8-1

---------------
python-dbusmock (0.8-1) unstable; urgency=low

  * New upstream release:
    - Support upower 1.0 API in the upower template. Specify property
      DaemonVersion >= 0.99 to use it. (LP: #1245955)
  * Bump Standards-Version to 3.9.5, no changes necessary.

 -- Martin Pitt <email address hidden> Fri, 08 Nov 2013 07:23:49 +0100

Changed in python-dbusmock (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.