Skip to content

Commit 23eed7e

Browse files
committed
Change SnapshotStatus enum to a boolean
This PR changes SnapshotStatus enum to a boolean is_ready_to_use and tries to use "processing" instead of "uploading" if possible to make it less specific.
1 parent 14a3392 commit 23eed7e

File tree

3 files changed

+323
-476
lines changed

3 files changed

+323
-476
lines changed

csi.proto

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -769,10 +769,10 @@ message ControllerServiceCapability {
769769
// CREATE_DELETE_SNAPSHOT MUST support creating volume from
770770
// snapshot.
771771
CREATE_DELETE_SNAPSHOT = 5;
772-
// LIST_SNAPSHOTS is NOT REQUIRED. For plugins that need to upload
773-
// a snapshot after it is being cut, LIST_SNAPSHOTS COULD be used
774-
// with the snapshot_id as the filter to query whether the
775-
// uploading process is complete or not.
772+
// LIST_SNAPSHOTS is NOT REQUIRED. For plugins that need to
773+
// process a snapshot after it is being cut, LIST_SNAPSHOTS
774+
// COULD be used with the snapshot_id as the filter to query
775+
// whether the processing is complete or not.
776776
LIST_SNAPSHOTS = 6;
777777
}
778778

@@ -847,37 +847,9 @@ message Snapshot {
847847
// field is REQUIRED.
848848
int64 created_at = 4;
849849

850-
// The status of a snapshot.
851-
SnapshotStatus status = 5;
852-
}
853-
854-
// The status of a snapshot.
855-
message SnapshotStatus {
856-
enum Type {
857-
UNKNOWN = 0;
858-
// A snapshot is ready for use.
859-
READY = 1;
860-
// A snapshot is cut and is now being uploaded.
861-
// Some cloud providers and storage systems uploads the snapshot
862-
// to the cloud after the snapshot is cut. During this phase,
863-
// `thaw` can be done so the application can be running again if
864-
// `freeze` was done before taking the snapshot.
865-
UPLOADING = 2;
866-
// An error occurred during the snapshot uploading process.
867-
// This error status is specific for uploading because
868-
// `CreateSnaphot` is a blocking call before the snapshot is
869-
// cut and therefore it SHOULD NOT come back with an error
870-
// status when an error occurs. Instead a gRPC error code SHALL
871-
// be returned by `CreateSnapshot` when an error occurs before
872-
// a snapshot is cut.
873-
ERROR_UPLOADING = 3;
874-
}
875-
// This field is REQUIRED.
876-
Type type = 1;
877-
878-
// Additional information to describe why a snapshot ended up in the
879-
// `ERROR_UPLOADING` status. This field is OPTIONAL.
880-
string details = 2;
850+
// Indicates if a snapshot is ready to use. The default value is
851+
// false. This field is REQUIRED.
852+
bool is_ready_to_use = 5;
881853
}
882854
message DeleteSnapshotRequest {
883855
// The ID of the snapshot to be deleted.
@@ -917,7 +889,8 @@ message ListSnapshotsRequest {
917889
// Identity information for a specific snapshot. This field is
918890
// OPTIONAL. It can be used to list only a specific snapshot.
919891
// ListSnapshots will return with current snapshot information
920-
// and will not block if the snapshot is being uploaded.
892+
// and will not block if the snapshot is being processed after
893+
// it is cut.
921894
string snapshot_id = 4;
922895
}
923896

0 commit comments

Comments
 (0)