-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcluster.proto
72 lines (58 loc) · 2.02 KB
/
cluster.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
syntax = "proto3";
option go_package = "github.com/clyso/ceph-api/api/ceph;pb";
package ceph;
// import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
service Cluster {
// Get cluster status
rpc GetStatus (google.protobuf.Empty) returns (ClusterStatus);
// Update cluster status
rpc UpdateStatus (ClusterStatus) returns (google.protobuf.Empty);
rpc GetUsers (google.protobuf.Empty) returns (ClusterUsers);
rpc UpdateUser (UpdateClusterUserReq) returns (google.protobuf.Empty);
rpc CreateUser (CreateClusterUserReq) returns (google.protobuf.Empty);
rpc ExportUser (ExportClusterUserReq) returns (ExportClusterUserResp);
rpc DeleteUser (DeleteClusterUserReq) returns (google.protobuf.Empty);
}
message ClusterStatus{
enum Status {
INSTALLED=0;
POST_INSTALLED=1;
}
Status status = 1;
}
message ClusterUsers{
repeated ClusterUser users =1;
}
message ClusterUser {
// entity, e.g: "client.admin"
string entity = 1;
// user capabilities, e.g: {"mon": "allow r","osd":"allow rw pool=liverpool"}
map<string, string> caps = 2;
// keyring
string key = 3;
}
message UpdateClusterUserReq{
// user capabilities, e.g: {"mon": "allow r","osd":"allow rw pool=liverpool"}
map<string, string> capabilities = 1;
// entity, e.g: "client.admin"
string user_entity = 2 [json_name = "user_entity"];
}
message CreateClusterUserReq{
// user capabilities, e.g: {"mon": "allow r","osd":"allow rw pool=liverpool"}
map<string, string> capabilities = 1;
// entity, e.g: "client.admin"
string user_entity = 2 [json_name = "user_entity"];
// keyring file format - if import_data is set then other fields ignored
bytes import_data = 3 [json_name = "import_data"];
}
message ExportClusterUserReq{
repeated string entities = 1;
}
message DeleteClusterUserReq{
string user_entity = 1 [json_name = "user_entity"];
}
message ExportClusterUserResp{
// User key and capabilities in Ceph config file format
bytes data = 1;
}