Bahtiar `kalkin-` Gadimov
32255a7916
Reverted Storage ←→ Pool dependency
...
- Storage() operates on a pool and in future on multiple pools
2016-04-25 07:17:16 +02:00
Bahtiar `kalkin-` Gadimov
9d646aabd3
Add volume_config to AppVM and TemplateVM
2016-04-25 07:17:13 +02:00
Bahtiar `kalkin-` Gadimov
24193c4308
Add Volume class
2016-04-25 07:16:38 +02:00
Bahtiar `kalkin-` Gadimov
428dd5bc1b
QubesVM.dir_path is set independent of storage
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
c3d8c899cc
Add TemplateVM test for storage_xen
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
3c798bc825
Pool configuration include the pool name
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
bd4674b658
Remove obsolete tests
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
22d73e8fa9
Fix Pool dir_path normalization
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
36470310a2
Replace pool config parsing logic
...
- Move add_pool/remove_pool to Qubes class
- Add Qubes.get_pool
- Remove storage.conf
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
c791cb1935
Serialize pool configuration to XML
2016-04-25 07:16:37 +02:00
Bahtiar `kalkin-` Gadimov
47e89d84b6
XenStorage.format_disk_dev returns now BlockDevice
2016-04-25 07:16:36 +02:00
Bahtiar `kalkin-` Gadimov
cc7dd625d9
Loop over QubesVM.block_devices in libvirt xml
2016-04-25 07:16:36 +02:00
Bahtiar `kalkin-` Gadimov
2f99efa4b8
Add BlockDevice
2016-04-25 07:16:36 +02:00
Wojtek Porczyk
62da967f78
Fix generating documentation
2016-04-22 15:23:39 +02:00
Bahtiar `kalkin-` Gadimov
ebb79e9c4f
Fix TC_01_Properties/test_030_rename_conflict_app
2016-04-20 14:02:04 +02:00
Bahtiar `kalkin-` Gadimov
d1d72466d6
Remove unneeded imports from tests/int.basic
2016-04-20 13:59:55 +02:00
Bahtiar `kalkin-` Gadimov
f74646fb1b
Assert that a TemplateVM can't have a template
2016-04-20 13:59:32 +02:00
Bahtiar `kalkin-` Gadimov
6aac0a5732
On startup-failure only force_shutdown if running
...
This avoids losing the exception if an exception is raised in
self.force_shutdown(), because the vm is not running or paused
2016-04-20 13:59:17 +02:00
Wojtek Porczyk
2a9752716c
Merge remote-tracking branch 'marmarek/core3-devel-mm' into core3-devel
2016-04-20 13:55:46 +02:00
Wojtek Porczyk
fe8fdb264b
qubes/vm/qubesvm: move is_guid_running to GUI extension
2016-04-20 13:54:56 +02:00
Wojtek Porczyk
adbca5c0f6
qubes/tools/qvm_run: fix --all/--passio exclusion
2016-04-20 13:54:56 +02:00
Wojtek Porczyk
e720e1634b
qubes/tools: rewrite qvm-shutdown
...
fixes QubesOS/qubes-issues#1228
2016-04-20 13:52:58 +02:00
Wojtek Porczyk
94589915b0
Fix documentation
2016-04-20 13:50:42 +02:00
Marek Marczykowski-Górecki
2a46abbefd
qubes.vm: implement TemplateVM.appvms property
2016-04-20 02:28:11 +02:00
Marek Marczykowski-Górecki
7117847816
tests: fix int.dom0_update
...
Environment must be preserved for QUBES_XML_PATH variable used to point
to a secondary (test) qubes.xml.
2016-04-20 02:26:56 +02:00
Marek Marczykowski-Górecki
a707840596
tests: fix and enable external tests loader
...
QubesOS/qubes-issues#1800
2016-04-20 02:26:16 +02:00
Marek Marczykowski-Górecki
a1575b98d4
tests: do not drop 'qubes.tests.' prefix
...
This cause troubles with "external" tests (loaded from outside of
qubes.tests module).
2016-04-20 02:25:56 +02:00
Wojtek Porczyk
540942de47
qubes/ext: convert extensions to singletons
...
From now the extensions are instantiated once. They no longer have .app
attribute, but can access it from event handlers via vm.app.
2016-04-11 15:31:41 +02:00
Marek Marczykowski-Górecki
eaf5efd814
tests: convert 'extra' test loader to core3 API
...
QubesOS/qubes-issues#1800
2016-04-11 13:50:19 +02:00
Marek Marczykowski-Górecki
8c6fe7ed90
Merge remote-tracking branch 'origin/master' into core3-devel-mm
2016-04-11 13:03:12 +02:00
Marek Marczykowski-Górecki
4308fa7946
Fix events names in docstrings
2016-04-11 00:13:14 +02:00
Marek Marczykowski-Górecki
d9a8cd5d68
backup: minor code style fixes
2016-04-11 00:13:13 +02:00
Wojtek Porczyk
c5962910d0
qubes/events: Rework firing events for effect
...
From now, the handlers should yield their values, not return.
2016-04-08 12:35:11 +02:00
Marek Marczykowski-Górecki
c28f50f6fe
backup: minor fixes
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
2261e6a4c7
backup: simplify auto-renaming handling
...
Don't try to track names in restore_info_verify, instead resolve them at
actual restore time.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
71a7730168
backup: simplify ordering of restoring VMs
...
No other change than reducing two nested loops into one.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
20d53fbf69
tests: more VMs combinations in backup
...
VM with custom template, non-default NetVM
This requires to VMs being removed in reversed order (to first remove
VM, then its template).
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
98c8b7cd22
backup: use simple classes for data storage on restore too
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
424d3054f3
backup: use vm.features to store backup-specific metadata
...
Do not keep them in system qubes.xml.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
ed88b5a9a3
backup: use vm.run_service instead of vm.run
...
This should be the only way used to call services.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
e8f21929ad
backup: by default include all the VMs with vm.include_in_backups
...
If there is a need for more robust default, it should be handled at that
property.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
a3051b956b
backup: docstrings, don't expose internal attributes
...
processes_to_kill_on_cancel shouldn't be initialized by user, so move
below applying user settings.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
b4227f7581
backup: use simple classes instead of hashes, use events for appmenus
...
This makes typo errors much easier to find (also using pylint or so).
While at it, also removed explicit appmenus backup, as it should be
provided by appmenus extension.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
c01f43a5d3
backup: unify handling of template and non-template VMs
...
Handle them the same way - individual files, not the whole directory for
templates.
Also don't backup obsolete 'kernels' subdir - it isn't supported in
core3.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
d9cf64a41d
backup: minor code structure changes
...
- initialize internal objects object in constructor
- use 'with'
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
78dbadab57
backup: minor: compile regex once
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
e9b8b6428c
backup: remove duplicated get_disk_usage function
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
c08f5986a9
backup: use constants for queue control strings
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
ad1f1738fa
qubes: make 'store' property public (R/O)
...
It makes sense to see from what Qubes object was loaded.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
c55ca8004a
tests: port backupcompatibility to core3 API
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
8c5d42a095
backup: add support for restoring pre-core3 backups
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
304d2b10bc
backup: fix handline "None" kernel
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
412bcfa88b
backup: fix hadling netvm property
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
d72d8f8445
backup: code inspection annotations
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
3fb0754398
backup: formatting
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
697a26c8da
backup: update license header
...
Use link instead of address, as recommended by FSF.
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
e04ea7512c
backup: minor code style
...
- Don't use catch-all except statement.
- Use str.format instead of "%" operator.
- Use static methods where applicable.
- Remove unused local variables.
- Don't shadow variables from outer scope
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
44eed25511
tests/backup: report failure when error was expected but none detected
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
e5af64f2bf
backup: fix restore summary table
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
595dfdc0a9
backup: add additional verification of backup header
...
Ensure only alphanumeric characters are used.
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
3342f637f4
backup: convert logging to proper python logging API
...
QubesOS/qubes-issues#1213
QubesOS/qubes-issues#1214
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
019678bf4d
tests: fix backup test to not break default template...
...
By default AppVM is template based. This means vm.root_img points at
default template's root image. Change this to StandaloneVM to have
independent root.img.
2016-04-07 13:06:25 +02:00
Marek Marczykowski-Górecki
e557fe9989
backup: restructude the code into classes
...
Introduce two main classes Backup and BackupRestore for storing the
state of the desired operation. Then a simple interface to adjust
parameters.
(Almost) no functional change.
QubesOS/qubes-issues#1213
QubesOS/qubes-issues#1214
2016-04-07 13:06:14 +02:00
Marek Marczykowski-Górecki
fd1f8def6a
tests: do not store dom0 home backup inside of dom0 home itself
2016-04-07 13:05:30 +02:00
Marek Marczykowski-Górecki
e0686e1e02
backup: initial conversion to core3 API
2016-04-07 13:05:25 +02:00
Marek Marczykowski-Górecki
45d6ab3862
qubes/vm: store libvirt config in libvirt.xml, fix rename handling
2016-04-07 13:03:46 +02:00
Marek Marczykowski-Górecki
12df07edd0
tests: invalid property should not be saved to qubes.xml
2016-04-07 13:03:42 +02:00
Marek Marczykowski-Górecki
de86a3c1a4
tools/qvm_prefs: reject invalid properties instead of ignoring silently
2016-04-07 13:03:39 +02:00
Marek Marczykowski-Górecki
c07981da88
tests: allow real prefix notation for selecting tests
2016-04-07 13:03:35 +02:00
Marek Marczykowski-Górecki
7f5feac98b
qubes/vm: fixes for features handling
...
Properly handle 'None' value, there is no difference between empty
string (<x></x>) and no content at all (<x/>).
2016-04-07 13:03:30 +02:00
Marek Marczykowski-Górecki
06c315c94b
qubes: fix/update event names
...
Fix few typos, then rename:
- recreate-appmenus -> domain-restore: there may be more to do than
only appmenus
2016-04-07 12:59:39 +02:00
Marek Marczykowski-Górecki
7cbe2dbd38
qubes/vm: add passio_stderr argument to vm.run_service
...
This allows getting error messages from service call, to provide more
meaningful error messages.
2016-04-07 12:58:05 +02:00
Marek Marczykowski-Górecki
1cd6acd875
core/events: allow handlers return some value
2016-04-07 12:58:01 +02:00
Marek Marczykowski-Górecki
6052143735
tests: qvm-prefs
...
QubesOS/qubes-issues#1248
2016-04-07 12:57:57 +02:00
Marek Marczykowski-Górecki
e319639146
qubes/vm: add StandaloneVM class
2016-04-07 12:57:52 +02:00
Marek Marczykowski-Górecki
43435405e7
tests: update checking 'None' VM representation
2016-04-07 12:57:47 +02:00
Marek Marczykowski-Górecki
c17f86e659
qubes: fix handling DEFAULT special value for VMProperty
2016-04-07 12:03:40 +02:00
Wojtek Porczyk
267a78e4e0
Fix resetting attribute to default when it's already default
...
Based on marmarek's
WIP fix resetting attribute to default when it's already default
2016-04-06 18:09:57 +02:00
Bahtiar `kalkin-` Gadimov
b1978abce5
Use entry_points for pool driver discovery
...
- Add qubes.storage entry point to setup.py
- Removed the old pool driver class loading logic
- Reworked pool tests
2016-04-06 10:11:19 +02:00
Wojtek Porczyk
42666e0ec5
Throw meaningful exception when qubes.xml is missing
...
Based on kalkin-'s Rais QubesException if qubes xml config is missing
2016-04-05 16:33:49 +02:00
Bahtiar `kalkin-` Gadimov
156ecf4163
Add missing import in qubes/__init__.py
...
This was: Fix qubes-create command
2016-04-05 16:25:51 +02:00
Bahtiar `kalkin-` Gadimov
49ec29a235
Fix bug in Qubes.get_vm_class()
2016-04-05 16:24:30 +02:00
Wojtek Porczyk
c375334c54
qubes/devices: calculate event names using +
...
This make static analysis of the events easier.
2016-03-23 09:08:13 +01:00
Wojtek Porczyk
349e218638
qubes/devices: devices class framework
...
This fixes loading PCI devices.
2016-03-23 09:08:13 +01:00
Wojtek Porczyk
a4fa1adb82
qubes/ext/gui: fix sending monitor layout at VM startup
...
Based on marmarek's commit 4edb42c1 under the same name.
2016-03-21 11:44:59 +01:00
Marek Marczykowski-Górecki
15e032cddb
qubes/vm: fix handling "None" kernel
...
The "None" value still makes sense for HVM domains.
2016-03-21 11:44:59 +01:00
Marek Marczykowski-Górecki
a02f7a30fc
qmemman: fix core3 API usage for sending events
2016-03-21 11:44:59 +01:00
Wojtek Porczyk
29d0baa944
qubes/vm/mix/net: By default MAC is constant
...
MAC address was one place, where qid was leaked to the VM. Different MAC
addresses are not needed, since we do routing, not switching.
2016-03-21 11:44:59 +01:00
Wojtek Porczyk
04cc2099f7
HVM part 2
2016-03-21 11:44:54 +01:00
Marek Marczykowski-Górecki
8da7416f30
vm: Remove reference to old libvirt config template
...
This file isn't installed anymore
2016-03-21 11:44:54 +01:00
Wojtek Porczyk
5eaf03c4a2
HVM part 1
2016-03-21 11:44:46 +01:00
Wojtek Porczyk
e0210130da
qubes: Fix error in get_vms_based_on()
...
Not every vm has .template attribute.
2016-03-21 11:43:33 +01:00
Wojtek Porczyk
d766b8e110
qubes: Fix "unify event names"
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
9567f7b40b
vm: rename 'yum-proxy-setup' feature to 'updates-proxy-setup'
...
The 'yum-proxy-setup' is deprecated since R3.0, so finally remove old
name.
But add it to R3.x compatibility layer.
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
b6d8c7fb81
ext/r3compatibility: features/services
...
QubesOS/qubes-issues#1812
2016-03-21 11:43:33 +01:00
Wojtek Porczyk
0f03b257ce
qubes/vm: Fix features coercion
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
c9fd57e7e4
ext/r3compatibility: move old firewall code to R3.x compat layer
...
QubesOS/qubes-issues#1812
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
afd4573a02
ext/r3compatibility: create R3.x QubesDB entries
...
This allows the user to start VM based on "old" system (from R3.x) in
R4.0. For example after restoring from backup, or migration. This also
makes upgrade instruction much easier - no need complex recovery
instruction if one upgrade dom0 before upgrading all the templates.
QubesOS/qubes-issues#1812
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
54784405bd
tests: adjust networking tests
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
3b1238f7cf
vm: stub for new firewall API
...
- introduce 'firewall-changed' event
- add reload_firewall_for_vm stub function
Should that function be private, called only from appropriate event
handlers?
QubesOS/qubes-issues#1815
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
34fe4a2d71
tests: add function to provide real network to test case
...
Very few tests should use it, as it makes the test result somehow
dependent on outside world state. But still, some of them need it.
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
c99a47d192
vm: fix handling firewall_conf path
...
It may be (and by default is) path relative to VM directory.
This code will be gone in the final version, after merging firewall
configuration into qubes.xml. But for now have something testable.
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
c9cad71d03
vm/mix/net: create vm.connected_vms dynamically
...
It is much less error-prone way. Previous approach didn't worked because
VMs weren't added here at 'domain-init'/'domain-loaded' event. And even
after adding such handlers it wasn't working because of
QubesOS/qubes-issues#1816 .
It may be a little slower, but since it isn't used so often
(starting/stopping VM and reloading firewall), shouldn't be a problem.
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
3e3213e7c7
Redo "core: do not reset firewal when setting netvm=none"
...
Apparently it got lost in merge.
QubesOS/qubes-issues#862
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
736773dbec
vm: remove obsolete firewall handling code
...
There is no vm.write_iptables_xenstore_entry().
QubesOS/qubes-issues#1815
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
a0fa8fcc8e
ext/qubesmanager: fix events signature
...
There is event itself passed just after VM object.
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
12f778b539
qubes/vm: do not recursively use repr in BaseVM.__repr__
...
This will easily end up in infinite recursion. For example
'sys-net'.template points at 'fedora-23', which itself has
'fedora-23'.netvm set to 'sys-net'.
2016-03-21 11:43:32 +01:00
Marek Marczykowski-Górecki
422f30b969
tests: port network tests to core3 API
2016-03-21 11:43:32 +01:00
Marek Marczykowski-Górecki
df5562d2c7
tests: fix rename test to report FAIL instead of ERROR when really failed
2016-03-21 11:43:32 +01:00
Wojtek Porczyk
394fa1e5d3
qubes/tests: tests for qubes.devices
2016-03-21 11:43:32 +01:00
Wojtek Porczyk
0f9ca47d90
qubes/ext/guid: Move gui-related code to extension
2016-03-21 11:43:32 +01:00
Wojtek Porczyk
75dd882b83
qubes: Unify event names
...
Events will be named <object>-[pre-]-<verb>, where verb is in infinitive
form.
2016-03-21 11:43:32 +01:00
Wojtek Porczyk
d09bd5ab6a
qubes: Convert QubesVM and Extension discovery to pkg_resources
...
QubesOS/qubes-issues#1238
2016-03-21 11:43:32 +01:00
Wojtek Porczyk
93686eae06
qubes/vm: change services to features
2016-03-21 11:43:32 +01:00
Wojtek Porczyk
bf78e662f6
Import qubesdb from the new module
...
fixes QubesOS/qubes-issues#1252
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
5dca051b32
tests: enable storage tests
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
8262f2ef4b
storage: fix handling standalone VMs
...
Currently Standalone have template=None.
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
a73c694f54
storage: access *_img directly from vm.storage object
...
Not through vm.something_img proxy.
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
c0c0e0022e
tests: convert storage tests to core3 API
...
QubesOS/qubes-issues#
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
14f31134c0
tests: move make_vm_name to QubesTestCase
...
This function is often useful also in unit tests, not only integration
tests.
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
5375dce90d
Prefer human readable output in qvm-prefs and qubes-prefs tools
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
68ed50c97d
tests: enable dom0 update tests
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
fb74126e56
tests: convert dom0 update test to core3 API
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
0307ec22f2
tests: resolve template name when copying from host collection
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
81dbe3628f
tests: skip system tests if not in dom0
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
50819c726c
tests: set QUBES_XML_PATH env variable to force usage of qubes-test.xml
...
This way even separate processes (even those started not directly - like
qrexec service calls) will use correct qubes.xml file.
Fixes QubesOS/qubes-issues#1730
2016-03-03 01:18:17 +01:00
Wojtek Porczyk
c80e89d47e
qubes: support QUBES_XML_PATH environment variable
...
This is reworked
core: load default qubes.xml location from QUBES_XML_PATH env variable
QubesOS/qubes-issues#1730
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
e3c94f3949
core: fix handling numeric label value set
...
Not sure if it should be supported this way, but surely it shouldn't
throw AttributeError.
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
79a6da1163
tests: split off invalid values tests for better reporting
...
Most of them fails for now...
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
c45c91c5f0
tests: improve verbosity of assertNotRaises even further
...
Include traceback in error message.
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
5a409ad417
tests: few more (disabled for now) tests for hvm related properties
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
1b69f5c213
tests: make test cleanup more defensive - qubes.xml load failure
...
If qubes.xml doesn't even load, remove it anyway and clean up the VMs
the hard way.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
9633573408
core: adjust units comment for host.memory_total, and fix related places
...
QubesOS/qubes-issues#1737
2016-03-03 01:18:16 +01:00
Wojtek Porczyk
88a63cbe3a
qubes/vm/qubesvm: do not clone VM-specific properties
...
This is reworked
core: do not clone VM-unique identifiers in clone_properties
by Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
2cbbe0bdb6
core: abandon 'kernels' in VM directory
...
Since we have PV Grub now (which is much more convenient), it is useless
now.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
9428c70d31
core: fix vm.create_on_disk
...
QubesOS/qubes-issues#
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
62759fb1f6
core: move maxmem default initialization to property itself
...
Also fix (for now?) units - memory_total is int bytes while maxmem in
megabytes.
QubesOS/qubes-issues#1737
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
2f3762ee68
core: minor fixes in handling properties
...
Conflicts:
qubes/vm/qubesvm.py
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
12941d67bf
tests: do not unnecessary mangle test name passed as runner parameter
...
Otherwise `qubes.tests.run -l` output would not be useful as input for
test list.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
05d006b873
tests: minor fixes in int.tools tests
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
163ab25d4b
tests: enable qubes.tests.int.basic
...
It is fully converted to core3 API (or tests marked as 'skip' if not),
so can be reenabled.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
9b1b82c592
tests: move properties tests to QubesVM unit tests
...
Since qvm-prefs is now a generic tool without any property-specific
stuff, we can tests properties getters/setters in QubesVM class unit
tests.
Now most of properties are tested. Some of those tests still fails
because missing/incomplete underlying implementation.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
81bc615bce
tests: convert tests/int/basic to core3 API
...
Not all tests converted - some of them will be removed in the next
commit. Also it doesn't mean that all tested functionality already
works...
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
2daba9e0eb
core: migrate handy GUI functions and backup mixin from core2
...
That's all from tests/__init__.py, so remove that file.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
bc82643580
tests: redo "84af738 tests: support VMs cleaned up in tearDownClass..."
...
Usage: VMs with name created by self.make_vm_name(name,
class_teardown=True) will be cleaned up in tearDownClass. It
should be used only in setUpClass.
Fixes QubesOS/qubes-issues#1691
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
0a45164be7
tests: few more FD leak fixes
...
QubesOS/qubes-issues#1697
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
47e346efbf
tests: initialize Qubes() object in SystemTestsMixin, add handy helpers
...
Most of the tests needs existing template, so add helper to copy it from
"host" collection. Add also helpers to reload qubes.xml - in case of
modification of it from some other process.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
2966456387
tests: improve assertNotRaises reporting
...
Include whole exception value, not only its type.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
f52a0f2d41
storage: get rid of 'servicevms' subdir
...
Keep all the non-template VMs in 'appvms'. Having it split makes no
sense since any VM can be "converted" to NetVM by simply changing its
provides_network attribute and probably assigning some PCI device.
On the other hand, it may be useful to set this manually, for example by
management stack - based on VM function, not type. But don't care about
it for now.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
c1bab3d094
storage: reset_volatile_storage doesn't need source_template parameter
...
It shouldn't touch anything not already known to the VM object.
2016-03-03 01:18:15 +01:00