-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcrush_rule.proto
58 lines (47 loc) · 1.16 KB
/
crush_rule.proto
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
syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = "github.com/clyso/ceph-api/api/ceph;pb";
package ceph;
service CrushRule {
rpc CreateRule (CreateRuleRequest) returns (google.protobuf.Empty) {}
rpc DeleteRule (DeleteRuleRequest) returns (google.protobuf.Empty) {}
rpc GetRule (GetRuleRequest) returns (Rule) {}
rpc ListRules (google.protobuf.Empty) returns (ListRulesResponse) {}
}
enum PoolType {
replication = 0;
erasure = 1;
}
message Rule {
int64 rule_id = 1;
string rule_name = 2;
int64 ruleset = 3;
int64 type = 4;
int64 min_size = 5;
int64 max_size = 6;
repeated Step steps = 7;
}
message Step {
map<string, string> entries = 1;
}
// CREATE RULE
message CreateRuleRequest {
optional string device_class = 1;
string failure_domain = 2;
string name = 3;
PoolType pool_type = 4;
optional string profile = 5;
optional string root = 6;
}
// DELETE RULE
message DeleteRuleRequest {
string name = 1;
}
// GET RULE
message GetRuleRequest {
string name = 1;
}
// LIST RULES
message ListRulesResponse {
repeated Rule rules = 1;
}