-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSR.enums.gen.go
145 lines (118 loc) · 2.98 KB
/
SR.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// This is a generated file. DO NOT EDIT manually.
package go_xen_client
//StorageOperations: storage_operations enum type
type StorageOperations int
const(
StorageOperationsScan StorageOperations = iota //Scanning backends for new or deleted VDIs
StorageOperationsDestroy //Destroying the SR
StorageOperationsForget //Forgetting about SR
StorageOperationsPlug //Plugging a PBD into this SR
StorageOperationsUnplug //Unplugging a PBD from this SR
StorageOperationsUpdate //Refresh the fields on the SR
StorageOperationsVdiCreate //Creating a new VDI
StorageOperationsVdiIntroduce //Introducing a new VDI
StorageOperationsVdiDestroy //Destroying a VDI
StorageOperationsVdiResize //Resizing a VDI
StorageOperationsVdiClone //Cloneing a VDI
StorageOperationsVdiSnapshot //Snapshotting a VDI
StorageOperationsVdiMirror //Mirroring a VDI
StorageOperationsVdiEnableCbt //Enabling changed block tracking for a VDI
StorageOperationsVdiDisableCbt //Disabling changed block tracking for a VDI
StorageOperationsVdiDataDestroy //Deleting the data of the VDI
StorageOperationsVdiListChangedBlocks //Exporting a bitmap that shows the changed blocks between two VDIs
StorageOperationsVdiSetOnBoot //Setting the on_boot field of the VDI
StorageOperationsPbdCreate //Creating a PBD for this SR
StorageOperationsPbdDestroy //Destroying one of this SR's PBDs
)
func (e StorageOperations) String() string {
switch e {
case 0:
return "scan"
case 1:
return "destroy"
case 2:
return "forget"
case 3:
return "plug"
case 4:
return "unplug"
case 5:
return "update"
case 6:
return "vdi_create"
case 7:
return "vdi_introduce"
case 8:
return "vdi_destroy"
case 9:
return "vdi_resize"
case 10:
return "vdi_clone"
case 11:
return "vdi_snapshot"
case 12:
return "vdi_mirror"
case 13:
return "vdi_enable_cbt"
case 14:
return "vdi_disable_cbt"
case 15:
return "vdi_data_destroy"
case 16:
return "vdi_list_changed_blocks"
case 17:
return "vdi_set_on_boot"
case 18:
return "pbd_create"
case 19:
return "pbd_destroy"
default:
return ""
}
}
func ToStorageOperations(strValue string) StorageOperations {
switch strValue {
case "scan":
return 0
case "destroy":
return 1
case "forget":
return 2
case "plug":
return 3
case "unplug":
return 4
case "update":
return 5
case "vdi_create":
return 6
case "vdi_introduce":
return 7
case "vdi_destroy":
return 8
case "vdi_resize":
return 9
case "vdi_clone":
return 10
case "vdi_snapshot":
return 11
case "vdi_mirror":
return 12
case "vdi_enable_cbt":
return 13
case "vdi_disable_cbt":
return 14
case "vdi_data_destroy":
return 15
case "vdi_list_changed_blocks":
return 16
case "vdi_set_on_boot":
return 17
case "pbd_create":
return 18
case "pbd_destroy":
return 19
default:
return -1
}
}