appvm.py 491 B

123456789101112131415161718
  1. #!/usr/bin/python2 -O
  2. # vim: fileencoding=utf-8
  3. import qubes.vm.qubesvm
  4. class AppVM(qubes.vm.qubesvm.QubesVM):
  5. '''Application VM'''
  6. template = qubes.VMProperty('template', load_stage=4,
  7. vmclass=qubes.vm.templatevm.TemplateVM,
  8. doc='Template, on which this AppVM is based.')
  9. def __init__(self, D):
  10. super(AppVM, self).__init__(D)
  11. # Some additional checks for template based VM
  12. assert self.template
  13. self.template.appvms.add(self)