Commit Graph

20 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
d7a3c0d319
qubes: new devices API
Allow device plugin to list attached and available devices. Enforce
at API level every device being exposed by some domain.

This commit only changes devices API, but not update existing users
(pci) yet.

QubesOS/qubes-issues#2257
2016-09-03 20:40:39 +02:00
Marek Marczykowski-Górecki
73d61bb378
qubes/events: fix event handlers ordering
Since "qubes: fix event framework", handlers from extensions looks the
same as from the VM class itself, so it isn't possible to order them
correctly. Specification says:

    For each class first are called bound handlers (specified in class
    definition), then handlers from extensions. Aside from above,
    remaining order is undefined.

So, restore this property, which is later correctly used to order
handlers.
2016-08-09 02:58:14 +02:00
Wojtek Porczyk
c5962910d0 qubes/events: Rework firing events for effect
From now, the handlers should yield their values, not return.
2016-04-08 12:35:11 +02:00
Marek Marczykowski-Górecki
1cd6acd875 core/events: allow handlers return some value 2016-04-07 12:58:01 +02:00
Wojtek Porczyk
ea44c0acf3 qubes: pylint fixes
Fix bunch of errors and warnings.
2015-10-05 23:49:39 +02:00
Wojtek Porczyk
80d664441d core3: fixes from Marek
This is adapted from commit 90a50dca406e3d40c88ea338566e0460589df7a3.
2015-10-05 12:46:13 +02:00
Wojtek Porczyk
7f16e0a73b qubes: disable events by default not to interfere with loading from XML 2015-06-29 17:39:28 +02:00
Wojtek Porczyk
8c437f4053 qubes: unify PropertyHolder API
get_props_list() -> property_list()
_init_property() -> _property_init()
2015-06-29 17:39:27 +02:00
Wojtek Porczyk
6798790e1f qubes: pylint fixes (fix signatures) 2015-06-29 17:39:27 +02:00
Wojtek Porczyk
adb144acfe qubes: pylint fixes (small mistakes and wrong names) 2015-06-29 17:39:27 +02:00
Wojtek Porczyk
bf29d5e5b5 qubes: pylint fixes (disable unfounded messages) 2015-06-29 17:39:27 +02:00
Wojtek Porczyk
ee06e7d7a2 qubes: documentation and licence fixes 2015-06-29 17:39:27 +02:00
Wojtek Porczyk
cdc3df66c8 qubes: pylint fixes (mostly whitespace) 2015-06-29 17:39:27 +02:00
Wojtek Porczyk
99edcb56c1 qubes: fix event framework
Two important fixes are in this commit: handlers from decorators are added when
class is defined (and not when class is instantiated); also multiple events can
be specified in the decorator.
2015-06-29 17:39:25 +02:00
Wojtek Porczyk
9fa3d60d0b qubes/events: fix event handling order
Events are divided into "pre" and "post" events. "Pre" events fire handlers in
MRO, "post" fire them in reverse.
2015-06-29 17:39:24 +02:00
Wojtek Porczyk
6b7860995b qubes/events.py: Fire events from parent classes too 2015-06-29 17:39:24 +02:00
Wojtek Porczyk
1a032ecf2a core3: basic global events and their documentation 2015-06-29 17:39:24 +02:00
Wojtek Porczyk
855a434879 core3: event framework adjusted for global Qubes object
From now, global events are emitted by qubes.Qubes object and handlers are registered there.
2015-06-29 17:39:24 +02:00
Wojtek Porczyk
65595e3b39 apidoc stub 2015-06-29 17:39:22 +02:00
Wojtek Porczyk
7f27d987cc import framework for core3 2015-06-29 17:39:22 +02:00