2013-03-16 17:23:22 +00:00
|
|
|
#!/usr/bin/python2
|
|
|
|
#
|
|
|
|
# The Qubes OS Project, http://www.qubes-os.org
|
|
|
|
#
|
|
|
|
# Copyright (C) 2010 Joanna Rutkowska <joanna@invisiblethingslab.com>
|
|
|
|
# Copyright (C) 2013 Marek Marczykowski <marmarek@invisiblethingslab.com>
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
import subprocess
|
|
|
|
import sys
|
2013-11-29 22:52:41 +00:00
|
|
|
import os
|
2013-03-16 17:23:22 +00:00
|
|
|
import os.path
|
|
|
|
import shutil
|
2014-04-16 14:59:47 +00:00
|
|
|
import dbus
|
2013-03-16 17:23:22 +00:00
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
from qubes.qubes import QubesVm, QubesHVm
|
|
|
|
from qubes.qubes import QubesException, QubesHost, QubesVmLabels
|
|
|
|
from qubes.qubes import vm_files, system_path, dry_run
|
2013-03-16 17:23:22 +00:00
|
|
|
|
2013-11-29 22:52:41 +00:00
|
|
|
import qubes.imgconverter
|
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
vm_files['appmenus_templates_subdir'] = 'apps.templates'
|
2013-11-29 22:52:41 +00:00
|
|
|
vm_files['appmenus_template_icons_subdir'] = 'apps.tempicons'
|
|
|
|
vm_files['appmenus_icons_subdir'] = 'apps.icons'
|
2013-03-16 17:23:22 +00:00
|
|
|
vm_files['appmenus_template_templates_subdir'] = 'apps-template.templates'
|
|
|
|
vm_files['appmenus_whitelist'] = 'whitelisted-appmenus.list'
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
system_path['appmenu_start_hvm_template'] = \
|
|
|
|
'/usr/share/qubes-appmenus/qubes-start.desktop'
|
|
|
|
system_path['appmenu_create_cmd'] = \
|
|
|
|
'/usr/libexec/qubes-appmenus/create-apps-for-appvm.sh'
|
|
|
|
system_path['appmenu_remove_cmd'] = \
|
|
|
|
'/usr/libexec/qubes-appmenus/remove-appvm-appmenus.sh'
|
2013-03-16 17:23:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
def QubesVm_get_attrs_config(self, attrs):
|
2015-05-02 19:05:11 +00:00
|
|
|
attrs["appmenus_templates_dir"] = {
|
|
|
|
"func": lambda x:
|
|
|
|
os.path.join(self.dir_path, vm_files["appmenus_templates_subdir"])
|
|
|
|
if self.updateable else
|
|
|
|
(self.template.appmenus_templates_dir if self.template is not None
|
|
|
|
else None)
|
|
|
|
}
|
|
|
|
attrs["appmenus_template_icons_dir"] = {
|
|
|
|
"func": lambda x:
|
|
|
|
os.path.join(self.dir_path,
|
|
|
|
vm_files["appmenus_template_icons_subdir"])
|
|
|
|
if self.updateable else
|
|
|
|
(self.template.appmenus_template_icons_dir
|
|
|
|
if self.template is not None else None)
|
|
|
|
}
|
|
|
|
attrs["appmenus_icons_dir"] = {
|
|
|
|
"func": lambda x:
|
|
|
|
os.path.join(self.dir_path, vm_files["appmenus_icons_subdir"])}
|
2013-11-29 22:52:41 +00:00
|
|
|
return attrs
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2013-11-29 22:52:41 +00:00
|
|
|
def QubesTemplateVm_get_attrs_config(self, attrs):
|
2015-05-02 19:05:11 +00:00
|
|
|
attrs['appmenus_templates_dir'] = {
|
|
|
|
'func': lambda x:
|
|
|
|
os.path.join(self.dir_path, vm_files["appmenus_templates_subdir"])}
|
|
|
|
attrs['appmenus_template_icons_dir'] = {
|
|
|
|
'func': lambda x:
|
|
|
|
os.path.join(self.dir_path,
|
|
|
|
vm_files["appmenus_template_icons_subdir"])}
|
2013-03-16 17:23:22 +00:00
|
|
|
return attrs
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
|
|
|
def QubesVm_appmenus_create(self, verbose=False, source_template=None):
|
2013-03-16 17:23:22 +00:00
|
|
|
if source_template is None:
|
|
|
|
source_template = self.template
|
|
|
|
|
|
|
|
if self.internal:
|
|
|
|
return
|
2015-09-02 23:18:16 +00:00
|
|
|
if self.is_disposablevm():
|
|
|
|
return
|
2013-03-16 17:23:22 +00:00
|
|
|
|
|
|
|
if self.is_netvm():
|
|
|
|
vmtype = 'servicevms'
|
|
|
|
elif self.is_template():
|
|
|
|
vmtype = 'vm-templates'
|
|
|
|
else:
|
|
|
|
vmtype = 'appvms'
|
|
|
|
|
|
|
|
try:
|
2014-09-18 05:46:00 +00:00
|
|
|
msgoutput = None if verbose else open(os.devnull, 'w')
|
2013-03-16 17:23:22 +00:00
|
|
|
if source_template is not None:
|
2014-09-18 05:46:00 +00:00
|
|
|
subprocess.check_call([system_path["appmenu_create_cmd"],
|
|
|
|
source_template.appmenus_templates_dir,
|
|
|
|
self.name, vmtype, self.label.icon],
|
|
|
|
stdout=msgoutput, stderr=msgoutput)
|
2013-03-16 17:23:22 +00:00
|
|
|
elif self.appmenus_templates_dir is not None:
|
2015-05-02 18:13:28 +00:00
|
|
|
subprocess.check_call([system_path["appmenu_create_cmd"],
|
|
|
|
self.appmenus_templates_dir, self.name,
|
|
|
|
vmtype, self.label.icon],
|
|
|
|
stdout=msgoutput, stderr=msgoutput)
|
2013-03-16 17:23:22 +00:00
|
|
|
else:
|
|
|
|
# Only add apps to menu
|
2015-05-02 18:13:28 +00:00
|
|
|
subprocess.check_call([system_path["appmenu_create_cmd"],
|
|
|
|
"none", self.name, vmtype,
|
|
|
|
self.label.icon],
|
|
|
|
stdout=msgoutput, stderr=msgoutput)
|
2013-03-16 17:23:22 +00:00
|
|
|
except subprocess.CalledProcessError:
|
2015-05-02 18:13:28 +00:00
|
|
|
print >> sys.stderr, "Ooops, there was a problem creating appmenus " \
|
|
|
|
"for {0} VM!".format(self.name)
|
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
|
|
|
|
def QubesVm_appmenus_remove(self):
|
|
|
|
if self.is_netvm():
|
|
|
|
vmtype = 'servicevms'
|
|
|
|
elif self.is_template():
|
|
|
|
vmtype = 'vm-templates'
|
|
|
|
else:
|
|
|
|
vmtype = 'appvms'
|
2015-05-02 18:13:28 +00:00
|
|
|
subprocess.check_call([system_path["appmenu_remove_cmd"], self.name,
|
|
|
|
vmtype], stderr=open(os.devnull, 'w'))
|
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
|
2013-11-29 22:52:41 +00:00
|
|
|
def QubesVm_appicons_create(self, srcdir=None):
|
|
|
|
if srcdir is None:
|
|
|
|
srcdir = self.appmenus_template_icons_dir
|
|
|
|
if srcdir is None:
|
|
|
|
return
|
2014-02-13 09:42:30 +00:00
|
|
|
if not os.path.exists(srcdir):
|
|
|
|
return
|
2013-11-29 22:52:41 +00:00
|
|
|
|
2015-09-02 23:18:16 +00:00
|
|
|
if self.internal:
|
|
|
|
return
|
|
|
|
if self.is_disposablevm():
|
|
|
|
return
|
|
|
|
|
2013-11-29 22:52:41 +00:00
|
|
|
whitelist = os.path.join(self.dir_path, vm_files['appmenus_whitelist'])
|
2014-04-14 02:12:00 +00:00
|
|
|
if os.path.exists(whitelist):
|
|
|
|
whitelist = [line.strip() for line in open(whitelist)]
|
|
|
|
else:
|
|
|
|
whitelist = None
|
2013-11-29 22:52:41 +00:00
|
|
|
|
|
|
|
if not os.path.exists(self.appmenus_icons_dir):
|
|
|
|
os.mkdir(self.appmenus_icons_dir)
|
|
|
|
elif not os.path.isdir(self.appmenus_icons_dir):
|
|
|
|
os.unlink(self.appmenus_icons_dir)
|
|
|
|
os.mkdir(self.appmenus_icons_dir)
|
|
|
|
|
|
|
|
for icon in os.listdir(srcdir):
|
|
|
|
desktop = os.path.splitext(icon)[0] + '.desktop'
|
2014-04-14 02:12:00 +00:00
|
|
|
if whitelist and desktop not in whitelist:
|
2013-11-29 22:52:41 +00:00
|
|
|
continue
|
|
|
|
|
2015-04-28 10:45:29 +00:00
|
|
|
src_icon = os.path.join(srcdir, icon)
|
|
|
|
dst_icon = os.path.join(self.appmenus_icons_dir, icon)
|
|
|
|
if not os.path.exists(dst_icon) or \
|
2015-05-02 18:13:28 +00:00
|
|
|
os.path.getmtime(src_icon) > os.path.getmtime(dst_icon):
|
2015-04-28 10:45:29 +00:00
|
|
|
qubes.imgconverter.tint(src_icon, dst_icon, self.label.color)
|
2013-11-29 22:52:41 +00:00
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2013-11-29 22:52:41 +00:00
|
|
|
def QubesVm_appicons_remove(self):
|
2015-05-02 18:13:28 +00:00
|
|
|
if not os.path.exists(self.appmenus_icons_dir):
|
|
|
|
return
|
2013-11-29 22:52:41 +00:00
|
|
|
for icon in os.listdir(self.appmenus_icons_dir):
|
|
|
|
os.unlink(os.path.join(self.appmenus_icons_dir, icon))
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2015-05-02 21:49:40 +00:00
|
|
|
def QubesVm_appicons_cleanup(self):
|
|
|
|
srcdir = self.appmenus_template_icons_dir
|
|
|
|
if srcdir is None:
|
|
|
|
return
|
|
|
|
if not os.path.exists(srcdir):
|
|
|
|
return
|
2015-09-02 23:18:16 +00:00
|
|
|
if not os.path.exists(self.appmenus_icons_dir):
|
|
|
|
return
|
2015-05-02 21:49:40 +00:00
|
|
|
|
|
|
|
for icon in os.listdir(self.appmenus_icons_dir):
|
|
|
|
if not os.path.exists(os.path.join(srcdir, icon)):
|
|
|
|
os.unlink(os.path.join(self.appmenus_icons_dir, icon))
|
|
|
|
|
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
def QubesVm_pre_rename(self, new_name):
|
|
|
|
self.appmenus_remove()
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
def QubesVm_post_rename(self, old_name):
|
|
|
|
old_dirpath = os.path.join(os.path.dirname(self.dir_path), old_name)
|
|
|
|
if self.appmenus_templates_dir is not None:
|
2015-05-02 18:13:28 +00:00
|
|
|
self.appmenus_templates_dir = self.appmenus_templates_dir.replace(
|
|
|
|
old_dirpath, self.dir_path)
|
2013-03-16 17:23:22 +00:00
|
|
|
|
|
|
|
self.appmenus_create()
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
def QubesVm_create_on_disk(self, verbose, source_template):
|
2013-11-22 02:56:04 +00:00
|
|
|
if isinstance(self, QubesHVm) and source_template is None:
|
2013-03-16 17:23:22 +00:00
|
|
|
if verbose:
|
2015-05-02 18:13:28 +00:00
|
|
|
print >> sys.stderr, "--> Creating appmenus directory: {0}".format(
|
|
|
|
self.appmenus_templates_dir)
|
|
|
|
os.mkdir(self.appmenus_templates_dir)
|
|
|
|
shutil.copy(system_path["appmenu_start_hvm_template"],
|
|
|
|
self.appmenus_templates_dir)
|
2013-03-16 17:23:22 +00:00
|
|
|
|
|
|
|
source_whitelist_filename = 'vm-' + vm_files["appmenus_whitelist"]
|
|
|
|
if self.is_netvm():
|
|
|
|
source_whitelist_filename = 'netvm-' + vm_files["appmenus_whitelist"]
|
2015-05-02 18:13:28 +00:00
|
|
|
if source_template and os.path.exists(
|
|
|
|
os.path.join(source_template.dir_path, source_whitelist_filename)):
|
2013-03-16 17:23:22 +00:00
|
|
|
if verbose:
|
2015-05-02 18:13:28 +00:00
|
|
|
print >> sys.stderr, "--> Creating default whitelisted apps list: {0}". \
|
2013-03-16 17:23:22 +00:00
|
|
|
format(self.dir_path + '/' + vm_files["whitelisted_appmenus"])
|
2015-05-02 18:13:28 +00:00
|
|
|
shutil.copy(
|
|
|
|
os.path.join(source_template.dir_path, source_whitelist_filename),
|
|
|
|
os.path.join(self.dir_path, vm_files["whitelisted_appmenus"]))
|
2013-03-16 17:23:22 +00:00
|
|
|
|
2013-11-25 06:19:20 +00:00
|
|
|
if source_template and self.updateable:
|
2013-03-16 17:23:22 +00:00
|
|
|
if verbose:
|
2015-05-02 18:13:28 +00:00
|
|
|
print >> sys.stderr, "--> Copying the template's appmenus templates dir:\n{0} ==>\n{1}". \
|
|
|
|
format(source_template.appmenus_templates_dir,
|
|
|
|
self.appmenus_templates_dir)
|
2014-09-09 00:13:08 +00:00
|
|
|
if os.path.isdir(source_template.appmenus_templates_dir):
|
2015-05-02 18:13:28 +00:00
|
|
|
shutil.copytree(source_template.appmenus_templates_dir,
|
|
|
|
self.appmenus_templates_dir)
|
2014-09-09 00:13:08 +00:00
|
|
|
else:
|
|
|
|
os.mkdir(self.appmenus_templates_dir)
|
|
|
|
if os.path.isdir(source_template.appmenus_template_icons_dir):
|
2015-05-02 18:13:28 +00:00
|
|
|
shutil.copytree(source_template.appmenus_template_icons_dir,
|
|
|
|
self.appmenus_template_icons_dir)
|
2014-09-09 00:13:08 +00:00
|
|
|
else:
|
|
|
|
os.mkdir(self.appmenus_template_icons_dir)
|
2013-03-16 17:23:22 +00:00
|
|
|
|
|
|
|
# Create appmenus
|
2013-11-29 22:52:41 +00:00
|
|
|
self.appicons_create()
|
2014-09-09 00:13:08 +00:00
|
|
|
self.appmenus_create(verbose=verbose)
|
2013-03-16 17:23:22 +00:00
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
def QubesVm_clone_disk_files(self, src_vm, verbose):
|
2015-05-02 18:13:28 +00:00
|
|
|
if src_vm.updateable and src_vm.appmenus_templates_dir is not None and \
|
|
|
|
self.appmenus_templates_dir is not None:
|
2013-03-16 17:23:22 +00:00
|
|
|
if verbose:
|
2015-05-02 18:13:28 +00:00
|
|
|
print >> sys.stderr, "--> Copying the template's appmenus templates dir:\n{0} ==>\n{1}". \
|
|
|
|
format(src_vm.appmenus_templates_dir,
|
|
|
|
self.appmenus_templates_dir)
|
|
|
|
shutil.copytree(src_vm.appmenus_templates_dir,
|
|
|
|
self.appmenus_templates_dir)
|
2013-03-16 17:23:22 +00:00
|
|
|
|
2014-02-22 00:25:18 +00:00
|
|
|
if src_vm.updateable and src_vm.appmenus_template_icons_dir is not None \
|
|
|
|
and self.appmenus_template_icons_dir is not None and \
|
|
|
|
os.path.isdir(src_vm.appmenus_template_icons_dir):
|
|
|
|
if verbose:
|
|
|
|
print >> sys.stderr, "--> Copying the template's appmenus " \
|
2015-05-02 18:13:28 +00:00
|
|
|
"template icons dir:\n{0} ==>\n{1}". \
|
|
|
|
format(src_vm.appmenus_template_icons_dir,
|
|
|
|
self.appmenus_template_icons_dir)
|
|
|
|
shutil.copytree(src_vm.appmenus_template_icons_dir,
|
|
|
|
self.appmenus_template_icons_dir)
|
2014-02-22 00:25:18 +00:00
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
for whitelist in (
|
|
|
|
vm_files["appmenus_whitelist"],
|
|
|
|
'vm-' + vm_files["appmenus_whitelist"],
|
|
|
|
'netvm-' + vm_files["appmenus_whitelist"]):
|
|
|
|
if os.path.exists(os.path.join(src_vm.dir_path, whitelist)):
|
|
|
|
if verbose:
|
2015-05-02 18:13:28 +00:00
|
|
|
print >> sys.stderr, "--> Copying whitelisted apps list: {0}". \
|
2013-03-16 17:23:22 +00:00
|
|
|
format(whitelist)
|
|
|
|
shutil.copy(os.path.join(src_vm.dir_path, whitelist),
|
2015-05-02 18:13:28 +00:00
|
|
|
os.path.join(self.dir_path, whitelist))
|
2013-03-16 17:23:22 +00:00
|
|
|
|
|
|
|
# Create appmenus
|
2013-11-29 22:52:41 +00:00
|
|
|
self.appicons_create()
|
2014-09-09 00:13:08 +00:00
|
|
|
self.appmenus_create(verbose=verbose)
|
2013-03-16 17:23:22 +00:00
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
def QubesVm_remove_from_disk(self):
|
|
|
|
self.appmenus_remove()
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2013-11-29 22:52:41 +00:00
|
|
|
def QubesVm_label_setter(self, _):
|
|
|
|
self.appicons_create()
|
|
|
|
|
2014-04-16 14:59:47 +00:00
|
|
|
# Apparently desktop environments heavily caches the icons,
|
|
|
|
# see #751 for details
|
|
|
|
if os.environ.get("DESKTOP_SESSION", "") == "kde-plasma":
|
|
|
|
try:
|
2015-05-02 18:13:28 +00:00
|
|
|
os.unlink(os.path.expandvars(
|
|
|
|
"$HOME/.kde/cache-$HOSTNAME/icon-cache.kcache"))
|
2014-04-16 14:59:47 +00:00
|
|
|
except:
|
|
|
|
pass
|
|
|
|
try:
|
2015-05-02 18:13:28 +00:00
|
|
|
notify_object = dbus.SessionBus().get_object(
|
|
|
|
"org.freedesktop.Notifications",
|
|
|
|
"/org/freedesktop/Notifications")
|
2014-04-16 14:59:47 +00:00
|
|
|
notify_object.Notify(
|
|
|
|
"Qubes", 0, self.label.icon, "Qubes",
|
2015-05-02 18:13:28 +00:00
|
|
|
"You will need to log off and log in again for the VM icons "
|
|
|
|
"to update in the KDE launcher menu",
|
2014-04-16 14:59:47 +00:00
|
|
|
[], [], 10000,
|
|
|
|
dbus_interface="org.freedesktop.Notifications")
|
|
|
|
except:
|
|
|
|
pass
|
|
|
|
elif os.environ.get("DESKTOP_SESSION", "") == "xfce":
|
|
|
|
self.appmenus_remove()
|
|
|
|
self.appmenus_create()
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2013-12-04 02:03:48 +00:00
|
|
|
def QubesVm_appmenus_recreate(self):
|
2015-04-28 10:45:29 +00:00
|
|
|
"""
|
|
|
|
Force recreation of all appmenus and icons. For example when VM label
|
|
|
|
color was changed
|
|
|
|
"""
|
2013-12-04 02:03:48 +00:00
|
|
|
self.appmenus_remove()
|
2014-02-22 00:25:18 +00:00
|
|
|
self.appicons_remove()
|
|
|
|
self.appicons_create()
|
2013-12-04 02:03:48 +00:00
|
|
|
self.appmenus_create()
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2015-04-28 10:45:29 +00:00
|
|
|
def QubesVm_appmenus_update(self):
|
|
|
|
"""
|
|
|
|
Similar to appmenus_recreate, but do not touch unchanged files
|
|
|
|
"""
|
|
|
|
self.appmenus_remove()
|
|
|
|
self.appicons_create()
|
|
|
|
self.appicons_cleanup()
|
|
|
|
self.appmenus_create()
|
|
|
|
|
2015-05-02 18:13:28 +00:00
|
|
|
|
2014-05-05 20:26:53 +00:00
|
|
|
def QubesVm_set_attr(self, name, newvalue, oldvalue):
|
2014-05-05 14:37:33 +00:00
|
|
|
if name == 'internal':
|
2014-05-05 20:26:53 +00:00
|
|
|
if newvalue and not oldvalue:
|
2014-05-05 14:37:33 +00:00
|
|
|
self.appmenus_remove()
|
2014-05-05 20:26:53 +00:00
|
|
|
elif not newvalue and oldvalue:
|
2014-05-05 14:37:33 +00:00
|
|
|
self.appmenus_create()
|
|
|
|
|
2013-03-16 17:23:22 +00:00
|
|
|
# new methods
|
|
|
|
QubesVm.appmenus_create = QubesVm_appmenus_create
|
|
|
|
QubesVm.appmenus_remove = QubesVm_appmenus_remove
|
2013-12-04 02:03:48 +00:00
|
|
|
QubesVm.appmenus_recreate = QubesVm_appmenus_recreate
|
2015-04-28 10:45:29 +00:00
|
|
|
QubesVm.appmenus_update = QubesVm_appmenus_update
|
2013-11-29 22:52:41 +00:00
|
|
|
QubesVm.appicons_create = QubesVm_appicons_create
|
2015-05-02 21:49:40 +00:00
|
|
|
QubesVm.appicons_cleanup = QubesVm_appicons_cleanup
|
2013-11-29 22:52:41 +00:00
|
|
|
QubesVm.appicons_remove = QubesVm_appicons_remove
|
2013-03-16 17:23:22 +00:00
|
|
|
|
|
|
|
# hooks for existing methods
|
|
|
|
QubesVm.hooks_get_attrs_config.append(QubesVm_get_attrs_config)
|
|
|
|
QubesVm.hooks_pre_rename.append(QubesVm_pre_rename)
|
|
|
|
QubesVm.hooks_post_rename.append(QubesVm_post_rename)
|
|
|
|
QubesVm.hooks_create_on_disk.append(QubesVm_create_on_disk)
|
|
|
|
QubesVm.hooks_clone_disk_files.append(QubesVm_clone_disk_files)
|
|
|
|
QubesVm.hooks_remove_from_disk.append(QubesVm_remove_from_disk)
|
2013-11-29 22:52:41 +00:00
|
|
|
QubesVm.hooks_label_setter.append(QubesVm_label_setter)
|
2014-05-05 14:37:33 +00:00
|
|
|
QubesVm.hooks_set_attr.append(QubesVm_set_attr)
|