appvm.py 512 B

12345678910111213141516171819
  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. ls_width=31,
  9. doc='Template, on which this AppVM is based.')
  10. def __init__(self, D):
  11. super(AppVM, self).__init__(D)
  12. # Some additional checks for template based VM
  13. assert self.template
  14. self.template.appvms.add(self)