Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xing-yang committed Apr 2, 2020
1 parent 86ce098 commit 1a51367
Show file tree
Hide file tree
Showing 3 changed files with 394 additions and 399 deletions.
46 changes: 22 additions & 24 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ service Controller {
rpc ControllerExpandVolume (ControllerExpandVolumeRequest)
returns (ControllerExpandVolumeResponse) {}

rpc GetVolume (GetVolumeRequest)
returns (GetVolumeResponse) {
rpc ControllerGetVolume (ControllerGetVolumeRequest)
returns (ControllerGetVolumeResponse) {
option (alpha_method) = true;
}
}
Expand Down Expand Up @@ -855,10 +855,11 @@ message ListVolumesResponse {
// reported by the SP. The CO MUST be resilient to that.
repeated string published_node_ids = 1;

// volume_condition shows error conditions reported by the SP.
// volume_condition shows information about the current health of
// the volume.
// This field is OPTIONAL.
// This field MUST be specified if the
// LIST_VOLUMES_VOLUME_CONDITION controller capability is supported.
// This field is OPTIONAL.
VolumeCondition volume_condition = 2 [(alpha_field) = true];
}

Expand All @@ -882,31 +883,34 @@ message ListVolumesResponse {
// An empty string is equal to an unspecified field value.
string next_token = 2;
}
message GetVolumeRequest {
message ControllerGetVolumeRequest {
option (alpha_message) = true;

// Identity information for a specific volume. This field is
// REQUIRED. GetVolume will return with current volume information.
// REQUIRED. ControllerGetVolume will return with current
// volume information.
string volume_id = 1;
}

message GetVolumeResponse {
message ControllerGetVolumeResponse {
option (alpha_message) = true;

message VolumeStatus{
// A list of all `node_id` of nodes that the volume in this entry
// is controller published on.
// This field is OPTIONAL. If it is not specified and the SP has
// the GET_VOLUME_PUBLISHED_NODES controller capability, the CO
// the PUBLISH_UNPUBLISH_VOLUME controller capability, the CO
// MAY assume the volume is not controller published to any nodes.
// If the field is not specified and the SP does not have the
// GET_VOLUME_PUBLISHED_NODES controller capability, the CO MUST
// PUBLISH_UNPUBLISH_VOLUME controller capability, the CO MUST
// not interpret this field.
// published_node_ids MAY include nodes not published to or
// reported by the SP. The CO MUST be resilient to that.
repeated string published_node_ids = 1;

// volume_condition shows error conditions reported by the SP.
// volume_condition shows information about the current health of
// the volume.
// This field is OPTIONAL.
// This field MUST be specified if the
// GET_VOLUME_VOLUME_CONDITION controller capability is supported.
VolumeCondition volume_condition = 2;
Expand Down Expand Up @@ -995,19 +999,14 @@ message ControllerServiceCapability {
LIST_VOLUMES_PUBLISHED_NODES = 10;

// Indicates the SP supports the
// ListVolumesResponse.entry.volume_condition field
LIST_VOLUMES_VOLUME_CONDITION = 11 [(alpha_enum_value) = true];
// ListVolumesResponse.entry.status.volume_condition field
// if SP also supports LIST_VOLUMES capability, or supports the
// ControllerGetVolumeResponse.status.volume_condition field
// if SP also supports GET_VOLUME capability
VOLUME_CONDITION = 11 [(alpha_enum_value) = true];

// Indicates the SP supports the GetVolume RPC
// Indicates the SP supports the ControllerGetVolume RPC
GET_VOLUME = 12 [(alpha_enum_value) = true];

// Indicates the SP supports the
// GetVolumeResponse.volume_condition field
GET_VOLUME_VOLUME_CONDITION = 13 [(alpha_enum_value) = true];

// Indicates the SP supports the
// GetVolumesResponse.published_node_ids field
GET_VOLUME_PUBLISHED_NODES = 14 [(alpha_enum_value) = true];
}

Type type = 1;
Expand Down Expand Up @@ -1367,9 +1366,8 @@ message VolumeCondition {
option (alpha_message) = true;

// Indicates the health condition of a volume is not normal.
// This field is OPTIONAL. If not present, it indicates the
// health condition is unknown.
.google.protobuf.BoolValue abnormal = 1;
// This field is REQUIRED.
bool abnormal = 1;

// The message describing the health condition of the volume.
// This field is REQUIRED.
Expand Down
Loading

0 comments on commit 1a51367

Please sign in to comment.