Marek Marczykowski-Górecki
8c1ba905a0
api: do not fail events when listener is cancelled in the meantime
...
Raising any error from event handler will abort further handlers of this
event.
2017-09-05 01:33:46 +02:00
Marek Marczykowski-Górecki
c8c32d4956
Merge branch 'stats'
...
* stats:
tests: admin.vm.Stats
api: fix handling interrupted calls
api/admin: implement admin.vm.Stats
app: refresh getting VM statistics, rename to QubesHost.get_vm_stats
api: use str(subject) instead of explicit subject.name
2017-07-29 05:05:32 +02:00
Marek Marczykowski-Górecki
2f4b4d97e7
api: fix handling interrupted calls
...
When an API call is interrupted, the relevant coroutine is cancelled -
which means it may throw CancelledError. At the same time, cancelled
call have related socket already closed (and transport set to None). But
QubesDaemonProtocol.respond try to close the transport again, which
fails. Fix handling this case.
2017-07-28 03:02:33 +02:00
Marek Marczykowski-Górecki
0d9574d9fc
api: use str(subject) instead of explicit subject.name
...
This allows better flexibility, when subject is not necessary a VM
object.
2017-07-27 22:15:02 +02:00
Marek Marczykowski-Górecki
074c705f77
api: keep track of established connections
...
This will be needed to gracefuly cleanup them between individual tests.
2017-07-26 03:26:59 +02:00
Marek Marczykowski-Górecki
cbc7241a93
api/admin: rename mgmt-permission:* event to admin-permission:*
...
Be more consistent with Admin API name and method names.
2017-07-17 02:41:42 +02:00
Marek Marczykowski-Górecki
66b88cc943
api: extract function to make pylint happy
2017-07-12 21:33:14 +02:00
Marek Marczykowski-Górecki
e6d5337fa7
api: cleanup already started servers when some later failed
2017-07-12 21:33:14 +02:00
Marek Marczykowski-Górecki
51022cada5
Merge remote-tracking branch 'origin/policy-adminvm'
2017-07-04 15:51:30 +02:00
Marek Marczykowski-Górecki
e5a9c46e3d
typos in docstrings
2017-07-04 13:04:22 +02:00
Marek Marczykowski-Górecki
6238254f49
events: merge fire_event and fire_event_pre functions
...
Those functions really do very similar things - lets merge them and add
simple parameter.
2017-07-04 13:04:21 +02:00
Marek Marczykowski-Górecki
291a338e73
api: add missing docstring
2017-07-04 04:27:34 +02:00
Wojtek Porczyk
3e0d01cfb9
qubes/admin: Add listing of API methods
2017-06-27 06:01:58 +02:00
Wojtek Porczyk
96a66ac6bd
qubes/api: refactor creating multiple qubesd sockets
...
Now there is a single function to do this, shared with tests.
2017-06-21 00:17:37 +02:00
Wojtek Porczyk
71a4390fdb
qubes/tools/qubesd: properly unlink UNIX sockets at shutdown
2017-06-20 13:00:20 +02:00
Wojtek Porczyk
858e547525
qubes: reorganise API protocols
...
Now instantiating API servers is handled by common function. This is,
among other reasons, for creating ad-hoc sockets for tests.
2017-06-20 13:00:20 +02:00
Marek Marczykowski-Górecki
d42197e94c
make 'mgmt-permission:' event compatible with check-events script
...
It doesn't support str.format().
2017-05-26 15:08:17 +02:00
Marek Marczykowski-Górecki
cd489f46e1
Rename MgmtAPI to AdminAPI - part 1: classes
...
QubesOS/qubes-issues#853
2017-05-12 19:28:07 +02:00