Skip to content

Commit 44e20d0

Browse files
committed
Aligned spec.md error messages. Clarified some wording. Renamed to NodeStageVolume/NodeUnstageVolume. Addressed jdef comments. Added RPC interactions and reference counting section
1 parent a603ab3 commit 44e20d0

File tree

3 files changed

+368
-405
lines changed

3 files changed

+368
-405
lines changed

csi.proto

+38-24
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,11 +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.
586+
// It MUST be set if the Node Plugin implements the
587+
// `STAGE_UNSTAGE_VOLUME` node capability.
568588
// This is an OPTIONAL field.
569-
string global_target_path = 4;
589+
string staging_target_path = 4;
570590

571591
// The path to which the volume will be published. It MUST be an
572592
// absolute path in the root filesystem of the process serving this
@@ -613,16 +633,10 @@ message NodeUnpublishVolumeRequest {
613633
// The ID of the volume. This field is REQUIRED.
614634
string volume_id = 2;
615635

616-
// The path to which the device was mounted by `NodePublishDevice`.
617-
// It MUST be an absolute path in the root filesystem of the process
618-
// serving this request.
619-
// This is an OPTIONAL field.
620-
string global_target_path = 3;
621-
622636
// The path at which the volume was published. It MUST be an absolute
623637
// path in the root filesystem of the process serving this request.
624638
// This is a REQUIRED field.
625-
string target_path = 4;
639+
string target_path = 3;
626640

627641
// End user credentials used to authenticate/authorize node
628642
// unpublish request.
@@ -635,7 +649,7 @@ message NodeUnpublishVolumeRequest {
635649
// users to pass through the required credentials. This information is
636650
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
637651
// This field is OPTIONAL.
638-
map<string, string> user_credentials = 5;
652+
map<string, string> user_credentials = 4;
639653
}
640654

641655
message NodeUnpublishVolumeResponse {}
@@ -678,7 +692,7 @@ message NodeServiceCapability {
678692
message RPC {
679693
enum Type {
680694
UNKNOWN = 0;
681-
PUBLISH_UNPUBLISH_DEVICE = 1;
695+
STAGE_UNSTAGE_VOLUME = 1;
682696
}
683697

684698
Type type = 1;

0 commit comments

Comments
 (0)