Skip to content

Commit d9fd839

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 7a8d2d5 commit d9fd839

File tree

3 files changed

+322
-474
lines changed

3 files changed

+322
-474
lines changed

csi.proto

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,10 @@ message ControllerServiceCapability {
770770
// CREATE_DELETE_SNAPSHOT MUST support creating volume from
771771
// snapshot.
772772
CREATE_DELETE_SNAPSHOT = 5;
773-
// LIST_SNAPSHOTS is NOT REQUIRED. For plugins that need to upload
774-
// a snapshot after it is being cut, LIST_SNAPSHOTS COULD be used
775-
// with the snapshot_id as the filter to query whether the
776-
// uploading process is complete or not.
773+
// LIST_SNAPSHOTS is NOT REQUIRED. For plugins that need to
774+
// process a snapshot after it is being cut, LIST_SNAPSHOTS
775+
// COULD be used with the snapshot_id as the filter to query
776+
// whether the processing is complete or not.
777777
LIST_SNAPSHOTS = 6;
778778
// Plugins supporting volume cloning at the storage level MAY
779779
// report this capability. The source volume must be managed by
@@ -857,37 +857,9 @@ message Snapshot {
857857
// field is REQUIRED.
858858
int64 created_at = 4;
859859

860-
// The status of a snapshot.
861-
SnapshotStatus status = 5;
862-
}
863-
864-
// The status of a snapshot.
865-
message SnapshotStatus {
866-
enum Type {
867-
UNKNOWN = 0;
868-
// A snapshot is ready for use.
869-
READY = 1;
870-
// A snapshot is cut and is now being uploaded.
871-
// Some cloud providers and storage systems uploads the snapshot
872-
// to the cloud after the snapshot is cut. During this phase,
873-
// `thaw` can be done so the application can be running again if
874-
// `freeze` was done before taking the snapshot.
875-
UPLOADING = 2;
876-
// An error occurred during the snapshot uploading process.
877-
// This error status is specific for uploading because
878-
// `CreateSnaphot` is a blocking call before the snapshot is
879-
// cut and therefore it SHOULD NOT come back with an error
880-
// status when an error occurs. Instead a gRPC error code SHALL
881-
// be returned by `CreateSnapshot` when an error occurs before
882-
// a snapshot is cut.
883-
ERROR_UPLOADING = 3;
884-
}
885-
// This field is REQUIRED.
886-
Type type = 1;
887-
888-
// Additional information to describe why a snapshot ended up in the
889-
// `ERROR_UPLOADING` status. This field is OPTIONAL.
890-
string details = 2;
860+
// Indicates if a snapshot is ready to use. The default value is
861+
// false. This field is REQUIRED.
862+
bool is_ready_to_use = 5;
891863
}
892864
message DeleteSnapshotRequest {
893865
// The ID of the snapshot to be deleted.
@@ -927,7 +899,8 @@ message ListSnapshotsRequest {
927899
// Identity information for a specific snapshot. This field is
928900
// OPTIONAL. It can be used to list only a specific snapshot.
929901
// ListSnapshots will return with current snapshot information
930-
// and will not block if the snapshot is being uploaded.
902+
// and will not block if the snapshot is being processed after
903+
// it is cut.
931904
string snapshot_id = 4;
932905
}
933906

0 commit comments

Comments
 (0)