Skip to content

Commit

Permalink
Renamed capability for ModifyVolumeGroupMembership
Browse files Browse the repository at this point in the history
Addressed review comments
  • Loading branch information
xing-yang committed Nov 21, 2022
1 parent 2dd3e15 commit d1c0a08
Show file tree
Hide file tree
Showing 3 changed files with 2,395 additions and 597 deletions.
67 changes: 39 additions & 28 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ service Controller {
option (alpha_method) = true;
}

rpc ModifyVolumeGroup(ModifyVolumeGroupRequest)
returns (ModifyVolumeGroupResponse) {
rpc ModifyVolumeGroupMembership(ModifyVolumeGroupMembershipRequest)
returns (ModifyVolumeGroupMembershipResponse) {
option (alpha_method) = true;
}

Expand Down Expand Up @@ -390,9 +390,11 @@ message CreateVolumeRequest {
// 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.
// The IDs of the volume groups where the volume will be added to.
// Note that it is possible for a volume to be placed in one or more
// groups on the storage backend even if this field is not specified.
// This field is OPTIONAL.
string volume_group_id = 8;
repeated string volume_group_id = 8 [(alpha_field) = true];
}

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

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

message TopologyRequirement {
Expand Down Expand Up @@ -1101,14 +1105,14 @@ message VolumeGroup {

// Underlying volumes in this group. The same definition in CSI
// Volume.
// This field is REQUIRED.
// This field is OPTIONAL.
// To support the creation of an empty group, this list can be empty.
// However, this field is not empty in the following cases:
// - Response from ListVolumeGroups or ControllerGetVolumeGroup if the
// VolumeGroup is not empty.
// - Response from ModifyVolumeGroup if the VolumeGroup is not
// empty after modification.
repeated .csi.v1.Volume volumes = 3;
// - Response from ModifyVolumeGroupMembership if the
// VolumeGroup is not empty after modification.
repeated Volume volumes = 3;
}
message DeleteVolumeGroupRequest {
option (alpha_message) = true;
Expand All @@ -1117,8 +1121,8 @@ message DeleteVolumeGroupRequest {
// This field is REQUIRED.
string volume_group_id = 1;

// Secrets required by plugin to complete volume group deletion
// request.
// Secrets required by plugin to complete volume group
// deletion 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];
Expand All @@ -1128,7 +1132,7 @@ message DeleteVolumeGroupResponse {
option (alpha_message) = true;
// Intentionally empty.
}
message ModifyVolumeGroupRequest {
message ModifyVolumeGroupMembershipRequest {
option (alpha_message) = true;

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

message ModifyVolumeGroupResponse {
message ModifyVolumeGroupMembershipResponse {
option (alpha_message) = true;

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

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

// params passed from VolumeSnapshotClass
// This field is OPTIONAL.
// Plugin specific parameters passed in as opaque key-value pairs.
// This field is OPTIONAL. The Plugin is responsible for parsing and
// validating these parameters. COs will treat these as opaque.
map<string, string> parameters = 5;

}

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

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

// Timestamp when the point-in-time consistency group snapshot is
// taken.
// Timestamp when the volume group snapshot is taken.
// This field is REQUIRED.
.google.protobuf.Timestamp creation_time = 5;

Expand Down Expand Up @@ -1458,30 +1464,35 @@ message ControllerServiceCapability {
// Indicates that the controller plugin supports adding an
// existing volume to a volume group and removing a volume from
// a volume group without deleting it.
VOLUME_GROUP_ADD_REMOVE_EXISTING_VOLUME = 15
MODIFY_VOLUME_GROUP_MEMBERSHIP = 15
[(alpha_enum_value) = true];

// Indicates that the controller plugin supports creating and
// deleting a volume group snapshot.
CREATE_DELETE_VOLUME_GROUP_SNAPSHOT = 16
[(alpha_enum_value) = true];

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

// Indicates that the controller plugin supports getting details
// of a volume group.
GET_VOLUME_GROUP = 17 [(alpha_enum_value) = true];
GET_VOLUME_GROUP = 18 [(alpha_enum_value) = true];

// Indicates that the controller plugin supports getting details
// of a volume group snapshot.
GET_VOLUME_GROUP_SNAPSHOT = 18 [(alpha_enum_value) = true];
GET_VOLUME_GROUP_SNAPSHOT = 19 [(alpha_enum_value) = true];

// Indicates that the controller plugin supports getting details
// of a list of volume groups.
LIST_VOLUME_GROUPS = 19 [(alpha_enum_value) = true];
LIST_VOLUME_GROUPS = 20 [(alpha_enum_value) = true];

// Indicates that the controller plugin supports getting details
// of a list of volume group snapshots.
LIST_VOLUME_GROUP_SNAPSHOTS = 20 [(alpha_enum_value) = true];
LIST_VOLUME_GROUP_SNAPSHOTS = 21 [(alpha_enum_value) = true];
}

Type type = 1;
Expand Down
Loading

0 comments on commit d1c0a08

Please sign in to comment.