-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHost.enums.gen.go
118 lines (94 loc) · 2.51 KB
/
Host.enums.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// This is a generated file. DO NOT EDIT manually.
package go_xen_client
//HostAllowedOperations: host_allowed_operations enum type
type HostAllowedOperations int
const(
HostAllowedOperationsProvision HostAllowedOperations = iota //Indicates this host is able to provision another VM
HostAllowedOperationsEvacuate //Indicates this host is evacuating
HostAllowedOperationsShutdown //Indicates this host is in the process of shutting itself down
HostAllowedOperationsReboot //Indicates this host is in the process of rebooting
HostAllowedOperationsPowerOn //Indicates this host is in the process of being powered on
HostAllowedOperationsVmStart //This host is starting a VM
HostAllowedOperationsVmResume //This host is resuming a VM
HostAllowedOperationsVmMigrate //This host is the migration target of a VM
)
func (e HostAllowedOperations) String() string {
switch e {
case 0:
return "provision"
case 1:
return "evacuate"
case 2:
return "shutdown"
case 3:
return "reboot"
case 4:
return "power_on"
case 5:
return "vm_start"
case 6:
return "vm_resume"
case 7:
return "vm_migrate"
default:
return ""
}
}
func ToHostAllowedOperations(strValue string) HostAllowedOperations {
switch strValue {
case "provision":
return 0
case "evacuate":
return 1
case "shutdown":
return 2
case "reboot":
return 3
case "power_on":
return 4
case "vm_start":
return 5
case "vm_resume":
return 6
case "vm_migrate":
return 7
default:
return -1
}
}
//HostDisplay: host_display enum type
type HostDisplay int
const(
HostDisplayEnabled HostDisplay = iota //This host is outputting its console to a physical display device
HostDisplayDisableOnReboot //The host will stop outputting its console to a physical display device on next boot
HostDisplayDisabled //This host is not outputting its console to a physical display device
HostDisplayEnableOnReboot //The host will start outputting its console to a physical display device on next boot
)
func (e HostDisplay) String() string {
switch e {
case 0:
return "enabled"
case 1:
return "disable_on_reboot"
case 2:
return "disabled"
case 3:
return "enable_on_reboot"
default:
return ""
}
}
func ToHostDisplay(strValue string) HostDisplay {
switch strValue {
case "enabled":
return 0
case "disable_on_reboot":
return 1
case "disabled":
return 2
case "enable_on_reboot":
return 3
default:
return -1
}
}