Commit Graph

14 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
4efedd2951
appmenus: retrieve appmenus during template installation
Hardcoded call to qvm-sync-appmenus in template post-install is no
longer used, handle appropriate event.

QubesOS/qubes-issues#2412
2016-11-02 23:29:55 +01:00
Marek Marczykowski-Górecki
90b18a1ec1
appmenus: add qvm-sync-appmenus --regenerate-only
This is especially useful when something goes wrong (like accidentally
removing entries).
2016-11-02 23:27:06 +01:00
Marek Marczykowski-Górecki
ef47bda417
appmenus: add few docstrings 2016-11-02 23:26:11 +01:00
Marek Marczykowski-Górecki
a513b33da3
appmenus: skip VMs without own directory
For example Dom0, or VM not created on disk (mostly while running
tests).
2016-09-05 14:38:46 +02:00
Marek Marczykowski-Górecki
92c3ba578a
appmenus: register event handlers on QubesVM, not BaseVM
It is critical to call rename-related events in the right order related
to those in QubesVM, because handler at QubesVM renames VM directory.

After "qubes/events: fix event handlers ordering" in qubes-core-admin it
is (again) possible to deterministically order event handler from
extension in relation to those from the class itself. But since ordering
on object class have higher priority (first from base class), those
handlers needs to be attached to the same class.
2016-08-15 23:53:11 +02:00
Marek Marczykowski-Górecki
86ef6906ad
appmenus: don't crash on VM without files on disk
Such VM can still trigger some appmenus-related action, for example
label change. This may happen during tests, or backup restore. And
probably some other cases.
2016-08-15 23:49:59 +02:00
Marek Marczykowski-Górecki
fe209dfd24
appmenus: clone default whitelists for VM type
Don't bother with checking whether it is a template or not - when
cloning VM disk files, copy those files anyway (if exist of course).
2016-08-08 14:38:50 +02:00
Marek Marczykowski-Górecki
bf140ae175
appmenus: misc API sync with core-admin
- there is no longer vm.is_netvm/is_disposablevm.
- 'domain-create-on-disk' even have no longer 'source_template' argument
2016-08-08 00:51:49 +02:00
Marek Marczykowski-Górecki
19609705fc
appmenus: do nothing if VM isn't created on disk yet
This may be a case during backup restore - some properties may be
modifier before restoring actual files.

QubesOS/qubes-issues#1897
2016-08-08 00:51:49 +02:00
Marek Marczykowski-Górecki
0fbc644fd9
appmenus: fix handling custom templates
QubesOS/qubes-issues#1897
2016-08-08 00:51:49 +02:00
Marek Marczykowski-Górecki
7dccbd1ead
appmenus: convert shell scripts to python
Fixes QubesOS/qubes-issues#1897
2016-08-08 00:51:48 +02:00
Marek Marczykowski-Górecki
54a5dd92cf
appmenus: indentation
QubesOS/qubes-issues#1897
2016-08-08 00:51:47 +02:00
Marek Marczykowski-Górecki
c32fbe14aa
appmenus: add simple unit tests
QubesOS/qubes-issues#1897
2016-08-08 00:51:47 +02:00
Marek Marczykowski-Górecki
acee13bf53
appmenus: use setuptools for packaging
QubesOS/qubes-issues#1897
2016-08-08 00:51:47 +02:00