Marek Marczykowski-Górecki
2efe8405b7
app: fix QubesRemote.run_service
...
When no localcmd is given, it should only affect last argument(s) of
qrexec-client-vm call, not the whole command.
2017-04-29 01:18:36 +02:00
Marek Marczykowski-Górecki
b8a8394d2d
app: fix FD leak
2017-04-29 01:18:36 +02:00
Marek Marczykowski-Górecki
04593b273d
app: add get_label, get_vm_class and add_new_vm methods
2017-04-29 01:18:35 +02:00
Marek Marczykowski-Górecki
6cbfd74631
app: add VM removal support
2017-04-29 01:18:32 +02:00
Marek Marczykowski-Górecki
8f7b902034
tools: qvm-run
...
The tool and tests for it.
2017-04-29 01:18:30 +02:00
Marek Marczykowski-Górecki
6dd7c69b3f
vm: add run* methods
...
The base method is run_service, but also implement convenient wrappers.
2017-04-29 01:18:28 +02:00
Marek Marczykowski-Górecki
e66b96edd1
Add logging to Qubes() and QubesVM() objects
2017-04-29 01:18:25 +02:00
Marek Marczykowski-Górecki
785706af2f
events: initial implementation
...
This module use asyncio, so require Python 3. And actually >= 3.5.2
because of asyncio.StreamReader.readuntil().
Modules are designed the way it's still possible to use non-events API
on Python 2.
2017-04-29 01:18:24 +02:00
Marek Marczykowski-Górecki
d8b0ff349d
refactor 'QUBESD_SOCKET' into separate module
...
This will avoid cyclic imports in upcoming events implementation
2017-04-29 01:18:24 +02:00
Marek Marczykowski-Górecki
9a26eec1ac
Make names always 'str'
...
Regardless of python version, always have names as 'str' type.
2017-03-13 04:41:54 +01:00
Marek Marczykowski-Górecki
e7d89bcc0d
Add app.pools collection and related functions
...
Collection to access storage pools and methods to create/remove pools.
2017-03-13 04:41:54 +01:00
Marek Marczykowski-Górecki
64d2f13212
Make generic named objects collection instead of separate for each type
...
There will be more:
- labels
- storage pools
- storage volumes
2017-03-13 04:41:54 +01:00
Marek Marczykowski-Górecki
f323fdec53
Initial labels support
...
It's just first part - reading info about them. The missing part:
creating and removing.
2017-03-13 04:37:30 +01:00
Marek Marczykowski-Górecki
9d5e974c5b
Simplify reading data from local socket
2017-03-13 04:37:28 +01:00
Marek Marczykowski-Górecki
f6e48cb3ff
Rename methods for global properties
...
Finally we've settled for `mgmt.property.`, instead of
`mgmt.global.property.` prefix.
QubesOS/qubes-issues#853
2017-03-13 04:37:28 +01:00
Marek Marczykowski-Górecki
69396040fd
Fix global properties handling
...
API name isn't 'mgmt.global.*' - discussed options are
'mgmt.global.property.*' or 'mgmt.property.*'. Lets settle on the
former.
QubesOS/qubes-issues#853
2017-03-09 02:39:53 +01:00
Marek Marczykowski-Górecki
5f81b9b809
Fix refreshing VM cache on python3
...
dict.items() iterator don't like adding/removing items at the same time.
2017-03-01 23:49:23 +01:00
Marek Marczykowski-Górecki
2b1ebba547
vm: add actual VM classes
...
QubesOS/qubes-issues#853
2017-03-01 23:49:23 +01:00
Marek Marczykowski-Górecki
45ab24ce12
Fix local socket communication
...
Don't try to send 'None' argument.
Close writing end after sending full request.
QubesOS/qubes-issues#853
2017-03-01 23:49:21 +01:00
Marek Marczykowski-Górecki
3e73b242d1
Add missing docstrings, require them by pylint
2017-03-01 23:49:21 +01:00
Marek Marczykowski-Górecki
4bbc7a6b1f
Cache vm.name property
...
It doesn't make sense to send mgmt call to _named_ VM just to ask for
its name. Use value that QubesVM object already have.
This also means we can safely access vm.name, no need to touch any
private attribute.
QubesOS/qubes-issues#853
2017-03-01 23:49:21 +01:00
Marek Marczykowski-Górecki
c298eddd16
Avoid cyclic imports
...
QubesOS/qubes-issues#853
2017-03-01 23:49:20 +01:00
Marek Marczykowski-Górecki
8f92250665
Fix py3k compatibility
...
QubesOS/qubes-issues#853
2017-03-01 23:49:20 +01:00
Marek Marczykowski-Górecki
745d16a879
Rename '_do_qubesd_call' to 'qubesd_call'
...
This method don't need to be private. Also the 'do_' prefix is
superfluous - methods typically do something.
QubesOS/qubes-issues#853
2017-03-01 23:49:19 +01:00
Marek Marczykowski-Górecki
3a2e0b770b
Initial commit
...
First minimal version, with just listing VMs and handling properties.
QubesOS/qubes-issues#853
2017-03-01 23:48:53 +01:00