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