Skip to content

Commit 5d436c6

Browse files
authored
Merge pull request #307 from xing-yang/snapshot_status
Change SnapshotStatus enum to a boolean
2 parents 7a8d2d5 + 546096b commit 5d436c6

File tree

3 files changed

+326
-489
lines changed

3 files changed

+326
-489
lines changed

csi.proto

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,6 @@ 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.
777773
LIST_SNAPSHOTS = 6;
778774
// Plugins supporting volume cloning at the storage level MAY
779775
// report this capability. The source volume must be managed by
@@ -857,37 +853,10 @@ message Snapshot {
857853
// field is REQUIRED.
858854
int64 created_at = 4;
859855

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;
856+
// Indicates if a snapshot is ready to use as a
857+
// `volume_content_source` in a `CreateVolumeRequest`. The default
858+
// value is false. This field is REQUIRED.
859+
bool ready_to_use = 5;
891860
}
892861
message DeleteSnapshotRequest {
893862
// The ID of the snapshot to be deleted.
@@ -927,7 +896,8 @@ message ListSnapshotsRequest {
927896
// Identity information for a specific snapshot. This field is
928897
// OPTIONAL. It can be used to list only a specific snapshot.
929898
// ListSnapshots will return with current snapshot information
930-
// and will not block if the snapshot is being uploaded.
899+
// and will not block if the snapshot is being processed after
900+
// it is cut.
931901
string snapshot_id = 4;
932902
}
933903

0 commit comments

Comments
 (0)