forked from csi-addons/spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
replication.proto
155 lines (140 loc) · 6 KB
/
replication.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
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
145
146
147
148
149
150
151
152
153
154
155
syntax = "proto3";
package replication;
import "google/protobuf/descriptor.proto";
option go_package = ".;replication";
extend google.protobuf.FieldOptions {
// Indicates that a field MAY contain information that is sensitive
// and MUST be treated as such (e.g. not logged).
bool replication_secret = 1059;
}
// Controller holds the RPC Methods for replication and all the methods it
// exposes should be idempotent.
service Controller {
// EnableVolumeReplication RPC call to enable the volume replication.
rpc EnableVolumeReplication (EnableVolumeReplicationRequest)
returns (EnableVolumeReplicationResponse) {}
// DisableVolumeReplication RPC call to disable the volume replication.
rpc DisableVolumeReplication (DisableVolumeReplicationRequest)
returns (DisableVolumeReplicationResponse) {}
// PromoteVolume RPC call to promote the volume.
rpc PromoteVolume (PromoteVolumeRequest)
returns (PromoteVolumeResponse) {}
// DemoteVolume RPC call to demote the volume.
rpc DemoteVolume (DemoteVolumeRequest)
returns (DemoteVolumeResponse) {}
// ResyncVolume RPC call to resync the volume.
rpc ResyncVolume (ResyncVolumeRequest)
returns (ResyncVolumeResponse) {}
}
// EnableVolumeReplicationRequest holds the required information to enable
// replication on a volume.
message EnableVolumeReplicationRequest {
// The identifier for this volume, generated by the plugin during
// CreateVolume CSI RPC call.
// This field is REQUIRED.
// This field MUST contain enough information to uniquely identify
// this specific volume vs all other volumes supported by this plugin.
// This field SHALL be used by the CO in subsequent calls to refer to
// this volume.
string volume_id = 1;
// Plugin specific parameters passed in as opaque key-value pairs.
map<string, string> parameters = 2;
// Secrets required by the plugin to complete the request.
map<string, string> secrets = 3 [(replication_secret) = true];
}
// EnableVolumeReplicationResponse holds the information to send when
// replication is successfully enabled on a volume.
message EnableVolumeReplicationResponse {
}
// DisableVolumeReplicationRequest holds the required information to disable
// replication on a volume.
message DisableVolumeReplicationRequest {
// The identifier for this volume, generated by the plugin during
// CreateVolume CSI RPC call.
// This field is REQUIRED.
// This field MUST contain enough information to uniquely identify
// this specific volume vs all other volumes supported by this plugin.
// This field SHALL be used by the CO in subsequent calls to refer to
// this volume.
string volume_id = 1;
// Plugin specific parameters passed in as opaque key-value pairs.
map<string, string> parameters = 2;
// Secrets required by the plugin to complete the request.
map<string, string> secrets = 3 [(replication_secret) = true];
}
// DisableVolumeReplicationResponse holds the information to send when
// replication is successfully disabled on a volume.
message DisableVolumeReplicationResponse {
}
// PromoteVolumeRequest holds the required information to promote volume as a
// primary on local cluster.
message PromoteVolumeRequest {
// The identifier for this volume, generated by the plugin during
// CreateVolume CSI RPC call.
// This field is REQUIRED.
// This field MUST contain enough information to uniquely identify
// this specific volume vs all other volumes supported by this plugin.
// This field SHALL be used by the CO in subsequent calls to refer to
// this volume.
string volume_id = 1;
// This field is optional.
// Default value is false, force option to Promote the volume.
bool force = 2;
// Plugin specific parameters passed in as opaque key-value pairs.
map<string, string> parameters = 3;
// Secrets required by the plugin to complete the request.
map<string, string> secrets = 4 [(replication_secret) = true];
}
// PromoteVolumeResponse holds the information to send when
// volume is successfully promoted.
message PromoteVolumeResponse{
}
// DemoteVolumeRequest holds the required information to demote volume on local
// cluster.
message DemoteVolumeRequest {
// The identifier for this volume, generated by the plugin during
// CreateVolume CSI RPC call.
// This field is REQUIRED.
// This field MUST contain enough information to uniquely identify
// this specific volume vs all other volumes supported by this plugin.
// This field SHALL be used by the CO in subsequent calls to refer to
// this volume.
string volume_id = 1;
// This field is optional.
// Default value is false, force option to Demote the volume.
bool force = 2;
// Plugin specific parameters passed in as opaque key-value pairs.
map<string, string> parameters = 3;
// Secrets required by the plugin to complete the request.
map<string, string> secrets = 4 [(replication_secret) = true];
}
// DemoteVolumeResponse holds the information to send when
// volume is successfully demoted.
message DemoteVolumeResponse{
}
// ResyncVolumeRequest holds the required information to resync volume.
message ResyncVolumeRequest {
// The identifier for this volume, generated by the plugin during
// CreateVolume CSI RPC call.
// This field is REQUIRED.
// This field MUST contain enough information to uniquely identify
// this specific volume vs all other volumes supported by this plugin.
// This field SHALL be used by the CO in subsequent calls to refer to
// this volume.
string volume_id = 1;
// This field is optional.
// Default value is false, force option to Resync the volume.
bool force = 2;
// Plugin specific parameters passed in as opaque key-value pairs.
map<string, string> parameters = 3;
// Secrets required by the plugin to complete the request.
map<string, string> secrets = 4 [(replication_secret) = true];
}
// ResyncVolumeResponse holds the information to send when
// volume is successfully resynced.
message ResyncVolumeResponse{
// Indicates that the volume is ready to use.
// The default value is false.
// This field is REQUIRED.
bool ready = 1;
}