Skip to content

Commit 8031f70

Browse files
committed
Add GetSnapshot RPC
1 parent 98819c4 commit 8031f70

File tree

4 files changed

+1452
-1167
lines changed

4 files changed

+1452
-1167
lines changed

csi.proto

+28
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ service Controller {
9494
rpc ListSnapshots (ListSnapshotsRequest)
9595
returns (ListSnapshotsResponse) {}
9696

97+
rpc GetSnapshot (GetSnapshotRequest)
98+
returns (GetSnapshotResponse) {
99+
option (alpha_method) = true;
100+
}
101+
97102
rpc ControllerExpandVolume (ControllerExpandVolumeRequest)
98103
returns (ControllerExpandVolumeResponse) {}
99104

@@ -1185,6 +1190,10 @@ message ControllerServiceCapability {
11851190
// Indicates the SP supports modifying volume with mutable
11861191
// parameters. See ControllerModifyVolume for details.
11871192
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];
1193+
1194+
// Indicates the SP supports the GetSnapshot RPC.
1195+
// This enables COs to fetch an existing snapshot.
1196+
GET_SNAPSHOT = 15 [(alpha_enum_value) = true];
11881197
}
11891198

11901199
Type type = 1;
@@ -1347,6 +1356,25 @@ message ListSnapshotsResponse {
13471356
// An empty string is equal to an unspecified field value.
13481357
string next_token = 2;
13491358
}
1359+
message GetSnapshotRequest {
1360+
option (alpha_message) = true;
1361+
1362+
// The ID of the snapshot to fetch current snapshot information for.
1363+
// This field is REQUIRED.
1364+
string snapshot_id = 1;
1365+
1366+
// Secrets required by plugin to complete GetSnapshot request.
1367+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
1368+
// section on how to use this field.
1369+
map<string, string> secrets = 2 [(csi_secret) = true];
1370+
}
1371+
1372+
message GetSnapshotResponse {
1373+
option (alpha_message) = true;
1374+
1375+
// This field is REQUIRED
1376+
Snapshot snapshot = 1;
1377+
}
13501378
message ControllerExpandVolumeRequest {
13511379
// The ID of the volume to expand. This field is REQUIRED.
13521380
string volume_id = 1;

0 commit comments

Comments
 (0)