-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
devices.go
108 lines (92 loc) · 3.56 KB
/
devices.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
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
type RTDevices struct {
Devices []RTDevice `json:"devices"`
}
type RTDevice struct {
Name string `json:"name,omitempty"`
Device string `json:"device,omitempty"`
Psize int `json:"psize,omitempty"`
MdPsize int `json:"mdpsize,omitempty"`
MDReserved int `json:"mdcache_reserved,omitempty"`
HDDReadAhead int `json:"hdd_readahead,omitempty"`
VerifyChid int `json:"verify_chid"`
Journal string `json:"journal,omitempty"`
Metadata string `json:"metadata,omitempty"`
Bcache int `json:"bcache,omitempty"`
BcacheWritearound int `json:"bcache_writearound"`
PlevelOverride int `json:"plevel_override,omitempty"`
Sync int `json:"sync"`
}
type RtlfsDevices struct {
Devices []RtlfsDevice `json:"devices"`
}
type RtlfsDevice struct {
Name string `json:"name"`
Path string `json:"path"`
Psize int `json:"psize,omitempty"`
Maxsize uint64 `json:"maxsize,omitempty"`
VerifyChid int `json:"verify_chid"`
PlevelOverride int `json:"plevel_override,omitempty"`
CheckMountpoint int `json:"check_mountpoint"`
Sync int `json:"sync"`
}
type CcowTenant struct {
FailureDomain int `json:"failure_domain"`
}
type CcowNetwork struct {
BrokerInterfaces string `json:"broker_interfaces"`
ServerUnixSocket string `json:"server_unix_socket"`
BrokerIP4addr string `json:"broker_ip4addr,omitempty"`
ServerIP4addr string `json:"server_ip4addr,omitempty"`
}
type CcowTrlog struct {
Interval int `json:"interval,omitempty"`
Quarantine int `json:"quarantine,omitempty"`
}
type CcowConf struct {
Trlog CcowTrlog `json:"trlog,omitempty"`
Tenant CcowTenant `json:"tenant"`
Network CcowNetwork `json:"network"`
}
type CcowdNetwork struct {
ServerInterfaces string `json:"server_interfaces"`
ServerUnixSocket string `json:"server_unix_socket"`
ServerIP4addr string `json:"server_ip4addr,omitempty"`
}
type CcowdBgConfig struct {
TrlogDeleteAfterHours int `json:"trlog_delete_after_hours,omitempty"`
SpeculativeBackrefTimeout int `json:"speculative_backref_timeout,omitempty"`
}
type CcowdConf struct {
BgConfig CcowdBgConfig `json:"repdev_bg_config,omitempty"`
Zone int `json:"zone,omitempty"`
Network CcowdNetwork `json:"network"`
Transport []string `json:"transport"`
}
type AuditdConf struct {
IsAggregator int `json:"is_aggregator"`
}
type SetupNode struct {
Ccow CcowConf `json:"ccow"`
Ccowd CcowdConf `json:"ccowd"`
Auditd AuditdConf `json:"auditd"`
Ipv4Autodetect int `json:"ipv4_autodetect,omitempty"`
RtlfsAutodetect string `json:"rtlfs_autodetect,omitempty"`
ClusterNodes []string `json:"cluster_nodes,omitempty"`
Rtrd RTDevices `json:"rtrd"`
RtrdSlaves []RTDevices `json:"rtrdslaves"`
Rtlfs RtlfsDevices `json:"rtlfs"`
NodeType string `json:"nodeType"`
}