Commit Graph

38 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
bf053769bf
tools: qvm-remove
The tool and test.
2017-04-29 01:18:33 +02:00
Marek Marczykowski-Górecki
6cbfd74631
app: add VM removal support 2017-04-29 01:18:32 +02:00
Marek Marczykowski-Górecki
77a96b8b21
tools: qvm-features
The tool and tests.
2017-04-29 01:18:32 +02:00
Marek Marczykowski-Górecki
ed93b40e72
tools: qvm-check
The tool and tests.
2017-04-29 01:18:31 +02:00
Marek Marczykowski-Górecki
b6d06d856d
tools: qvm-start
The tool and tests for it.
2017-04-29 01:18:31 +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
e7118b53ce
tests: basic tests for qvm-start-gui tool 2017-04-29 01:18:29 +02:00
Marek Marczykowski-Górecki
e76af930a7
tests: very naive mockup of app.run_service
Currently it doesn't check passed arguments, does not allow specify
expected stdout/stderr or even return code.
It's only enough to not crash tests on NotImplementedError.
2017-04-29 01:18:29 +02:00
Marek Marczykowski-Górecki
ef683485e2
events: add qubesd reconnection support
If connection is interrupted (for example qubesd restart), attempt to
reconnect.
2017-04-29 01:18:29 +02:00
Marek Marczykowski-Górecki
7a4f36f015
tests: add/fix VM state tests 2017-04-29 01:18:28 +02:00
Marek Marczykowski-Górecki
8989c1c010
tests: fix label test file location 2017-04-29 01:18:26 +02:00
Marek Marczykowski-Górecki
e40875ee5f
tests: events
Since qubesmgmt.events require python3, those tests can use python3
features. But it should be still importable on python2 (so, no 'yield
from', not type hits etc).
2017-04-29 01:18:26 +02:00
Marek Marczykowski-Górecki
7bafd631d4
Exclude tools and events from python2 tests and packaging
Those two parts require python3.
To avoid duplicating the exclude list, run tests and pylint on a copy
installed via setuptools.
2017-04-29 01:18:25 +02:00
Marek Marczykowski-Górecki
d0e8c0515e
label: add index and icon 2017-04-29 01:18:25 +02:00
Marek Marczykowski-Górecki
36d8ee9b32
Add qvm-pool and qvm-volume tool 2017-04-07 18:48:05 +02: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
0e775209fd
storage: pass volume id as a payload in mgmt.pool.volume.* methods
Volume id may contain characters normally not allowed in qrexec argument
(like '/'). Also, don't encode two values inside one qrexec argument, as
it makes writing a policy much harder.
2017-03-13 04:37:31 +01:00
Marek Marczykowski-Górecki
a493352e5d
tests: add qvm-ls
Very few tests for qvm-ls, but include two very broad (multiple VMs,
various columns etc).
2017-03-13 04:37:31 +01:00
Marek Marczykowski-Górecki
310d9da381
tests: add convenient TestVM and TestVMCollection classes
Very simple mockups for other tests.
2017-03-13 04:37:30 +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
ede625d1dd
tests: catch and check stderr from invalid argument type tests
Verify if tool failed with expected message, but also make tests output
more readable.
2017-03-13 04:37:30 +01:00
Marek Marczykowski-Górecki
c1ae5f8bf5
Adjust property value decoding
Now property.Get contains also explicit value type.
2017-03-13 04:37:30 +01:00
Marek Marczykowski-Górecki
5615510da5
Add specific exception for qubesd communication error 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
6dd6d9e254
tests: add tests for simple tools
QubesOS/qubes-issues#853
2017-03-09 02:46:13 +01:00
Marek Marczykowski-Górecki
484743faf0
tests: add qubes-prefs tests
Based on qvm-prefs.
2017-03-09 02:39:53 +01:00
Marek Marczykowski-Górecki
6b8bbd9c51
tests: adjust StdoutBuffer for python2/python3 compatibility
io.StringIO expects unicode writes, while string literal on python2 are
bytes. Act accordingly.
2017-03-09 02:39:52 +01:00
Marek Marczykowski-Górecki
a575bc3422
tools: allow supplying app object to main function
This is mostly for tests, which use dummy app instance.
2017-03-09 02:39:52 +01:00
Marek Marczykowski-Górecki
32bd75da77
Update license headers
Update GPL->LGPL for tools moved from core-admin repository.
While at it, change mailing address to www link, as suggested by FSF.

Cc: @woju
Cc: @rootkovska
2017-03-09 02:39:51 +01:00
Marek Marczykowski-Górecki
fe74b05049
tests: migrate basic tools tests 2017-03-09 02:39:51 +01:00
Marek Marczykowski-Górecki
f59ff0c641
mgmt.vm.volume.* API support
QubesOS/qubes-issues#853
2017-03-01 23:49:24 +01:00
Marek Marczykowski-Górecki
851ba6aedb
Fix handling '%d' in exception message
QubesOS/qubes-issues#853
2017-03-01 23:49:21 +01:00
Marek Marczykowski-Górecki
61cb9887af
Implement simple VM actions
QubesOS/qubes-issues#853
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
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
58c940b5c0
Rename qubesmgmt.property.DEFAULT to qubesmgmt.DEFAULT
Don't shadow builtin 'property' type. We don't need to kee compatibility
with actual core3 implementation yet, so don't make the same mistake
twice.
2017-03-01 23:49:18 +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