Marek Marczykowski-Górecki
6926725e02
Fixes for devices API
...
See comments in #98
2017-05-12 14:25:31 +02:00
Bahtiar `kalkin-` Gadimov
79407a8717
Make pylint ♥
2017-04-15 23:50:11 +02:00
Bahtiar `kalkin-` Gadimov
5bc7a8f9e3
Fix pylint warning no-else-return
2017-04-15 23:49:41 +02:00
Bahtiar `kalkin-` Gadimov
eb217e0d27
Fix pylint warning len-as-conditional
2017-04-15 23:49:41 +02:00
Bahtiar `kalkin-` Gadimov
9da28c9c15
device-list-attached event returns a dev/options tupples list
2017-04-15 23:49:40 +02:00
Bahtiar `kalkin-` Gadimov
1c9636c5af
DeviceAssignment options are now a dict
2017-04-15 23:49:40 +02:00
Bahtiar `kalkin-` Gadimov
5a8cc9bdd3
Remove WrongAssignment exception
...
Signed-off-by: Bahtiar `kalkin-` Gadimov <bahtiar@gadimov.de>
2017-04-15 23:49:39 +02:00
Bahtiar `kalkin-` Gadimov
e446e7a2f4
Rename qubes.devices.BlockDevice to qubes.storage.BlockDevice
...
Signed-off-by: Bahtiar `kalkin-` Gadimov <bahtiar@gadimov.de>
2017-04-15 23:49:36 +02:00
Bahtiar `kalkin-` Gadimov
990cfd8ab9
Migrate DeviceCollection to new API
...
- Use PersistentCollection as _set()
- attach/detach expect DeviceAssignment as parater
- attached(persistent=True) is now persistent()
- attached() returns all attached devices
- assigned() returns all attached device assignments
`# modified: templates/libvirt/xen.xml
Signed-off-by: Bahtiar `kalkin-` Gadimov <bahtiar@gadimov.de>
2017-04-15 18:05:28 +02:00
Bahtiar `kalkin-` Gadimov
23c68c5458
Add PersistentCollection helper to qubes.devices
2017-04-15 18:05:27 +02:00
Bahtiar `kalkin-` Gadimov
211e018268
Add DeviceAssignment
2017-04-15 18:05:26 +02:00
Wojtek Porczyk
be53db4db9
qubes/events: they accept only keyword arguments
...
Positional arguments are hereby deprecated, with immediate effect.
QubesOS/qubes-issues#2622
2017-02-21 14:46:42 +01:00
Wojtek Porczyk
d74567d65f
qubes: port core to python3
...
fixes QubesOS/qubes-issues#2074
2017-01-20 16:42:51 +01:00
Marek Marczykowski-Górecki
aa67a4512e
qubes/ext/pci: move PCI devices handling to an extension
...
Implement required event handlers according to documentation in
qubes.devices.
A modification of qubes.devices.DeviceInfo is needed to allow dynamic,
read-only properties.
QubesOS/qubes-issues#2257
2016-09-03 20:41:03 +02:00
Marek Marczykowski-Górecki
e1de82ea53
qubes/devices: use more detailed exceptions than just KeyError
...
Especially inherit from QubesException, so tools will treat this as
properly handled error.
QubesOS/qubes-issues#2257
2016-09-03 20:41:03 +02:00
Marek Marczykowski-Górecki
e5d6c4e078
qubes/devices: allow non-persistent attach
...
QubesOS/qubes-issues#2257
2016-09-03 20:41:02 +02:00
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
Bahtiar `kalkin-` Gadimov
d3f8fc96e4
Fix pci device attachment to QubesVM
2016-07-21 12:22:53 +02:00
Wojtek Porczyk
ba20254888
Rewrite PCI attaching/detaching from xl to libvirt
...
The only remaining part is querying vm-side BDF. That can't be done
in libvirt.
2016-06-16 13:29:15 +02:00
Wojtek Porczyk
6ade5736d7
pylint fixes
2016-06-10 21:27:29 +02:00
Wojtek Porczyk
63c09a090c
qubes: Combat import cycles
...
This commit eliminates import statements happening in the middle of the
file (between two classes definition). The cycles are still there. The
only magic module is qubes itself.
2016-05-05 14:33:09 +02:00
Bahtiar `kalkin-` Gadimov
2f99efa4b8
Add BlockDevice
2016-04-25 07:16:36 +02:00
Marek Marczykowski-Górecki
06c315c94b
qubes: fix/update event names
...
Fix few typos, then rename:
- recreate-appmenus -> domain-restore: there may be more to do than
only appmenus
2016-04-07 12:59:39 +02:00
Wojtek Porczyk
c375334c54
qubes/devices: calculate event names using +
...
This make static analysis of the events easier.
2016-03-23 09:08:13 +01:00
Wojtek Porczyk
349e218638
qubes/devices: devices class framework
...
This fixes loading PCI devices.
2016-03-23 09:08:13 +01:00
Wojtek Porczyk
5eaf03c4a2
HVM part 1
2016-03-21 11:44:46 +01:00