Skip to content

Commit 70a7fb1

Browse files
committed
Renamed capability for ModifyVolumeGroupMembership
Addressed review comments
1 parent 9e3910d commit 70a7fb1

File tree

3 files changed

+2395
-597
lines changed

3 files changed

+2395
-597
lines changed

Diff for: csi.proto

+39-28
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ service Controller {
111111
option (alpha_method) = true;
112112
}
113113

114-
rpc ModifyVolumeGroup(ModifyVolumeGroupRequest)
115-
returns (ModifyVolumeGroupResponse) {
114+
rpc ModifyVolumeGroupMembership(ModifyVolumeGroupMembershipRequest)
115+
returns (ModifyVolumeGroupMembershipResponse) {
116116
option (alpha_method) = true;
117117
}
118118

@@ -390,9 +390,11 @@ message CreateVolumeRequest {
390390
// choose where the provisioned volume is accessible from.
391391
TopologyRequirement accessibility_requirements = 7;
392392

393-
// The ID of the volume group where the volume will be added to.
393+
// The IDs of the volume groups where the volume will be added to.
394+
// Note that it is possible for a volume to be placed in one or more
395+
// groups on the storage backend even if this field is not specified.
394396
// This field is OPTIONAL.
395-
string volume_group_id = 8;
397+
repeated string volume_group_id = 8 [(alpha_field) = true];
396398
}
397399

398400
// Specifies what source the volume will be created from. One of the
@@ -594,9 +596,11 @@ message Volume {
594596
// in the "region" "R1".
595597
repeated Topology accessible_topology = 5;
596598

597-
// The ID of the volume group where the volume belongs to.
599+
// The IDs of the volume groups where the volume belongs to.
600+
// Note that it is possible for a volume to be placed in one or more
601+
// groups on the storage backend even if this field is not specified.
598602
// This field is OPTIONAL.
599-
string volume_group_id = 6;
603+
repeated string volume_group_id = 6 [(alpha_field) = true];
600604
}
601605

602606
message TopologyRequirement {
@@ -1101,14 +1105,14 @@ message VolumeGroup {
11011105

11021106
// Underlying volumes in this group. The same definition in CSI
11031107
// Volume.
1104-
// This field is REQUIRED.
1108+
// This field is OPTIONAL.
11051109
// To support the creation of an empty group, this list can be empty.
11061110
// However, this field is not empty in the following cases:
11071111
// - Response from ListVolumeGroups or ControllerGetVolumeGroup if the
11081112
// VolumeGroup is not empty.
1109-
// - Response from ModifyVolumeGroup if the VolumeGroup is not
1110-
// empty after modification.
1111-
repeated .csi.v1.Volume volumes = 3;
1113+
// - Response from ModifyVolumeGroupMembership if the
1114+
// VolumeGroup is not empty after modification.
1115+
repeated Volume volumes = 3;
11121116
}
11131117
message DeleteVolumeGroupRequest {
11141118
option (alpha_message) = true;
@@ -1117,8 +1121,8 @@ message DeleteVolumeGroupRequest {
11171121
// This field is REQUIRED.
11181122
string volume_group_id = 1;
11191123

1120-
// Secrets required by plugin to complete volume group deletion
1121-
// request.
1124+
// Secrets required by plugin to complete volume group
1125+
// deletion request.
11221126
// This field is OPTIONAL. Refer to the `Secrets Requirements`
11231127
// section on how to use this field.
11241128
map<string, string> secrets = 2 [(csi_secret) = true];
@@ -1128,7 +1132,7 @@ message DeleteVolumeGroupResponse {
11281132
option (alpha_message) = true;
11291133
// Intentionally empty.
11301134
}
1131-
message ModifyVolumeGroupRequest {
1135+
message ModifyVolumeGroupMembershipRequest {
11321136
option (alpha_message) = true;
11331137

11341138
// The ID of the volume group to be modified.
@@ -1151,7 +1155,7 @@ message ModifyVolumeGroupRequest {
11511155
map<string, string> secrets = 3 [(csi_secret) = true];
11521156
}
11531157

1154-
message ModifyVolumeGroupResponse {
1158+
message ModifyVolumeGroupMembershipResponse {
11551159
option (alpha_message) = true;
11561160

11571161
// Contains all attributes of the modified volume group.
@@ -1240,14 +1244,17 @@ message CreateVolumeGroupSnapshotRequest {
12401244
// take a group snapshot
12411245
repeated string volume_ids = 3;
12421246

1243-
// secrets required for snapshot creation (pulled from
1244-
// VolumeSnapshotClass)
1245-
// This field is OPTIONAL.
1247+
// Secrets required by plugin to complete volume group snapshot
1248+
// creation request.
1249+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
1250+
// section on how to use this field.
12461251
map<string, string> secrets = 4 [(.csi.v1.csi_secret) = true];
12471252

1248-
// params passed from VolumeSnapshotClass
1249-
// This field is OPTIONAL.
1253+
// Plugin specific parameters passed in as opaque key-value pairs.
1254+
// This field is OPTIONAL. The Plugin is responsible for parsing and
1255+
// validating these parameters. COs will treat these as opaque.
12501256
map<string, string> parameters = 5;
1257+
12511258
}
12521259

12531260
message CreateVolumeGroupSnapshotResponse {
@@ -1268,7 +1275,7 @@ message VolumeGroupSnapshot {
12681275
// A list of snapshots created. Snapshot is the same
12691276
// definition as Snapshot definition used in CSI.
12701277
// This field is OPTIONAL.
1271-
repeated .csi.v1.Snapshot snapshots = 2;
1278+
repeated Snapshot snapshots = 2;
12721279

12731280
// Identity information for the source volume group. Currently, only
12741281
// support the case that source is volume group. This field is
@@ -1279,8 +1286,7 @@ message VolumeGroupSnapshot {
12791286
// This field is REQUIRED.
12801287
bool ready_to_use = 4;
12811288

1282-
// Timestamp when the point-in-time consistency group snapshot is
1283-
// taken.
1289+
// Timestamp when the volume group snapshot is taken.
12841290
// This field is REQUIRED.
12851291
.google.protobuf.Timestamp creation_time = 5;
12861292

@@ -1458,30 +1464,35 @@ message ControllerServiceCapability {
14581464
// Indicates that the controller plugin supports adding an
14591465
// existing volume to a volume group and removing a volume from
14601466
// a volume group without deleting it.
1461-
VOLUME_GROUP_ADD_REMOVE_EXISTING_VOLUME = 15
1467+
MODIFY_VOLUME_GROUP_MEMBERSHIP = 15
1468+
[(alpha_enum_value) = true];
1469+
1470+
// Indicates that the controller plugin supports creating and
1471+
// deleting a volume group snapshot.
1472+
CREATE_DELETE_VOLUME_GROUP_SNAPSHOT = 16
14621473
[(alpha_enum_value) = true];
14631474

14641475
// Indicates whether the controller plugin supports creating a
14651476
// volume from an individual volume snapshot if the volume
14661477
// snapshot is part of a VolumeGroupSnapshot.
14671478
// Use cases: selective restore, advanced recovery, etc.
1468-
INDIVIDUAL_SNAPSHOT_RESTORE = 16 [(alpha_enum_value) = true];
1479+
INDIVIDUAL_SNAPSHOT_RESTORE = 17 [(alpha_enum_value) = true];
14691480

14701481
// Indicates that the controller plugin supports getting details
14711482
// of a volume group.
1472-
GET_VOLUME_GROUP = 17 [(alpha_enum_value) = true];
1483+
GET_VOLUME_GROUP = 18 [(alpha_enum_value) = true];
14731484

14741485
// Indicates that the controller plugin supports getting details
14751486
// of a volume group snapshot.
1476-
GET_VOLUME_GROUP_SNAPSHOT = 18 [(alpha_enum_value) = true];
1487+
GET_VOLUME_GROUP_SNAPSHOT = 19 [(alpha_enum_value) = true];
14771488

14781489
// Indicates that the controller plugin supports getting details
14791490
// of a list of volume groups.
1480-
LIST_VOLUME_GROUPS = 19 [(alpha_enum_value) = true];
1491+
LIST_VOLUME_GROUPS = 20 [(alpha_enum_value) = true];
14811492

14821493
// Indicates that the controller plugin supports getting details
14831494
// of a list of volume group snapshots.
1484-
LIST_VOLUME_GROUP_SNAPSHOTS = 20 [(alpha_enum_value) = true];
1495+
LIST_VOLUME_GROUP_SNAPSHOTS = 21 [(alpha_enum_value) = true];
14851496
}
14861497

14871498
Type type = 1;

0 commit comments

Comments
 (0)