Skip to content

Commit

Permalink
Changed Severity to Condition
Browse files Browse the repository at this point in the history
  • Loading branch information
xing-yang committed Feb 12, 2020
1 parent 277cefe commit c74ce24
Show file tree
Hide file tree
Showing 3 changed files with 319 additions and 277 deletions.
26 changes: 18 additions & 8 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,12 @@ message ListVolumesResponse {
// 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_health shows error conditions reported by the SP.
// This field MUST be specified if the
// LIST_VOLUMES_VOLUME_HEALTH controller capability is supported.
// This field is OPTIONAL.
repeated VolumeHealth volume_health = 2;
}

message Entry {
Expand Down Expand Up @@ -847,15 +853,15 @@ message GetVolumeResponse {
message VolumeStatus{
// volume_health shows error conditions reported by the SP.
// This field MUST be specified if the
// GET_VOLUME_HEALTH controller capability is supported.
// VOLUME_HEALTH controller capability is supported.
repeated VolumeHealth volume_health = 1;
}

// This field is REQUIRED
Volume volume = 1;

// This field is OPTIONAL. This field MUST be specified if the
// GET_VOLUME_HEALTH controller capability is supported.
// VOLUME_HEALTH controller capability is supported.
VolumeStatus status = 2;
}
message GetCapacityRequest {
Expand Down Expand Up @@ -933,12 +939,16 @@ message ControllerServiceCapability {
// ListVolumesResponse.entry.published_nodes field
LIST_VOLUMES_PUBLISHED_NODES = 10;

// Indicates the SP supports the
// ListVolumesResponse.entry.volume_health field
LIST_VOLUMES_VOLUME_HEALTH = 11;

// Indicates the SP supports the GetVolume RPC
GET_VOLUME = 11;
GET_VOLUME = 12;

// Indicates the SP supports the
// GetVolumeResponse.volume_health field
GET_VOLUME_HEALTH = 12;
VOLUME_HEALTH = 13;
}

Type type = 1;
Expand Down Expand Up @@ -1292,7 +1302,7 @@ message VolumeUsage {
}

message VolumeHealth {
enum Severity {
enum Condition {
// Volume health condition is unknown; treat it as healthy.
UNKNOWN = 0;
// Volume is healthy.
Expand All @@ -1301,14 +1311,14 @@ message VolumeHealth {
TEMPORARY_UNHEALTHY = 2;
// Volume will fail soon. Move your data off and replace volume or
// you may lose your data.
FATAL_EMINENT = 3;
FATAL_IMMINENT = 3;
// Volume is unusable. Data loss is likely.
FATAL = 4;
}

// The severity level of the health condition of the volume.
// The level of the health condition of the volume.
// This field is REQUIRED.
Severity severity = 1;
Condition condition = 1;

// The error code describing the health condition of the volume.
// This is an opaque field to CO.
Expand Down
Loading

0 comments on commit c74ce24

Please sign in to comment.