Skip to content

spec: NodeID to string #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 21 additions & 29 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ message ControllerPublishVolumeRequest {
string volume_id = 2;

// The ID of the node. This field is OPTIONAL. The CO SHALL set (or
// clear) this field to match the `NodeID` returned by `GetNodeID`.
// `GetNodeID` is allowed to omit `NodeID` from a successful `Result`;
// clear) this field to match the node ID returned by `GetNodeID`.
// `GetNodeID` is allowed to omit node ID from a successful `Result`;
// in such cases the CO SHALL NOT specify this field.
NodeID node_id = 3;
string node_id = 3;

// The capability of the volume the CO expects the volume to have.
// This is a REQUIRED field.
Expand Down Expand Up @@ -351,14 +351,6 @@ message ControllerPublishVolumeResponse {
Error error = 2;
}
}

message NodeID {
// Information about a node in the form of key-value pairs. This
// information is opaque to the CO. Given this information will be
// passed around by the CO, it is RECOMMENDED that each Plugin keeps
// this information as small as possible. This field is REQUIRED.
map<string, string> values = 1;
}
////////
////////
message ControllerUnpublishVolumeRequest {
Expand All @@ -369,15 +361,15 @@ message ControllerUnpublishVolumeRequest {
string volume_id = 2;

// The ID of the node. This field is OPTIONAL. The CO SHALL set (or
// clear) this field to match the `NodeID` returned by `GetNodeID`.
// `GetNodeID` is allowed to omit `NodeID` from a successful `Result`;
// clear) this field to match the node ID returned by `GetNodeID`.
// `GetNodeID` is allowed to omit node ID from a successful `Result`;
// in such cases the CO SHALL NOT specify this field.
//
// If `GetNodeID` does not omit `NodeID` from a successful `Result`,
// If `GetNodeID` does not omit node ID from a successful `Result`,
// the CO MAY omit this field as well, indicating that it does not
// know which node the volume was previously used. The Plugin SHOULD
// return an Error if this is not supported.
NodeID node_id = 3;
string node_id = 3;

// End user credentials used to authenticate/authorize controller
// unpublish request.
Expand Down Expand Up @@ -655,7 +647,7 @@ message GetNodeIDResponse {
// `ControllerPublishVolume`. This is an OPTIONAL field. If unset,
// the CO SHALL leave the `node_id` field unset in
// `ControllerPublishVolume`.
NodeID node_id = 1;
string node_id = 1;
}

// One of the following fields MUST be specified.
Expand Down Expand Up @@ -984,10 +976,10 @@ message Error {
// node before retrying with exponential back off.
VOLUME_ALREADY_PUBLISHED = 5;

// Indicates that a node corresponding to the specified `NodeID`
// Indicates that a node corresponding to the specified node ID
// does not exist.
//
// Recovery behavior: Caller SHOULD verify that the `NodeID` is
// Recovery behavior: Caller SHOULD verify that the node ID is
// correct and that the node is available and has not been
// terminated or deleted before retrying with exponential backoff.
NODE_DOES_NOT_EXIST = 6;
Expand All @@ -997,7 +989,7 @@ message Error {
// number of nodes and therefore this operation can not be
// completed until the volume is detached from at least one of the
// existing nodes. When this error code is returned, the Plugin
// MUST also specify the `NodeId` of all the nodes the volume is
// MUST also specify the node ID of all the nodes the volume is
// attached to.
//
// Recovery behavior: Caller MAY use the provided `node_ids`
Expand All @@ -1009,12 +1001,12 @@ message Error {
UNSUPPORTED_VOLUME_TYPE = 10;
UNSUPPORTED_FS_TYPE = 11;

// Indicates that the specified `NodeID` is not allowed or
// Indicates that the specified node ID is not allowed or
// understood by the Plugin, or the Plugin does not support the
// operation without a `NodeID`. More human-readable information
// operation without a node ID. More human-readable information
// MAY be provided in the `error_description` field.
//
// Recovery behavior: Caller MUST fix the `NodeID` before
// Recovery behavior: Caller MUST fix the node ID before
// retrying.
INVALID_NODE_ID = 8;
}
Expand All @@ -1029,7 +1021,7 @@ message Error {
// On `VOLUME_ALREADY_ATTACHED` and `MAX_ATTACHED_NODES` errors,
// this field contains the node(s) that the specified volume is
// already attached to.
repeated NodeID node_ids = 3;
repeated string node_ids = 3;
}

// `ControllerUnpublishVolume` specific error.
Expand Down Expand Up @@ -1084,28 +1076,28 @@ message Error {
// deleted before retrying with exponential back off.
VOLUME_DOES_NOT_EXIST = 4;

// Indicates that a node corresponding to the specified `NodeID`
// Indicates that a node corresponding to the specified node ID
// does not exist.
//
// Recovery behavior: Caller SHOULD verify that the `NodeID` is
// Recovery behavior: Caller SHOULD verify that the node ID is
// correct and that the node is available and has not been
// terminated or deleted before retrying.
NODE_DOES_NOT_EXIST = 5;

// Indicates that the specified `NodeID` is not allowed or
// Indicates that the specified node ID is not allowed or
// understood by the Plugin. More human-readable information MAY
// be provided in the `error_description` field.
//
// Recovery behavior: Caller MUST fix the `NodeID` before
// Recovery behavior: Caller MUST fix the node ID before
// retrying.
INVALID_NODE_ID = 6;

VOLUME_NOT_ATTACHED_TO_SPECIFIED_NODE = 7;

// Indicates that the Plugin does not support the operation
// without a `NodeID`.
// without a node ID.
//
// Recovery behavior: Caller MUST specify the `NodeID` before
// Recovery behavior: Caller MUST specify the node ID before
// retrying.
NODE_ID_REQUIRED = 8;
}
Expand Down
Loading