Skip to content

Commit

Permalink
Add error codes and address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xing-yang committed Sep 19, 2022
1 parent cf06518 commit f8764d1
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 44 deletions.
60 changes: 43 additions & 17 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ message CreateVolumeRequest {
// VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
// choose where the provisioned volume is accessible from.
TopologyRequirement accessibility_requirements = 7;

// The ID of the volume group where the volume will be added to.
// This field is OPTIONAL.
string volume_group_id = 8;
}

// Specifies what source the volume will be created from. One of the
Expand Down Expand Up @@ -588,6 +592,10 @@ message Volume {
// Indicates a volume accessible from both "zone" "Z2" and "zone" "Z3"
// in the "region" "R1".
repeated Topology accessible_topology = 5;

// The ID of the volume group where the volume belongs to.
// This field is OPTIONAL.
string volume_group_id = 6;
}

message TopologyRequirement {
Expand Down Expand Up @@ -1069,18 +1077,6 @@ message CreateVolumeGroupRequest {
// This field is OPTIONAL. Refer to the `Secrets Requirements`
// section on how to use this field.
map<string, string> secrets = 3 [(csi_secret) = true];

// Phase 2
// If specified, a volume group will be created from the source group
// snapshot.
// This field is OPTIONAL.
// VolumeGroupSnapshot source_volume_group_snapshot = 4;

// Phase 2
// If specified, a volume group will be created from a list of
// existing volumes.
// This field is OPTIONAL.
// repeated string volume_id = 5;
}

message CreateVolumeGroupResponse {
Expand Down Expand Up @@ -1111,15 +1107,12 @@ message VolumeGroup {
// VolumeGroup is not empty.
// - Response from ModifyVolumeGroup if the VolumeGroup is not
// empty after modification.
// - Phase 2: Create a new volume group from a source group snapshot.
// - Phase 2: Create a new volume group and add a list of existing
// volumes to the group.
repeated .csi.v1.Volume volumes = 3;
}
message DeleteVolumeGroupRequest {
option (alpha_message) = true;

// The ID of the volume group to be deprovisioned.
// The ID of the volume group to be deleted.
// This field is REQUIRED.
string volume_group_id = 1;

Expand Down Expand Up @@ -1149,6 +1142,12 @@ message ModifyVolumeGroupRequest {
// be removed from the group.
// This field is OPTIONAL.
repeated string volume_ids = 2;

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

message ModifyVolumeGroupResponse {
Expand All @@ -1165,6 +1164,12 @@ message ControllerGetVolumeGroupRequest {
// information for.
// This field is REQUIRED.
string volume_group_id = 1;

// Secrets required by plugin to complete ControllerGetVolumeGroup
// 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 ControllerGetVolumeGroupResponse {
Expand All @@ -1191,6 +1196,11 @@ message ListVolumeGroupsRequest {
// the next page of entries. This field is OPTIONAL.
// An empty string is equal to an unspecified field value.
string starting_token = 2;

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

message ListVolumeGroupsResponse {
Expand Down Expand Up @@ -1282,7 +1292,7 @@ message VolumeGroupSnapshot {
message DeleteVolumeGroupSnapshotRequest {
option (alpha_message) = true;

// The ID of the group snapshot to be deprovisioned.
// The ID of the group snapshot to be deleted.
// This field is REQUIRED.
string group_snapshot_id = 1;

Expand All @@ -1303,6 +1313,12 @@ message ControllerGetVolumeGroupSnapshotRequest {
// information for.
// This field is REQUIRED.
string group_snapshot_id = 1;

// Secrets required by plugin to complete
// ControllerGetVolumeGroupSnapshot 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 ControllerGetVolumeGroupSnapshotResponse {
Expand All @@ -1329,6 +1345,12 @@ message ListVolumeGroupSnapshotsRequest {
// call to get the next page of entries. This field is OPTIONAL.
// An empty string is equal to an unspecified field value.
string starting_token = 2;

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

message ListVolumeGroupSnapshotsResponse {
Expand Down Expand Up @@ -1537,6 +1559,10 @@ message Snapshot {
// `volume_content_source` in a `CreateVolumeRequest`. The default
// value is false. This field is REQUIRED.
bool ready_to_use = 5;

// The ID of the volume group snapshot that this snapshot is part of.
// This field is OPTIONAL.
string group_snapshot_id = 6;
}
message DeleteSnapshotRequest {
// The ID of the snapshot to be deleted.
Expand Down
Loading

0 comments on commit f8764d1

Please sign in to comment.