appvm.py 691 B

1234567891011121314151617181920212223
  1. #!/usr/bin/python2 -O
  2. # vim: fileencoding=utf-8
  3. import qubes.events
  4. import qubes.vm.qubesvm
  5. class AppVM(qubes.vm.qubesvm.QubesVM):
  6. '''Application VM'''
  7. template = qubes.VMProperty('template', load_stage=4,
  8. vmclass=qubes.vm.templatevm.TemplateVM,
  9. ls_width=31,
  10. doc='Template, on which this AppVM is based.')
  11. def __init__(self, *args, **kwargs):
  12. super(AppVM, self).__init__(*args, **kwargs)
  13. @qubes.events.handler('domain-loaded')
  14. def on_domain_loaded(self, event):
  15. # pylint: disable=unused-argument
  16. # Some additional checks for template based VM
  17. assert self.template
  18. #self.template.appvms.add(self) # XXX