choices.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. from utilities.choices import ChoiceSet
  2. #
  3. # Clusters
  4. #
  5. class ClusterStatusChoices(ChoiceSet):
  6. key = 'Cluster.status'
  7. STATUS_PLANNED = 'planned'
  8. STATUS_STAGING = 'staging'
  9. STATUS_ACTIVE = 'active'
  10. STATUS_DECOMMISSIONING = 'decommissioning'
  11. STATUS_OFFLINE = 'offline'
  12. CHOICES = [
  13. (STATUS_PLANNED, 'Planned', 'cyan'),
  14. (STATUS_STAGING, 'Staging', 'blue'),
  15. (STATUS_ACTIVE, 'Active', 'green'),
  16. (STATUS_DECOMMISSIONING, 'Decommissioning', 'yellow'),
  17. (STATUS_OFFLINE, 'Offline', 'red'),
  18. ]
  19. #
  20. # VirtualMachines
  21. #
  22. class VirtualMachineStatusChoices(ChoiceSet):
  23. key = 'VirtualMachine.status'
  24. STATUS_OFFLINE = 'offline'
  25. STATUS_ACTIVE = 'active'
  26. STATUS_PLANNED = 'planned'
  27. STATUS_STAGED = 'staged'
  28. STATUS_FAILED = 'failed'
  29. STATUS_DECOMMISSIONING = 'decommissioning'
  30. CHOICES = [
  31. (STATUS_OFFLINE, 'Offline', 'gray'),
  32. (STATUS_ACTIVE, 'Active', 'green'),
  33. (STATUS_PLANNED, 'Planned', 'cyan'),
  34. (STATUS_STAGED, 'Staged', 'blue'),
  35. (STATUS_FAILED, 'Failed', 'red'),
  36. (STATUS_DECOMMISSIONING, 'Decommissioning', 'yellow'),
  37. ]