Commit Graph

393 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
d0bcd3ead2
vm: add TemplateVM.appvms property - list of VMs based on it 2017-05-18 09:51:58 +02:00
Marek Marczykowski-Górecki
024ac6a810
tools/qvm-run: fix waiting for session
Register SIGCHLD signal handler later - do not stop data processing when
qubes.WaitForSession service exits.
2017-05-18 09:50:50 +02:00
Marek Marczykowski-Górecki
7f5fc6ac3d
tools: fix handling single optional VM name 2017-05-18 09:50:25 +02:00
Marek Marczykowski-Górecki
ee81902979
features: fix serialization
qubesd_call expect "bytes" type. Additionally serialize false value as
empty string (which is treated by python as false value), because
otherwise would be serialized to (non-empty) string, which is true value
in python.
2017-05-18 09:48:18 +02:00
Marek Marczykowski-Górecki
3217d8af6f
travis: enable deploy script, switch to 4.0 repos
Enable master-staging -> master update
Use new "Build Stages" Travis-CI feature, to deploy only after _all_
tests complete.
2017-05-17 13:42:13 +02:00
Marek Marczykowski-Górecki
116c45071f
Make pylint happy 2017-05-17 13:20:59 +02:00
Marek Marczykowski-Górecki
45cbbf5e1d
tools/qvm-run: use print instead of logging
Do not color qvm-run diagnostic messages, but also avoid ANSI control
sequences in logs. While at it, do not print 'Running ...' message when
--pass-io is used.
2017-05-17 11:14:00 +02:00
Marek Marczykowski-Górecki
2d7ca9f95e
tools/qvm-run: wait for user session unless qvm-run --no-gui is used
Avoid race condition with X server startup, especially important for
qvm-run --autostart.
2017-05-17 11:07:48 +02:00
Marek Marczykowski-Górecki
210876bd8f
tools/qvm-run: use subproces.DEVNULL instead of manually opened /dev/null 2017-05-17 11:06:56 +02:00
Marek Marczykowski-Górecki
f386d45695
vm: fix run_service error reporting
qubesadmin.exc.QubesVMError (in contrast to qubesa.exc.QubesVMError)
does not take VM instance as first argument.
2017-05-17 01:32:27 +02:00
Marek Marczykowski-Górecki
88b559d985
Invalidate domains cache when received an event affecting it
When events handling is enabled, use it for cache invalidation too.
2017-05-13 14:55:26 +02:00
Marek Marczykowski-Górecki
57b87da9d1
tools/qvm-start-gui: fix cat-induced typo
<^-^>
2017-05-12 19:43:59 +02:00
Marek Marczykowski-Górecki
cfc9ff2ce5
Rename Mgmt API to Admin API: methods names
QubesOS/qubes-issues#853
2017-05-12 19:36:03 +02:00
Marek Marczykowski-Górecki
cf0cf57e7c
Install actual scripts stubs
Since core-admin no longer install them, this package finally can
provide them without conflicts.
2017-05-12 00:16:26 +02:00
Marek Marczykowski-Górecki
6c47765884
Update documentation link in readme 2017-05-12 00:13:01 +02:00
Marek Marczykowski-Górecki
f4d6ac2880
Include tools also on python 3.4
This result only in small limitation in qvm-start-gui tool, but allow
to use the tools from Debian jessie based VM (python 3.4.2).
2017-05-11 23:57:48 +02:00
Marek Marczykowski-Górecki
4ceff0f8c0
Rename qubesmgmt to qubesadmin module
QubesOS/qubes-issues#853
2017-05-11 23:40:03 +02:00
Marek Marczykowski-Górecki
78c28a70e9
Add missing docstrings 2017-05-11 21:13:57 +02:00
Marek Marczykowski-Górecki
1b7a58b84b
rpm: plug man pages building into rpm 2017-05-11 21:13:57 +02:00
Marek Marczykowski-Górecki
54d992f727
doc: import man pages
Most of them are moved from core-admin repository, even if tool is not
implemented yet. Some are generated using skel-manpage.py script.
This way we have complete man pages list, and sphinx will properly
warn/error about inconsistencies.
2017-05-11 21:13:57 +02:00
Marek Marczykowski-Górecki
39a888df4d
tools: minor fixes for documentation building 2017-05-11 21:13:57 +02:00
Marek Marczykowski-Górecki
d3439694c8
tools: fix get_parser_for_command 2017-05-11 21:13:56 +02:00
Marek Marczykowski-Górecki
70e04eddf8
doc: Sphinx config skeleton
Some parts (especially in qubesmgmt/dochelpers.py) copied from
core-admin repo.
2017-05-11 21:13:56 +02:00
Marek Marczykowski-Górecki
812e28c97f
tools: qvm-firewall
The tool and tests.

Use '-' for empty fields in the table, to work also with old 'column'
program version, which doesn't support empty table fields.
2017-05-01 02:34:23 +02:00
Marek Marczykowski-Górecki
0d49ba2710
firewall: add firewall API
To keep API compatibility with core-admin, most data structures are
copied from there.
2017-05-01 02:21:07 +02:00
Marek Marczykowski-Górecki
206f1a7c5b
tests: make tests not fail with substituted sys.stdout
At best lets skip tests in such a case.
2017-04-30 22:54:20 +02:00
Marek Marczykowski-Górecki
09acf4729b
tests: import assertNotRaises() from core-admin 2017-04-30 22:53:43 +02:00
Marek Marczykowski-Górecki
d5bf5a1d75
tools: qvm-device
The tool and tests.
2017-04-30 15:31:41 +02:00
Marek Marczykowski-Górecki
6f46faba6c
README: add note about python version compatibility 2017-04-30 15:21:04 +02:00
Marek Marczykowski-Górecki
cdb9205eef
tests: make Std{err,out}Buffer context managers stackable
Allow use StdoutBuffer context manager inside another similar context
manager. This allows running the tests by a test runner which collect
the output using similar trick.
2017-04-30 15:21:04 +02:00
Marek Marczykowski-Górecki
54dcec2cf5
devices: add devices API wrappers 2017-04-30 15:21:04 +02:00
Marek Marczykowski-Górecki
14ba770c1a
base: handle default method destination
Will ease vm.qubesd_call usage.
2017-04-29 02:27:40 +02:00
Marek Marczykowski-Górecki
9aa2427513
tools: fix license header for qvm-ls 2017-04-29 01:18:38 +02:00
Marek Marczykowski-Górecki
8ce10168ef
tools: qvm-clone
The tool and tests.
2017-04-29 01:18:37 +02:00
Marek Marczykowski-Górecki
1db4e3abea
tests: add QubesLocal/QubesRemote tests
Lets also test basic communication primitives. `mock` python module
makes it _much_ easier, so lets use it also on python2 - requiring
backported version installed.
2017-04-29 01:18:37 +02:00
Marek Marczykowski-Górecki
786bb7d94f
tests: add clone_vm tests
Also put non-VMCollection related tests into separate class.
2017-04-29 01:18:37 +02:00
Marek Marczykowski-Górecki
cb87cfa824
app: add clone_vm function
This differ from main core-admin API, because Admin API do not expose
separate `create_on_disk()`/`clone_disk_files()` functions. When this is
a single operation, `add_new_vm()` cannot be repurposed to clone VM.
2017-04-29 01:18:36 +02:00
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
6e84422062
tools: minor fix for qvm-check 2017-04-29 01:18:36 +02:00
Marek Marczykowski-Górecki
b61844ae5d
tools: add qvm-create
The tool and tests.
2017-04-29 01:18:35 +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
4113651f01
tools: fix default for SinglePropertyAction
For positional arguments default is sent to __call__ even when not
provided on command line. Exclude it in SinglePropertyAction, since
"default" value is really meant for 'properties' attribute, not
individual property.
2017-04-29 01:18:34 +02:00
Marek Marczykowski-Górecki
984ea09cef
tools: fix PropertyAction
self.default={} is mutable, so instead of modifying value derived from
that default, retrieve value, copy it and store again. Otherwise tests
(where the same parser is used multiple times) fails badly.
The same approach is used in argparse._AppendAction.
2017-04-29 01:18:34 +02:00
Marek Marczykowski-Górecki
377a82105d
Add qvm-start-gui autostart script
Start it using XDG Autostart feature, but exclude starting in
qubes-session - so even if package is installed in a VM, it wont be
started simultaneusly with GUI agent.
On the other hand, if some other DE session is running there (which will
be the case for GUI domain), gui-daemons will be started accordingly.

QubesOS/qubes-issues#833
2017-04-29 01:18:34 +02:00
Marek Marczykowski-Górecki
47cea5d146
Add 'daemon' python module dependency
It is required by qvm-start-gui tool.
2017-04-29 01:18:34 +02:00
Marek Marczykowski-Górecki
8eed508864
tools: add qvm-start-gui --notify-monitor-layout option
This is mostly what 'qubes-monitor-layout-notify' tool did in Qubes 3.2.
2017-04-29 01:18:33 +02:00
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