Skip to content

Commit c381d18

Browse files
committed
CreateVolumeRequest: add requested AccessMode
User should be able to specify (via CO) what kind of volume should be created. Some applications may require a SINGLE_NODE_WRITER volume for a database, while others may want MULTI_NODE_MULTI_WRITER for say sharing of pictures.
1 parent 3de4168 commit c381d18

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

spec.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,20 @@ message CreateVolumeRequest {
391391
// not supported by the Plugin, the call SHALL fail. This field is
392392
// REQUIRED.
393393
repeated VolumeCapability volume_capabilities = 4;
394-
394+
395395
// Plugin specific parameters passed in as opaque key-value pairs.
396396
// This field is OPTIONAL. The Plugin is responsible for parsing and
397397
// validating these parameters. COs will treat these as opaque.
398398
map<string, string> parameters = 5;
399+
400+
// The requested minimal access mode. The Plugin MAY return a volume
401+
// that allows a broader access mode, e.g. MULTI_NODE_MULTI_WRITER
402+
// when CO asked just for SINGLE_NODE_WRITER. The Plugin MUST NOT
403+
// return a volume with more restrictive access mode than the CO
404+
// requested in this field, e.g. return SINGLE_NODE_READER_ONLY
405+
// volume when CO requested SINGLE_NODE_WRITER.
406+
// This field is OPTIONAL.
407+
AccessMode access_mode = 6;
399408
}
400409
401410
message CreateVolumeResponse {
@@ -1170,6 +1179,14 @@ message Error {
11701179
// Recovery behavior: Caller MUST fix the invalid value before
11711180
// retrying.
11721181
INVALID_PARAMETER_VALUE = 7;
1182+
1183+
// Indicates that the access mode is not allowed by the Plugin.
1184+
// More human-readable information MAY be provided in the
1185+
// `error_description` field.
1186+
//
1187+
// Recovery behavior: Caller MUST fix the access mode before
1188+
// retrying.
1189+
UNSUPPORTED_ACCESS_MODE = 8;
11731190
}
11741191
11751192
// Machine parsable error code.

0 commit comments

Comments
 (0)