Commit Graph

3770 Commits

Author SHA1 Message Date
Bahtiar `kalkin-` Gadimov
3009bd862e
Fix manpage generation 2016-05-21 01:25:15 +02:00
Bahtiar `kalkin-` Gadimov
91f72dc56c
Rework argument checking when generating manpages
Add the ability to handle commands having subcommands, like `qvm-block`

Split the ArgumentCheckVisitor in an OptionsCheckVisitor &
SubCommandCheckVisitor. The OptionsCheckVisitor checks options given
in a section named 'Options' (case insensitive), while the
SubCommandCheckVisitor dispatches on a section named 'Commands' (case
insensitive).

This also fixes finding the undocumented command arguments. The previous
solution with depart_document did not work. NodeVisitor does not dispatch to
depart_document() even if it's mentioned in the documentation.
2016-05-21 01:25:14 +02:00
Bahtiar `kalkin-` Gadimov
e580131465
Add AliasedSubParsersAction 2016-05-21 01:25:13 +02:00
Wojtek Porczyk
e757444c35 qubes/tools/qvm-features: add tool for managing qvm-features
QubesOS/qubes-issues#1637
2016-05-19 03:02:24 +02:00
Bahtiar `kalkin-` Gadimov
a65b0edcd4 Add QubesArgumentParser.print_error() 2016-05-19 03:02:24 +02:00
Wojtek Porczyk
454e1835fe pylintrc: add (commented) ruleset for debugging imports 2016-05-19 03:02:24 +02:00
Wojtek Porczyk
786884ad7a qubes: fix netvm properties and tests
fixes QubesOS/qubes-issues#1816
2016-05-19 03:02:23 +02:00
Wojtek Porczyk
d728f4b9ff qubes/app: reconnect to libvirtd after crash
Sometimes libvirt crashes. After that the connection (and all
vm.libvirt_domain-s) were unusable.

fixes QubesOS/qubes-issues#990
2016-05-05 17:33:00 +02:00
Wojtek Porczyk
e3aae7bc17 qubes: Minor fixes
Fix mock TestApp object and argument parsing in qvm-run.
2016-05-05 16:58:43 +02:00
Wojtek Porczyk
c76790fbde qubes/tests/vm/qubesvm: fix test for vm.internal
On flipping .internal vm (re)creates appmenus. They need label.
2016-05-05 14:38:04 +02:00
Wojtek Porczyk
63c09a090c qubes: Combat import cycles
This commit eliminates import statements happening in the middle of the
file (between two classes definition). The cycles are still there. The
only magic module is qubes itself.
2016-05-05 14:33:09 +02:00
Wojtek Porczyk
f8270a07bb qubes: add filename= argument to Qubes.save()
fixes QubesOS/qubes-issues#1846
2016-05-05 00:40:45 +02:00
Bahtiar `kalkin-` Gadimov
1d5b89f0d5 LinuxKernel keep track of own volumes
This is squashed woju/qubes-core-admin#8 by @kalkin

- LinuxKernel.volumes() lists all available kernels
- LinuxKernel use kernel version as vid
- LinuxKernel add docstrings
- Linux.kernel use os.listdir instead of os.walk
- LinuxKernel dynamically list available kernels
2016-05-04 17:21:05 +02:00
Bahtiar `kalkin-` Gadimov
7200e6153b
Rename default storage driver from xen to file
- Rename XenPool   ⇒ FilePool
- Rename XenVolume ⇒ FileVolume
2016-04-30 20:42:46 +02:00
Bahtiar `kalkin-` Gadimov
b2c1017488 Fix missing parameter in Pool.__init__() 2016-04-30 20:42:00 +02:00
Wojtek Porczyk
044aefe25a contrib: import-graph creates smaller, more readable graph 2016-04-27 17:51:18 +02:00
Wojtek Porczyk
26fabe53aa Add readthedocs and badge to README.md 2016-04-27 15:41:56 +02:00
Wojtek Porczyk
7f2f4a4e75 Fix GUI extension 2016-04-27 15:27:01 +02:00
Wojtek Porczyk
487411be4c Merge remote-tracking branch 'woju/pull/5/head' into core3-devel
Makefile                    |   1 -
doc/manpages/qvm-create.rst |   5 +
etc/storage.conf            |  13 -
qubes/__init__.py           |  82 +++++-
qubes/config.py             |  14 +-
qubes/devices.py            |  15 ++
qubes/storage/__init__.py   | 591 +++++++++++++---------------------------
qubes/storage/kernels.py    | 109 ++++++++
qubes/storage/xen.py        | 643 +++++++++++++++++++++++++++++---------------
qubes/tests/__init__.py     |  13 +-
qubes/tests/int/basic.py    |   5 +-
qubes/tests/storage.py      |  70 ++---
qubes/tests/storage_xen.py  | 366 +++++++++++++++----------
qubes/tools/qvm_create.py   |  18 +-
qubes/vm/appvm.py           |  38 ++-
qubes/vm/qubesvm.py         | 192 ++++++-------
qubes/vm/templatevm.py      |  45 +++-
rpm_spec/core-dom0.spec     |   2 +-
setup.py                    |   1 +
templates/libvirt/xen.xml   |  32 ++-
20 files changed, 1313 insertions(+), 942 deletions(-)
2016-04-26 11:09:18 +02:00
Bahtiar `kalkin-` Gadimov
04a3e80311 SizeMixIn first assert than call super() 2016-04-25 07:17:21 +02:00
Bahtiar `kalkin-` Gadimov
29f4be0f10 If vm doesnt support volume_config raise TypeError 2016-04-25 07:17:21 +02:00
Bahtiar `kalkin-` Gadimov
37ca33b0d1 Add docstring to xen volumes implementations 2016-04-25 07:17:21 +02:00
Bahtiar `kalkin-` Gadimov
8f060a8746 Fix Pool and Volume __init__ 2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
591134833b Replace Volume.__str__ with enhanced __repr__ 2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
04536c5950 Don't exec app.save() after add_pool & remove_pool 2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
d7ff4b9057 Move volume xml config from QubesVM to Volume 2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
2e28849c90 Move pool xml config from Qubes to Pool 2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
49b4951389 Storage move rename() logic to XenPool
- Fix config renaming
2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
e3ae6cdc1b BackupTestsMixin.create_backup_vms uses volumes
Instead of using root_img to access the path it uses now the proper volumes
2016-04-25 07:17:20 +02:00
Bahtiar `kalkin-` Gadimov
d7fd66070a Fix revert template changes test 2016-04-25 07:17:19 +02:00
Bahtiar `kalkin-` Gadimov
8cc31e86a7 qvm-create handle --pool argument 2016-04-25 07:17:19 +02:00
Bahtiar `kalkin-` Gadimov
2c2a778a1d Serialize volume_config from qubes.xml 2016-04-25 07:17:19 +02:00
Bahtiar `kalkin-` Gadimov
fe6a35155e Move kernel file checks to LinuxKernel pool 2016-04-25 07:17:19 +02:00
Bahtiar `kalkin-` Gadimov
ef485ca32a Add linux-kernel to defaults['pool_config'] 2016-04-25 07:17:19 +02:00
Bahtiar `kalkin-` Gadimov
62c81044c5 Add XenPool.setup/destroy 2016-04-25 07:17:18 +02:00
Bahtiar `kalkin-` Gadimov
97d04791b7 After add/remove_pool execute Pool.setup/destroy 2016-04-25 07:17:18 +02:00
Bahtiar `kalkin-` Gadimov
9674d03088 Add pool LinuxKernel 2016-04-25 07:17:18 +02:00
Bahtiar `kalkin-` Gadimov
d1a0542c85 Add XenPool.remove() 2016-04-25 07:17:18 +02:00
Bahtiar `kalkin-` Gadimov
a37fc2464a Add XenPool.config() 2016-04-25 07:17:18 +02:00
Bahtiar `kalkin-` Gadimov
971c4ae91d Add XenPool.driver field 2016-04-25 07:17:18 +02:00
Bahtiar `kalkin-` Gadimov
5f7cb41a21 Move Storage.clone_disk_files logic to XenPool
- Add XenVolume to identify volumes which can be cloned even if they are not in
the same pool
2016-04-25 07:17:17 +02:00
Bahtiar `kalkin-` Gadimov
973c83cedd Move most resize logic to XenPool 2016-04-25 07:17:17 +02:00
Bahtiar `kalkin-` Gadimov
bdfb85ac19 Refactor Storage, Pool and XenPool
- Remove all *_dev_config methods
 - Checks if a storage image exists moved to XenPool
 - Storage.remove wraps Pool.remove()
 - Stop volumes on domain sutdown/kill
 - Warn when using deprecated methods
2016-04-25 07:17:17 +02:00
Bahtiar `kalkin-` Gadimov
3c66d4b54c Fix storage_xen test 2016-04-25 07:17:17 +02:00
Bahtiar `kalkin-` Gadimov
79ac3d3770 Fix storage test and simplify TestVM 2016-04-25 07:17:17 +02:00
Bahtiar `kalkin-` Gadimov
88238c80f3 Add XenPool._reset_volume 2016-04-25 07:17:17 +02:00
Bahtiar `kalkin-` Gadimov
3dab5193c6 XenPool add snapshot handling 2016-04-25 07:17:16 +02:00
Bahtiar `kalkin-` Gadimov
792d94959f Add implementations of xen volumes 2016-04-25 07:17:16 +02:00
Bahtiar `kalkin-` Gadimov
f02f9e3a41 Add XenPool init_volume 2016-04-25 07:17:16 +02:00
Bahtiar `kalkin-` Gadimov
4d4b846ce8 Replace XenStorage with XenPool 2016-04-25 07:17:16 +02:00