Skip to content

Add GetSnapshot RPC #586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ service Controller {
rpc ListSnapshots (ListSnapshotsRequest)
returns (ListSnapshotsResponse) {}

rpc GetSnapshot (GetSnapshotRequest)
returns (GetSnapshotResponse) {
option (alpha_method) = true;
}

rpc ControllerExpandVolume (ControllerExpandVolumeRequest)
returns (ControllerExpandVolumeResponse) {}

Expand Down Expand Up @@ -1185,6 +1190,10 @@ message ControllerServiceCapability {
// Indicates the SP supports modifying volume with mutable
// parameters. See ControllerModifyVolume for details.
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];

// Indicates the SP supports the GetSnapshot RPC.
// This enables COs to fetch an existing snapshot.
GET_SNAPSHOT = 15 [(alpha_enum_value) = true];
}

Type type = 1;
Expand Down Expand Up @@ -1347,6 +1356,25 @@ message ListSnapshotsResponse {
// An empty string is equal to an unspecified field value.
string next_token = 2;
}
message GetSnapshotRequest {
option (alpha_message) = true;

// The ID of the snapshot to fetch current snapshot information for.
// This field is REQUIRED.
string snapshot_id = 1;

// Secrets required by plugin to complete GetSnapshot request.
// This field is OPTIONAL. Refer to the `Secrets Requirements`
// section on how to use this field.
map<string, string> secrets = 2 [(csi_secret) = true];
}

message GetSnapshotResponse {
option (alpha_message) = true;

// This field is REQUIRED
Snapshot snapshot = 1;
}
message ControllerExpandVolumeRequest {
// The ID of the volume to expand. This field is REQUIRED.
string volume_id = 1;
Expand Down
Loading