Skip to content

Commit aaceb16

Browse files
committed
Renamed to NodeStageVolume/NodeUnstageVolume. Addressed jdef comments. Added RPC interactions section
1 parent 2697a9c commit aaceb16

File tree

3 files changed

+338
-272
lines changed

3 files changed

+338
-272
lines changed

csi.proto

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ service Controller {
4141
}
4242

4343
service Node {
44-
rpc NodePublishDevice (NodePublishDeviceRequest)
45-
returns (NodePublishDeviceResponse) {}
44+
rpc NodeStageVolume (NodeStageVolumeRequest)
45+
returns (NodeStageVolumeResponse) {}
4646

47-
rpc NodeUnpublishDevice (NodeUnpublishDeviceRequest)
48-
returns (NodeUnpublishDeviceResponse) {}
47+
rpc NodeUnstageVolume (NodeUnstageVolumeRequest)
48+
returns (NodeUnstageVolumeResponse) {}
4949

5050
rpc NodePublishVolume (NodePublishVolumeRequest)
5151
returns (NodePublishVolumeResponse) {}
@@ -331,8 +331,8 @@ message ControllerPublishVolumeRequest {
331331

332332
message ControllerPublishVolumeResponse {
333333
// The SP specific information that will be passed to the Plugin in
334-
// the subsequent `NodePublishDevice` and `NodePublishVolume` calls
335-
// for the given volume.
334+
// the subsequent `NodeStageVolume` and `NodePublishVolume` calls
335+
// for the given volume.
336336
// This information is opaque to the CO. This field is OPTIONAL.
337337
map<string, string> publish_volume_info = 1;
338338
}
@@ -503,7 +503,7 @@ message ControllerServiceCapability {
503503
}
504504
////////
505505
////////
506-
message NodePublishDeviceRequest {
506+
message NodeStageVolumeRequest {
507507
// The API version assumed by the CO. This is a REQUIRED field.
508508
Version version = 1;
509509

@@ -519,20 +519,38 @@ message NodePublishDeviceRequest {
519519

520520
// The path to which the volume will be published. It MUST be an
521521
// absolute path in the root filesystem of the process serving this
522-
// request. The CO SHALL ensure uniqueness of global_target_path per
522+
// request. The CO SHALL ensure uniqueness of staging_target_path per
523523
// volume.
524524
// This is a REQUIRED field.
525-
string global_target_path = 4;
525+
string staging_target_path = 4;
526526

527527
// The capability of the volume the CO expects the volume to have.
528528
// This is a REQUIRED field.
529529
VolumeCapability volume_capability = 5;
530+
531+
// End user credentials used to authenticate/authorize node
532+
// publish request.
533+
// This field contains credential data, for example username and
534+
// password. Each key must consist of alphanumeric characters, '-',
535+
// '_' or '.'. Each value MUST contain a valid string. An SP MAY
536+
// choose to accept binary (non-string) data by using a binary-to-text
537+
// encoding scheme, like base64. An SP SHALL advertise the
538+
// requirements for credentials in documentation. COs SHALL permit
539+
// users to pass through the required credentials. This information is
540+
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
541+
// This field is OPTIONAL.
542+
map<string, string> user_credentials = 6;
543+
544+
// Attributes of the volume to publish. This field is OPTIONAL and
545+
// MUST match the attributes of the VolumeInfo identified by
546+
// `volume_id`.
547+
map<string,string> volume_attributes = 7;
530548
}
531549

532-
message NodePublishDeviceResponse {}
550+
message NodeStageVolumeResponse {}
533551
////////
534552
////////
535-
message NodeUnpublishDeviceRequest {
553+
message NodeUnstageVolumeRequest {
536554
// The API version assumed by the CO. This is a REQUIRED field.
537555
Version version = 1;
538556

@@ -542,10 +560,10 @@ message NodeUnpublishDeviceRequest {
542560
// The path at which the volume was published. It MUST be an absolute
543561
// path in the root filesystem of the process serving this request.
544562
// This is a REQUIRED field.
545-
string global_target_path = 3;
563+
string staging_target_path = 3;
546564
}
547565

548-
message NodeUnpublishDeviceResponse {}
566+
message NodeUnstageVolumeResponse {}
549567
////////
550568
////////
551569
message NodePublishVolumeRequest {
@@ -562,13 +580,13 @@ message NodePublishVolumeRequest {
562580
// this capability. This is an OPTIONAL field.
563581
map<string, string> publish_volume_info = 3;
564582

565-
// The path to which the device was mounted by `NodePublishDevice`.
583+
// The path to which the device was mounted by `NodeStageVolume`.
566584
// It MUST be an absolute path in the root filesystem of the process
567585
// serving this request.
568586
// It MUST be set if the Node Plugin implements the
569-
// `PUBLISH_UNPUBLISH_DEVICE` node capability.
587+
// `STAGE_UNSTAGE_VOLUME` node capability.
570588
// This is an OPTIONAL field.
571-
string global_target_path = 4;
589+
string staging_target_path = 4;
572590

573591
// The path to which the volume will be published. It MUST be an
574592
// absolute path in the root filesystem of the process serving this
@@ -615,13 +633,13 @@ message NodeUnpublishVolumeRequest {
615633
// The ID of the volume. This field is REQUIRED.
616634
string volume_id = 2;
617635

618-
// The path to which the device was mounted by `NodePublishDevice`.
636+
// The path to which the device was mounted by `NodeStageVolume`.
619637
// It MUST be an absolute path in the root filesystem of the process
620638
// serving this request.
621639
// It MUST be set if the Node Plugin implements the
622-
// `PUBLISH_UNPUBLISH_DEVICE` node capability.
640+
// `STAGE_UNSTAGE_VOLUME` node capability.
623641
// This is an OPTIONAL field.
624-
string global_target_path = 3;
642+
string staging_target_path = 3;
625643

626644
// The path at which the volume was published. It MUST be an absolute
627645
// path in the root filesystem of the process serving this request.
@@ -682,7 +700,7 @@ message NodeServiceCapability {
682700
message RPC {
683701
enum Type {
684702
UNKNOWN = 0;
685-
PUBLISH_UNPUBLISH_DEVICE = 1;
703+
STAGE_UNSTAGE_VOLUME = 1;
686704
}
687705

688706
Type type = 1;

0 commit comments

Comments
 (0)