status.py 701 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from enum import IntEnum
  4. __author__ = 'James Iter'
  5. __date__ = '2017/3/22'
  6. __contact__ = 'james.iter.cn@gmail.com'
  7. __copyright__ = '(c) 2017 by James Iter.'
  8. class EmitKind(IntEnum):
  9. log = 0
  10. event = 1
  11. class GuestState(IntEnum):
  12. # 参考地址:
  13. # http://libvirt.org/docs/libvirt-appdev-guide-python/en-US/html/libvirt_application_development_guide_using_python-Guest_Domains-Information-State.html
  14. no_state = 0
  15. running = 1
  16. blocked = 2
  17. paused = 3
  18. shutdown = 4
  19. shutoff = 5
  20. crashed = 6
  21. pm_suspended = 7
  22. class LogLevel(IntEnum):
  23. critical = 0
  24. error = 1
  25. warn = 2
  26. info = 3
  27. debug = 4