Skip to content

Commit ad31f6e

Browse files
committed
Add error codes and address comments
1 parent 6f5c813 commit ad31f6e

File tree

2 files changed

+193
-44
lines changed

2 files changed

+193
-44
lines changed

csi.proto

+43-17
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,10 @@ message CreateVolumeRequest {
388388
// VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
389389
// choose where the provisioned volume is accessible from.
390390
TopologyRequirement accessibility_requirements = 7;
391+
392+
// The ID of the volume group where the volume will be added to.
393+
// This field is OPTIONAL.
394+
string volume_group_id = 8;
391395
}
392396

393397
// Specifies what source the volume will be created from. One of the
@@ -588,6 +592,10 @@ message Volume {
588592
// Indicates a volume accessible from both "zone" "Z2" and "zone" "Z3"
589593
// in the "region" "R1".
590594
repeated Topology accessible_topology = 5;
595+
596+
// The ID of the volume group where the volume belongs to.
597+
// This field is OPTIONAL.
598+
string volume_group_id = 6;
591599
}
592600

593601
message TopologyRequirement {
@@ -1069,18 +1077,6 @@ message CreateVolumeGroupRequest {
10691077
// This field is OPTIONAL. Refer to the `Secrets Requirements`
10701078
// section on how to use this field.
10711079
map<string, string> secrets = 3 [(csi_secret) = true];
1072-
1073-
// Phase 2
1074-
// If specified, a volume group will be created from the source group
1075-
// snapshot.
1076-
// This field is OPTIONAL.
1077-
// VolumeGroupSnapshot source_volume_group_snapshot = 4;
1078-
1079-
// Phase 2
1080-
// If specified, a volume group will be created from a list of
1081-
// existing volumes.
1082-
// This field is OPTIONAL.
1083-
// repeated string volume_id = 5;
10841080
}
10851081

10861082
message CreateVolumeGroupResponse {
@@ -1111,15 +1107,12 @@ message VolumeGroup {
11111107
// VolumeGroup is not empty.
11121108
// - Response from ModifyVolumeGroup if the VolumeGroup is not
11131109
// empty after modification.
1114-
// - Phase 2: Create a new volume group from a source group snapshot.
1115-
// - Phase 2: Create a new volume group and add a list of existing
1116-
// volumes to the group.
11171110
repeated .csi.v1.Volume volumes = 3;
11181111
}
11191112
message DeleteVolumeGroupRequest {
11201113
option (alpha_message) = true;
11211114

1122-
// The ID of the volume group to be deprovisioned.
1115+
// The ID of the volume group to be deleted.
11231116
// This field is REQUIRED.
11241117
string volume_group_id = 1;
11251118

@@ -1149,6 +1142,12 @@ message ModifyVolumeGroupRequest {
11491142
// be removed from the group.
11501143
// This field is OPTIONAL.
11511144
repeated string volume_ids = 2;
1145+
1146+
// Secrets required by plugin to complete volume group
1147+
// modification request.
1148+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
1149+
// section on how to use this field.
1150+
map<string, string> secrets = 3 [(csi_secret) = true];
11521151
}
11531152

11541153
message ModifyVolumeGroupResponse {
@@ -1165,6 +1164,12 @@ message ControllerGetVolumeGroupRequest {
11651164
// information for.
11661165
// This field is REQUIRED.
11671166
string volume_group_id = 1;
1167+
1168+
// Secrets required by plugin to complete ControllerGetVolumeGroup
1169+
// request.
1170+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
1171+
// section on how to use this field.
1172+
map<string, string> secrets = 2 [(csi_secret) = true];
11681173
}
11691174

11701175
message ControllerGetVolumeGroupResponse {
@@ -1191,6 +1196,11 @@ message ListVolumeGroupsRequest {
11911196
// the next page of entries. This field is OPTIONAL.
11921197
// An empty string is equal to an unspecified field value.
11931198
string starting_token = 2;
1199+
1200+
// Secrets required by plugin to complete ListVolumeGroup request.
1201+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
1202+
// section on how to use this field.
1203+
map<string, string> secrets = 3 [(csi_secret) = true];
11941204
}
11951205

11961206
message ListVolumeGroupsResponse {
@@ -1282,7 +1292,7 @@ message VolumeGroupSnapshot {
12821292
message DeleteVolumeGroupSnapshotRequest {
12831293
option (alpha_message) = true;
12841294

1285-
// The ID of the group snapshot to be deprovisioned.
1295+
// The ID of the group snapshot to be deleted.
12861296
// This field is REQUIRED.
12871297
string group_snapshot_id = 1;
12881298

@@ -1303,6 +1313,12 @@ message ControllerGetVolumeGroupSnapshotRequest {
13031313
// information for.
13041314
// This field is REQUIRED.
13051315
string group_snapshot_id = 1;
1316+
1317+
// Secrets required by plugin to complete
1318+
// ControllerGetVolumeGroupSnapshot request.
1319+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
1320+
// section on how to use this field.
1321+
map<string, string> secrets = 2 [(csi_secret) = true];
13061322
}
13071323

13081324
message ControllerGetVolumeGroupSnapshotResponse {
@@ -1329,6 +1345,12 @@ message ListVolumeGroupSnapshotsRequest {
13291345
// call to get the next page of entries. This field is OPTIONAL.
13301346
// An empty string is equal to an unspecified field value.
13311347
string starting_token = 2;
1348+
1349+
// Secrets required by plugin to complete ListVolumeGroupSnapshot
1350+
// request.
1351+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
1352+
// section on how to use this field.
1353+
map<string, string> secrets = 3 [(csi_secret) = true];
13321354
}
13331355

13341356
message ListVolumeGroupSnapshotsResponse {
@@ -1537,6 +1559,10 @@ message Snapshot {
15371559
// `volume_content_source` in a `CreateVolumeRequest`. The default
15381560
// value is false. This field is REQUIRED.
15391561
bool ready_to_use = 5;
1562+
1563+
// The ID of the volume group snapshot that this snapshot is part of.
1564+
// This field is OPTIONAL.
1565+
string group_snapshot_id = 6;
15401566
}
15411567
message DeleteSnapshotRequest {
15421568
// The ID of the snapshot to be deleted.

0 commit comments

Comments
 (0)