-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNetwork.enums.gen.go
97 lines (75 loc) · 1.89 KB
/
Network.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
// This is a generated file. DO NOT EDIT manually.
package go_xen_client
//NetworkOperations: network_operations enum type
type NetworkOperations int
const(
NetworkOperationsAttaching NetworkOperations = iota //Indicates this network is attaching to a VIF or PIF
)
func (e NetworkOperations) String() string {
switch e {
case 0:
return "attaching"
default:
return ""
}
}
func ToNetworkOperations(strValue string) NetworkOperations {
switch strValue {
case "attaching":
return 0
default:
return -1
}
}
//NetworkDefaultLockingMode: network_default_locking_mode enum type
type NetworkDefaultLockingMode int
const(
NetworkDefaultLockingModeUnlocked NetworkDefaultLockingMode = iota //Treat all VIFs on this network with locking_mode = 'default' as if they have locking_mode = 'unlocked'
NetworkDefaultLockingModeDisabled //Treat all VIFs on this network with locking_mode = 'default' as if they have locking_mode = 'disabled'
)
func (e NetworkDefaultLockingMode) String() string {
switch e {
case 0:
return "unlocked"
case 1:
return "disabled"
default:
return ""
}
}
func ToNetworkDefaultLockingMode(strValue string) NetworkDefaultLockingMode {
switch strValue {
case "unlocked":
return 0
case "disabled":
return 1
default:
return -1
}
}
//NetworkPurpose: network_purpose enum type
type NetworkPurpose int
const(
NetworkPurposeNbd NetworkPurpose = iota //Network Block Device service using TLS
NetworkPurposeInsecureNbd //Network Block Device service without integrity or confidentiality: NOT RECOMMENDED
)
func (e NetworkPurpose) String() string {
switch e {
case 0:
return "nbd"
case 1:
return "insecure_nbd"
default:
return ""
}
}
func ToNetworkPurpose(strValue string) NetworkPurpose {
switch strValue {
case "nbd":
return 0
case "insecure_nbd":
return 1
default:
return -1
}
}