Skip to content

Commit 72124ad

Browse files
authored
Merge pull request #271 from jdef/align_validation_with_creation
spec: Align volume validation with creation.
2 parents f624381 + dff09f9 commit 72124ad

File tree

3 files changed

+463
-331
lines changed

3 files changed

+463
-331
lines changed

csi.proto

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -631,30 +631,51 @@ message ValidateVolumeCapabilitiesRequest {
631631
// The ID of the volume to check. This field is REQUIRED.
632632
string volume_id = 1;
633633

634+
// Attributes of the volume to check. This field is OPTIONAL and MUST
635+
// match the attributes of the Volume identified by `volume_id`.
636+
map<string, string> volume_attributes = 2;
637+
634638
// The capabilities that the CO wants to check for the volume. This
635-
// call SHALL return "supported" only if all the volume capabilities
639+
// call SHALL return "confirmed" only if all the volume capabilities
636640
// specified below are supported. This field is REQUIRED.
637-
repeated VolumeCapability volume_capabilities = 2;
641+
repeated VolumeCapability volume_capabilities = 3;
638642

639-
// Attributes of the volume to check. This field is OPTIONAL and MUST
640-
// match the attributes of the Volume identified by `volume_id`.
641-
map<string, string> volume_attributes = 3;
643+
// See CreateVolumeRequest.parameters.
644+
// This field is OPTIONAL.
645+
map<string, string> parameters = 4;
642646

643-
// Specifies where (regions, zones, racks, etc.) the caller believes
644-
// the volume is accessible from.
645-
// A caller MAY specify multiple topologies to indicate they believe
646-
// the volume to be accessible from multiple locations.
647-
// This field is OPTIONAL. This field SHALL NOT be set unless the
648-
// plugin advertises the ACCESSIBILITY_CONSTRAINTS capability.
649-
repeated Topology accessible_topology = 4;
647+
// Secrets required by plugin to complete volume validation request.
648+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
649+
// section on how to use this field.
650+
map<string, string> controller_validate_secrets = 5;
650651
}
651652

652653
message ValidateVolumeCapabilitiesResponse {
653-
// True if the Plugin supports the specified capabilities for the
654-
// given volume. This field is REQUIRED.
655-
bool supported = 1;
654+
message Confirmed {
655+
// Volume attributes validated by the plugin.
656+
// This field is OPTIONAL.
657+
map<string, string> volume_attributes = 1;
658+
659+
// Volume capabilities supported by the plugin.
660+
// This field is REQUIRED.
661+
repeated VolumeCapability volume_capabilities = 2;
662+
663+
// The volume creation parameters validated by the plugin.
664+
// This field is OPTIONAL.
665+
map<string, string> parameters = 3;
666+
}
667+
668+
// Confirmed indicates to the CO the set of capabilities that the
669+
// plugin has validated. This field SHALL only be set to a non-empty
670+
// value for successful validation responses.
671+
// For successful validation responses, the CO SHALL compare the
672+
// fields of this message to the originally requested capabilities in
673+
// order to guard against an older plugin reporting "valid" for newer
674+
// capability fields that it does not yet understand.
675+
// This field is OPTIONAL.
676+
Confirmed confirmed = 1;
656677

657-
// Message to the CO if `supported` above is false. This field is
678+
// Message to the CO if `confirmed` above is empty. This field is
658679
// OPTIONAL.
659680
// An empty string is equal to an unspecified field value.
660681
string message = 2;

0 commit comments

Comments
 (0)