Commit Graph

3211 Commits

Author SHA1 Message Date
Wojtek Porczyk
ea44c0acf3 qubes: pylint fixes
Fix bunch of errors and warnings.
2015-10-05 23:49:39 +02:00
Wojtek Porczyk
15713cbf46 qubes/tools: rewrite qvm-kill
Also new function, `error_runtime` for common parser.

fixes QubesOS/qubes-issues#1222
2015-10-05 18:06:02 +02:00
Wojtek Porczyk
015b01fe46 qubes/tools: unify looking up the domain
This is common operation that is repeatable.
2015-10-05 17:34:13 +02:00
Wojtek Porczyk
55e4ddcd3d qubes/tools: custom QubesArgumentParser
Common functions that revolve around running the tool (like
`dont_run_as_root`) will be methods of this class.
2015-10-05 14:03:11 +02:00
Wojtek Porczyk
c9cbf8ffe2 core3: fix mounting modules.img 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
15c59f938c qubes/storage/xen: fix RO snapshot 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
3724d6fca1 qubes/vm/qubesvm: fix core2 compatibility 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
8628a984fc qubes/vm: fix memory constraint while generating libvirt XML 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
c538d536c8 core3: move qmemman
This is part of fixing qvm-start.

qmemman was moved with minimal touching, mainly module names.

Moved function parsing human-readable sizes from core2. This function is
wrong, because it treats k/M/G as 1024-based, but leave it for now.
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
fcdb579bab core3: qubesmanager notifying extension
core/notify.py was excavated and tray notifying remnants were moved to
qubes.log. They are unused as yet.

Also extension events are fixed.
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
75c3f355db qubes/vm/qubesvm: fix domain's UUID management
Now we generate UUID on domain's instantiation. This is needed, because
we sometimes don't update XML (like in qvm-start).

fixes QubesOS/qubes-issues#1236
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
c4da931a1d qvm-tools: remove unneeded stubs
Those stubs are now automagically created by setuptools
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
a8fb99ef0f Add README.md with warning 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
6f4951d08a install python package with setuptools 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
ce60915fb0 qvm-ls: fix listing domains and labels 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
b0be1ad584 qubes/tools: qvm-start rewritten from original 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
17ac6cb225 core3: boolean properties can be set explicitely 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
b4d51b016b core3: some properties can be set only once
Some properties should not be changed by user at will (like UUID). The
solution is to make them write-once, so they will be set when loading
from XML and frozen for the lifespan of the object holding the property.
When desperately needed, users may edit XML by hand.

fixes QubesOS/qubes-issues#1235
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
a017d78174 Dumb down dir_path property
From now, dir_path cannot be set and is calculated from domain's class
and name.

fixes QubesOS/qubes-issues#1234
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
12329e7b35 qubes/vm/qubesvm: fix log initialisation 2015-10-05 12:46:14 +02:00
Wojtek Porczyk
9da5ae8169 qvm-create: fix --template option 2015-10-05 12:46:13 +02:00
Wojtek Porczyk
d3425142bc qubes/tools: hide --xml option
It requires user to know, what he is doing
2015-10-05 12:46:13 +02:00
Wojtek Porczyk
b0af95fa2b qvm-prefs: support resetting values 2015-10-05 12:46:13 +02:00
Wojtek Porczyk
af1a6a49bd qvm-ls: fix printing label 2015-10-05 12:46:13 +02:00
Wojtek Porczyk
e7cba0214f qubes/tools: qvm-prefs 2015-10-05 12:46:13 +02:00
Wojtek Porczyk
0fbee4dc10 core3: more fixes 2015-10-05 12:46:13 +02:00
Wojtek Porczyk
80d664441d core3: fixes from Marek
This is adapted from commit 90a50dca406e3d40c88ea338566e0460589df7a3.
2015-10-05 12:46:13 +02:00
Wojtek Porczyk
e9b998400d qubes/vm/qubesvm: fix __init__ wrt .storage attr 2015-09-28 18:20:28 +02:00
Wojtek Porczyk
6241859dc8 qubes: Fix PropertyHolder.property_get_default
And test cases, some of them stubs.
2015-09-28 18:20:28 +02:00
Wojtek Porczyk
067f033af6 qubes/tools/qvm-create: Add internal --no-root option
And documentation fixes.
2015-09-28 18:20:28 +02:00
Wojtek Porczyk
136b3b36b8 qubes/tools/qubes-create: add --property option 2015-09-28 18:20:28 +02:00
Wojtek Porczyk
84eb082ed2 qubes/vm/qubesvm: fix label setting/loading 2015-09-28 18:20:28 +02:00
Wojtek Porczyk
f536935632 qubes/tools: add --verbose and --quiet to tools 2015-09-28 18:20:28 +02:00
Wojtek Porczyk
ea9a984fa7 qubes/vm: Fix instantiating QubesVM
vm.app attribute needs to be accessible before setting properties
2015-09-28 18:20:28 +02:00
Wojtek Porczyk
cb62545007 qubes: fix qid generation 2015-09-28 18:20:07 +02:00
Wojtek Porczyk
12092c3aa5 core3: port TemplateVM 2015-09-28 18:15:24 +02:00
Wojtek Porczyk
ff7d89700a qubes/tools: port qvm-create 2015-06-30 17:18:24 +02:00
Wojtek Porczyk
669a976d4e qubes/tools: add common action for setting properties 2015-06-29 17:40:43 +02:00
Wojtek Porczyk
b11b8cdbde qubes/tools: add common --force-root option 2015-06-29 17:39:29 +02:00
Wojtek Porczyk
6dc5f328f3 qubes/tools: ArgumentParser prepopulated with common options 2015-06-29 17:39:29 +02:00
Wojtek Porczyk
7832f23d5d qubes: minor fix 2015-06-29 17:39:29 +02:00
Wojtek Porczyk
7886695c63 qubes/vm/qubesvm: fix qid setter to accept str
Mainly for loading from XML.
2015-06-29 17:39:29 +02:00
Wojtek Porczyk
d4147c52bd qubes: Fix property-set events signature 2015-06-29 17:39:29 +02:00
Wojtek Porczyk
7f16e0a73b qubes: disable events by default not to interfere with loading from XML 2015-06-29 17:39:28 +02:00
Wojtek Porczyk
f2d9d628c4 qubes/vm/qubesvm: Fix loading/instantiating 2015-06-29 17:39:28 +02:00
Wojtek Porczyk
fd0107f11a new tool: qubes-create
At present it just creates default qubes.xml (empty barring labels and AdminVM).
In the future it can be evolved into backend for firstboot.
2015-06-29 17:39:28 +02:00
Wojtek Porczyk
8e690c6858 qubes: fix saving Label 2015-06-29 17:39:28 +02:00
Wojtek Porczyk
d5f2e6ab74 qubes: rework qubes.xml handling
Now it more closely aligns with old core2 semantics. New semantics will
have to wait for qubesd.
2015-06-29 17:39:28 +02:00
Wojtek Porczyk
7c8cc14bec core3: fix import 2015-06-29 17:39:28 +02:00
Wojtek Porczyk
18d36c17e1 rpm_spec/core-dom0-doc.spec: fix build dependencies 2015-06-29 17:39:28 +02:00