Skip to content

Commit 2561947

Browse files
akutzjdef
authored andcommitted
NodeID to string
This patch updates all references to NodeID so that it is now a simple string value. Associated field names and error codes have been updated accordingly.
1 parent e6a9c33 commit 2561947

File tree

3 files changed

+343
-384
lines changed

3 files changed

+343
-384
lines changed

csi.proto

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ message ControllerPublishVolumeRequest {
313313
string volume_id = 2;
314314

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

321321
// The capability of the volume the CO expects the volume to have.
322322
// This is a REQUIRED field.
@@ -351,14 +351,6 @@ message ControllerPublishVolumeResponse {
351351
Error error = 2;
352352
}
353353
}
354-
355-
message NodeID {
356-
// Information about a node in the form of key-value pairs. This
357-
// information is opaque to the CO. Given this information will be
358-
// passed around by the CO, it is RECOMMENDED that each Plugin keeps
359-
// this information as small as possible. This field is REQUIRED.
360-
map<string, string> values = 1;
361-
}
362354
////////
363355
////////
364356
message ControllerUnpublishVolumeRequest {
@@ -369,15 +361,15 @@ message ControllerUnpublishVolumeRequest {
369361
string volume_id = 2;
370362

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

382374
// End user credentials used to authenticate/authorize controller
383375
// unpublish request.
@@ -655,7 +647,7 @@ message GetNodeIDResponse {
655647
// `ControllerPublishVolume`. This is an OPTIONAL field. If unset,
656648
// the CO SHALL leave the `node_id` field unset in
657649
// `ControllerPublishVolume`.
658-
NodeID node_id = 1;
650+
string node_id = 1;
659651
}
660652

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

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

1012-
// Indicates that the specified `NodeID` is not allowed or
1004+
// Indicates that the specified node ID is not allowed or
10131005
// understood by the Plugin, or the Plugin does not support the
1014-
// operation without a `NodeID`. More human-readable information
1006+
// operation without a node ID. More human-readable information
10151007
// MAY be provided in the `error_description` field.
10161008
//
1017-
// Recovery behavior: Caller MUST fix the `NodeID` before
1009+
// Recovery behavior: Caller MUST fix the node ID before
10181010
// retrying.
10191011
INVALID_NODE_ID = 8;
10201012
}
@@ -1029,7 +1021,7 @@ message Error {
10291021
// On `VOLUME_ALREADY_ATTACHED` and `MAX_ATTACHED_NODES` errors,
10301022
// this field contains the node(s) that the specified volume is
10311023
// already attached to.
1032-
repeated NodeID node_ids = 3;
1024+
repeated string node_ids = 3;
10331025
}
10341026

10351027
// `ControllerUnpublishVolume` specific error.
@@ -1084,28 +1076,28 @@ message Error {
10841076
// deleted before retrying with exponential back off.
10851077
VOLUME_DOES_NOT_EXIST = 4;
10861078

1087-
// Indicates that a node corresponding to the specified `NodeID`
1079+
// Indicates that a node corresponding to the specified node ID
10881080
// does not exist.
10891081
//
1090-
// Recovery behavior: Caller SHOULD verify that the `NodeID` is
1082+
// Recovery behavior: Caller SHOULD verify that the node ID is
10911083
// correct and that the node is available and has not been
10921084
// terminated or deleted before retrying.
10931085
NODE_DOES_NOT_EXIST = 5;
10941086

1095-
// Indicates that the specified `NodeID` is not allowed or
1087+
// Indicates that the specified node ID is not allowed or
10961088
// understood by the Plugin. More human-readable information MAY
10971089
// be provided in the `error_description` field.
10981090
//
1099-
// Recovery behavior: Caller MUST fix the `NodeID` before
1091+
// Recovery behavior: Caller MUST fix the node ID before
11001092
// retrying.
11011093
INVALID_NODE_ID = 6;
11021094

11031095
VOLUME_NOT_ATTACHED_TO_SPECIFIED_NODE = 7;
11041096

11051097
// Indicates that the Plugin does not support the operation
1106-
// without a `NodeID`.
1098+
// without a node ID.
11071099
//
1108-
// Recovery behavior: Caller MUST specify the `NodeID` before
1100+
// Recovery behavior: Caller MUST specify the node ID before
11091101
// retrying.
11101102
NODE_ID_REQUIRED = 8;
11111103
}

0 commit comments

Comments
 (0)