From a4f1ce07c77c9822136debe38a85bd8a26c57039 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Tue, 27 Feb 2018 17:46:01 -0500 Subject: [PATCH 1/2] vendor updates --- .../spec/.gitignore | 3 +- .../container-storage-interface/spec/Makefile | 4 +- .../spec/csi.proto | 462 ++--- .../spec/lib/go/.gitignore | 1 - .../spec/lib/go/Makefile | 11 +- .../spec/lib/go/csi/{ => v0}/csi.pb.go | 1547 +++++++++-------- .../container-storage-interface/spec/spec.md | 701 +++++--- .../kubernetes-csi/csi-test/Gopkg.lock | 139 +- .../kubernetes-csi/csi-test/driver/driver.go | 2 +- .../csi-test/driver/driver.mock.go | 272 ++- .../kubernetes-csi/csi-test/hack/e2e.sh | 2 +- .../csi-test/pkg/sanity/controller.go | 179 +- .../csi-test/pkg/sanity/identity.go | 55 +- .../csi-test/pkg/sanity/node.go | 122 +- .../kubernetes-csi/csi-test/test/co_test.go | 18 +- .../csi-test/test/driver_test.go | 20 +- 16 files changed, 1826 insertions(+), 1712 deletions(-) rename vendor/github.com/container-storage-interface/spec/lib/go/csi/{ => v0}/csi.pb.go (60%) diff --git a/vendor/github.com/container-storage-interface/spec/.gitignore b/vendor/github.com/container-storage-interface/spec/.gitignore index 83250da773..4f7ede45c5 100644 --- a/vendor/github.com/container-storage-interface/spec/.gitignore +++ b/vendor/github.com/container-storage-interface/spec/.gitignore @@ -1,2 +1,3 @@ -/csi.proto.tmp +*.tmp .DS_Store +.build diff --git a/vendor/github.com/container-storage-interface/spec/Makefile b/vendor/github.com/container-storage-interface/spec/Makefile index fa69d61deb..3cfaa4500a 100644 --- a/vendor/github.com/container-storage-interface/spec/Makefile +++ b/vendor/github.com/container-storage-interface/spec/Makefile @@ -8,9 +8,7 @@ CSI_PROTO := csi.proto # The temporary file is not versioned, and thus will always be # built on Travis-CI. $(CSI_PROTO).tmp: $(CSI_SPEC) - cat $? | \ - sed -n -e '/```protobuf$$/,/```$$/ p' | \ - sed -e 's@^```.*$$@////////@g' > $@ + cat $? | sed -n -e '/```protobuf$$/,/^```$$/ p' | sed '/^```/d' > "$@" # This is the target for building the CSI protobuf file. # diff --git a/vendor/github.com/container-storage-interface/spec/csi.proto b/vendor/github.com/container-storage-interface/spec/csi.proto index 29a9472d71..bd8a3e319f 100644 --- a/vendor/github.com/container-storage-interface/spec/csi.proto +++ b/vendor/github.com/container-storage-interface/spec/csi.proto @@ -1,14 +1,16 @@ -//////// syntax = "proto3"; -package csi; -//////// -//////// -service Identity { - rpc GetSupportedVersions (GetSupportedVersionsRequest) - returns (GetSupportedVersionsResponse) {} +package csi.v0; +option go_package = "csi"; +service Identity { rpc GetPluginInfo(GetPluginInfoRequest) returns (GetPluginInfoResponse) {} + + rpc GetPluginCapabilities(GetPluginCapabilitiesRequest) + returns (GetPluginCapabilitiesResponse) {} + + rpc Probe (ProbeRequest) + returns (ProbeResponse) {} } service Controller { @@ -33,14 +35,17 @@ service Controller { rpc GetCapacity (GetCapacityRequest) returns (GetCapacityResponse) {} - rpc ControllerProbe (ControllerProbeRequest) - returns (ControllerProbeResponse) {} - rpc ControllerGetCapabilities (ControllerGetCapabilitiesRequest) returns (ControllerGetCapabilitiesResponse) {} } service Node { + rpc NodeStageVolume (NodeStageVolumeRequest) + returns (NodeStageVolumeResponse) {} + + rpc NodeUnstageVolume (NodeUnstageVolumeRequest) + returns (NodeUnstageVolumeResponse) {} + rpc NodePublishVolume (NodePublishVolumeRequest) returns (NodePublishVolumeResponse) {} @@ -50,38 +55,10 @@ service Node { rpc NodeGetId (NodeGetIdRequest) returns (NodeGetIdResponse) {} - rpc NodeProbe (NodeProbeRequest) - returns (NodeProbeResponse) {} - rpc NodeGetCapabilities (NodeGetCapabilitiesRequest) returns (NodeGetCapabilitiesResponse) {} } -//////// -//////// -message GetSupportedVersionsRequest { -} - -message GetSupportedVersionsResponse { - // All the CSI versions that the Plugin supports. This field is - // REQUIRED. - repeated Version supported_versions = 1; -} - -// Specifies a version in Semantic Version 2.0 format. -// (http://semver.org/spec/v2.0.0.html) -message Version { - // The value of this field MUST NOT be negative. - int32 major = 1; // This field is REQUIRED. - // The value of this field MUST NOT be negative. - int32 minor = 2; // This field is REQUIRED. - // The value of this field MUST NOT be negative. - int32 patch = 3; // This field is REQUIRED. -} -//////// -//////// message GetPluginInfoRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; } message GetPluginInfoResponse { @@ -100,12 +77,46 @@ message GetPluginInfoResponse { // This field is OPTIONAL. Values are opaque to the CO. map manifest = 3; } -//////// -//////// -message CreateVolumeRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; +message GetPluginCapabilitiesRequest { +} + +message GetPluginCapabilitiesResponse { + // All the capabilities that the controller service supports. This + // field is OPTIONAL. + repeated PluginCapability capabilities = 2; +} + +// Specifies a capability of the plugin. +message PluginCapability { + message Service { + enum Type { + UNKNOWN = 0; + // CONTROLLER_SERVICE indicates that the Plugin provides RPCs for + // the ControllerService. Plugins SHOULD provide this capability. + // In rare cases certain plugins may wish to omit the + // ControllerService entirely from their implementation, but such + // SHOULD NOT be the common case. + // The presence of this capability determines whether the CO will + // attempt to invoke the REQUIRED ControllerService RPCs, as well + // as specific RPCs as indicated by ControllerGetCapabilities. + CONTROLLER_SERVICE = 1; + } + Type type = 1; + } + + oneof type { + // Service that the plugin supports. + Service service = 1; + } +} +message ProbeRequest { +} + +message ProbeResponse { + // Intentionally empty. +} +message CreateVolumeRequest { // The suggested name for the storage space. This field is REQUIRED. // It serves two purposes: // 1) Idempotency - This name is generated by the CO to achieve @@ -121,12 +132,12 @@ message CreateVolumeRequest { // an identifier by which to refer to the newly provisioned // storage. If a storage system supports this, it can optionally // use this name as the identifier for the new volume. - string name = 2; + string name = 1; // This field is OPTIONAL. This allows the CO to specify the capacity // requirement of the volume to be provisioned. If not specified, the // Plugin MAY choose an implementation-defined capacity range. - CapacityRange capacity_range = 3; + CapacityRange capacity_range = 2; // The capabilities that the provisioned volume MUST have: the Plugin // MUST provision a volume that could satisfy ALL of the @@ -136,25 +147,31 @@ message CreateVolumeRequest { // early validation: if ANY of the specified volume capabilities are // not supported by the Plugin, the call SHALL fail. This field is // REQUIRED. - repeated VolumeCapability volume_capabilities = 4; + repeated VolumeCapability volume_capabilities = 3; // Plugin specific parameters passed in as opaque key-value pairs. // This field is OPTIONAL. The Plugin is responsible for parsing and // validating these parameters. COs will treat these as opaque. - map parameters = 5; - - // Credentials used by Controller plugin to authenticate/authorize - // volume creation request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + map parameters = 4; + + // Secrets required by plugin to complete volume creation request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map controller_create_credentials = 6; + map controller_create_secrets = 5; } message CreateVolumeResponse { @@ -263,126 +280,131 @@ message Volume { // be passed to volume validation and publishing calls. map attributes = 3; } -//////// -//////// message DeleteVolumeRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; - // The ID of the volume to be deprovisioned. // This field is REQUIRED. - string volume_id = 2; - - // Credentials used by Controller plugin to authenticate/authorize - // volume deletion request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + string volume_id = 1; + + // Secrets required by plugin to complete volume deletion request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map controller_delete_credentials = 3; + map controller_delete_secrets = 2; } -message DeleteVolumeResponse {} -//////// -//////// +message DeleteVolumeResponse { +} message ControllerPublishVolumeRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; - // The ID of the volume to be used on a node. // This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The ID of the node. This field is REQUIRED. The CO SHALL set this // field to match the node ID returned by `NodeGetId`. - string node_id = 3; + string node_id = 2; // The capability of the volume the CO expects the volume to have. // This is a REQUIRED field. - VolumeCapability volume_capability = 4; + VolumeCapability volume_capability = 3; // Whether to publish the volume in readonly mode. This field is // REQUIRED. - bool readonly = 5; - - // Credentials used by Controller plugin to authenticate/authorize - // controller publish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + bool readonly = 4; + + // Secrets required by plugin to complete controller publish volume + // request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map controller_publish_credentials = 6; + map controller_publish_secrets = 5; // Attributes of the volume to be used on a node. This field is // OPTIONAL and MUST match the attributes of the Volume identified // by `volume_id`. - map volume_attributes = 7; + map volume_attributes = 6; } message ControllerPublishVolumeResponse { // The SP specific information that will be passed to the Plugin in - // the subsequent `NodePublishVolume` call for the given volume. + // the subsequent `NodeStageVolume` or `NodePublishVolume` calls + // for the given volume. // This information is opaque to the CO. This field is OPTIONAL. map publish_info = 1; } -//////// -//////// message ControllerUnpublishVolumeRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; - // The ID of the volume. This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The ID of the node. This field is OPTIONAL. The CO SHOULD set this // field to match the node ID returned by `NodeGetId` or leave it // unset. If the value is set, the SP MUST unpublish the volume from // the specified node. If the value is unset, the SP MUST unpublish // the volume from all nodes it is published to. - string node_id = 3; - - // Credentials used by Controller plugin to authenticate/authorize - // controller unpublish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + string node_id = 2; + + // Secrets required by plugin to complete controller unpublish volume + // request. This SHOULD be the same secrets passed to the + // ControllerPublishVolume. + // call for the specified volume. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map controller_unpublish_credentials = 4; + map controller_unpublish_secrets = 3; } -message ControllerUnpublishVolumeResponse {} -//////// -//////// +message ControllerUnpublishVolumeResponse { +} message ValidateVolumeCapabilitiesRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; - // The ID of the volume to check. This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The capabilities that the CO wants to check for the volume. This // call SHALL return "supported" only if all the volume capabilities // specified below are supported. This field is REQUIRED. - repeated VolumeCapability volume_capabilities = 3; + repeated VolumeCapability volume_capabilities = 2; // Attributes of the volume to check. This field is OPTIONAL and MUST // match the attributes of the Volume identified by `volume_id`. - map volume_attributes = 4; + map volume_attributes = 3; } message ValidateVolumeCapabilitiesResponse { @@ -395,12 +417,7 @@ message ValidateVolumeCapabilitiesResponse { // An empty string is equal to an unspecified field value. string message = 2; } -//////// -//////// message ListVolumesRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; - // If specified (non-zero value), the Plugin MUST NOT return more // entries than this number in the response. If the actual number of // entries is more than this number, the Plugin MUST set `next_token` @@ -409,13 +426,13 @@ message ListVolumesRequest { // not specified (zero value), it means there is no restriction on the // number of entries that can be returned. // The value of this field MUST NOT be negative. - int32 max_entries = 2; + int32 max_entries = 1; // A token to specify where to start paginating. Set this field to // `next_token` returned by a previous `ListVolumes` call to get the // next page of entries. This field is OPTIONAL. // An empty string is equal to an unspecified field value. - string starting_token = 3; + string starting_token = 2; } message ListVolumesResponse { @@ -433,24 +450,19 @@ message ListVolumesResponse { // An empty string is equal to an unspecified field value. string next_token = 2; } -//////// -//////// message GetCapacityRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; - // If specified, the Plugin SHALL report the capacity of the storage // that can be used to provision volumes that satisfy ALL of the // specified `volume_capabilities`. These are the same // `volume_capabilities` the CO will use in `CreateVolumeRequest`. // This field is OPTIONAL. - repeated VolumeCapability volume_capabilities = 2; + repeated VolumeCapability volume_capabilities = 1; // If specified, the Plugin SHALL report the capacity of the storage // that can be used to provision volumes with the given Plugin // specific `parameters`. These are the same `parameters` the CO will // use in `CreateVolumeRequest`. This field is OPTIONAL. - map parameters = 3; + map parameters = 2; } message GetCapacityResponse { @@ -462,19 +474,7 @@ message GetCapacityResponse { // The value of this field MUST NOT be negative. int64 available_capacity = 1; } -//////// -//////// -message ControllerProbeRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; -} - -message ControllerProbeResponse {} -//////// -//////// message ControllerGetCapabilitiesRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; } message ControllerGetCapabilitiesResponse { @@ -502,21 +502,85 @@ message ControllerServiceCapability { RPC rpc = 1; } } -//////// -//////// -message NodePublishVolumeRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; +message NodeStageVolumeRequest { + // The ID of the volume to publish. This field is REQUIRED. + string volume_id = 1; + + // The CO SHALL set this field to the value returned by + // `ControllerPublishVolume` if the corresponding Controller Plugin + // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be + // left unset if the corresponding Controller Plugin does not have + // this capability. This is an OPTIONAL field. + map publish_info = 2; + + // The path to which the volume will be published. It MUST be an + // absolute path in the root filesystem of the process serving this + // request. The CO SHALL ensure that there is only one + // staging_target_path per volume. + // This is a REQUIRED field. + string staging_target_path = 3; + + // The capability of the volume the CO expects the volume to have. + // This is a REQUIRED field. + VolumeCapability volume_capability = 4; + + // Secrets required by plugin to complete node stage volume request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. + // This field is OPTIONAL. + map node_stage_secrets = 5; + + // Attributes of the volume to publish. This field is OPTIONAL and + // MUST match the attributes of the VolumeInfo identified by + // `volume_id`. + map volume_attributes = 6; +} + +message NodeStageVolumeResponse { +} +message NodeUnstageVolumeRequest { + // The ID of the volume. This field is REQUIRED. + string volume_id = 1; + + // The path at which the volume was published. It MUST be an absolute + // path in the root filesystem of the process serving this request. + // This is a REQUIRED field. + string staging_target_path = 2; +} +message NodeUnstageVolumeResponse { +} +message NodePublishVolumeRequest { // The ID of the volume to publish. This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The CO SHALL set this field to the value returned by // `ControllerPublishVolume` if the corresponding Controller Plugin // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be // left unset if the corresponding Controller Plugin does not have // this capability. This is an OPTIONAL field. - map publish_info = 3; + map publish_info = 2; + + // The path to which the device was mounted by `NodeStageVolume`. + // It MUST be an absolute path in the root filesystem of the process + // serving this request. + // It MUST be set if the Node Plugin implements the + // `STAGE_UNSTAGE_VOLUME` node capability. + // This is an OPTIONAL field. + string staging_target_path = 3; // The path to which the volume will be published. It MUST be an // absolute path in the root filesystem of the process serving this @@ -534,18 +598,24 @@ message NodePublishVolumeRequest { // REQUIRED. bool readonly = 6; - // Credentials used by Node plugin to authenticate/authorize node - // publish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + // Secrets required by plugin to complete node publish volume request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map node_publish_credentials = 7; + map node_publish_secrets = 7; // Attributes of the volume to publish. This field is OPTIONAL and // MUST match the attributes of the Volume identified by @@ -553,41 +623,21 @@ message NodePublishVolumeRequest { map volume_attributes = 8; } -message NodePublishVolumeResponse {} -//////// -//////// +message NodePublishVolumeResponse { +} message NodeUnpublishVolumeRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; - // The ID of the volume. This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The path at which the volume was published. It MUST be an absolute // path in the root filesystem of the process serving this request. // This is a REQUIRED field. - string target_path = 3; - - // Credentials used by Node plugin to authenticate/authorize node - // unpublish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. - // This field is OPTIONAL. - map node_unpublish_credentials = 4; + string target_path = 2; } -message NodeUnpublishVolumeResponse {} -//////// -//////// +message NodeUnpublishVolumeResponse { +} message NodeGetIdRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; } message NodeGetIdResponse { @@ -596,19 +646,7 @@ message NodeGetIdResponse { // This is a REQUIRED field. string node_id = 1; } -//////// -//////// -message NodeProbeRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; -} - -message NodeProbeResponse {} -//////// -//////// message NodeGetCapabilitiesRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; } message NodeGetCapabilitiesResponse { @@ -622,6 +660,7 @@ message NodeServiceCapability { message RPC { enum Type { UNKNOWN = 0; + STAGE_UNSTAGE_VOLUME = 1; } Type type = 1; @@ -632,4 +671,3 @@ message NodeServiceCapability { RPC rpc = 1; } } -//////// diff --git a/vendor/github.com/container-storage-interface/spec/lib/go/.gitignore b/vendor/github.com/container-storage-interface/spec/lib/go/.gitignore index 13f0dc2818..e1128ce897 100644 --- a/vendor/github.com/container-storage-interface/spec/lib/go/.gitignore +++ b/vendor/github.com/container-storage-interface/spec/lib/go/.gitignore @@ -1,4 +1,3 @@ /protoc /protoc-gen-go /csi.a -/csi/.build/ diff --git a/vendor/github.com/container-storage-interface/spec/lib/go/Makefile b/vendor/github.com/container-storage-interface/spec/lib/go/Makefile index 552175ff4e..3af5de2b84 100644 --- a/vendor/github.com/container-storage-interface/spec/lib/go/Makefile +++ b/vendor/github.com/container-storage-interface/spec/lib/go/Makefile @@ -76,10 +76,11 @@ export PATH := $(shell pwd):$(PATH) ######################################################################## ## BUILD ## ######################################################################## -CSI_GO := csi/csi.pb.go -CSI_A := csi.a CSI_PROTO := ../../csi.proto -CSI_GO_TMP := csi/.build/csi.pb.go +CSI_PKG := $(shell cat $(CSI_PROTO) | sed -n -e 's/^package.\([^;]*\);$$/\1/p'|tr '.' '/') +CSI_GO := $(CSI_PKG)/csi.pb.go +CSI_A := csi.a +CSI_GO_TMP := $(CSI_PKG)/.build/csi.pb.go # This recipe generates the go language bindings to a temp area. $(CSI_GO_TMP): $(CSI_PROTO) | $(PROTOC) $(PROTOC_GEN_GO) @@ -104,8 +105,8 @@ endif # 3. Build the archive file. $(CSI_A): $(CSI_GO) go get -d ./... - go install ./csi - go build -o "$@" ./csi + go install ./$(CSI_PKG) + go build -o "$@" ./$(CSI_PKG) build: $(CSI_A) diff --git a/vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go b/vendor/github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go similarity index 60% rename from vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go rename to vendor/github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go index 877c14e993..969362ff47 100644 --- a/vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go +++ b/vendor/github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go @@ -8,11 +8,13 @@ It is generated from these files: csi.proto It has these top-level messages: - GetSupportedVersionsRequest - GetSupportedVersionsResponse - Version GetPluginInfoRequest GetPluginInfoResponse + GetPluginCapabilitiesRequest + GetPluginCapabilitiesResponse + PluginCapability + ProbeRequest + ProbeResponse CreateVolumeRequest CreateVolumeResponse VolumeCapability @@ -30,19 +32,19 @@ It has these top-level messages: ListVolumesResponse GetCapacityRequest GetCapacityResponse - ControllerProbeRequest - ControllerProbeResponse ControllerGetCapabilitiesRequest ControllerGetCapabilitiesResponse ControllerServiceCapability + NodeStageVolumeRequest + NodeStageVolumeResponse + NodeUnstageVolumeRequest + NodeUnstageVolumeResponse NodePublishVolumeRequest NodePublishVolumeResponse NodeUnpublishVolumeRequest NodeUnpublishVolumeResponse NodeGetIdRequest NodeGetIdResponse - NodeProbeRequest - NodeProbeResponse NodeGetCapabilitiesRequest NodeGetCapabilitiesResponse NodeServiceCapability @@ -69,6 +71,37 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +type PluginCapability_Service_Type int32 + +const ( + PluginCapability_Service_UNKNOWN PluginCapability_Service_Type = 0 + // CONTROLLER_SERVICE indicates that the Plugin provides RPCs for + // the ControllerService. Plugins SHOULD provide this capability. + // In rare cases certain plugins may wish to omit the + // ControllerService entirely from their implementation, but such + // SHOULD NOT be the common case. + // The presence of this capability determines whether the CO will + // attempt to invoke the REQUIRED ControllerService RPCs, as well + // as specific RPCs as indicated by ControllerGetCapabilities. + PluginCapability_Service_CONTROLLER_SERVICE PluginCapability_Service_Type = 1 +) + +var PluginCapability_Service_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "CONTROLLER_SERVICE", +} +var PluginCapability_Service_Type_value = map[string]int32{ + "UNKNOWN": 0, + "CONTROLLER_SERVICE": 1, +} + +func (x PluginCapability_Service_Type) String() string { + return proto.EnumName(PluginCapability_Service_Type_name, int32(x)) +} +func (PluginCapability_Service_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor0, []int{4, 0, 0} +} + type VolumeCapability_AccessMode_Mode int32 const ( @@ -110,7 +143,7 @@ func (x VolumeCapability_AccessMode_Mode) String() string { return proto.EnumName(VolumeCapability_AccessMode_Mode_name, int32(x)) } func (VolumeCapability_AccessMode_Mode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{7, 2, 0} + return fileDescriptor0, []int{9, 2, 0} } type ControllerServiceCapability_RPC_Type int32 @@ -148,106 +181,33 @@ func (ControllerServiceCapability_RPC_Type) EnumDescriptor() ([]byte, []int) { type NodeServiceCapability_RPC_Type int32 const ( - NodeServiceCapability_RPC_UNKNOWN NodeServiceCapability_RPC_Type = 0 + NodeServiceCapability_RPC_UNKNOWN NodeServiceCapability_RPC_Type = 0 + NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME NodeServiceCapability_RPC_Type = 1 ) var NodeServiceCapability_RPC_Type_name = map[int32]string{ 0: "UNKNOWN", + 1: "STAGE_UNSTAGE_VOLUME", } var NodeServiceCapability_RPC_Type_value = map[string]int32{ - "UNKNOWN": 0, + "UNKNOWN": 0, + "STAGE_UNSTAGE_VOLUME": 1, } func (x NodeServiceCapability_RPC_Type) String() string { return proto.EnumName(NodeServiceCapability_RPC_Type_name, int32(x)) } func (NodeServiceCapability_RPC_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{37, 0, 0} -} - -// ////// -// ////// -type GetSupportedVersionsRequest struct { -} - -func (m *GetSupportedVersionsRequest) Reset() { *m = GetSupportedVersionsRequest{} } -func (m *GetSupportedVersionsRequest) String() string { return proto.CompactTextString(m) } -func (*GetSupportedVersionsRequest) ProtoMessage() {} -func (*GetSupportedVersionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -type GetSupportedVersionsResponse struct { - // All the CSI versions that the Plugin supports. This field is - // REQUIRED. - SupportedVersions []*Version `protobuf:"bytes,1,rep,name=supported_versions,json=supportedVersions" json:"supported_versions,omitempty"` -} - -func (m *GetSupportedVersionsResponse) Reset() { *m = GetSupportedVersionsResponse{} } -func (m *GetSupportedVersionsResponse) String() string { return proto.CompactTextString(m) } -func (*GetSupportedVersionsResponse) ProtoMessage() {} -func (*GetSupportedVersionsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *GetSupportedVersionsResponse) GetSupportedVersions() []*Version { - if m != nil { - return m.SupportedVersions - } - return nil -} - -// Specifies a version in Semantic Version 2.0 format. -// (http://semver.org/spec/v2.0.0.html) -type Version struct { - // The value of this field MUST NOT be negative. - Major int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"` - // The value of this field MUST NOT be negative. - Minor int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"` - // The value of this field MUST NOT be negative. - Patch int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"` + return fileDescriptor0, []int{39, 0, 0} } -func (m *Version) Reset() { *m = Version{} } -func (m *Version) String() string { return proto.CompactTextString(m) } -func (*Version) ProtoMessage() {} -func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -func (m *Version) GetMajor() int32 { - if m != nil { - return m.Major - } - return 0 -} - -func (m *Version) GetMinor() int32 { - if m != nil { - return m.Minor - } - return 0 -} - -func (m *Version) GetPatch() int32 { - if m != nil { - return m.Patch - } - return 0 -} - -// ////// -// ////// type GetPluginInfoRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` } func (m *GetPluginInfoRequest) Reset() { *m = GetPluginInfoRequest{} } func (m *GetPluginInfoRequest) String() string { return proto.CompactTextString(m) } func (*GetPluginInfoRequest) ProtoMessage() {} -func (*GetPluginInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *GetPluginInfoRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*GetPluginInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } type GetPluginInfoResponse struct { // The name MUST follow reverse domain name notation format @@ -267,7 +227,7 @@ type GetPluginInfoResponse struct { func (m *GetPluginInfoResponse) Reset() { *m = GetPluginInfoResponse{} } func (m *GetPluginInfoResponse) String() string { return proto.CompactTextString(m) } func (*GetPluginInfoResponse) ProtoMessage() {} -func (*GetPluginInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (*GetPluginInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } func (m *GetPluginInfoResponse) GetName() string { if m != nil { @@ -290,11 +250,156 @@ func (m *GetPluginInfoResponse) GetManifest() map[string]string { return nil } -// ////// -// ////// +type GetPluginCapabilitiesRequest struct { +} + +func (m *GetPluginCapabilitiesRequest) Reset() { *m = GetPluginCapabilitiesRequest{} } +func (m *GetPluginCapabilitiesRequest) String() string { return proto.CompactTextString(m) } +func (*GetPluginCapabilitiesRequest) ProtoMessage() {} +func (*GetPluginCapabilitiesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +type GetPluginCapabilitiesResponse struct { + // All the capabilities that the controller service supports. This + // field is OPTIONAL. + Capabilities []*PluginCapability `protobuf:"bytes,2,rep,name=capabilities" json:"capabilities,omitempty"` +} + +func (m *GetPluginCapabilitiesResponse) Reset() { *m = GetPluginCapabilitiesResponse{} } +func (m *GetPluginCapabilitiesResponse) String() string { return proto.CompactTextString(m) } +func (*GetPluginCapabilitiesResponse) ProtoMessage() {} +func (*GetPluginCapabilitiesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *GetPluginCapabilitiesResponse) GetCapabilities() []*PluginCapability { + if m != nil { + return m.Capabilities + } + return nil +} + +// Specifies a capability of the plugin. +type PluginCapability struct { + // Types that are valid to be assigned to Type: + // *PluginCapability_Service_ + Type isPluginCapability_Type `protobuf_oneof:"type"` +} + +func (m *PluginCapability) Reset() { *m = PluginCapability{} } +func (m *PluginCapability) String() string { return proto.CompactTextString(m) } +func (*PluginCapability) ProtoMessage() {} +func (*PluginCapability) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +type isPluginCapability_Type interface { + isPluginCapability_Type() +} + +type PluginCapability_Service_ struct { + Service *PluginCapability_Service `protobuf:"bytes,1,opt,name=service,oneof"` +} + +func (*PluginCapability_Service_) isPluginCapability_Type() {} + +func (m *PluginCapability) GetType() isPluginCapability_Type { + if m != nil { + return m.Type + } + return nil +} + +func (m *PluginCapability) GetService() *PluginCapability_Service { + if x, ok := m.GetType().(*PluginCapability_Service_); ok { + return x.Service + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*PluginCapability) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _PluginCapability_OneofMarshaler, _PluginCapability_OneofUnmarshaler, _PluginCapability_OneofSizer, []interface{}{ + (*PluginCapability_Service_)(nil), + } +} + +func _PluginCapability_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*PluginCapability) + // type + switch x := m.Type.(type) { + case *PluginCapability_Service_: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Service); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("PluginCapability.Type has unexpected type %T", x) + } + return nil +} + +func _PluginCapability_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*PluginCapability) + switch tag { + case 1: // type.service + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(PluginCapability_Service) + err := b.DecodeMessage(msg) + m.Type = &PluginCapability_Service_{msg} + return true, err + default: + return false, nil + } +} + +func _PluginCapability_OneofSizer(msg proto.Message) (n int) { + m := msg.(*PluginCapability) + // type + switch x := m.Type.(type) { + case *PluginCapability_Service_: + s := proto.Size(x.Service) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type PluginCapability_Service struct { + Type PluginCapability_Service_Type `protobuf:"varint,1,opt,name=type,enum=csi.v0.PluginCapability_Service_Type" json:"type,omitempty"` +} + +func (m *PluginCapability_Service) Reset() { *m = PluginCapability_Service{} } +func (m *PluginCapability_Service) String() string { return proto.CompactTextString(m) } +func (*PluginCapability_Service) ProtoMessage() {} +func (*PluginCapability_Service) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} } + +func (m *PluginCapability_Service) GetType() PluginCapability_Service_Type { + if m != nil { + return m.Type + } + return PluginCapability_Service_UNKNOWN +} + +type ProbeRequest struct { +} + +func (m *ProbeRequest) Reset() { *m = ProbeRequest{} } +func (m *ProbeRequest) String() string { return proto.CompactTextString(m) } +func (*ProbeRequest) ProtoMessage() {} +func (*ProbeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +type ProbeResponse struct { +} + +func (m *ProbeResponse) Reset() { *m = ProbeResponse{} } +func (m *ProbeResponse) String() string { return proto.CompactTextString(m) } +func (*ProbeResponse) ProtoMessage() {} +func (*ProbeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + type CreateVolumeRequest struct { - // The API version assumed by the CO. This field is REQUIRED. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // The suggested name for the storage space. This field is REQUIRED. // It serves two purposes: // 1) Idempotency - This name is generated by the CO to achieve @@ -310,11 +415,11 @@ type CreateVolumeRequest struct { // an identifier by which to refer to the newly provisioned // storage. If a storage system supports this, it can optionally // use this name as the identifier for the new volume. - Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // This field is OPTIONAL. This allows the CO to specify the capacity // requirement of the volume to be provisioned. If not specified, the // Plugin MAY choose an implementation-defined capacity range. - CapacityRange *CapacityRange `protobuf:"bytes,3,opt,name=capacity_range,json=capacityRange" json:"capacity_range,omitempty"` + CapacityRange *CapacityRange `protobuf:"bytes,2,opt,name=capacity_range,json=capacityRange" json:"capacity_range,omitempty"` // The capabilities that the provisioned volume MUST have: the Plugin // MUST provision a volume that could satisfy ALL of the // capabilities specified in this list. The Plugin MUST assume that @@ -323,36 +428,35 @@ type CreateVolumeRequest struct { // early validation: if ANY of the specified volume capabilities are // not supported by the Plugin, the call SHALL fail. This field is // REQUIRED. - VolumeCapabilities []*VolumeCapability `protobuf:"bytes,4,rep,name=volume_capabilities,json=volumeCapabilities" json:"volume_capabilities,omitempty"` + VolumeCapabilities []*VolumeCapability `protobuf:"bytes,3,rep,name=volume_capabilities,json=volumeCapabilities" json:"volume_capabilities,omitempty"` // Plugin specific parameters passed in as opaque key-value pairs. // This field is OPTIONAL. The Plugin is responsible for parsing and // validating these parameters. COs will treat these as opaque. - Parameters map[string]string `protobuf:"bytes,5,rep,name=parameters" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Credentials used by Controller plugin to authenticate/authorize - // volume creation request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + Parameters map[string]string `protobuf:"bytes,4,rep,name=parameters" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Secrets required by plugin to complete volume creation request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - ControllerCreateCredentials map[string]string `protobuf:"bytes,6,rep,name=controller_create_credentials,json=controllerCreateCredentials" json:"controller_create_credentials,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ControllerCreateSecrets map[string]string `protobuf:"bytes,5,rep,name=controller_create_secrets,json=controllerCreateSecrets" json:"controller_create_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } func (m *CreateVolumeRequest) Reset() { *m = CreateVolumeRequest{} } func (m *CreateVolumeRequest) String() string { return proto.CompactTextString(m) } func (*CreateVolumeRequest) ProtoMessage() {} -func (*CreateVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -func (m *CreateVolumeRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*CreateVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } func (m *CreateVolumeRequest) GetName() string { if m != nil { @@ -382,9 +486,9 @@ func (m *CreateVolumeRequest) GetParameters() map[string]string { return nil } -func (m *CreateVolumeRequest) GetControllerCreateCredentials() map[string]string { +func (m *CreateVolumeRequest) GetControllerCreateSecrets() map[string]string { if m != nil { - return m.ControllerCreateCredentials + return m.ControllerCreateSecrets } return nil } @@ -399,7 +503,7 @@ type CreateVolumeResponse struct { func (m *CreateVolumeResponse) Reset() { *m = CreateVolumeResponse{} } func (m *CreateVolumeResponse) String() string { return proto.CompactTextString(m) } func (*CreateVolumeResponse) ProtoMessage() {} -func (*CreateVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*CreateVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } func (m *CreateVolumeResponse) GetVolume() *Volume { if m != nil { @@ -424,7 +528,7 @@ type VolumeCapability struct { func (m *VolumeCapability) Reset() { *m = VolumeCapability{} } func (m *VolumeCapability) String() string { return proto.CompactTextString(m) } func (*VolumeCapability) ProtoMessage() {} -func (*VolumeCapability) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*VolumeCapability) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } type isVolumeCapability_AccessType interface { isVolumeCapability_AccessType() @@ -549,7 +653,7 @@ type VolumeCapability_BlockVolume struct { func (m *VolumeCapability_BlockVolume) Reset() { *m = VolumeCapability_BlockVolume{} } func (m *VolumeCapability_BlockVolume) String() string { return proto.CompactTextString(m) } func (*VolumeCapability_BlockVolume) ProtoMessage() {} -func (*VolumeCapability_BlockVolume) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7, 0} } +func (*VolumeCapability_BlockVolume) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 0} } // Indicate that the volume will be accessed via the filesystem API. type VolumeCapability_MountVolume struct { @@ -567,7 +671,7 @@ type VolumeCapability_MountVolume struct { func (m *VolumeCapability_MountVolume) Reset() { *m = VolumeCapability_MountVolume{} } func (m *VolumeCapability_MountVolume) String() string { return proto.CompactTextString(m) } func (*VolumeCapability_MountVolume) ProtoMessage() {} -func (*VolumeCapability_MountVolume) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7, 1} } +func (*VolumeCapability_MountVolume) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 1} } func (m *VolumeCapability_MountVolume) GetFsType() string { if m != nil { @@ -586,13 +690,13 @@ func (m *VolumeCapability_MountVolume) GetMountFlags() []string { // Specify how a volume can be accessed. type VolumeCapability_AccessMode struct { // This field is REQUIRED. - Mode VolumeCapability_AccessMode_Mode `protobuf:"varint,1,opt,name=mode,enum=csi.VolumeCapability_AccessMode_Mode" json:"mode,omitempty"` + Mode VolumeCapability_AccessMode_Mode `protobuf:"varint,1,opt,name=mode,enum=csi.v0.VolumeCapability_AccessMode_Mode" json:"mode,omitempty"` } func (m *VolumeCapability_AccessMode) Reset() { *m = VolumeCapability_AccessMode{} } func (m *VolumeCapability_AccessMode) String() string { return proto.CompactTextString(m) } func (*VolumeCapability_AccessMode) ProtoMessage() {} -func (*VolumeCapability_AccessMode) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7, 2} } +func (*VolumeCapability_AccessMode) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 2} } func (m *VolumeCapability_AccessMode) GetMode() VolumeCapability_AccessMode_Mode { if m != nil { @@ -618,7 +722,7 @@ type CapacityRange struct { func (m *CapacityRange) Reset() { *m = CapacityRange{} } func (m *CapacityRange) String() string { return proto.CompactTextString(m) } func (*CapacityRange) ProtoMessage() {} -func (*CapacityRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*CapacityRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } func (m *CapacityRange) GetRequiredBytes() int64 { if m != nil { @@ -659,7 +763,7 @@ type Volume struct { func (m *Volume) Reset() { *m = Volume{} } func (m *Volume) String() string { return proto.CompactTextString(m) } func (*Volume) ProtoMessage() {} -func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } func (m *Volume) GetCapacityBytes() int64 { if m != nil { @@ -682,39 +786,34 @@ func (m *Volume) GetAttributes() map[string]string { return nil } -// ////// -// ////// type DeleteVolumeRequest struct { - // The API version assumed by the CO. This field is REQUIRED. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // The ID of the volume to be deprovisioned. // This field is REQUIRED. - VolumeId string `protobuf:"bytes,2,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` - // Credentials used by Controller plugin to authenticate/authorize - // volume deletion request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + // Secrets required by plugin to complete volume deletion request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - ControllerDeleteCredentials map[string]string `protobuf:"bytes,3,rep,name=controller_delete_credentials,json=controllerDeleteCredentials" json:"controller_delete_credentials,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ControllerDeleteSecrets map[string]string `protobuf:"bytes,2,rep,name=controller_delete_secrets,json=controllerDeleteSecrets" json:"controller_delete_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } func (m *DeleteVolumeRequest) Reset() { *m = DeleteVolumeRequest{} } func (m *DeleteVolumeRequest) String() string { return proto.CompactTextString(m) } func (*DeleteVolumeRequest) ProtoMessage() {} -func (*DeleteVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } - -func (m *DeleteVolumeRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*DeleteVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } func (m *DeleteVolumeRequest) GetVolumeId() string { if m != nil { @@ -723,9 +822,9 @@ func (m *DeleteVolumeRequest) GetVolumeId() string { return "" } -func (m *DeleteVolumeRequest) GetControllerDeleteCredentials() map[string]string { +func (m *DeleteVolumeRequest) GetControllerDeleteSecrets() map[string]string { if m != nil { - return m.ControllerDeleteCredentials + return m.ControllerDeleteSecrets } return nil } @@ -736,54 +835,50 @@ type DeleteVolumeResponse struct { func (m *DeleteVolumeResponse) Reset() { *m = DeleteVolumeResponse{} } func (m *DeleteVolumeResponse) String() string { return proto.CompactTextString(m) } func (*DeleteVolumeResponse) ProtoMessage() {} -func (*DeleteVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*DeleteVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } -// ////// -// ////// type ControllerPublishVolumeRequest struct { - // The API version assumed by the CO. This field is REQUIRED. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // The ID of the volume to be used on a node. // This field is REQUIRED. - VolumeId string `protobuf:"bytes,2,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` // The ID of the node. This field is REQUIRED. The CO SHALL set this // field to match the node ID returned by `NodeGetId`. - NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` + NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` // The capability of the volume the CO expects the volume to have. // This is a REQUIRED field. - VolumeCapability *VolumeCapability `protobuf:"bytes,4,opt,name=volume_capability,json=volumeCapability" json:"volume_capability,omitempty"` + VolumeCapability *VolumeCapability `protobuf:"bytes,3,opt,name=volume_capability,json=volumeCapability" json:"volume_capability,omitempty"` // Whether to publish the volume in readonly mode. This field is // REQUIRED. - Readonly bool `protobuf:"varint,5,opt,name=readonly" json:"readonly,omitempty"` - // Credentials used by Controller plugin to authenticate/authorize - // controller publish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + Readonly bool `protobuf:"varint,4,opt,name=readonly" json:"readonly,omitempty"` + // Secrets required by plugin to complete controller publish volume + // request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - ControllerPublishCredentials map[string]string `protobuf:"bytes,6,rep,name=controller_publish_credentials,json=controllerPublishCredentials" json:"controller_publish_credentials,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ControllerPublishSecrets map[string]string `protobuf:"bytes,5,rep,name=controller_publish_secrets,json=controllerPublishSecrets" json:"controller_publish_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Attributes of the volume to be used on a node. This field is // OPTIONAL and MUST match the attributes of the Volume identified // by `volume_id`. - VolumeAttributes map[string]string `protobuf:"bytes,7,rep,name=volume_attributes,json=volumeAttributes" json:"volume_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + VolumeAttributes map[string]string `protobuf:"bytes,6,rep,name=volume_attributes,json=volumeAttributes" json:"volume_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } func (m *ControllerPublishVolumeRequest) Reset() { *m = ControllerPublishVolumeRequest{} } func (m *ControllerPublishVolumeRequest) String() string { return proto.CompactTextString(m) } func (*ControllerPublishVolumeRequest) ProtoMessage() {} -func (*ControllerPublishVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } - -func (m *ControllerPublishVolumeRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*ControllerPublishVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } func (m *ControllerPublishVolumeRequest) GetVolumeId() string { if m != nil { @@ -813,9 +908,9 @@ func (m *ControllerPublishVolumeRequest) GetReadonly() bool { return false } -func (m *ControllerPublishVolumeRequest) GetControllerPublishCredentials() map[string]string { +func (m *ControllerPublishVolumeRequest) GetControllerPublishSecrets() map[string]string { if m != nil { - return m.ControllerPublishCredentials + return m.ControllerPublishSecrets } return nil } @@ -829,7 +924,8 @@ func (m *ControllerPublishVolumeRequest) GetVolumeAttributes() map[string]string type ControllerPublishVolumeResponse struct { // The SP specific information that will be passed to the Plugin in - // the subsequent `NodePublishVolume` call for the given volume. + // the subsequent `NodeStageVolume` or `NodePublishVolume` calls + // for the given volume. // This information is opaque to the CO. This field is OPTIONAL. PublishInfo map[string]string `protobuf:"bytes,1,rep,name=publish_info,json=publishInfo" json:"publish_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } @@ -838,7 +934,7 @@ func (m *ControllerPublishVolumeResponse) Reset() { *m = ControllerPubli func (m *ControllerPublishVolumeResponse) String() string { return proto.CompactTextString(m) } func (*ControllerPublishVolumeResponse) ProtoMessage() {} func (*ControllerPublishVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{13} + return fileDescriptor0, []int{15} } func (m *ControllerPublishVolumeResponse) GetPublishInfo() map[string]string { @@ -848,45 +944,43 @@ func (m *ControllerPublishVolumeResponse) GetPublishInfo() map[string]string { return nil } -// ////// -// ////// type ControllerUnpublishVolumeRequest struct { - // The API version assumed by the CO. This field is REQUIRED. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // The ID of the volume. This field is REQUIRED. - VolumeId string `protobuf:"bytes,2,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` // The ID of the node. This field is OPTIONAL. The CO SHOULD set this // field to match the node ID returned by `NodeGetId` or leave it // unset. If the value is set, the SP MUST unpublish the volume from // the specified node. If the value is unset, the SP MUST unpublish // the volume from all nodes it is published to. - NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` - // Credentials used by Controller plugin to authenticate/authorize - // controller unpublish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` + // Secrets required by plugin to complete controller unpublish volume + // request. This SHOULD be the same secrets passed to the + // ControllerPublishVolume. + // call for the specified volume. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - ControllerUnpublishCredentials map[string]string `protobuf:"bytes,4,rep,name=controller_unpublish_credentials,json=controllerUnpublishCredentials" json:"controller_unpublish_credentials,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ControllerUnpublishSecrets map[string]string `protobuf:"bytes,3,rep,name=controller_unpublish_secrets,json=controllerUnpublishSecrets" json:"controller_unpublish_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } func (m *ControllerUnpublishVolumeRequest) Reset() { *m = ControllerUnpublishVolumeRequest{} } func (m *ControllerUnpublishVolumeRequest) String() string { return proto.CompactTextString(m) } func (*ControllerUnpublishVolumeRequest) ProtoMessage() {} func (*ControllerUnpublishVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{14} -} - -func (m *ControllerUnpublishVolumeRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil + return fileDescriptor0, []int{16} } func (m *ControllerUnpublishVolumeRequest) GetVolumeId() string { @@ -903,9 +997,9 @@ func (m *ControllerUnpublishVolumeRequest) GetNodeId() string { return "" } -func (m *ControllerUnpublishVolumeRequest) GetControllerUnpublishCredentials() map[string]string { +func (m *ControllerUnpublishVolumeRequest) GetControllerUnpublishSecrets() map[string]string { if m != nil { - return m.ControllerUnpublishCredentials + return m.ControllerUnpublishSecrets } return nil } @@ -917,37 +1011,26 @@ func (m *ControllerUnpublishVolumeResponse) Reset() { *m = ControllerUnp func (m *ControllerUnpublishVolumeResponse) String() string { return proto.CompactTextString(m) } func (*ControllerUnpublishVolumeResponse) ProtoMessage() {} func (*ControllerUnpublishVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{15} + return fileDescriptor0, []int{17} } -// ////// -// ////// type ValidateVolumeCapabilitiesRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // The ID of the volume to check. This field is REQUIRED. - VolumeId string `protobuf:"bytes,2,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` // The capabilities that the CO wants to check for the volume. This // call SHALL return "supported" only if all the volume capabilities // specified below are supported. This field is REQUIRED. - VolumeCapabilities []*VolumeCapability `protobuf:"bytes,3,rep,name=volume_capabilities,json=volumeCapabilities" json:"volume_capabilities,omitempty"` + VolumeCapabilities []*VolumeCapability `protobuf:"bytes,2,rep,name=volume_capabilities,json=volumeCapabilities" json:"volume_capabilities,omitempty"` // Attributes of the volume to check. This field is OPTIONAL and MUST // match the attributes of the Volume identified by `volume_id`. - VolumeAttributes map[string]string `protobuf:"bytes,4,rep,name=volume_attributes,json=volumeAttributes" json:"volume_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + VolumeAttributes map[string]string `protobuf:"bytes,3,rep,name=volume_attributes,json=volumeAttributes" json:"volume_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } func (m *ValidateVolumeCapabilitiesRequest) Reset() { *m = ValidateVolumeCapabilitiesRequest{} } func (m *ValidateVolumeCapabilitiesRequest) String() string { return proto.CompactTextString(m) } func (*ValidateVolumeCapabilitiesRequest) ProtoMessage() {} func (*ValidateVolumeCapabilitiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{16} -} - -func (m *ValidateVolumeCapabilitiesRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil + return fileDescriptor0, []int{18} } func (m *ValidateVolumeCapabilitiesRequest) GetVolumeId() string { @@ -985,7 +1068,7 @@ func (m *ValidateVolumeCapabilitiesResponse) Reset() { *m = ValidateVolu func (m *ValidateVolumeCapabilitiesResponse) String() string { return proto.CompactTextString(m) } func (*ValidateVolumeCapabilitiesResponse) ProtoMessage() {} func (*ValidateVolumeCapabilitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{17} + return fileDescriptor0, []int{19} } func (m *ValidateVolumeCapabilitiesResponse) GetSupported() bool { @@ -1002,11 +1085,7 @@ func (m *ValidateVolumeCapabilitiesResponse) GetMessage() string { return "" } -// ////// -// ////// type ListVolumesRequest struct { - // The API version assumed by the CO. This field is REQUIRED. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // If specified (non-zero value), the Plugin MUST NOT return more // entries than this number in the response. If the actual number of // entries is more than this number, the Plugin MUST set `next_token` @@ -1015,25 +1094,18 @@ type ListVolumesRequest struct { // not specified (zero value), it means there is no restriction on the // number of entries that can be returned. // The value of this field MUST NOT be negative. - MaxEntries int32 `protobuf:"varint,2,opt,name=max_entries,json=maxEntries" json:"max_entries,omitempty"` + MaxEntries int32 `protobuf:"varint,1,opt,name=max_entries,json=maxEntries" json:"max_entries,omitempty"` // A token to specify where to start paginating. Set this field to // `next_token` returned by a previous `ListVolumes` call to get the // next page of entries. This field is OPTIONAL. // An empty string is equal to an unspecified field value. - StartingToken string `protobuf:"bytes,3,opt,name=starting_token,json=startingToken" json:"starting_token,omitempty"` + StartingToken string `protobuf:"bytes,2,opt,name=starting_token,json=startingToken" json:"starting_token,omitempty"` } func (m *ListVolumesRequest) Reset() { *m = ListVolumesRequest{} } func (m *ListVolumesRequest) String() string { return proto.CompactTextString(m) } func (*ListVolumesRequest) ProtoMessage() {} -func (*ListVolumesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } - -func (m *ListVolumesRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*ListVolumesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } func (m *ListVolumesRequest) GetMaxEntries() int32 { if m != nil { @@ -1063,7 +1135,7 @@ type ListVolumesResponse struct { func (m *ListVolumesResponse) Reset() { *m = ListVolumesResponse{} } func (m *ListVolumesResponse) String() string { return proto.CompactTextString(m) } func (*ListVolumesResponse) ProtoMessage() {} -func (*ListVolumesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +func (*ListVolumesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } func (m *ListVolumesResponse) GetEntries() []*ListVolumesResponse_Entry { if m != nil { @@ -1086,7 +1158,7 @@ type ListVolumesResponse_Entry struct { func (m *ListVolumesResponse_Entry) Reset() { *m = ListVolumesResponse_Entry{} } func (m *ListVolumesResponse_Entry) String() string { return proto.CompactTextString(m) } func (*ListVolumesResponse_Entry) ProtoMessage() {} -func (*ListVolumesResponse_Entry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19, 0} } +func (*ListVolumesResponse_Entry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21, 0} } func (m *ListVolumesResponse_Entry) GetVolume() *Volume { if m != nil { @@ -1095,35 +1167,24 @@ func (m *ListVolumesResponse_Entry) GetVolume() *Volume { return nil } -// ////// -// ////// type GetCapacityRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // If specified, the Plugin SHALL report the capacity of the storage // that can be used to provision volumes that satisfy ALL of the // specified `volume_capabilities`. These are the same // `volume_capabilities` the CO will use in `CreateVolumeRequest`. // This field is OPTIONAL. - VolumeCapabilities []*VolumeCapability `protobuf:"bytes,2,rep,name=volume_capabilities,json=volumeCapabilities" json:"volume_capabilities,omitempty"` + VolumeCapabilities []*VolumeCapability `protobuf:"bytes,1,rep,name=volume_capabilities,json=volumeCapabilities" json:"volume_capabilities,omitempty"` // If specified, the Plugin SHALL report the capacity of the storage // that can be used to provision volumes with the given Plugin // specific `parameters`. These are the same `parameters` the CO will // use in `CreateVolumeRequest`. This field is OPTIONAL. - Parameters map[string]string `protobuf:"bytes,3,rep,name=parameters" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } func (m *GetCapacityRequest) Reset() { *m = GetCapacityRequest{} } func (m *GetCapacityRequest) String() string { return proto.CompactTextString(m) } func (*GetCapacityRequest) ProtoMessage() {} -func (*GetCapacityRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } - -func (m *GetCapacityRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*GetCapacityRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } func (m *GetCapacityRequest) GetVolumeCapabilities() []*VolumeCapability { if m != nil { @@ -1152,7 +1213,7 @@ type GetCapacityResponse struct { func (m *GetCapacityResponse) Reset() { *m = GetCapacityResponse{} } func (m *GetCapacityResponse) String() string { return proto.CompactTextString(m) } func (*GetCapacityResponse) ProtoMessage() {} -func (*GetCapacityResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +func (*GetCapacityResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } func (m *GetCapacityResponse) GetAvailableCapacity() int64 { if m != nil { @@ -1161,38 +1222,7 @@ func (m *GetCapacityResponse) GetAvailableCapacity() int64 { return 0 } -// ////// -// ////// -type ControllerProbeRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` -} - -func (m *ControllerProbeRequest) Reset() { *m = ControllerProbeRequest{} } -func (m *ControllerProbeRequest) String() string { return proto.CompactTextString(m) } -func (*ControllerProbeRequest) ProtoMessage() {} -func (*ControllerProbeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } - -func (m *ControllerProbeRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} - -type ControllerProbeResponse struct { -} - -func (m *ControllerProbeResponse) Reset() { *m = ControllerProbeResponse{} } -func (m *ControllerProbeResponse) String() string { return proto.CompactTextString(m) } -func (*ControllerProbeResponse) ProtoMessage() {} -func (*ControllerProbeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } - -// ////// -// ////// type ControllerGetCapabilitiesRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` } func (m *ControllerGetCapabilitiesRequest) Reset() { *m = ControllerGetCapabilitiesRequest{} } @@ -1202,13 +1232,6 @@ func (*ControllerGetCapabilitiesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } -func (m *ControllerGetCapabilitiesRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} - type ControllerGetCapabilitiesResponse struct { // All the capabilities that the controller service supports. This // field is OPTIONAL. @@ -1321,7 +1344,7 @@ func _ControllerServiceCapability_OneofSizer(msg proto.Message) (n int) { } type ControllerServiceCapability_RPC struct { - Type ControllerServiceCapability_RPC_Type `protobuf:"varint,1,opt,name=type,enum=csi.ControllerServiceCapability_RPC_Type" json:"type,omitempty"` + Type ControllerServiceCapability_RPC_Type `protobuf:"varint,1,opt,name=type,enum=csi.v0.ControllerServiceCapability_RPC_Type" json:"type,omitempty"` } func (m *ControllerServiceCapability_RPC) Reset() { *m = ControllerServiceCapability_RPC{} } @@ -1338,19 +1361,155 @@ func (m *ControllerServiceCapability_RPC) GetType() ControllerServiceCapability_ return ControllerServiceCapability_RPC_UNKNOWN } -// ////// -// ////// +type NodeStageVolumeRequest struct { + // The ID of the volume to publish. This field is REQUIRED. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + // The CO SHALL set this field to the value returned by + // `ControllerPublishVolume` if the corresponding Controller Plugin + // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be + // left unset if the corresponding Controller Plugin does not have + // this capability. This is an OPTIONAL field. + PublishInfo map[string]string `protobuf:"bytes,2,rep,name=publish_info,json=publishInfo" json:"publish_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // The path to which the volume will be published. It MUST be an + // absolute path in the root filesystem of the process serving this + // request. The CO SHALL ensure that there is only one + // staging_target_path per volume. + // This is a REQUIRED field. + StagingTargetPath string `protobuf:"bytes,3,opt,name=staging_target_path,json=stagingTargetPath" json:"staging_target_path,omitempty"` + // The capability of the volume the CO expects the volume to have. + // This is a REQUIRED field. + VolumeCapability *VolumeCapability `protobuf:"bytes,4,opt,name=volume_capability,json=volumeCapability" json:"volume_capability,omitempty"` + // Secrets required by plugin to complete node stage volume request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. + // This field is OPTIONAL. + NodeStageSecrets map[string]string `protobuf:"bytes,5,rep,name=node_stage_secrets,json=nodeStageSecrets" json:"node_stage_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Attributes of the volume to publish. This field is OPTIONAL and + // MUST match the attributes of the VolumeInfo identified by + // `volume_id`. + VolumeAttributes map[string]string `protobuf:"bytes,6,rep,name=volume_attributes,json=volumeAttributes" json:"volume_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *NodeStageVolumeRequest) Reset() { *m = NodeStageVolumeRequest{} } +func (m *NodeStageVolumeRequest) String() string { return proto.CompactTextString(m) } +func (*NodeStageVolumeRequest) ProtoMessage() {} +func (*NodeStageVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } + +func (m *NodeStageVolumeRequest) GetVolumeId() string { + if m != nil { + return m.VolumeId + } + return "" +} + +func (m *NodeStageVolumeRequest) GetPublishInfo() map[string]string { + if m != nil { + return m.PublishInfo + } + return nil +} + +func (m *NodeStageVolumeRequest) GetStagingTargetPath() string { + if m != nil { + return m.StagingTargetPath + } + return "" +} + +func (m *NodeStageVolumeRequest) GetVolumeCapability() *VolumeCapability { + if m != nil { + return m.VolumeCapability + } + return nil +} + +func (m *NodeStageVolumeRequest) GetNodeStageSecrets() map[string]string { + if m != nil { + return m.NodeStageSecrets + } + return nil +} + +func (m *NodeStageVolumeRequest) GetVolumeAttributes() map[string]string { + if m != nil { + return m.VolumeAttributes + } + return nil +} + +type NodeStageVolumeResponse struct { +} + +func (m *NodeStageVolumeResponse) Reset() { *m = NodeStageVolumeResponse{} } +func (m *NodeStageVolumeResponse) String() string { return proto.CompactTextString(m) } +func (*NodeStageVolumeResponse) ProtoMessage() {} +func (*NodeStageVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } + +type NodeUnstageVolumeRequest struct { + // The ID of the volume. This field is REQUIRED. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + // The path at which the volume was published. It MUST be an absolute + // path in the root filesystem of the process serving this request. + // This is a REQUIRED field. + StagingTargetPath string `protobuf:"bytes,2,opt,name=staging_target_path,json=stagingTargetPath" json:"staging_target_path,omitempty"` +} + +func (m *NodeUnstageVolumeRequest) Reset() { *m = NodeUnstageVolumeRequest{} } +func (m *NodeUnstageVolumeRequest) String() string { return proto.CompactTextString(m) } +func (*NodeUnstageVolumeRequest) ProtoMessage() {} +func (*NodeUnstageVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } + +func (m *NodeUnstageVolumeRequest) GetVolumeId() string { + if m != nil { + return m.VolumeId + } + return "" +} + +func (m *NodeUnstageVolumeRequest) GetStagingTargetPath() string { + if m != nil { + return m.StagingTargetPath + } + return "" +} + +type NodeUnstageVolumeResponse struct { +} + +func (m *NodeUnstageVolumeResponse) Reset() { *m = NodeUnstageVolumeResponse{} } +func (m *NodeUnstageVolumeResponse) String() string { return proto.CompactTextString(m) } +func (*NodeUnstageVolumeResponse) ProtoMessage() {} +func (*NodeUnstageVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } + type NodePublishVolumeRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // The ID of the volume to publish. This field is REQUIRED. - VolumeId string `protobuf:"bytes,2,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` // The CO SHALL set this field to the value returned by // `ControllerPublishVolume` if the corresponding Controller Plugin // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be // left unset if the corresponding Controller Plugin does not have // this capability. This is an OPTIONAL field. - PublishInfo map[string]string `protobuf:"bytes,3,rep,name=publish_info,json=publishInfo" json:"publish_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + PublishInfo map[string]string `protobuf:"bytes,2,rep,name=publish_info,json=publishInfo" json:"publish_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // The path to which the device was mounted by `NodeStageVolume`. + // It MUST be an absolute path in the root filesystem of the process + // serving this request. + // It MUST be set if the Node Plugin implements the + // `STAGE_UNSTAGE_VOLUME` node capability. + // This is an OPTIONAL field. + StagingTargetPath string `protobuf:"bytes,3,opt,name=staging_target_path,json=stagingTargetPath" json:"staging_target_path,omitempty"` // The path to which the volume will be published. It MUST be an // absolute path in the root filesystem of the process serving this // request. The CO SHALL ensure uniqueness of target_path per volume. @@ -1364,18 +1523,24 @@ type NodePublishVolumeRequest struct { // Whether to publish the volume in readonly mode. This field is // REQUIRED. Readonly bool `protobuf:"varint,6,opt,name=readonly" json:"readonly,omitempty"` - // Credentials used by Node plugin to authenticate/authorize node - // publish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + // Secrets required by plugin to complete node publish volume request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - NodePublishCredentials map[string]string `protobuf:"bytes,7,rep,name=node_publish_credentials,json=nodePublishCredentials" json:"node_publish_credentials,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NodePublishSecrets map[string]string `protobuf:"bytes,7,rep,name=node_publish_secrets,json=nodePublishSecrets" json:"node_publish_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Attributes of the volume to publish. This field is OPTIONAL and // MUST match the attributes of the Volume identified by // `volume_id`. @@ -1385,14 +1550,7 @@ type NodePublishVolumeRequest struct { func (m *NodePublishVolumeRequest) Reset() { *m = NodePublishVolumeRequest{} } func (m *NodePublishVolumeRequest) String() string { return proto.CompactTextString(m) } func (*NodePublishVolumeRequest) ProtoMessage() {} -func (*NodePublishVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } - -func (m *NodePublishVolumeRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*NodePublishVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } func (m *NodePublishVolumeRequest) GetVolumeId() string { if m != nil { @@ -1408,6 +1566,13 @@ func (m *NodePublishVolumeRequest) GetPublishInfo() map[string]string { return nil } +func (m *NodePublishVolumeRequest) GetStagingTargetPath() string { + if m != nil { + return m.StagingTargetPath + } + return "" +} + func (m *NodePublishVolumeRequest) GetTargetPath() string { if m != nil { return m.TargetPath @@ -1429,9 +1594,9 @@ func (m *NodePublishVolumeRequest) GetReadonly() bool { return false } -func (m *NodePublishVolumeRequest) GetNodePublishCredentials() map[string]string { +func (m *NodePublishVolumeRequest) GetNodePublishSecrets() map[string]string { if m != nil { - return m.NodePublishCredentials + return m.NodePublishSecrets } return nil } @@ -1449,44 +1614,21 @@ type NodePublishVolumeResponse struct { func (m *NodePublishVolumeResponse) Reset() { *m = NodePublishVolumeResponse{} } func (m *NodePublishVolumeResponse) String() string { return proto.CompactTextString(m) } func (*NodePublishVolumeResponse) ProtoMessage() {} -func (*NodePublishVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } +func (*NodePublishVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } -// ////// -// ////// type NodeUnpublishVolumeRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // The ID of the volume. This field is REQUIRED. - VolumeId string `protobuf:"bytes,2,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` // The path at which the volume was published. It MUST be an absolute // path in the root filesystem of the process serving this request. // This is a REQUIRED field. - TargetPath string `protobuf:"bytes,3,opt,name=target_path,json=targetPath" json:"target_path,omitempty"` - // Credentials used by Node plugin to authenticate/authorize node - // unpublish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. - // This field is OPTIONAL. - NodeUnpublishCredentials map[string]string `protobuf:"bytes,4,rep,name=node_unpublish_credentials,json=nodeUnpublishCredentials" json:"node_unpublish_credentials,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath" json:"target_path,omitempty"` } func (m *NodeUnpublishVolumeRequest) Reset() { *m = NodeUnpublishVolumeRequest{} } func (m *NodeUnpublishVolumeRequest) String() string { return proto.CompactTextString(m) } func (*NodeUnpublishVolumeRequest) ProtoMessage() {} -func (*NodeUnpublishVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } - -func (m *NodeUnpublishVolumeRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*NodeUnpublishVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } func (m *NodeUnpublishVolumeRequest) GetVolumeId() string { if m != nil { @@ -1502,39 +1644,21 @@ func (m *NodeUnpublishVolumeRequest) GetTargetPath() string { return "" } -func (m *NodeUnpublishVolumeRequest) GetNodeUnpublishCredentials() map[string]string { - if m != nil { - return m.NodeUnpublishCredentials - } - return nil -} - type NodeUnpublishVolumeResponse struct { } func (m *NodeUnpublishVolumeResponse) Reset() { *m = NodeUnpublishVolumeResponse{} } func (m *NodeUnpublishVolumeResponse) String() string { return proto.CompactTextString(m) } func (*NodeUnpublishVolumeResponse) ProtoMessage() {} -func (*NodeUnpublishVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +func (*NodeUnpublishVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } -// ////// -// ////// type NodeGetIdRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` } func (m *NodeGetIdRequest) Reset() { *m = NodeGetIdRequest{} } func (m *NodeGetIdRequest) String() string { return proto.CompactTextString(m) } func (*NodeGetIdRequest) ProtoMessage() {} -func (*NodeGetIdRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } - -func (m *NodeGetIdRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*NodeGetIdRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } type NodeGetIdResponse struct { // The ID of the node as understood by the SP which SHALL be used by @@ -1546,7 +1670,7 @@ type NodeGetIdResponse struct { func (m *NodeGetIdResponse) Reset() { *m = NodeGetIdResponse{} } func (m *NodeGetIdResponse) String() string { return proto.CompactTextString(m) } func (*NodeGetIdResponse) ProtoMessage() {} -func (*NodeGetIdResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } +func (*NodeGetIdResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } func (m *NodeGetIdResponse) GetNodeId() string { if m != nil { @@ -1555,51 +1679,13 @@ func (m *NodeGetIdResponse) GetNodeId() string { return "" } -// ////// -// ////// -type NodeProbeRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` -} - -func (m *NodeProbeRequest) Reset() { *m = NodeProbeRequest{} } -func (m *NodeProbeRequest) String() string { return proto.CompactTextString(m) } -func (*NodeProbeRequest) ProtoMessage() {} -func (*NodeProbeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } - -func (m *NodeProbeRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} - -type NodeProbeResponse struct { -} - -func (m *NodeProbeResponse) Reset() { *m = NodeProbeResponse{} } -func (m *NodeProbeResponse) String() string { return proto.CompactTextString(m) } -func (*NodeProbeResponse) ProtoMessage() {} -func (*NodeProbeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } - -// ////// -// ////// type NodeGetCapabilitiesRequest struct { - // The API version assumed by the CO. This is a REQUIRED field. - Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` } func (m *NodeGetCapabilitiesRequest) Reset() { *m = NodeGetCapabilitiesRequest{} } func (m *NodeGetCapabilitiesRequest) String() string { return proto.CompactTextString(m) } func (*NodeGetCapabilitiesRequest) ProtoMessage() {} -func (*NodeGetCapabilitiesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } - -func (m *NodeGetCapabilitiesRequest) GetVersion() *Version { - if m != nil { - return m.Version - } - return nil -} +func (*NodeGetCapabilitiesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } type NodeGetCapabilitiesResponse struct { // All the capabilities that the node service supports. This field @@ -1610,7 +1696,7 @@ type NodeGetCapabilitiesResponse struct { func (m *NodeGetCapabilitiesResponse) Reset() { *m = NodeGetCapabilitiesResponse{} } func (m *NodeGetCapabilitiesResponse) String() string { return proto.CompactTextString(m) } func (*NodeGetCapabilitiesResponse) ProtoMessage() {} -func (*NodeGetCapabilitiesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } +func (*NodeGetCapabilitiesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } func (m *NodeGetCapabilitiesResponse) GetCapabilities() []*NodeServiceCapability { if m != nil { @@ -1629,7 +1715,7 @@ type NodeServiceCapability struct { func (m *NodeServiceCapability) Reset() { *m = NodeServiceCapability{} } func (m *NodeServiceCapability) String() string { return proto.CompactTextString(m) } func (*NodeServiceCapability) ProtoMessage() {} -func (*NodeServiceCapability) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } +func (*NodeServiceCapability) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } type isNodeServiceCapability_Type interface { isNodeServiceCapability_Type() @@ -1711,13 +1797,13 @@ func _NodeServiceCapability_OneofSizer(msg proto.Message) (n int) { } type NodeServiceCapability_RPC struct { - Type NodeServiceCapability_RPC_Type `protobuf:"varint,1,opt,name=type,enum=csi.NodeServiceCapability_RPC_Type" json:"type,omitempty"` + Type NodeServiceCapability_RPC_Type `protobuf:"varint,1,opt,name=type,enum=csi.v0.NodeServiceCapability_RPC_Type" json:"type,omitempty"` } func (m *NodeServiceCapability_RPC) Reset() { *m = NodeServiceCapability_RPC{} } func (m *NodeServiceCapability_RPC) String() string { return proto.CompactTextString(m) } func (*NodeServiceCapability_RPC) ProtoMessage() {} -func (*NodeServiceCapability_RPC) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37, 0} } +func (*NodeServiceCapability_RPC) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39, 0} } func (m *NodeServiceCapability_RPC) GetType() NodeServiceCapability_RPC_Type { if m != nil { @@ -1727,53 +1813,57 @@ func (m *NodeServiceCapability_RPC) GetType() NodeServiceCapability_RPC_Type { } func init() { - proto.RegisterType((*GetSupportedVersionsRequest)(nil), "csi.GetSupportedVersionsRequest") - proto.RegisterType((*GetSupportedVersionsResponse)(nil), "csi.GetSupportedVersionsResponse") - proto.RegisterType((*Version)(nil), "csi.Version") - proto.RegisterType((*GetPluginInfoRequest)(nil), "csi.GetPluginInfoRequest") - proto.RegisterType((*GetPluginInfoResponse)(nil), "csi.GetPluginInfoResponse") - proto.RegisterType((*CreateVolumeRequest)(nil), "csi.CreateVolumeRequest") - proto.RegisterType((*CreateVolumeResponse)(nil), "csi.CreateVolumeResponse") - proto.RegisterType((*VolumeCapability)(nil), "csi.VolumeCapability") - proto.RegisterType((*VolumeCapability_BlockVolume)(nil), "csi.VolumeCapability.BlockVolume") - proto.RegisterType((*VolumeCapability_MountVolume)(nil), "csi.VolumeCapability.MountVolume") - proto.RegisterType((*VolumeCapability_AccessMode)(nil), "csi.VolumeCapability.AccessMode") - proto.RegisterType((*CapacityRange)(nil), "csi.CapacityRange") - proto.RegisterType((*Volume)(nil), "csi.Volume") - proto.RegisterType((*DeleteVolumeRequest)(nil), "csi.DeleteVolumeRequest") - proto.RegisterType((*DeleteVolumeResponse)(nil), "csi.DeleteVolumeResponse") - proto.RegisterType((*ControllerPublishVolumeRequest)(nil), "csi.ControllerPublishVolumeRequest") - proto.RegisterType((*ControllerPublishVolumeResponse)(nil), "csi.ControllerPublishVolumeResponse") - proto.RegisterType((*ControllerUnpublishVolumeRequest)(nil), "csi.ControllerUnpublishVolumeRequest") - proto.RegisterType((*ControllerUnpublishVolumeResponse)(nil), "csi.ControllerUnpublishVolumeResponse") - proto.RegisterType((*ValidateVolumeCapabilitiesRequest)(nil), "csi.ValidateVolumeCapabilitiesRequest") - proto.RegisterType((*ValidateVolumeCapabilitiesResponse)(nil), "csi.ValidateVolumeCapabilitiesResponse") - proto.RegisterType((*ListVolumesRequest)(nil), "csi.ListVolumesRequest") - proto.RegisterType((*ListVolumesResponse)(nil), "csi.ListVolumesResponse") - proto.RegisterType((*ListVolumesResponse_Entry)(nil), "csi.ListVolumesResponse.Entry") - proto.RegisterType((*GetCapacityRequest)(nil), "csi.GetCapacityRequest") - proto.RegisterType((*GetCapacityResponse)(nil), "csi.GetCapacityResponse") - proto.RegisterType((*ControllerProbeRequest)(nil), "csi.ControllerProbeRequest") - proto.RegisterType((*ControllerProbeResponse)(nil), "csi.ControllerProbeResponse") - proto.RegisterType((*ControllerGetCapabilitiesRequest)(nil), "csi.ControllerGetCapabilitiesRequest") - proto.RegisterType((*ControllerGetCapabilitiesResponse)(nil), "csi.ControllerGetCapabilitiesResponse") - proto.RegisterType((*ControllerServiceCapability)(nil), "csi.ControllerServiceCapability") - proto.RegisterType((*ControllerServiceCapability_RPC)(nil), "csi.ControllerServiceCapability.RPC") - proto.RegisterType((*NodePublishVolumeRequest)(nil), "csi.NodePublishVolumeRequest") - proto.RegisterType((*NodePublishVolumeResponse)(nil), "csi.NodePublishVolumeResponse") - proto.RegisterType((*NodeUnpublishVolumeRequest)(nil), "csi.NodeUnpublishVolumeRequest") - proto.RegisterType((*NodeUnpublishVolumeResponse)(nil), "csi.NodeUnpublishVolumeResponse") - proto.RegisterType((*NodeGetIdRequest)(nil), "csi.NodeGetIdRequest") - proto.RegisterType((*NodeGetIdResponse)(nil), "csi.NodeGetIdResponse") - proto.RegisterType((*NodeProbeRequest)(nil), "csi.NodeProbeRequest") - proto.RegisterType((*NodeProbeResponse)(nil), "csi.NodeProbeResponse") - proto.RegisterType((*NodeGetCapabilitiesRequest)(nil), "csi.NodeGetCapabilitiesRequest") - proto.RegisterType((*NodeGetCapabilitiesResponse)(nil), "csi.NodeGetCapabilitiesResponse") - proto.RegisterType((*NodeServiceCapability)(nil), "csi.NodeServiceCapability") - proto.RegisterType((*NodeServiceCapability_RPC)(nil), "csi.NodeServiceCapability.RPC") - proto.RegisterEnum("csi.VolumeCapability_AccessMode_Mode", VolumeCapability_AccessMode_Mode_name, VolumeCapability_AccessMode_Mode_value) - proto.RegisterEnum("csi.ControllerServiceCapability_RPC_Type", ControllerServiceCapability_RPC_Type_name, ControllerServiceCapability_RPC_Type_value) - proto.RegisterEnum("csi.NodeServiceCapability_RPC_Type", NodeServiceCapability_RPC_Type_name, NodeServiceCapability_RPC_Type_value) + proto.RegisterType((*GetPluginInfoRequest)(nil), "csi.v0.GetPluginInfoRequest") + proto.RegisterType((*GetPluginInfoResponse)(nil), "csi.v0.GetPluginInfoResponse") + proto.RegisterType((*GetPluginCapabilitiesRequest)(nil), "csi.v0.GetPluginCapabilitiesRequest") + proto.RegisterType((*GetPluginCapabilitiesResponse)(nil), "csi.v0.GetPluginCapabilitiesResponse") + proto.RegisterType((*PluginCapability)(nil), "csi.v0.PluginCapability") + proto.RegisterType((*PluginCapability_Service)(nil), "csi.v0.PluginCapability.Service") + proto.RegisterType((*ProbeRequest)(nil), "csi.v0.ProbeRequest") + proto.RegisterType((*ProbeResponse)(nil), "csi.v0.ProbeResponse") + proto.RegisterType((*CreateVolumeRequest)(nil), "csi.v0.CreateVolumeRequest") + proto.RegisterType((*CreateVolumeResponse)(nil), "csi.v0.CreateVolumeResponse") + proto.RegisterType((*VolumeCapability)(nil), "csi.v0.VolumeCapability") + proto.RegisterType((*VolumeCapability_BlockVolume)(nil), "csi.v0.VolumeCapability.BlockVolume") + proto.RegisterType((*VolumeCapability_MountVolume)(nil), "csi.v0.VolumeCapability.MountVolume") + proto.RegisterType((*VolumeCapability_AccessMode)(nil), "csi.v0.VolumeCapability.AccessMode") + proto.RegisterType((*CapacityRange)(nil), "csi.v0.CapacityRange") + proto.RegisterType((*Volume)(nil), "csi.v0.Volume") + proto.RegisterType((*DeleteVolumeRequest)(nil), "csi.v0.DeleteVolumeRequest") + proto.RegisterType((*DeleteVolumeResponse)(nil), "csi.v0.DeleteVolumeResponse") + proto.RegisterType((*ControllerPublishVolumeRequest)(nil), "csi.v0.ControllerPublishVolumeRequest") + proto.RegisterType((*ControllerPublishVolumeResponse)(nil), "csi.v0.ControllerPublishVolumeResponse") + proto.RegisterType((*ControllerUnpublishVolumeRequest)(nil), "csi.v0.ControllerUnpublishVolumeRequest") + proto.RegisterType((*ControllerUnpublishVolumeResponse)(nil), "csi.v0.ControllerUnpublishVolumeResponse") + proto.RegisterType((*ValidateVolumeCapabilitiesRequest)(nil), "csi.v0.ValidateVolumeCapabilitiesRequest") + proto.RegisterType((*ValidateVolumeCapabilitiesResponse)(nil), "csi.v0.ValidateVolumeCapabilitiesResponse") + proto.RegisterType((*ListVolumesRequest)(nil), "csi.v0.ListVolumesRequest") + proto.RegisterType((*ListVolumesResponse)(nil), "csi.v0.ListVolumesResponse") + proto.RegisterType((*ListVolumesResponse_Entry)(nil), "csi.v0.ListVolumesResponse.Entry") + proto.RegisterType((*GetCapacityRequest)(nil), "csi.v0.GetCapacityRequest") + proto.RegisterType((*GetCapacityResponse)(nil), "csi.v0.GetCapacityResponse") + proto.RegisterType((*ControllerGetCapabilitiesRequest)(nil), "csi.v0.ControllerGetCapabilitiesRequest") + proto.RegisterType((*ControllerGetCapabilitiesResponse)(nil), "csi.v0.ControllerGetCapabilitiesResponse") + proto.RegisterType((*ControllerServiceCapability)(nil), "csi.v0.ControllerServiceCapability") + proto.RegisterType((*ControllerServiceCapability_RPC)(nil), "csi.v0.ControllerServiceCapability.RPC") + proto.RegisterType((*NodeStageVolumeRequest)(nil), "csi.v0.NodeStageVolumeRequest") + proto.RegisterType((*NodeStageVolumeResponse)(nil), "csi.v0.NodeStageVolumeResponse") + proto.RegisterType((*NodeUnstageVolumeRequest)(nil), "csi.v0.NodeUnstageVolumeRequest") + proto.RegisterType((*NodeUnstageVolumeResponse)(nil), "csi.v0.NodeUnstageVolumeResponse") + proto.RegisterType((*NodePublishVolumeRequest)(nil), "csi.v0.NodePublishVolumeRequest") + proto.RegisterType((*NodePublishVolumeResponse)(nil), "csi.v0.NodePublishVolumeResponse") + proto.RegisterType((*NodeUnpublishVolumeRequest)(nil), "csi.v0.NodeUnpublishVolumeRequest") + proto.RegisterType((*NodeUnpublishVolumeResponse)(nil), "csi.v0.NodeUnpublishVolumeResponse") + proto.RegisterType((*NodeGetIdRequest)(nil), "csi.v0.NodeGetIdRequest") + proto.RegisterType((*NodeGetIdResponse)(nil), "csi.v0.NodeGetIdResponse") + proto.RegisterType((*NodeGetCapabilitiesRequest)(nil), "csi.v0.NodeGetCapabilitiesRequest") + proto.RegisterType((*NodeGetCapabilitiesResponse)(nil), "csi.v0.NodeGetCapabilitiesResponse") + proto.RegisterType((*NodeServiceCapability)(nil), "csi.v0.NodeServiceCapability") + proto.RegisterType((*NodeServiceCapability_RPC)(nil), "csi.v0.NodeServiceCapability.RPC") + proto.RegisterEnum("csi.v0.PluginCapability_Service_Type", PluginCapability_Service_Type_name, PluginCapability_Service_Type_value) + proto.RegisterEnum("csi.v0.VolumeCapability_AccessMode_Mode", VolumeCapability_AccessMode_Mode_name, VolumeCapability_AccessMode_Mode_value) + proto.RegisterEnum("csi.v0.ControllerServiceCapability_RPC_Type", ControllerServiceCapability_RPC_Type_name, ControllerServiceCapability_RPC_Type_value) + proto.RegisterEnum("csi.v0.NodeServiceCapability_RPC_Type", NodeServiceCapability_RPC_Type_name, NodeServiceCapability_RPC_Type_value) } // Reference imports to suppress errors if they are not otherwise used. @@ -1787,8 +1877,9 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for Identity service type IdentityClient interface { - GetSupportedVersions(ctx context.Context, in *GetSupportedVersionsRequest, opts ...grpc.CallOption) (*GetSupportedVersionsResponse, error) GetPluginInfo(ctx context.Context, in *GetPluginInfoRequest, opts ...grpc.CallOption) (*GetPluginInfoResponse, error) + GetPluginCapabilities(ctx context.Context, in *GetPluginCapabilitiesRequest, opts ...grpc.CallOption) (*GetPluginCapabilitiesResponse, error) + Probe(ctx context.Context, in *ProbeRequest, opts ...grpc.CallOption) (*ProbeResponse, error) } type identityClient struct { @@ -1799,18 +1890,27 @@ func NewIdentityClient(cc *grpc.ClientConn) IdentityClient { return &identityClient{cc} } -func (c *identityClient) GetSupportedVersions(ctx context.Context, in *GetSupportedVersionsRequest, opts ...grpc.CallOption) (*GetSupportedVersionsResponse, error) { - out := new(GetSupportedVersionsResponse) - err := grpc.Invoke(ctx, "/csi.Identity/GetSupportedVersions", in, out, c.cc, opts...) +func (c *identityClient) GetPluginInfo(ctx context.Context, in *GetPluginInfoRequest, opts ...grpc.CallOption) (*GetPluginInfoResponse, error) { + out := new(GetPluginInfoResponse) + err := grpc.Invoke(ctx, "/csi.v0.Identity/GetPluginInfo", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *identityClient) GetPluginInfo(ctx context.Context, in *GetPluginInfoRequest, opts ...grpc.CallOption) (*GetPluginInfoResponse, error) { - out := new(GetPluginInfoResponse) - err := grpc.Invoke(ctx, "/csi.Identity/GetPluginInfo", in, out, c.cc, opts...) +func (c *identityClient) GetPluginCapabilities(ctx context.Context, in *GetPluginCapabilitiesRequest, opts ...grpc.CallOption) (*GetPluginCapabilitiesResponse, error) { + out := new(GetPluginCapabilitiesResponse) + err := grpc.Invoke(ctx, "/csi.v0.Identity/GetPluginCapabilities", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityClient) Probe(ctx context.Context, in *ProbeRequest, opts ...grpc.CallOption) (*ProbeResponse, error) { + out := new(ProbeResponse) + err := grpc.Invoke(ctx, "/csi.v0.Identity/Probe", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1820,62 +1920,85 @@ func (c *identityClient) GetPluginInfo(ctx context.Context, in *GetPluginInfoReq // Server API for Identity service type IdentityServer interface { - GetSupportedVersions(context.Context, *GetSupportedVersionsRequest) (*GetSupportedVersionsResponse, error) GetPluginInfo(context.Context, *GetPluginInfoRequest) (*GetPluginInfoResponse, error) + GetPluginCapabilities(context.Context, *GetPluginCapabilitiesRequest) (*GetPluginCapabilitiesResponse, error) + Probe(context.Context, *ProbeRequest) (*ProbeResponse, error) } func RegisterIdentityServer(s *grpc.Server, srv IdentityServer) { s.RegisterService(&_Identity_serviceDesc, srv) } -func _Identity_GetSupportedVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSupportedVersionsRequest) +func _Identity_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPluginInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(IdentityServer).GetSupportedVersions(ctx, in) + return srv.(IdentityServer).GetPluginInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Identity/GetSupportedVersions", + FullMethod: "/csi.v0.Identity/GetPluginInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IdentityServer).GetSupportedVersions(ctx, req.(*GetSupportedVersionsRequest)) + return srv.(IdentityServer).GetPluginInfo(ctx, req.(*GetPluginInfoRequest)) } return interceptor(ctx, in, info, handler) } -func _Identity_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPluginInfoRequest) +func _Identity_GetPluginCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPluginCapabilitiesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(IdentityServer).GetPluginInfo(ctx, in) + return srv.(IdentityServer).GetPluginCapabilities(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Identity/GetPluginInfo", + FullMethod: "/csi.v0.Identity/GetPluginCapabilities", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IdentityServer).GetPluginInfo(ctx, req.(*GetPluginInfoRequest)) + return srv.(IdentityServer).GetPluginCapabilities(ctx, req.(*GetPluginCapabilitiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Identity_Probe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProbeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServer).Probe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/csi.v0.Identity/Probe", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServer).Probe(ctx, req.(*ProbeRequest)) } return interceptor(ctx, in, info, handler) } var _Identity_serviceDesc = grpc.ServiceDesc{ - ServiceName: "csi.Identity", + ServiceName: "csi.v0.Identity", HandlerType: (*IdentityServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "GetSupportedVersions", - Handler: _Identity_GetSupportedVersions_Handler, - }, { MethodName: "GetPluginInfo", Handler: _Identity_GetPluginInfo_Handler, }, + { + MethodName: "GetPluginCapabilities", + Handler: _Identity_GetPluginCapabilities_Handler, + }, + { + MethodName: "Probe", + Handler: _Identity_Probe_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "csi.proto", @@ -1891,7 +2014,6 @@ type ControllerClient interface { ValidateVolumeCapabilities(ctx context.Context, in *ValidateVolumeCapabilitiesRequest, opts ...grpc.CallOption) (*ValidateVolumeCapabilitiesResponse, error) ListVolumes(ctx context.Context, in *ListVolumesRequest, opts ...grpc.CallOption) (*ListVolumesResponse, error) GetCapacity(ctx context.Context, in *GetCapacityRequest, opts ...grpc.CallOption) (*GetCapacityResponse, error) - ControllerProbe(ctx context.Context, in *ControllerProbeRequest, opts ...grpc.CallOption) (*ControllerProbeResponse, error) ControllerGetCapabilities(ctx context.Context, in *ControllerGetCapabilitiesRequest, opts ...grpc.CallOption) (*ControllerGetCapabilitiesResponse, error) } @@ -1905,7 +2027,7 @@ func NewControllerClient(cc *grpc.ClientConn) ControllerClient { func (c *controllerClient) CreateVolume(ctx context.Context, in *CreateVolumeRequest, opts ...grpc.CallOption) (*CreateVolumeResponse, error) { out := new(CreateVolumeResponse) - err := grpc.Invoke(ctx, "/csi.Controller/CreateVolume", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/csi.v0.Controller/CreateVolume", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1914,7 +2036,7 @@ func (c *controllerClient) CreateVolume(ctx context.Context, in *CreateVolumeReq func (c *controllerClient) DeleteVolume(ctx context.Context, in *DeleteVolumeRequest, opts ...grpc.CallOption) (*DeleteVolumeResponse, error) { out := new(DeleteVolumeResponse) - err := grpc.Invoke(ctx, "/csi.Controller/DeleteVolume", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/csi.v0.Controller/DeleteVolume", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1923,7 +2045,7 @@ func (c *controllerClient) DeleteVolume(ctx context.Context, in *DeleteVolumeReq func (c *controllerClient) ControllerPublishVolume(ctx context.Context, in *ControllerPublishVolumeRequest, opts ...grpc.CallOption) (*ControllerPublishVolumeResponse, error) { out := new(ControllerPublishVolumeResponse) - err := grpc.Invoke(ctx, "/csi.Controller/ControllerPublishVolume", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/csi.v0.Controller/ControllerPublishVolume", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1932,7 +2054,7 @@ func (c *controllerClient) ControllerPublishVolume(ctx context.Context, in *Cont func (c *controllerClient) ControllerUnpublishVolume(ctx context.Context, in *ControllerUnpublishVolumeRequest, opts ...grpc.CallOption) (*ControllerUnpublishVolumeResponse, error) { out := new(ControllerUnpublishVolumeResponse) - err := grpc.Invoke(ctx, "/csi.Controller/ControllerUnpublishVolume", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/csi.v0.Controller/ControllerUnpublishVolume", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1941,7 +2063,7 @@ func (c *controllerClient) ControllerUnpublishVolume(ctx context.Context, in *Co func (c *controllerClient) ValidateVolumeCapabilities(ctx context.Context, in *ValidateVolumeCapabilitiesRequest, opts ...grpc.CallOption) (*ValidateVolumeCapabilitiesResponse, error) { out := new(ValidateVolumeCapabilitiesResponse) - err := grpc.Invoke(ctx, "/csi.Controller/ValidateVolumeCapabilities", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/csi.v0.Controller/ValidateVolumeCapabilities", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1950,7 +2072,7 @@ func (c *controllerClient) ValidateVolumeCapabilities(ctx context.Context, in *V func (c *controllerClient) ListVolumes(ctx context.Context, in *ListVolumesRequest, opts ...grpc.CallOption) (*ListVolumesResponse, error) { out := new(ListVolumesResponse) - err := grpc.Invoke(ctx, "/csi.Controller/ListVolumes", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/csi.v0.Controller/ListVolumes", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1959,16 +2081,7 @@ func (c *controllerClient) ListVolumes(ctx context.Context, in *ListVolumesReque func (c *controllerClient) GetCapacity(ctx context.Context, in *GetCapacityRequest, opts ...grpc.CallOption) (*GetCapacityResponse, error) { out := new(GetCapacityResponse) - err := grpc.Invoke(ctx, "/csi.Controller/GetCapacity", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *controllerClient) ControllerProbe(ctx context.Context, in *ControllerProbeRequest, opts ...grpc.CallOption) (*ControllerProbeResponse, error) { - out := new(ControllerProbeResponse) - err := grpc.Invoke(ctx, "/csi.Controller/ControllerProbe", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/csi.v0.Controller/GetCapacity", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1977,7 +2090,7 @@ func (c *controllerClient) ControllerProbe(ctx context.Context, in *ControllerPr func (c *controllerClient) ControllerGetCapabilities(ctx context.Context, in *ControllerGetCapabilitiesRequest, opts ...grpc.CallOption) (*ControllerGetCapabilitiesResponse, error) { out := new(ControllerGetCapabilitiesResponse) - err := grpc.Invoke(ctx, "/csi.Controller/ControllerGetCapabilities", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/csi.v0.Controller/ControllerGetCapabilities", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1994,7 +2107,6 @@ type ControllerServer interface { ValidateVolumeCapabilities(context.Context, *ValidateVolumeCapabilitiesRequest) (*ValidateVolumeCapabilitiesResponse, error) ListVolumes(context.Context, *ListVolumesRequest) (*ListVolumesResponse, error) GetCapacity(context.Context, *GetCapacityRequest) (*GetCapacityResponse, error) - ControllerProbe(context.Context, *ControllerProbeRequest) (*ControllerProbeResponse, error) ControllerGetCapabilities(context.Context, *ControllerGetCapabilitiesRequest) (*ControllerGetCapabilitiesResponse, error) } @@ -2012,7 +2124,7 @@ func _Controller_CreateVolume_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Controller/CreateVolume", + FullMethod: "/csi.v0.Controller/CreateVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).CreateVolume(ctx, req.(*CreateVolumeRequest)) @@ -2030,7 +2142,7 @@ func _Controller_DeleteVolume_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Controller/DeleteVolume", + FullMethod: "/csi.v0.Controller/DeleteVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).DeleteVolume(ctx, req.(*DeleteVolumeRequest)) @@ -2048,7 +2160,7 @@ func _Controller_ControllerPublishVolume_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Controller/ControllerPublishVolume", + FullMethod: "/csi.v0.Controller/ControllerPublishVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ControllerPublishVolume(ctx, req.(*ControllerPublishVolumeRequest)) @@ -2066,7 +2178,7 @@ func _Controller_ControllerUnpublishVolume_Handler(srv interface{}, ctx context. } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Controller/ControllerUnpublishVolume", + FullMethod: "/csi.v0.Controller/ControllerUnpublishVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ControllerUnpublishVolume(ctx, req.(*ControllerUnpublishVolumeRequest)) @@ -2084,7 +2196,7 @@ func _Controller_ValidateVolumeCapabilities_Handler(srv interface{}, ctx context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Controller/ValidateVolumeCapabilities", + FullMethod: "/csi.v0.Controller/ValidateVolumeCapabilities", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ValidateVolumeCapabilities(ctx, req.(*ValidateVolumeCapabilitiesRequest)) @@ -2102,7 +2214,7 @@ func _Controller_ListVolumes_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Controller/ListVolumes", + FullMethod: "/csi.v0.Controller/ListVolumes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ListVolumes(ctx, req.(*ListVolumesRequest)) @@ -2120,7 +2232,7 @@ func _Controller_GetCapacity_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Controller/GetCapacity", + FullMethod: "/csi.v0.Controller/GetCapacity", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).GetCapacity(ctx, req.(*GetCapacityRequest)) @@ -2128,24 +2240,6 @@ func _Controller_GetCapacity_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Controller_ControllerProbe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ControllerProbeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ControllerServer).ControllerProbe(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/csi.Controller/ControllerProbe", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ControllerServer).ControllerProbe(ctx, req.(*ControllerProbeRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Controller_ControllerGetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ControllerGetCapabilitiesRequest) if err := dec(in); err != nil { @@ -2156,7 +2250,7 @@ func _Controller_ControllerGetCapabilities_Handler(srv interface{}, ctx context. } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Controller/ControllerGetCapabilities", + FullMethod: "/csi.v0.Controller/ControllerGetCapabilities", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ControllerGetCapabilities(ctx, req.(*ControllerGetCapabilitiesRequest)) @@ -2165,7 +2259,7 @@ func _Controller_ControllerGetCapabilities_Handler(srv interface{}, ctx context. } var _Controller_serviceDesc = grpc.ServiceDesc{ - ServiceName: "csi.Controller", + ServiceName: "csi.v0.Controller", HandlerType: (*ControllerServer)(nil), Methods: []grpc.MethodDesc{ { @@ -2196,10 +2290,6 @@ var _Controller_serviceDesc = grpc.ServiceDesc{ MethodName: "GetCapacity", Handler: _Controller_GetCapacity_Handler, }, - { - MethodName: "ControllerProbe", - Handler: _Controller_ControllerProbe_Handler, - }, { MethodName: "ControllerGetCapabilities", Handler: _Controller_ControllerGetCapabilities_Handler, @@ -2212,10 +2302,11 @@ var _Controller_serviceDesc = grpc.ServiceDesc{ // Client API for Node service type NodeClient interface { + NodeStageVolume(ctx context.Context, in *NodeStageVolumeRequest, opts ...grpc.CallOption) (*NodeStageVolumeResponse, error) + NodeUnstageVolume(ctx context.Context, in *NodeUnstageVolumeRequest, opts ...grpc.CallOption) (*NodeUnstageVolumeResponse, error) NodePublishVolume(ctx context.Context, in *NodePublishVolumeRequest, opts ...grpc.CallOption) (*NodePublishVolumeResponse, error) NodeUnpublishVolume(ctx context.Context, in *NodeUnpublishVolumeRequest, opts ...grpc.CallOption) (*NodeUnpublishVolumeResponse, error) NodeGetId(ctx context.Context, in *NodeGetIdRequest, opts ...grpc.CallOption) (*NodeGetIdResponse, error) - NodeProbe(ctx context.Context, in *NodeProbeRequest, opts ...grpc.CallOption) (*NodeProbeResponse, error) NodeGetCapabilities(ctx context.Context, in *NodeGetCapabilitiesRequest, opts ...grpc.CallOption) (*NodeGetCapabilitiesResponse, error) } @@ -2227,36 +2318,45 @@ func NewNodeClient(cc *grpc.ClientConn) NodeClient { return &nodeClient{cc} } -func (c *nodeClient) NodePublishVolume(ctx context.Context, in *NodePublishVolumeRequest, opts ...grpc.CallOption) (*NodePublishVolumeResponse, error) { - out := new(NodePublishVolumeResponse) - err := grpc.Invoke(ctx, "/csi.Node/NodePublishVolume", in, out, c.cc, opts...) +func (c *nodeClient) NodeStageVolume(ctx context.Context, in *NodeStageVolumeRequest, opts ...grpc.CallOption) (*NodeStageVolumeResponse, error) { + out := new(NodeStageVolumeResponse) + err := grpc.Invoke(ctx, "/csi.v0.Node/NodeStageVolume", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *nodeClient) NodeUnpublishVolume(ctx context.Context, in *NodeUnpublishVolumeRequest, opts ...grpc.CallOption) (*NodeUnpublishVolumeResponse, error) { - out := new(NodeUnpublishVolumeResponse) - err := grpc.Invoke(ctx, "/csi.Node/NodeUnpublishVolume", in, out, c.cc, opts...) +func (c *nodeClient) NodeUnstageVolume(ctx context.Context, in *NodeUnstageVolumeRequest, opts ...grpc.CallOption) (*NodeUnstageVolumeResponse, error) { + out := new(NodeUnstageVolumeResponse) + err := grpc.Invoke(ctx, "/csi.v0.Node/NodeUnstageVolume", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *nodeClient) NodeGetId(ctx context.Context, in *NodeGetIdRequest, opts ...grpc.CallOption) (*NodeGetIdResponse, error) { - out := new(NodeGetIdResponse) - err := grpc.Invoke(ctx, "/csi.Node/NodeGetId", in, out, c.cc, opts...) +func (c *nodeClient) NodePublishVolume(ctx context.Context, in *NodePublishVolumeRequest, opts ...grpc.CallOption) (*NodePublishVolumeResponse, error) { + out := new(NodePublishVolumeResponse) + err := grpc.Invoke(ctx, "/csi.v0.Node/NodePublishVolume", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeClient) NodeUnpublishVolume(ctx context.Context, in *NodeUnpublishVolumeRequest, opts ...grpc.CallOption) (*NodeUnpublishVolumeResponse, error) { + out := new(NodeUnpublishVolumeResponse) + err := grpc.Invoke(ctx, "/csi.v0.Node/NodeUnpublishVolume", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *nodeClient) NodeProbe(ctx context.Context, in *NodeProbeRequest, opts ...grpc.CallOption) (*NodeProbeResponse, error) { - out := new(NodeProbeResponse) - err := grpc.Invoke(ctx, "/csi.Node/NodeProbe", in, out, c.cc, opts...) +func (c *nodeClient) NodeGetId(ctx context.Context, in *NodeGetIdRequest, opts ...grpc.CallOption) (*NodeGetIdResponse, error) { + out := new(NodeGetIdResponse) + err := grpc.Invoke(ctx, "/csi.v0.Node/NodeGetId", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2265,7 +2365,7 @@ func (c *nodeClient) NodeProbe(ctx context.Context, in *NodeProbeRequest, opts . func (c *nodeClient) NodeGetCapabilities(ctx context.Context, in *NodeGetCapabilitiesRequest, opts ...grpc.CallOption) (*NodeGetCapabilitiesResponse, error) { out := new(NodeGetCapabilitiesResponse) - err := grpc.Invoke(ctx, "/csi.Node/NodeGetCapabilities", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/csi.v0.Node/NodeGetCapabilities", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2275,10 +2375,11 @@ func (c *nodeClient) NodeGetCapabilities(ctx context.Context, in *NodeGetCapabil // Server API for Node service type NodeServer interface { + NodeStageVolume(context.Context, *NodeStageVolumeRequest) (*NodeStageVolumeResponse, error) + NodeUnstageVolume(context.Context, *NodeUnstageVolumeRequest) (*NodeUnstageVolumeResponse, error) NodePublishVolume(context.Context, *NodePublishVolumeRequest) (*NodePublishVolumeResponse, error) NodeUnpublishVolume(context.Context, *NodeUnpublishVolumeRequest) (*NodeUnpublishVolumeResponse, error) NodeGetId(context.Context, *NodeGetIdRequest) (*NodeGetIdResponse, error) - NodeProbe(context.Context, *NodeProbeRequest) (*NodeProbeResponse, error) NodeGetCapabilities(context.Context, *NodeGetCapabilitiesRequest) (*NodeGetCapabilitiesResponse, error) } @@ -2286,74 +2387,92 @@ func RegisterNodeServer(s *grpc.Server, srv NodeServer) { s.RegisterService(&_Node_serviceDesc, srv) } -func _Node_NodePublishVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodePublishVolumeRequest) +func _Node_NodeStageVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeStageVolumeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(NodeServer).NodePublishVolume(ctx, in) + return srv.(NodeServer).NodeStageVolume(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Node/NodePublishVolume", + FullMethod: "/csi.v0.Node/NodeStageVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServer).NodePublishVolume(ctx, req.(*NodePublishVolumeRequest)) + return srv.(NodeServer).NodeStageVolume(ctx, req.(*NodeStageVolumeRequest)) } return interceptor(ctx, in, info, handler) } -func _Node_NodeUnpublishVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeUnpublishVolumeRequest) +func _Node_NodeUnstageVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeUnstageVolumeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(NodeServer).NodeUnpublishVolume(ctx, in) + return srv.(NodeServer).NodeUnstageVolume(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Node/NodeUnpublishVolume", + FullMethod: "/csi.v0.Node/NodeUnstageVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServer).NodeUnpublishVolume(ctx, req.(*NodeUnpublishVolumeRequest)) + return srv.(NodeServer).NodeUnstageVolume(ctx, req.(*NodeUnstageVolumeRequest)) } return interceptor(ctx, in, info, handler) } -func _Node_NodeGetId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeGetIdRequest) +func _Node_NodePublishVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodePublishVolumeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(NodeServer).NodeGetId(ctx, in) + return srv.(NodeServer).NodePublishVolume(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Node/NodeGetId", + FullMethod: "/csi.v0.Node/NodePublishVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServer).NodeGetId(ctx, req.(*NodeGetIdRequest)) + return srv.(NodeServer).NodePublishVolume(ctx, req.(*NodePublishVolumeRequest)) } return interceptor(ctx, in, info, handler) } -func _Node_NodeProbe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeProbeRequest) +func _Node_NodeUnpublishVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeUnpublishVolumeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(NodeServer).NodeProbe(ctx, in) + return srv.(NodeServer).NodeUnpublishVolume(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Node/NodeProbe", + FullMethod: "/csi.v0.Node/NodeUnpublishVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServer).NodeProbe(ctx, req.(*NodeProbeRequest)) + return srv.(NodeServer).NodeUnpublishVolume(ctx, req.(*NodeUnpublishVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Node_NodeGetId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeGetIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeServer).NodeGetId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/csi.v0.Node/NodeGetId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeServer).NodeGetId(ctx, req.(*NodeGetIdRequest)) } return interceptor(ctx, in, info, handler) } @@ -2368,7 +2487,7 @@ func _Node_NodeGetCapabilities_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.Node/NodeGetCapabilities", + FullMethod: "/csi.v0.Node/NodeGetCapabilities", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NodeServer).NodeGetCapabilities(ctx, req.(*NodeGetCapabilitiesRequest)) @@ -2377,9 +2496,17 @@ func _Node_NodeGetCapabilities_Handler(srv interface{}, ctx context.Context, dec } var _Node_serviceDesc = grpc.ServiceDesc{ - ServiceName: "csi.Node", + ServiceName: "csi.v0.Node", HandlerType: (*NodeServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "NodeStageVolume", + Handler: _Node_NodeStageVolume_Handler, + }, + { + MethodName: "NodeUnstageVolume", + Handler: _Node_NodeUnstageVolume_Handler, + }, { MethodName: "NodePublishVolume", Handler: _Node_NodePublishVolume_Handler, @@ -2392,10 +2519,6 @@ var _Node_serviceDesc = grpc.ServiceDesc{ MethodName: "NodeGetId", Handler: _Node_NodeGetId_Handler, }, - { - MethodName: "NodeProbe", - Handler: _Node_NodeProbe_Handler, - }, { MethodName: "NodeGetCapabilities", Handler: _Node_NodeGetCapabilities_Handler, @@ -2408,135 +2531,141 @@ var _Node_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("csi.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 2071 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00,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e, 0x36, 0x43, 0xc4, 0x0a, 0x58, - 0xf6, 0x97, 0x23, 0xb3, 0x07, 0xf9, 0x20, 0x0d, 0x24, 0x52, 0xea, 0x0b, 0xc8, 0x87, 0xaa, 0x03, - 0xa9, 0xa3, 0x0e, 0xfe, 0xb2, 0x67, 0x3a, 0xb8, 0xa5, 0x5f, 0xf5, 0x3d, 0xec, 0xd2, 0x30, 0xa4, - 0xb5, 0xbc, 0x0f, 0x3d, 0x20, 0x40, 0x12, 0xd3, 0xb6, 0xd9, 0x31, 0x3d, 0x4e, 0x93, 0xa2, 0x34, - 0x40, 0x41, 0x94, 0x40, 0xfd, 0x4a, 0x82, 0x59, 0x9e, 0x98, 0xfb, 0x42, 0x71, 0x0a, 0x89, 0xf4, - 0xa1, 0x4c, 0xe4, 0x12, 0xa4, 0xcc, 0x16, 0x3f, 0xff, 0x29, 0xb3, 0x85, 0x1e, 0x03, 0x18, 0x9e, - 0xe7, 0x98, 0x57, 0x3d, 0xc2, 0xc2, 0x8a, 0x75, 0x51, 0x48, 0x46, 0x79, 0x3f, 0xc0, 0xf2, 0x1a, - 0x32, 0x20, 0x27, 0x97, 0x38, 0x82, 0x9e, 0xea, 0xd2, 0xfd, 0x3d, 0x05, 0xcb, 0x87, 0xb8, 0x8d, - 0xdf, 0xb4, 0x46, 0x17, 0x61, 0x81, 0x17, 0xd5, 0xc0, 0xa5, 0x79, 0x06, 0xa8, 0xb5, 0x22, 0xf5, - 0xad, 0x45, 0xd5, 0x84, 0xea, 0x5b, 0x5a, 0xa8, 0x6f, 0x31, 0x56, 0x08, 0xf5, 0x8d, 0x61, 0x47, - 0xd5, 0xb7, 0x21, 0x8a, 0x70, 0x81, 0x8a, 0x17, 0x30, 0x55, 0xac, 0xd6, 0x60, 0x25, 0x6c, 0x24, - 0x2b, 0x50, 0xea, 0xff, 0x33, 0xb0, 0x3d, 0x50, 0x74, 0xde, 0xbb, 0x6a, 0x9b, 0xee, 0xcb, 0x77, - 0x10, 0xce, 0x75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, 0x82, 0x40, 0xf6, 0x27, 0xb0, 0x10, 0x74, - 0x1a, 0xb4, 0x1a, 0x30, 0x88, 0x5d, 0x4b, 0x59, 0x8b, 0x82, 0xa3, 0xdc, 0x2c, 0x61, 0x03, 0xee, - 0x50, 0xaa, 0xd6, 0xa2, 0xe0, 0xa8, 0x5f, 0xd1, 0xf4, 0xdc, 0x15, 0xd5, 0xc5, 0x25, 0xa6, 0x94, - 0x4c, 0xe0, 0xcb, 0xbe, 0x9a, 0xa5, 0x1f, 0xf8, 0x3f, 0xfa, 0x26, 0x00, 0x00, 0xff, 0xff, 0x9b, - 0x61, 0xfa, 0x6c, 0xed, 0x1f, 0x00, 0x00, + // 2173 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0x4d, 0x53, 0xe3, 0xc8, + 0x15, 0xf9, 0x0b, 0x78, 0x06, 0xd6, 0xd3, 0x30, 0x83, 0x11, 0x30, 0x03, 0x62, 0x67, 0x96, 0xfd, + 0xf2, 0x26, 0x24, 0xd9, 0xda, 0xec, 0x90, 0x49, 0xc0, 0x28, 0xe0, 0xc5, 0x18, 0x4a, 0x18, 0xa6, + 0x76, 0xb2, 0x29, 0xad, 0xb0, 0x1b, 0x46, 0x19, 0x23, 0x79, 0x24, 0x99, 0x1a, 0x6e, 0xa9, 0x5c, + 0x52, 0x95, 0x5b, 0xee, 0x49, 0xa5, 0x2a, 0xc7, 0x9c, 0x73, 0x48, 0x55, 0xaa, 0xe6, 0x9c, 0xaa, + 0xfc, 0x81, 0x9c, 0xf2, 0x03, 0x52, 0x39, 0xe6, 0x94, 0x53, 0x4a, 0xdd, 0x2d, 0xb9, 0x25, 0xb7, + 0x64, 0x7b, 0x67, 0x6a, 0x2b, 0x27, 0xac, 0xf7, 0xdd, 0xaf, 0xdf, 0x7b, 0xfd, 0x5e, 0x37, 0x30, + 0xdd, 0x72, 0xcd, 0x4a, 0x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, 0x6e, 0x22, 0x73, 0x63, 0x37, 0x91, 0x17, 0x80, 0xc8, 0x19, + 0xed, 0x2b, 0x88, 0x5f, 0x3a, 0x7c, 0x7f, 0xc8, 0x82, 0x42, 0x70, 0xe4, 0xac, 0x2d, 0x59, 0x31, + 0x30, 0x32, 0x92, 0xfb, 0xc0, 0x61, 0x2a, 0x46, 0x3d, 0x54, 0xde, 0xb0, 0xd9, 0xf1, 0x0f, 0x25, + 0xe1, 0x6a, 0xbe, 0xfd, 0xbe, 0x71, 0x09, 0x16, 0x07, 0x7c, 0xc1, 0xba, 0x86, 0x2b, 0x28, 0xfb, + 0xa8, 0x33, 0xcb, 0x1d, 0x33, 0x5e, 0x13, 0x62, 0x2b, 0x93, 0x10, 0x5b, 0xca, 0x32, 0x2c, 0x09, + 0x14, 0x31, 0x2b, 0xfe, 0x99, 0xa7, 0x66, 0x8c, 0x3f, 0x10, 0x35, 0x85, 0x69, 0xf3, 0x5d, 0x3e, + 0x04, 0x84, 0x43, 0xc0, 0xdb, 0x4d, 0x9c, 0x07, 0x50, 0xe4, 0xe9, 0x72, 0x84, 0x0e, 0xbc, 0x21, + 0x99, 0x95, 0x7f, 0xa3, 0xf1, 0xac, 0x10, 0x1b, 0xcf, 0x7e, 0x01, 0x0b, 0x24, 0xeb, 0xe2, 0x7d, + 0xef, 0x64, 0x74, 0x00, 0x48, 0xf4, 0x08, 0x87, 0x88, 0xe4, 0x1e, 0xc9, 0xe5, 0xd8, 0x14, 0xd6, + 0x12, 0x65, 0xdf, 0x14, 0x51, 0xf4, 0xe9, 0x50, 0x45, 0xdf, 0x56, 0xfe, 0xa9, 0x34, 0xea, 0xff, + 0x2f, 0x26, 0x37, 0x16, 0xfd, 0xc2, 0x99, 0x4b, 0x79, 0x06, 0x32, 0x4d, 0x8d, 0xf1, 0xc7, 0xa1, + 0x58, 0xe0, 0x65, 0xe2, 0x81, 0xa7, 0xac, 0xc2, 0xb2, 0x50, 0x36, 0x53, 0x8d, 0xa0, 0x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e, 0x54, 0xe6, 0x79, 0xf8, 0xf3, + 0x51, 0x5e, 0x12, 0x60, 0xe2, 0x56, 0xc6, 0x43, 0x45, 0x89, 0xf1, 0x88, 0x82, 0x64, 0x23, 0x95, + 0x26, 0xd0, 0xb0, 0x9b, 0x7f, 0x96, 0x6d, 0xb9, 0xe6, 0x45, 0x81, 0xfc, 0x4b, 0xc5, 0xf7, 0xfe, + 0x17, 0x00, 0x00, 0xff, 0xff, 0x69, 0xaa, 0xdb, 0x41, 0x5f, 0x21, 0x00, 0x00, } diff --git a/vendor/github.com/container-storage-interface/spec/spec.md b/vendor/github.com/container-storage-interface/spec/spec.md index a4d0592fae..7a5f6b1207 100644 --- a/vendor/github.com/container-storage-interface/spec/spec.md +++ b/vendor/github.com/container-storage-interface/spec/spec.md @@ -142,6 +142,23 @@ Plugins. A unified Plugin component supplies both the Controller Service and Node Service. ``` +``` + CO "Node" Host(s) ++-------------------------------------------+ +| | +| +------------+ +------------+ | +| | CO | gRPC | Node | | +| | +-----------> Plugin | | +| +------------+ +------------+ | +| | ++-------------------------------------------+ + +Figure 4: Headless Plugin deployment, only the CO Node hosts run +Plugins. A Node-only Plugin component supplies only the Node Service. +Its GetPluginCapabilities RPC does not report the CONTROLLER_SERVICE +capability. +``` + ### Volume Lifecycle ``` @@ -161,10 +178,38 @@ Service and Node Service. | PUBLISHED | +------------+ -Figure 4: The lifecycle of a dynamically provisioned volume, from +Figure 5: The lifecycle of a dynamically provisioned volume, from creation to destruction. ``` +``` + CreateVolume +------------+ DeleteVolume + +------------->| CREATED +--------------+ + | +---+----+---+ | + | Controller | | Controller v ++++ Publish | | Unpublish +++ +|X| Volume | | Volume | | ++-+ +---v----+---+ +-+ + | NODE_READY | + +---+----^---+ + Node | | Node + Stage | | Unstage + Volume | | Volume + +---v----+---+ + | VOL_READY | + +------------+ + Node | | Node + Publish | | Unpublish + Volume | | Volume + +---v----+---+ + | PUBLISHED | + +------------+ + +Figure 6: The lifecycle of a dynamically provisioned volume, from +creation to destruction, when the Node Plugin advertises the +STAGE_UNSTAGE_VOLUME capability. +``` + ``` Controller Controller Publish Unpublish @@ -182,7 +227,7 @@ creation to destruction. Volume Capabilities -Figure 5: The lifecycle of a pre-provisioned volume that requires +Figure 7: The lifecycle of a pre-provisioned volume that requires controller to publish to a node (`ControllerPublishVolume`) prior to publishing on the node (`NodePublishVolume`). ``` @@ -199,7 +244,7 @@ Publish | | Unpublish | PUBLISHED | +------------+ -Figure 6: Plugins may forego other lifecycle steps by contraindicating +Figure 8: Plugins may forego other lifecycle steps by contraindicating them via the capabilities API. Interactions with the volumes of such plugins is reduced to `NodePublishVolume` and `NodeUnpublishVolume` calls. @@ -225,7 +270,9 @@ Each SP MUST provide: ```protobuf syntax = "proto3"; -package csi; +package csi.v0; + +option go_package = "csi"; ``` There are three sets of RPCs: @@ -236,11 +283,14 @@ There are three sets of RPCs: ```protobuf service Identity { - rpc GetSupportedVersions (GetSupportedVersionsRequest) - returns (GetSupportedVersionsResponse) {} - rpc GetPluginInfo(GetPluginInfoRequest) returns (GetPluginInfoResponse) {} + + rpc GetPluginCapabilities(GetPluginCapabilitiesRequest) + returns (GetPluginCapabilitiesResponse) {} + + rpc Probe (ProbeRequest) + returns (ProbeResponse) {} } service Controller { @@ -265,14 +315,17 @@ service Controller { rpc GetCapacity (GetCapacityRequest) returns (GetCapacityResponse) {} - rpc ControllerProbe (ControllerProbeRequest) - returns (ControllerProbeResponse) {} - rpc ControllerGetCapabilities (ControllerGetCapabilitiesRequest) returns (ControllerGetCapabilitiesResponse) {} } service Node { + rpc NodeStageVolume (NodeStageVolumeRequest) + returns (NodeStageVolumeResponse) {} + + rpc NodeUnstageVolume (NodeUnstageVolumeRequest) + returns (NodeUnstageVolumeResponse) {} + rpc NodePublishVolume (NodePublishVolumeRequest) returns (NodePublishVolumeResponse) {} @@ -282,9 +335,6 @@ service Node { rpc NodeGetId (NodeGetIdRequest) returns (NodeGetIdResponse) {} - rpc NodeProbe (NodeProbeRequest) - returns (NodeProbeResponse) {} - rpc NodeGetCapabilities (NodeGetCapabilitiesRequest) returns (NodeGetCapabilitiesResponse) {} } @@ -321,7 +371,6 @@ The status `code` MUST contain a [canonical error code](https://github.com/grpc/ | Condition | gRPC Code | Description | Recovery Behavior | |-----------|-----------|-------------|-------------------| -| Unsupported request version | 3 INVALID_ARGUMENT | Indicates that the version specified in the request is not supported by the Plugin. | Caller MUST NOT retry; caller SHOULD call `GetSupportedVersions` to discover which CSI versions the Plugin supports. | | Missing required field | 3 INVALID_ARGUMENT | Indicates that a required field is missing from the request. More human-readable information MAY be provided in the `error_description` field. | Caller MUST fix the request by adding the missing required field before retrying. | | Invalid or unsupported field in the request | 3 INVALID_ARGUMENT | Indicates that the one ore more fields in this field is either not allowed by the Plugin or has an invalid value. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the field before retrying. | @@ -332,30 +381,14 @@ The status `details` MUST be empty. In the future, this spec may require `detail ### Identity Service RPC -Identity service RPCs allow a CO to negotiate an API protocol version that MAY be used for subsequent RPCs across all CSI services with respect to a particular CSI plugin. -The general flow of the success case is as follows (protos illustrated in YAML for brevity): - -1. CO queries supported versions via Identity RPC. The CO is expected to gracefully handle, in the manner of its own choosing, the case wherein the returned `supported_versions` from the plugin are not supported by the CO. - -``` - # CO --(GetSupportedVersions)--> Plugin - request: {} - response: - supported_versions: - - major: 0 - minor: 1 - patch: 0 -``` +Identity service RPCs allow a CO to query a plugin for capabilities, health, and other metadata. +The general flow of the success case MAY be as follows (protos illustrated in YAML for brevity): -2. CO queries metadata via Identity RPC, using a supported API protocol version (as per the reply from the prior step): the requested `version` MUST match an entry from the aforementioned `supported_versions` array. +1. CO queries metadata via Identity RPC. ``` # CO --(GetPluginInfo)--> Plugin request: - version: - major: 0 - minor: 1 - patch: 0 response: name: org.foo.whizbang.super-plugin vendor_version: blue-green @@ -363,48 +396,29 @@ The general flow of the success case is as follows (protos illustrated in YAML f baz: qaz ``` -#### `GetSupportedVersions` - -A Plugin SHALL reply with a list of supported CSI versions. -The initial version of the CSI specification is 0.1.0 (in *major.minor.patch* format). -A CO MAY execute plugin RPCs in the manner prescribed by any such supported CSI version. -The versions returned by this call are orthogonal to any vendor-specific version metadata (see `vendor_version` in `GetPluginInfoResponse`). - -NOTE: Changes to this RPC should be approached very conservatively since the request/response protobufs here are critical for proper client-server version negotiation. -Future changes to this RPC MUST **guarantee** backwards compatibility. - -```protobuf -message GetSupportedVersionsRequest { -} +2. CO queries available capabilities of the plugin. -message GetSupportedVersionsResponse { - // All the CSI versions that the Plugin supports. This field is - // REQUIRED. - repeated Version supported_versions = 1; -} - -// Specifies a version in Semantic Version 2.0 format. -// (http://semver.org/spec/v2.0.0.html) -message Version { - // The value of this field MUST NOT be negative. - int32 major = 1; // This field is REQUIRED. - // The value of this field MUST NOT be negative. - int32 minor = 2; // This field is REQUIRED. - // The value of this field MUST NOT be negative. - int32 patch = 3; // This field is REQUIRED. -} +``` + # CO --(GetPluginCapabilities)--> Plugin + request: + response: + capabilities: + - service: + type: CONTROLLER_SERVICE ``` -##### GetSupportedVersions Errors +3. CO queries the readiness of the plugin. -If the plugin is unable to complete the GetSupportedVersions call successfully, it MUST return a non-ok gRPC code in the gRPC status. +``` + # CO --(Probe)--> Plugin + request: + response: {} +``` #### `GetPluginInfo` ```protobuf message GetPluginInfoRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; } message GetPluginInfoResponse { @@ -429,6 +443,88 @@ message GetPluginInfoResponse { If the plugin is unable to complete the GetPluginInfo call successfully, it MUST return a non-ok gRPC code in the gRPC status. +#### `GetPluginCapabilities` + +This REQUIRED RPC allows the CO to query the supported capabilities of the Plugin "as a whole": it is the grand sum of all capabilities of all instances of the Plugin software, as it is intended to be deployed. +All instances of the same version (see `vendor_version` of `GetPluginInfoResponse`) of the Plugin SHALL return the same set of capabilities, regardless of both: (a) where instances are deployed on the cluster as well as; (b) which RPCs an instance is serving. + +```protobuf +message GetPluginCapabilitiesRequest { +} + +message GetPluginCapabilitiesResponse { + // All the capabilities that the controller service supports. This + // field is OPTIONAL. + repeated PluginCapability capabilities = 2; +} + +// Specifies a capability of the plugin. +message PluginCapability { + message Service { + enum Type { + UNKNOWN = 0; + + // CONTROLLER_SERVICE indicates that the Plugin provides RPCs for + // the ControllerService. Plugins SHOULD provide this capability. + // In rare cases certain plugins may wish to omit the + // ControllerService entirely from their implementation, but such + // SHOULD NOT be the common case. + // The presence of this capability determines whether the CO will + // attempt to invoke the REQUIRED ControllerService RPCs, as well + // as specific RPCs as indicated by ControllerGetCapabilities. + CONTROLLER_SERVICE = 1; + } + Type type = 1; + } + + oneof type { + // Service that the plugin supports. + Service service = 1; + } +} +``` + +##### GetPluginCapabilities Errors + +If the plugin is unable to complete the GetPluginCapabilities call successfully, it MUST return a non-ok gRPC code in the gRPC status. + +#### `Probe` + +A Plugin MUST implement this RPC call. +The primary utility of the Probe RPC is to verify that the plugin is in a healthy state. +If an unhealthy state is reported, via a non-success response, a CO MAY take action with the intent to bring the plugin to a healthy state. +Such actions MAY include, but SHALL NOT be limited to, the following: + +* Restarting the plugin container, or +* Notifying the plugin supervisor. + +The Plugin MAY verify that it has the right configurations, devices, dependencies and drivers in order to run and return a success if the validation succeeds. +The CO MAY invoke this RPC at any time. +A CO MAY invoke this call multiple times with the understanding that a plugin's implementation MAY NOT be trivial and there MAY be overhead incurred by such repeated calls. +The SP SHALL document guidance and known limitations regarding a particular Plugin's implementation of this RPC. +For example, the SP MAY document the maximum frequency at which its Probe implementation should be called. + +```protobuf +message ProbeRequest { +} + +message ProbeResponse { + // Intentionally empty. +} +``` + +##### Probe Errors + +If the plugin is unable to complete the Probe call successfully, it MUST return a non-ok gRPC code in the gRPC status. +If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. +The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. + +| Condition | gRPC Code | Description | Recovery Behavior | +|-----------|-----------|-------------|-------------------| +| Plugin not healthy | 9 FAILED_PRECONDITION | Indicates that the plugin is not in a healthy/ready state. | Caller SHOULD assume the plugin is not healthy and that future RPCs MAY fail because of this condition. | +| Missing required dependency | 9 FAILED_PRECONDITION | Indicates that the plugin is missing one or more required dependency. | Caller MUST assume the plugin is not healthy. | + + ### Controller Service RPC #### `CreateVolume` @@ -441,9 +537,6 @@ If a volume corresponding to the specified volume `name` already exists and is c ```protobuf message CreateVolumeRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; - // The suggested name for the storage space. This field is REQUIRED. // It serves two purposes: // 1) Idempotency - This name is generated by the CO to achieve @@ -459,12 +552,12 @@ message CreateVolumeRequest { // an identifier by which to refer to the newly provisioned // storage. If a storage system supports this, it can optionally // use this name as the identifier for the new volume. - string name = 2; + string name = 1; // This field is OPTIONAL. This allows the CO to specify the capacity // requirement of the volume to be provisioned. If not specified, the // Plugin MAY choose an implementation-defined capacity range. - CapacityRange capacity_range = 3; + CapacityRange capacity_range = 2; // The capabilities that the provisioned volume MUST have: the Plugin // MUST provision a volume that could satisfy ALL of the @@ -474,25 +567,31 @@ message CreateVolumeRequest { // early validation: if ANY of the specified volume capabilities are // not supported by the Plugin, the call SHALL fail. This field is // REQUIRED. - repeated VolumeCapability volume_capabilities = 4; + repeated VolumeCapability volume_capabilities = 3; // Plugin specific parameters passed in as opaque key-value pairs. // This field is OPTIONAL. The Plugin is responsible for parsing and // validating these parameters. COs will treat these as opaque. - map parameters = 5; - - // Credentials used by Controller plugin to authenticate/authorize - // volume creation request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + map parameters = 4; + + // Secrets required by plugin to complete volume creation request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map controller_create_credentials = 6; + map controller_create_secrets = 5; } message CreateVolumeResponse { @@ -628,28 +727,32 @@ If a volume corresponding to the specified `volume_id` does not exist or the art ```protobuf message DeleteVolumeRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; - // The ID of the volume to be deprovisioned. // This field is REQUIRED. - string volume_id = 2; - - // Credentials used by Controller plugin to authenticate/authorize - // volume deletion request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + string volume_id = 1; + + // Secrets required by plugin to complete volume deletion request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map controller_delete_credentials = 3; + map controller_delete_secrets = 2; } -message DeleteVolumeResponse {} +message DeleteVolumeResponse { +} ``` ##### DeleteVolume Errors @@ -681,47 +784,52 @@ The CO MAY call this RPC for publishing a volume to multiple nodes if the volume ```protobuf message ControllerPublishVolumeRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; - // The ID of the volume to be used on a node. // This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The ID of the node. This field is REQUIRED. The CO SHALL set this // field to match the node ID returned by `NodeGetId`. - string node_id = 3; + string node_id = 2; // The capability of the volume the CO expects the volume to have. // This is a REQUIRED field. - VolumeCapability volume_capability = 4; + VolumeCapability volume_capability = 3; // Whether to publish the volume in readonly mode. This field is // REQUIRED. - bool readonly = 5; - - // Credentials used by Controller plugin to authenticate/authorize - // controller publish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + bool readonly = 4; + + // Secrets required by plugin to complete controller publish volume + // request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map controller_publish_credentials = 6; + map controller_publish_secrets = 5; // Attributes of the volume to be used on a node. This field is // OPTIONAL and MUST match the attributes of the Volume identified // by `volume_id`. - map volume_attributes = 7; + map volume_attributes = 6; } message ControllerPublishVolumeResponse { // The SP specific information that will be passed to the Plugin in - // the subsequent `NodePublishVolume` call for the given volume. + // the subsequent `NodeStageVolume` or `NodePublishVolume` calls + // for the given volume. // This information is opaque to the CO. This field is OPTIONAL. map publish_info = 1; } @@ -747,7 +855,7 @@ The CO MUST implement the specified error recovery behavior when it encounters t Controller Plugin MUST implement this RPC call if it has `PUBLISH_UNPUBLISH_VOLUME` controller capability. This RPC is a reverse operation of `ControllerPublishVolume`. -It MUST be called after `NodeUnpublishVolume` on the volume is called and succeeds. +It MUST be called after all `NodeUnstageVolume` and `NodeUnpublishVolume` on the volume are called and succeed. The Plugin SHOULD perform the work that is necessary for making the volume ready to be consumed by a different node. The Plugin MUST NOT assume that this RPC will be executed on the node where the volume was previously used. @@ -759,34 +867,41 @@ If this operation failed, or the CO does not know if the operation failed or not ```protobuf message ControllerUnpublishVolumeRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; - // The ID of the volume. This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The ID of the node. This field is OPTIONAL. The CO SHOULD set this // field to match the node ID returned by `NodeGetId` or leave it // unset. If the value is set, the SP MUST unpublish the volume from // the specified node. If the value is unset, the SP MUST unpublish // the volume from all nodes it is published to. - string node_id = 3; - - // Credentials used by Controller plugin to authenticate/authorize - // controller unpublish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + string node_id = 2; + + // Secrets required by plugin to complete controller unpublish volume + // request. This SHOULD be the same secrets passed to the + // ControllerPublishVolume. + // call for the specified volume. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map controller_unpublish_credentials = 4; + map controller_unpublish_secrets = 3; } -message ControllerUnpublishVolumeResponse {} +message ControllerUnpublishVolumeResponse { +} ``` ##### ControllerUnpublishVolume Errors @@ -812,20 +927,17 @@ This operation MUST be idempotent. ```protobuf message ValidateVolumeCapabilitiesRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; - // The ID of the volume to check. This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The capabilities that the CO wants to check for the volume. This // call SHALL return "supported" only if all the volume capabilities // specified below are supported. This field is REQUIRED. - repeated VolumeCapability volume_capabilities = 3; + repeated VolumeCapability volume_capabilities = 2; // Attributes of the volume to check. This field is OPTIONAL and MUST // match the attributes of the Volume identified by `volume_id`. - map volume_attributes = 4; + map volume_attributes = 3; } message ValidateVolumeCapabilitiesResponse { @@ -858,9 +970,6 @@ The Plugin SHALL return the information about all the volumes that it knows abou ```protobuf message ListVolumesRequest { - // The API version assumed by the CO. This field is REQUIRED. - Version version = 1; - // If specified (non-zero value), the Plugin MUST NOT return more // entries than this number in the response. If the actual number of // entries is more than this number, the Plugin MUST set `next_token` @@ -869,13 +978,13 @@ message ListVolumesRequest { // not specified (zero value), it means there is no restriction on the // number of entries that can be returned. // The value of this field MUST NOT be negative. - int32 max_entries = 2; + int32 max_entries = 1; // A token to specify where to start paginating. Set this field to // `next_token` returned by a previous `ListVolumes` call to get the // next page of entries. This field is OPTIONAL. // An empty string is equal to an unspecified field value. - string starting_token = 3; + string starting_token = 2; } message ListVolumesResponse { @@ -913,21 +1022,18 @@ The RPC allows the CO to query the capacity of the storage pool from which the c ```protobuf message GetCapacityRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; - // If specified, the Plugin SHALL report the capacity of the storage // that can be used to provision volumes that satisfy ALL of the // specified `volume_capabilities`. These are the same // `volume_capabilities` the CO will use in `CreateVolumeRequest`. // This field is OPTIONAL. - repeated VolumeCapability volume_capabilities = 2; + repeated VolumeCapability volume_capabilities = 1; // If specified, the Plugin SHALL report the capacity of the storage // that can be used to provision volumes with the given Plugin // specific `parameters`. These are the same `parameters` the CO will // use in `CreateVolumeRequest`. This field is OPTIONAL. - map parameters = 3; + map parameters = 2; } message GetCapacityResponse { @@ -945,42 +1051,12 @@ message GetCapacityResponse { If the plugin is unable to complete the GetCapacity call successfully, it MUST return a non-ok gRPC code in the gRPC status. -#### `ControllerProbe` - -A Controller Plugin MUST implement this RPC call. -The Plugin SHOULD verify if it has the right configurations, devices, dependencies and drivers in order to run the controller service, and return a success if the validation succeeds. -The CO SHALL invoke this RPC prior to any other controller service RPC in order to allow the CO to determine the readiness of the controller service. -A CO MAY invoke this call multiple times with the understanding that a plugin's implementation MAY NOT be trivial and there MAY be overhead incurred by such repeated calls. - -```protobuf -message ControllerProbeRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; -} - -message ControllerProbeResponse {} -``` - -##### ControllerProbe Errors - -If the plugin is unable to complete the ControllerProbe call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Bad plugin config | 9 FAILED_PRECONDITION | Indicates that the plugin is misconfigured. | Caller MUST assume the plugin is not healthy. | -| Missing required dependency | 9 FAILED_PRECONDITION | Indicates that the plugin is missing one or more required dependency. | Caller MUST assume the plugin is not healthy. | - - #### `ControllerGetCapabilities` A Controller Plugin MUST implement this RPC call. This RPC allows the CO to check the supported capabilities of controller service provided by the Plugin. ```protobuf message ControllerGetCapabilitiesRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; } message ControllerGetCapabilitiesResponse { @@ -1029,6 +1105,142 @@ It is NOT REQUIRED for a controller plugin to implement the `LIST_VOLUMES` capab ### Node Service RPC +#### `NodeStageVolume` + +A Node Plugin MUST implement this RPC call if it has `STAGE_UNSTAGE_VOLUME` node capability. + +This RPC is called by the CO prior to the volume being consumed by any workloads on the node by `NodePublishVolume`. +The Plugin SHALL assume that this RPC will be executed on the node where the volume will be used. +This RPC SHOULD be called by the CO when a workload that wants to use the specified volume is placed (scheduled) on the specified node for the first time or for the first time since a `NodeUnstageVolume` call for the specified volume was called and returned success on that node. + +If the corresponding Controller Plugin has `PUBLISH_UNPUBLISH_VOLUME` controller capability and the Node Plugin has `STAGE_UNSTAGE_VOLUME` capability, then the CO MUST guarantee that this RPC is called after `ControllerPublishVolume` is called for the given volume on the given node and returns a success. +The CO MUST guarantee that this RPC is called and returns a success before any `NodePublishVolume` is called for the given volume on the given node. + +This operation MUST be idempotent. +If the volume corresponding to the `volume_id` is already staged to the `staging_target_path`, and is identical to the specified `volume_capability` the Plugin MUST reply `0 OK`. + +If this RPC failed, or the CO does not know if it failed or not, it MAY choose to call `NodeStageVolume` again, or choose to call `NodeUnstageVolume`. + +```protobuf +message NodeStageVolumeRequest { + // The ID of the volume to publish. This field is REQUIRED. + string volume_id = 1; + + // The CO SHALL set this field to the value returned by + // `ControllerPublishVolume` if the corresponding Controller Plugin + // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be + // left unset if the corresponding Controller Plugin does not have + // this capability. This is an OPTIONAL field. + map publish_info = 2; + + // The path to which the volume will be published. It MUST be an + // absolute path in the root filesystem of the process serving this + // request. The CO SHALL ensure that there is only one + // staging_target_path per volume. + // This is a REQUIRED field. + string staging_target_path = 3; + + // The capability of the volume the CO expects the volume to have. + // This is a REQUIRED field. + VolumeCapability volume_capability = 4; + + // Secrets required by plugin to complete node stage volume request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. + // This field is OPTIONAL. + map node_stage_secrets = 5; + + // Attributes of the volume to publish. This field is OPTIONAL and + // MUST match the attributes of the VolumeInfo identified by + // `volume_id`. + map volume_attributes = 6; +} + +message NodeStageVolumeResponse { +} +``` + +#### NodeStageVolume Errors + +If the plugin is unable to complete the NodeStageVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. +If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. +The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. + +| Condition | gRPC Code | Description | Recovery Behavior | +|-----------|-----------|-------------|-------------------| +| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | +| Volume published but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified `volume_id` has already been published at the specified `staging_target_path` but is incompatible with the specified `volume_capability` flag. | Caller MUST fix the arguments before retying. | +| Operation pending for volume | 10 ABORTED | Indicates that there is a already an operation pending for the specified volume. In general the Cluster Orchestrator (CO) is responsible for ensuring that there is no more than one call "in-flight" per volume at a given time. However, in some circumstances, the CO MAY lose state (for example when the CO crashes and restarts), and MAY issue multiple calls simultaneously for the same volume. The Plugin, SHOULD handle this as gracefully as possible, and MAY return this error code to reject secondary calls. | Caller SHOULD ensure that there are no other calls pending for the specified volume, and then retry with exponential back off. | +| Exceeds capabilities | 10 FAILED_PRECONDITION | Indicates that the CO has exceeded the volume's capabilities because the volume does not have MULTI_NODE capability. | Caller MAY choose to call `ValidateVolumeCapabilities` to validate the volume capabilities, or wait for the volume to be unpublished on the node. | + +#### `NodeUnstageVolume` + +A Node Plugin MUST implement this RPC call if it has `STAGE_UNSTAGE_VOLUME` node capability. + +This RPC is a reverse operation of `NodeStageVolume`. +This RPC MUST undo the work by the corresponding `NodeStageVolume`. +This RPC SHALL be called by the CO once for each `staging_target_path` that was successfully setup via `NodeStageVolume`. + +If the corresponding Controller Plugin has `PUBLISH_UNPUBLISH_VOLUME` controller capability and the Node Plugin has `STAGE_UNSTAGE_VOLUME` capability, the CO MUST guarantee that this RPC is called and returns success before calling `ControllerUnpublishVolume` for the given node and the given volume. +The CO MUST guarantee that this RPC is called after all `NodeUnpublishVolume` have been called and returned success for the given volume on the given node. + +The Plugin SHALL assume that this RPC will be executed on the node where the volume is being used. + +This RPC MAY be called by the CO when the workload using the volume is being moved to a different node, or all the workloads using the volume on a node have finished. + +This operation MUST be idempotent. +If the volume corresponding to the `volume_id` is not staged to the `staging_target_path`, the Plugin MUST reply `0 OK`. + +If this RPC failed, or the CO does not know if it failed or not, it MAY choose to call `NodeUnstageVolume` again. + +```protobuf +message NodeUnstageVolumeRequest { + // The ID of the volume. This field is REQUIRED. + string volume_id = 1; + + // The path at which the volume was published. It MUST be an absolute + // path in the root filesystem of the process serving this request. + // This is a REQUIRED field. + string staging_target_path = 2; +} + +message NodeUnstageVolumeResponse { +} +``` + +#### NodeUnstageVolume Errors + +If the plugin is unable to complete the NodeUnstageVolume call successfully, it MUST return a non-ok gRPC code in the gRPC status. +If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. +The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. + +| Condition | gRPC Code | Description | Recovery Behavior | +|-----------|-----------|-------------|-------------------| +| Volume does not exists | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | +| Operation pending for volume | 10 ABORTED | Indicates that there is a already an operation pending for the specified volume. In general the Cluster Orchestrator (CO) is responsible for ensuring that there is no more than one call "in-flight" per volume at a given time. However, in some circumstances, the CO MAY lose state (for example when the CO crashes and restarts), and MAY issue multiple calls simultaneously for the same volume. The Plugin, SHOULD handle this as gracefully as possible, and MAY return this error code to reject secondary calls. | Caller SHOULD ensure that there are no other calls pending for the specified volume, and then retry with exponential back off. | + +#### RPC Interactions and Reference Counting +`NodeStageVolume`, `NodeUnstageVolume`, `NodePublishVolume`, `NodeUnpublishVolume` + +The following interaction semantics ARE REQUIRED if the plugin advertises the `STAGE_UNSTAGE_VOLUME` capability. +`NodeStageVolume` MUST be called and return success once per volume per node before any `NodePublishVolume` MAY be called for the volume. +All `NodeUnpublishVolume` MUST be called and return success for a volume before `NodeUnstageVolume` MAY be called for the volume. + +Note that this requires that all COs MUST support reference counting of volumes so that if `STAGE_UNSTAGE_VOLUME` is advertised by the SP, the CO MUST fufill the above interaction semantics. + #### `NodePublishVolume` This RPC is called by the CO when a workload that wants to use the specified volume is placed (scheduled) on a node. @@ -1049,22 +1261,27 @@ The following table shows what the Plugin SHOULD return when receiving a second | MULTI_NODE | OK (idempotent) | ALREADY_EXISTS | OK | OK | | Non MULTI_NODE | OK (idempotent) | ALREADY_EXISTS | FAILED_PRECONDITION | FAILED_PRECONDITION| -(`Tn`: target path of the n-th `NodePublishVolume`, `Pn`: other arguments of the n-th `NodePublishVolume` except `node_credentials`) +(`Tn`: target path of the n-th `NodePublishVolume`, `Pn`: other arguments of the n-th `NodePublishVolume` except `node_publish_secrets`) ```protobuf message NodePublishVolumeRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; - // The ID of the volume to publish. This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The CO SHALL set this field to the value returned by // `ControllerPublishVolume` if the corresponding Controller Plugin // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be // left unset if the corresponding Controller Plugin does not have // this capability. This is an OPTIONAL field. - map publish_info = 3; + map publish_info = 2; + + // The path to which the device was mounted by `NodeStageVolume`. + // It MUST be an absolute path in the root filesystem of the process + // serving this request. + // It MUST be set if the Node Plugin implements the + // `STAGE_UNSTAGE_VOLUME` node capability. + // This is an OPTIONAL field. + string staging_target_path = 3; // The path to which the volume will be published. It MUST be an // absolute path in the root filesystem of the process serving this @@ -1082,18 +1299,24 @@ message NodePublishVolumeRequest { // REQUIRED. bool readonly = 6; - // Credentials used by Node plugin to authenticate/authorize node - // publish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. + // Secrets required by plugin to complete node publish volume request. + // A secret is a string to string map where the key identifies the + // name of the secret (e.g. "username" or "password"), and the value + // contains the secret data (e.g. "bob" or "abc123"). + // Each key MUST consist of alphanumeric characters, '-', '_' or '.'. + // Each value MUST contain a valid string. An SP MAY choose to accept + // binary (non-string) data by using a binary-to-text encoding scheme, + // like base64. + // An SP SHALL advertise the requirements for required secret keys and + // values in documentation. + // CO SHALL permit passing through the required secrets. + // A CO MAY pass the same secrets to all RPCs, therefore the keys for + // all unique secrets that an SP expects must be unique across all CSI + // operations. + // This information is sensitive and MUST be treated as such (not + // logged, etc.) by the CO. // This field is OPTIONAL. - map node_publish_credentials = 7; + map node_publish_secrets = 7; // Attributes of the volume to publish. This field is OPTIONAL and // MUST match the attributes of the Volume identified by @@ -1101,7 +1324,8 @@ message NodePublishVolumeRequest { map volume_attributes = 8; } -message NodePublishVolumeResponse {} +message NodePublishVolumeResponse { +} ``` ##### NodePublishVolume Errors @@ -1116,6 +1340,7 @@ The CO MUST implement the specified error recovery behavior when it encounters t | Volume published but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified `volume_id` has already been published at the specified `target_path` but is incompatible with the specified `volume_capability` or `readonly` flag. | Caller MUST fix the arguments before retying. | | Operation pending for volume | 10 ABORTED | Indicates that there is a already an operation pending for the specified volume. In general the Cluster Orchestrator (CO) is responsible for ensuring that there is no more than one call "in-flight" per volume at a given time. However, in some circumstances, the CO MAY lose state (for example when the CO crashes and restarts), and MAY issue multiple calls simultaneously for the same volume. The Plugin, SHOULD handle this as gracefully as possible, and MAY return this error code to reject secondary calls. | Caller SHOULD ensure that there are no other calls pending for the specified volume, and then retry with exponential back off. | | Exceeds capabilities | 10 FAILED_PRECONDITION | Indicates that the CO has exceeded the volume's capabilities because the volume does not have MULTI_NODE capability. | Caller MAY choose to call `ValidateVolumeCapabilities` to validate the volume capabilities, or wait for the volume to be unpublished on the node. | +| Stanging target path not set | 10 FAILED_PRECONDITION | Indicates that `STAGE_UNSTAGE_VOLUME` capability is set but no `staging_target_path` was set. | Caller MUST make sure call to `NodeStageVolume` is made and returns success before retrying with valid `staging_target_path`. | #### `NodeUnpublishVolume` @@ -1134,32 +1359,17 @@ If this RPC failed, or the CO does not know if it failed or not, it can choose t ```protobuf message NodeUnpublishVolumeRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; - // The ID of the volume. This field is REQUIRED. - string volume_id = 2; + string volume_id = 1; // The path at which the volume was published. It MUST be an absolute // path in the root filesystem of the process serving this request. // This is a REQUIRED field. - string target_path = 3; - - // Credentials used by Node plugin to authenticate/authorize node - // unpublish request. - // This field contains credential data, for example username and - // password. Each key must consist of alphanumeric characters, '-', - // '_' or '.'. Each value MUST contain a valid string. An SP MAY - // choose to accept binary (non-string) data by using a binary-to-text - // encoding scheme, like base64. An SP SHALL advertise the - // requirements for credentials in documentation. COs SHALL permit - // passing through the required credentials. This information is - // sensitive and MUST be treated as such (not logged, etc.) by the CO. - // This field is OPTIONAL. - map node_unpublish_credentials = 4; + string target_path = 2; } -message NodeUnpublishVolumeResponse {} +message NodeUnpublishVolumeResponse { +} ``` ##### NodeUnpublishVolume Errors @@ -1183,8 +1393,6 @@ The result of this call will be used by CO in `ControllerPublishVolume`. ```protobuf message NodeGetIdRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; } message NodeGetIdResponse { @@ -1205,36 +1413,6 @@ Condition | gRPC Code | Description | Recovery Behavior | --- | --- | --- | --- | | Call not implemented | 12 UNIMPLEMENTED | NodeGetId call is not implemented by the plugin or disabled in the Plugin's current mode of operation. | Caller MUST NOT retry. Caller MAY call `ControllerGetCapabilities` or `NodeGetCapabilities` to discover Plugin capabilities. | -#### `NodeProbe` - -A Node Plugin MUST implement this RPC call. -The Plugin SHALL assume that this RPC will be executed on the node where the volume will be used. -The CO SHOULD call this RPC for the node at which it wants to place the workload. -This RPC allows the CO to probe the readiness of the Plugin on the node where the volumes will be used. -The Plugin SHOULD verify if it has everything it needs (binaries, kernel module, drivers, etc.) to run on that node, and return a success if the validation succeeds. -The CO MAY use this RPC to probe which machines can support specific Plugins and schedule workloads accordingly. - -```protobuf -message NodeProbeRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; -} - -message NodeProbeResponse {} -``` - -##### NodeProbe Errors - -If the plugin is unable to complete the NodeProbe call successfully, it MUST return a non-ok gRPC code in the gRPC status. -If the conditions defined below are encountered, the plugin MUST return the specified gRPC error code. -The CO MUST implement the specified error recovery behavior when it encounters the gRPC error code. - -| Condition | gRPC Code | Description | Recovery Behavior | -|-----------|-----------|-------------|-------------------| -| Bad plugin config | 9 FAILED_PRECONDITION | Indicates that the plugin is misconfigured. | Caller MUST assume the plugin is not healthy. | -| Missing required dependency | 9 FAILED_PRECONDITION | Indicates that the plugin is missing one or more required dependency. | Caller MUST assume the plugin is not healthy. | - - #### `NodeGetCapabilities` A Node Plugin MUST implement this RPC call. @@ -1242,8 +1420,6 @@ This RPC allows the CO to check the supported capabilities of node service provi ```protobuf message NodeGetCapabilitiesRequest { - // The API version assumed by the CO. This is a REQUIRED field. - Version version = 1; } message NodeGetCapabilitiesResponse { @@ -1257,6 +1433,7 @@ message NodeServiceCapability { message RPC { enum Type { UNKNOWN = 0; + STAGE_UNSTAGE_VOLUME = 1; } Type type = 1; @@ -1316,7 +1493,7 @@ If the plugin is unable to complete the NodeGetCapabilities call successfully, i * CO: monitor `/path/to/unix/domain/socket.sock`. * Plugin: read `CSI_ENDPOINT`, create UNIX socket at specified path, bind and listen. * CO: observe that socket now exists, establish connection. -* CO: invoke `GetSupportedVersions`. +* CO: invoke `GetPluginCapabilities`. #### Filesystem @@ -1368,11 +1545,13 @@ Supervised plugins MAY be isolated and/or resource-bounded. * Logging configuration flags and/or variables, including working sample configurations. * Default log destination(s) (where do the logs go if no configuration is specified?) * Log lifecycle management ownership and related guidance (size limits, rate limits, rolling, archiving, expunging, etc.) applicable to the logging mechanism embedded within the Plugin. -* Plugins SHOULD NOT write potentially sensitive data to logs (e.g. `Credentials`). +* Plugins SHOULD NOT write potentially sensitive data to logs (e.g. secrets). ##### Available Services * Plugin Packages MAY support all or a subset of CSI services; service combinations MAY be configurable at runtime by the Plugin Supervisor. + * A plugin must know the "mode" in which it is operating (e.g. node, controller, or both). + * This specification does not dictate the mechanism by which mode of operation must be discovered, and instead places that burden upon the SP. * Misconfigured plugin software SHOULD fail-fast with an OS-appropriate error code. ##### Linux Capabilities diff --git a/vendor/github.com/kubernetes-csi/csi-test/Gopkg.lock b/vendor/github.com/kubernetes-csi/csi-test/Gopkg.lock index 9e181aff5e..95c54da291 100644 --- a/vendor/github.com/kubernetes-csi/csi-test/Gopkg.lock +++ b/vendor/github.com/kubernetes-csi/csi-test/Gopkg.lock @@ -4,8 +4,8 @@ [[projects]] branch = "master" name = "github.com/container-storage-interface/spec" - packages = ["lib/go/csi"] - revision = "7ab01a90da87f9fef3ee1de0494962fdefaf7db7" + packages = ["lib/go/csi/v0"] + revision = "35d9f9d77954980e449e52c3f3e43c21bd8171f5" [[projects]] name = "github.com/golang/mock" @@ -15,61 +15,164 @@ [[projects]] name = "github.com/golang/protobuf" - packages = ["proto","protoc-gen-go/descriptor","ptypes","ptypes/any","ptypes/duration","ptypes/timestamp"] + packages = [ + "proto", + "protoc-gen-go/descriptor", + "ptypes", + "ptypes/any", + "ptypes/duration", + "ptypes/timestamp" + ] revision = "925541529c1fa6821df4e44ce2723319eb2be768" version = "v1.0.0" [[projects]] name = "github.com/onsi/ginkgo" - packages = [".","config","internal/codelocation","internal/containernode","internal/failer","internal/leafnodes","internal/remote","internal/spec","internal/spec_iterator","internal/specrunner","internal/suite","internal/testingtproxy","internal/writer","reporters","reporters/stenographer","reporters/stenographer/support/go-colorable","reporters/stenographer/support/go-isatty","types"] + packages = [ + ".", + "config", + "internal/codelocation", + "internal/containernode", + "internal/failer", + "internal/leafnodes", + "internal/remote", + "internal/spec", + "internal/spec_iterator", + "internal/specrunner", + "internal/suite", + "internal/testingtproxy", + "internal/writer", + "reporters", + "reporters/stenographer", + "reporters/stenographer/support/go-colorable", + "reporters/stenographer/support/go-isatty", + "types" + ] revision = "9eda700730cba42af70d53180f9dcce9266bc2bc" version = "v1.4.0" [[projects]] name = "github.com/onsi/gomega" - packages = [".","format","internal/assertion","internal/asyncassertion","internal/oraclematcher","internal/testingtsupport","matchers","matchers/support/goraph/bipartitegraph","matchers/support/goraph/edge","matchers/support/goraph/node","matchers/support/goraph/util","types"] + packages = [ + ".", + "format", + "internal/assertion", + "internal/asyncassertion", + "internal/oraclematcher", + "internal/testingtsupport", + "matchers", + "matchers/support/goraph/bipartitegraph", + "matchers/support/goraph/edge", + "matchers/support/goraph/node", + "matchers/support/goraph/util", + "types" + ] revision = "003f63b7f4cff3fc95357005358af2de0f5fe152" version = "v1.3.0" [[projects]] branch = "master" name = "golang.org/x/net" - packages = ["context","html","html/atom","html/charset","http2","http2/hpack","idna","internal/timeseries","lex/httplex","trace"] - revision = "309822c5b9b9f80db67f016069a12628d94fad34" + packages = [ + "context", + "html", + "html/atom", + "html/charset", + "http2", + "http2/hpack", + "idna", + "internal/timeseries", + "lex/httplex", + "trace" + ] + revision = "cbe0f9307d0156177f9dd5dc85da1a31abc5f2fb" [[projects]] branch = "master" name = "golang.org/x/sys" packages = ["unix"] - revision = "8f27ce8a604014414f8dfffc25cbcde83a3f2216" + revision = "f6cff0780e542efa0c8e864dc8fa522808f6a598" [[projects]] - branch = "master" name = "golang.org/x/text" - packages = ["collate","collate/build","encoding","encoding/charmap","encoding/htmlindex","encoding/internal","encoding/internal/identifier","encoding/japanese","encoding/korean","encoding/simplifiedchinese","encoding/traditionalchinese","encoding/unicode","internal/colltab","internal/gen","internal/tag","internal/triegen","internal/ucd","internal/utf8internal","language","runes","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable"] - revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3" + packages = [ + "collate", + "collate/build", + "encoding", + "encoding/charmap", + "encoding/htmlindex", + "encoding/internal", + "encoding/internal/identifier", + "encoding/japanese", + "encoding/korean", + "encoding/simplifiedchinese", + "encoding/traditionalchinese", + "encoding/unicode", + "internal/colltab", + "internal/gen", + "internal/tag", + "internal/triegen", + "internal/ucd", + "internal/utf8internal", + "language", + "runes", + "secure/bidirule", + "transform", + "unicode/bidi", + "unicode/cldr", + "unicode/norm", + "unicode/rangetable" + ] + revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" + version = "v0.3.0" [[projects]] branch = "master" name = "google.golang.org/genproto" packages = ["googleapis/rpc/status"] - revision = "4eb30f4778eed4c258ba66527a0d4f9ec8a36c45" + revision = "2d9486acae19cf9bd0c093d7dc236a323726a9e4" [[projects]] name = "google.golang.org/grpc" - packages = [".","balancer","balancer/base","balancer/roundrobin","codes","connectivity","credentials","encoding","grpclb/grpc_lb_v1/messages","grpclog","internal","keepalive","metadata","naming","peer","reflection","reflection/grpc_reflection_v1alpha","resolver","resolver/dns","resolver/passthrough","stats","status","tap","transport"] - revision = "6b51017f791ae1cfbec89c52efdf444b13b550ef" - version = "v1.9.2" + packages = [ + ".", + "balancer", + "balancer/base", + "balancer/roundrobin", + "codes", + "connectivity", + "credentials", + "encoding", + "encoding/proto", + "grpclb/grpc_lb_v1/messages", + "grpclog", + "internal", + "keepalive", + "metadata", + "naming", + "peer", + "reflection", + "reflection/grpc_reflection_v1alpha", + "resolver", + "resolver/dns", + "resolver/passthrough", + "stats", + "status", + "tap", + "transport" + ] + revision = "8e4536a86ab602859c20df5ebfd0bd4228d08655" + version = "v1.10.0" [[projects]] - branch = "v2" name = "gopkg.in/yaml.v2" packages = ["."] - revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4" + revision = "7f97868eec74b32b0982dd158a51a446d1da7eb5" + version = "v2.1.1" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "cf320a669e7ee73c5af68b237c718e67af6d75f188a7afbcd04c0e1e83e06ee5" + inputs-digest = "f47d1f5025e3e4b4b099c879060a3775aa05c29c21f95144c129fa4ba1ad128b" solver-name = "gps-cdcl" solver-version = 1 diff --git a/vendor/github.com/kubernetes-csi/csi-test/driver/driver.go b/vendor/github.com/kubernetes-csi/csi-test/driver/driver.go index 94145df229..3ed7a83240 100644 --- a/vendor/github.com/kubernetes-csi/csi-test/driver/driver.go +++ b/vendor/github.com/kubernetes-csi/csi-test/driver/driver.go @@ -22,7 +22,7 @@ import ( "net" "sync" - "github.com/container-storage-interface/spec/lib/go/csi" + csi "github.com/container-storage-interface/spec/lib/go/csi/v0" "github.com/kubernetes-csi/csi-test/utils" "google.golang.org/grpc" "google.golang.org/grpc/reflection" diff --git a/vendor/github.com/kubernetes-csi/csi-test/driver/driver.mock.go b/vendor/github.com/kubernetes-csi/csi-test/driver/driver.mock.go index c877cb70bc..e9e140611a 100644 --- a/vendor/github.com/kubernetes-csi/csi-test/driver/driver.mock.go +++ b/vendor/github.com/kubernetes-csi/csi-test/driver/driver.mock.go @@ -1,289 +1,261 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: github.com/container-storage-interface/spec/lib/go/csi (interfaces: IdentityServer,ControllerServer,NodeServer) +// Automatically generated by MockGen. DO NOT EDIT! +// Source: github.com/container-storage-interface/spec/lib/go/csi/v0 (interfaces: IdentityServer,ControllerServer,NodeServer) -// Package driver is a generated GoMock package. package driver import ( context "context" - csi "github.com/container-storage-interface/spec/lib/go/csi" + + v0 "github.com/container-storage-interface/spec/lib/go/csi/v0" gomock "github.com/golang/mock/gomock" - reflect "reflect" ) -// MockIdentityServer is a mock of IdentityServer interface +// Mock of IdentityServer interface type MockIdentityServer struct { ctrl *gomock.Controller - recorder *MockIdentityServerMockRecorder + recorder *_MockIdentityServerRecorder } -// MockIdentityServerMockRecorder is the mock recorder for MockIdentityServer -type MockIdentityServerMockRecorder struct { +// Recorder for MockIdentityServer (not exported) +type _MockIdentityServerRecorder struct { mock *MockIdentityServer } -// NewMockIdentityServer creates a new mock instance func NewMockIdentityServer(ctrl *gomock.Controller) *MockIdentityServer { mock := &MockIdentityServer{ctrl: ctrl} - mock.recorder = &MockIdentityServerMockRecorder{mock} + mock.recorder = &_MockIdentityServerRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use -func (m *MockIdentityServer) EXPECT() *MockIdentityServerMockRecorder { - return m.recorder +func (_m *MockIdentityServer) EXPECT() *_MockIdentityServerRecorder { + return _m.recorder +} + +func (_m *MockIdentityServer) GetPluginCapabilities(_param0 context.Context, _param1 *v0.GetPluginCapabilitiesRequest) (*v0.GetPluginCapabilitiesResponse, error) { + ret := _m.ctrl.Call(_m, "GetPluginCapabilities", _param0, _param1) + ret0, _ := ret[0].(*v0.GetPluginCapabilitiesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockIdentityServerRecorder) GetPluginCapabilities(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "GetPluginCapabilities", arg0, arg1) } -// GetPluginInfo mocks base method -func (m *MockIdentityServer) GetPluginInfo(arg0 context.Context, arg1 *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error) { - ret := m.ctrl.Call(m, "GetPluginInfo", arg0, arg1) - ret0, _ := ret[0].(*csi.GetPluginInfoResponse) +func (_m *MockIdentityServer) GetPluginInfo(_param0 context.Context, _param1 *v0.GetPluginInfoRequest) (*v0.GetPluginInfoResponse, error) { + ret := _m.ctrl.Call(_m, "GetPluginInfo", _param0, _param1) + ret0, _ := ret[0].(*v0.GetPluginInfoResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetPluginInfo indicates an expected call of GetPluginInfo -func (mr *MockIdentityServerMockRecorder) GetPluginInfo(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPluginInfo", reflect.TypeOf((*MockIdentityServer)(nil).GetPluginInfo), arg0, arg1) +func (_mr *_MockIdentityServerRecorder) GetPluginInfo(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "GetPluginInfo", arg0, arg1) } -// GetSupportedVersions mocks base method -func (m *MockIdentityServer) GetSupportedVersions(arg0 context.Context, arg1 *csi.GetSupportedVersionsRequest) (*csi.GetSupportedVersionsResponse, error) { - ret := m.ctrl.Call(m, "GetSupportedVersions", arg0, arg1) - ret0, _ := ret[0].(*csi.GetSupportedVersionsResponse) +func (_m *MockIdentityServer) Probe(_param0 context.Context, _param1 *v0.ProbeRequest) (*v0.ProbeResponse, error) { + ret := _m.ctrl.Call(_m, "Probe", _param0, _param1) + ret0, _ := ret[0].(*v0.ProbeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetSupportedVersions indicates an expected call of GetSupportedVersions -func (mr *MockIdentityServerMockRecorder) GetSupportedVersions(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSupportedVersions", reflect.TypeOf((*MockIdentityServer)(nil).GetSupportedVersions), arg0, arg1) +func (_mr *_MockIdentityServerRecorder) Probe(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Probe", arg0, arg1) } -// MockControllerServer is a mock of ControllerServer interface +// Mock of ControllerServer interface type MockControllerServer struct { ctrl *gomock.Controller - recorder *MockControllerServerMockRecorder + recorder *_MockControllerServerRecorder } -// MockControllerServerMockRecorder is the mock recorder for MockControllerServer -type MockControllerServerMockRecorder struct { +// Recorder for MockControllerServer (not exported) +type _MockControllerServerRecorder struct { mock *MockControllerServer } -// NewMockControllerServer creates a new mock instance func NewMockControllerServer(ctrl *gomock.Controller) *MockControllerServer { mock := &MockControllerServer{ctrl: ctrl} - mock.recorder = &MockControllerServerMockRecorder{mock} + mock.recorder = &_MockControllerServerRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use -func (m *MockControllerServer) EXPECT() *MockControllerServerMockRecorder { - return m.recorder +func (_m *MockControllerServer) EXPECT() *_MockControllerServerRecorder { + return _m.recorder } -// ControllerGetCapabilities mocks base method -func (m *MockControllerServer) ControllerGetCapabilities(arg0 context.Context, arg1 *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error) { - ret := m.ctrl.Call(m, "ControllerGetCapabilities", arg0, arg1) - ret0, _ := ret[0].(*csi.ControllerGetCapabilitiesResponse) +func (_m *MockControllerServer) ControllerGetCapabilities(_param0 context.Context, _param1 *v0.ControllerGetCapabilitiesRequest) (*v0.ControllerGetCapabilitiesResponse, error) { + ret := _m.ctrl.Call(_m, "ControllerGetCapabilities", _param0, _param1) + ret0, _ := ret[0].(*v0.ControllerGetCapabilitiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// ControllerGetCapabilities indicates an expected call of ControllerGetCapabilities -func (mr *MockControllerServerMockRecorder) ControllerGetCapabilities(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerGetCapabilities", reflect.TypeOf((*MockControllerServer)(nil).ControllerGetCapabilities), arg0, arg1) +func (_mr *_MockControllerServerRecorder) ControllerGetCapabilities(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ControllerGetCapabilities", arg0, arg1) } -// ControllerProbe mocks base method -func (m *MockControllerServer) ControllerProbe(arg0 context.Context, arg1 *csi.ControllerProbeRequest) (*csi.ControllerProbeResponse, error) { - ret := m.ctrl.Call(m, "ControllerProbe", arg0, arg1) - ret0, _ := ret[0].(*csi.ControllerProbeResponse) +func (_m *MockControllerServer) ControllerPublishVolume(_param0 context.Context, _param1 *v0.ControllerPublishVolumeRequest) (*v0.ControllerPublishVolumeResponse, error) { + ret := _m.ctrl.Call(_m, "ControllerPublishVolume", _param0, _param1) + ret0, _ := ret[0].(*v0.ControllerPublishVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// ControllerProbe indicates an expected call of ControllerProbe -func (mr *MockControllerServerMockRecorder) ControllerProbe(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerProbe", reflect.TypeOf((*MockControllerServer)(nil).ControllerProbe), arg0, arg1) +func (_mr *_MockControllerServerRecorder) ControllerPublishVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ControllerPublishVolume", arg0, arg1) } -// ControllerPublishVolume mocks base method -func (m *MockControllerServer) ControllerPublishVolume(arg0 context.Context, arg1 *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error) { - ret := m.ctrl.Call(m, "ControllerPublishVolume", arg0, arg1) - ret0, _ := ret[0].(*csi.ControllerPublishVolumeResponse) +func (_m *MockControllerServer) ControllerUnpublishVolume(_param0 context.Context, _param1 *v0.ControllerUnpublishVolumeRequest) (*v0.ControllerUnpublishVolumeResponse, error) { + ret := _m.ctrl.Call(_m, "ControllerUnpublishVolume", _param0, _param1) + ret0, _ := ret[0].(*v0.ControllerUnpublishVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// ControllerPublishVolume indicates an expected call of ControllerPublishVolume -func (mr *MockControllerServerMockRecorder) ControllerPublishVolume(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerPublishVolume", reflect.TypeOf((*MockControllerServer)(nil).ControllerPublishVolume), arg0, arg1) +func (_mr *_MockControllerServerRecorder) ControllerUnpublishVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ControllerUnpublishVolume", arg0, arg1) } -// ControllerUnpublishVolume mocks base method -func (m *MockControllerServer) ControllerUnpublishVolume(arg0 context.Context, arg1 *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) { - ret := m.ctrl.Call(m, "ControllerUnpublishVolume", arg0, arg1) - ret0, _ := ret[0].(*csi.ControllerUnpublishVolumeResponse) +func (_m *MockControllerServer) CreateVolume(_param0 context.Context, _param1 *v0.CreateVolumeRequest) (*v0.CreateVolumeResponse, error) { + ret := _m.ctrl.Call(_m, "CreateVolume", _param0, _param1) + ret0, _ := ret[0].(*v0.CreateVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// ControllerUnpublishVolume indicates an expected call of ControllerUnpublishVolume -func (mr *MockControllerServerMockRecorder) ControllerUnpublishVolume(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUnpublishVolume", reflect.TypeOf((*MockControllerServer)(nil).ControllerUnpublishVolume), arg0, arg1) +func (_mr *_MockControllerServerRecorder) CreateVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "CreateVolume", arg0, arg1) } -// CreateVolume mocks base method -func (m *MockControllerServer) CreateVolume(arg0 context.Context, arg1 *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { - ret := m.ctrl.Call(m, "CreateVolume", arg0, arg1) - ret0, _ := ret[0].(*csi.CreateVolumeResponse) +func (_m *MockControllerServer) DeleteVolume(_param0 context.Context, _param1 *v0.DeleteVolumeRequest) (*v0.DeleteVolumeResponse, error) { + ret := _m.ctrl.Call(_m, "DeleteVolume", _param0, _param1) + ret0, _ := ret[0].(*v0.DeleteVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// CreateVolume indicates an expected call of CreateVolume -func (mr *MockControllerServerMockRecorder) CreateVolume(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockControllerServer)(nil).CreateVolume), arg0, arg1) +func (_mr *_MockControllerServerRecorder) DeleteVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "DeleteVolume", arg0, arg1) } -// DeleteVolume mocks base method -func (m *MockControllerServer) DeleteVolume(arg0 context.Context, arg1 *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) { - ret := m.ctrl.Call(m, "DeleteVolume", arg0, arg1) - ret0, _ := ret[0].(*csi.DeleteVolumeResponse) +func (_m *MockControllerServer) GetCapacity(_param0 context.Context, _param1 *v0.GetCapacityRequest) (*v0.GetCapacityResponse, error) { + ret := _m.ctrl.Call(_m, "GetCapacity", _param0, _param1) + ret0, _ := ret[0].(*v0.GetCapacityResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// DeleteVolume indicates an expected call of DeleteVolume -func (mr *MockControllerServerMockRecorder) DeleteVolume(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolume", reflect.TypeOf((*MockControllerServer)(nil).DeleteVolume), arg0, arg1) +func (_mr *_MockControllerServerRecorder) GetCapacity(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "GetCapacity", arg0, arg1) } -// GetCapacity mocks base method -func (m *MockControllerServer) GetCapacity(arg0 context.Context, arg1 *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error) { - ret := m.ctrl.Call(m, "GetCapacity", arg0, arg1) - ret0, _ := ret[0].(*csi.GetCapacityResponse) +func (_m *MockControllerServer) ListVolumes(_param0 context.Context, _param1 *v0.ListVolumesRequest) (*v0.ListVolumesResponse, error) { + ret := _m.ctrl.Call(_m, "ListVolumes", _param0, _param1) + ret0, _ := ret[0].(*v0.ListVolumesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetCapacity indicates an expected call of GetCapacity -func (mr *MockControllerServerMockRecorder) GetCapacity(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCapacity", reflect.TypeOf((*MockControllerServer)(nil).GetCapacity), arg0, arg1) +func (_mr *_MockControllerServerRecorder) ListVolumes(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ListVolumes", arg0, arg1) } -// ListVolumes mocks base method -func (m *MockControllerServer) ListVolumes(arg0 context.Context, arg1 *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error) { - ret := m.ctrl.Call(m, "ListVolumes", arg0, arg1) - ret0, _ := ret[0].(*csi.ListVolumesResponse) +func (_m *MockControllerServer) ValidateVolumeCapabilities(_param0 context.Context, _param1 *v0.ValidateVolumeCapabilitiesRequest) (*v0.ValidateVolumeCapabilitiesResponse, error) { + ret := _m.ctrl.Call(_m, "ValidateVolumeCapabilities", _param0, _param1) + ret0, _ := ret[0].(*v0.ValidateVolumeCapabilitiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// ListVolumes indicates an expected call of ListVolumes -func (mr *MockControllerServerMockRecorder) ListVolumes(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVolumes", reflect.TypeOf((*MockControllerServer)(nil).ListVolumes), arg0, arg1) +func (_mr *_MockControllerServerRecorder) ValidateVolumeCapabilities(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ValidateVolumeCapabilities", arg0, arg1) } -// ValidateVolumeCapabilities mocks base method -func (m *MockControllerServer) ValidateVolumeCapabilities(arg0 context.Context, arg1 *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error) { - ret := m.ctrl.Call(m, "ValidateVolumeCapabilities", arg0, arg1) - ret0, _ := ret[0].(*csi.ValidateVolumeCapabilitiesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ValidateVolumeCapabilities indicates an expected call of ValidateVolumeCapabilities -func (mr *MockControllerServerMockRecorder) ValidateVolumeCapabilities(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateVolumeCapabilities", reflect.TypeOf((*MockControllerServer)(nil).ValidateVolumeCapabilities), arg0, arg1) -} - -// MockNodeServer is a mock of NodeServer interface +// Mock of NodeServer interface type MockNodeServer struct { ctrl *gomock.Controller - recorder *MockNodeServerMockRecorder + recorder *_MockNodeServerRecorder } -// MockNodeServerMockRecorder is the mock recorder for MockNodeServer -type MockNodeServerMockRecorder struct { +// Recorder for MockNodeServer (not exported) +type _MockNodeServerRecorder struct { mock *MockNodeServer } -// NewMockNodeServer creates a new mock instance func NewMockNodeServer(ctrl *gomock.Controller) *MockNodeServer { mock := &MockNodeServer{ctrl: ctrl} - mock.recorder = &MockNodeServerMockRecorder{mock} + mock.recorder = &_MockNodeServerRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use -func (m *MockNodeServer) EXPECT() *MockNodeServerMockRecorder { - return m.recorder +func (_m *MockNodeServer) EXPECT() *_MockNodeServerRecorder { + return _m.recorder +} + +func (_m *MockNodeServer) NodeGetCapabilities(_param0 context.Context, _param1 *v0.NodeGetCapabilitiesRequest) (*v0.NodeGetCapabilitiesResponse, error) { + ret := _m.ctrl.Call(_m, "NodeGetCapabilities", _param0, _param1) + ret0, _ := ret[0].(*v0.NodeGetCapabilitiesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockNodeServerRecorder) NodeGetCapabilities(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NodeGetCapabilities", arg0, arg1) } -// NodeGetId mocks base method -func (m *MockNodeServer) NodeGetId(arg0 context.Context, arg1 *csi.NodeGetIdRequest) (*csi.NodeGetIdResponse, error) { - ret := m.ctrl.Call(m, "NodeGetId", arg0, arg1) - ret0, _ := ret[0].(*csi.NodeGetIdResponse) +func (_m *MockNodeServer) NodeGetId(_param0 context.Context, _param1 *v0.NodeGetIdRequest) (*v0.NodeGetIdResponse, error) { + ret := _m.ctrl.Call(_m, "NodeGetId", _param0, _param1) + ret0, _ := ret[0].(*v0.NodeGetIdResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// NodeGetId indicates an expected call of NodeGetId -func (mr *MockNodeServerMockRecorder) NodeGetId(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeGetId", reflect.TypeOf((*MockNodeServer)(nil).NodeGetId), arg0, arg1) +func (_mr *_MockNodeServerRecorder) NodeGetId(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NodeGetId", arg0, arg1) } -// NodeGetCapabilities mocks base method -func (m *MockNodeServer) NodeGetCapabilities(arg0 context.Context, arg1 *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error) { - ret := m.ctrl.Call(m, "NodeGetCapabilities", arg0, arg1) - ret0, _ := ret[0].(*csi.NodeGetCapabilitiesResponse) +func (_m *MockNodeServer) NodePublishVolume(_param0 context.Context, _param1 *v0.NodePublishVolumeRequest) (*v0.NodePublishVolumeResponse, error) { + ret := _m.ctrl.Call(_m, "NodePublishVolume", _param0, _param1) + ret0, _ := ret[0].(*v0.NodePublishVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// NodeGetCapabilities indicates an expected call of NodeGetCapabilities -func (mr *MockNodeServerMockRecorder) NodeGetCapabilities(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeGetCapabilities", reflect.TypeOf((*MockNodeServer)(nil).NodeGetCapabilities), arg0, arg1) +func (_mr *_MockNodeServerRecorder) NodePublishVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NodePublishVolume", arg0, arg1) } -// NodeProbe mocks base method -func (m *MockNodeServer) NodeProbe(arg0 context.Context, arg1 *csi.NodeProbeRequest) (*csi.NodeProbeResponse, error) { - ret := m.ctrl.Call(m, "NodeProbe", arg0, arg1) - ret0, _ := ret[0].(*csi.NodeProbeResponse) +func (_m *MockNodeServer) NodeStageVolume(_param0 context.Context, _param1 *v0.NodeStageVolumeRequest) (*v0.NodeStageVolumeResponse, error) { + ret := _m.ctrl.Call(_m, "NodeStageVolume", _param0, _param1) + ret0, _ := ret[0].(*v0.NodeStageVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// NodeProbe indicates an expected call of NodeProbe -func (mr *MockNodeServerMockRecorder) NodeProbe(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeProbe", reflect.TypeOf((*MockNodeServer)(nil).NodeProbe), arg0, arg1) +func (_mr *_MockNodeServerRecorder) NodeStageVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NodeStageVolume", arg0, arg1) } -// NodePublishVolume mocks base method -func (m *MockNodeServer) NodePublishVolume(arg0 context.Context, arg1 *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) { - ret := m.ctrl.Call(m, "NodePublishVolume", arg0, arg1) - ret0, _ := ret[0].(*csi.NodePublishVolumeResponse) +func (_m *MockNodeServer) NodeUnpublishVolume(_param0 context.Context, _param1 *v0.NodeUnpublishVolumeRequest) (*v0.NodeUnpublishVolumeResponse, error) { + ret := _m.ctrl.Call(_m, "NodeUnpublishVolume", _param0, _param1) + ret0, _ := ret[0].(*v0.NodeUnpublishVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// NodePublishVolume indicates an expected call of NodePublishVolume -func (mr *MockNodeServerMockRecorder) NodePublishVolume(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodePublishVolume", reflect.TypeOf((*MockNodeServer)(nil).NodePublishVolume), arg0, arg1) +func (_mr *_MockNodeServerRecorder) NodeUnpublishVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NodeUnpublishVolume", arg0, arg1) } -// NodeUnpublishVolume mocks base method -func (m *MockNodeServer) NodeUnpublishVolume(arg0 context.Context, arg1 *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error) { - ret := m.ctrl.Call(m, "NodeUnpublishVolume", arg0, arg1) - ret0, _ := ret[0].(*csi.NodeUnpublishVolumeResponse) +func (_m *MockNodeServer) NodeUnstageVolume(_param0 context.Context, _param1 *v0.NodeUnstageVolumeRequest) (*v0.NodeUnstageVolumeResponse, error) { + ret := _m.ctrl.Call(_m, "NodeUnstageVolume", _param0, _param1) + ret0, _ := ret[0].(*v0.NodeUnstageVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// NodeUnpublishVolume indicates an expected call of NodeUnpublishVolume -func (mr *MockNodeServerMockRecorder) NodeUnpublishVolume(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeUnpublishVolume", reflect.TypeOf((*MockNodeServer)(nil).NodeUnpublishVolume), arg0, arg1) +func (_mr *_MockNodeServerRecorder) NodeUnstageVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NodeUnstageVolume", arg0, arg1) } diff --git a/vendor/github.com/kubernetes-csi/csi-test/hack/e2e.sh b/vendor/github.com/kubernetes-csi/csi-test/hack/e2e.sh index 24218cb297..4784085a1f 100755 --- a/vendor/github.com/kubernetes-csi/csi-test/hack/e2e.sh +++ b/vendor/github.com/kubernetes-csi/csi-test/hack/e2e.sh @@ -5,7 +5,7 @@ UDS="/tmp/e2e-csi-sanity.sock" CSI_ENDPOINTS="127.0.0.1:9998" CSI_ENDPOINTS="$CSI_ENDPOINTS unix://${UDS}" CSI_ENDPOINTS="$CSI_ENDPOINTS ${UDS}" -CSI_MOCK_VERSION="support/csi-0.2.0" +CSI_MOCK_VERSION="master" # # $1 - endpoint for mock. diff --git a/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/controller.go b/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/controller.go index c8e4aa0ae1..2ea3709a7a 100644 --- a/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/controller.go +++ b/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/controller.go @@ -22,7 +22,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/container-storage-interface/spec/lib/go/csi" + csi "github.com/container-storage-interface/spec/lib/go/csi/v0" context "golang.org/x/net/context" . "github.com/onsi/ginkgo" @@ -41,9 +41,7 @@ func isCapabilitySupported( caps, err := c.ControllerGetCapabilities( context.Background(), - &csi.ControllerGetCapabilitiesRequest{ - Version: csiClientVersion, - }) + &csi.ControllerGetCapabilitiesRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(caps).NotTo(BeNil()) Expect(caps.GetCapabilities()).NotTo(BeNil()) @@ -66,23 +64,10 @@ var _ = Describe("ControllerGetCapabilities [Controller Server]", func() { c = csi.NewControllerClient(conn) }) - It("should fail when no version is provided", func() { - _, err := c.ControllerGetCapabilities( - context.Background(), - &csi.ControllerGetCapabilitiesRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should return appropriate capabilities", func() { caps, err := c.ControllerGetCapabilities( context.Background(), - &csi.ControllerGetCapabilitiesRequest{ - Version: csiClientVersion, - }) + &csi.ControllerGetCapabilitiesRequest{}) By("checking successful response") Expect(err).NotTo(HaveOccurred()) @@ -117,25 +102,10 @@ var _ = Describe("GetCapacity [Controller Server]", func() { } }) - It("should fail when no version is provided", func() { - - By("failing when there is no version") - _, err := c.GetCapacity( - context.Background(), - &csi.GetCapacityRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should return capacity (no optional values added)", func() { _, err := c.GetCapacity( context.Background(), - &csi.GetCapacityRequest{ - Version: csiClientVersion, - }) + &csi.GetCapacityRequest{}) Expect(err).NotTo(HaveOccurred()) // Since capacity is int64 we will not be checking it @@ -156,25 +126,10 @@ var _ = Describe("ListVolumes [Controller Server]", func() { } }) - It("should fail when no version is provided", func() { - - By("failing when there is no version") - _, err := c.ListVolumes( - context.Background(), - &csi.ListVolumesRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should return appropriate values (no optional values added)", func() { vols, err := c.ListVolumes( context.Background(), - &csi.ListVolumesRequest{ - Version: csiClientVersion, - }) + &csi.ListVolumesRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(vols).NotTo(BeNil()) @@ -202,25 +157,11 @@ var _ = Describe("CreateVolume [Controller Server]", func() { } }) - It("should fail when no version is provided", func() { - - _, err := c.CreateVolume( - context.Background(), - &csi.CreateVolumeRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should fail when no name is provided", func() { _, err := c.CreateVolume( context.Background(), - &csi.CreateVolumeRequest{ - Version: csiClientVersion, - }) + &csi.CreateVolumeRequest{}) Expect(err).To(HaveOccurred()) serverError, ok := status.FromError(err) @@ -233,8 +174,7 @@ var _ = Describe("CreateVolume [Controller Server]", func() { _, err := c.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Version: csiClientVersion, - Name: "name", + Name: "name", }) Expect(err).To(HaveOccurred()) @@ -250,8 +190,7 @@ var _ = Describe("CreateVolume [Controller Server]", func() { vol, err := c.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Version: csiClientVersion, - Name: name, + Name: name, VolumeCapabilities: []*csi.VolumeCapability{ { AccessType: &csi.VolumeCapability_Mount{ @@ -272,7 +211,6 @@ var _ = Describe("CreateVolume [Controller Server]", func() { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), }) Expect(err).NotTo(HaveOccurred()) @@ -287,8 +225,7 @@ var _ = Describe("CreateVolume [Controller Server]", func() { vol, err := c.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Version: csiClientVersion, - Name: name, + Name: name, VolumeCapabilities: []*csi.VolumeCapability{ { AccessType: &csi.VolumeCapability_Mount{ @@ -313,7 +250,6 @@ var _ = Describe("CreateVolume [Controller Server]", func() { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), }) Expect(err).NotTo(HaveOccurred()) @@ -333,25 +269,11 @@ var _ = Describe("DeleteVolume [Controller Server]", func() { } }) - It("should fail when no version is provided", func() { - - _, err := c.DeleteVolume( - context.Background(), - &csi.DeleteVolumeRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should fail when no volume id is provided", func() { _, err := c.DeleteVolume( context.Background(), - &csi.DeleteVolumeRequest{ - Version: csiClientVersion, - }) + &csi.DeleteVolumeRequest{}) Expect(err).To(HaveOccurred()) serverError, ok := status.FromError(err) @@ -364,7 +286,6 @@ var _ = Describe("DeleteVolume [Controller Server]", func() { _, err := c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - Version: csiClientVersion, VolumeId: "reallyfakevolumeid", }) Expect(err).NotTo(HaveOccurred()) @@ -378,8 +299,7 @@ var _ = Describe("DeleteVolume [Controller Server]", func() { vol, err := c.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Version: csiClientVersion, - Name: name, + Name: name, VolumeCapabilities: []*csi.VolumeCapability{ { AccessType: &csi.VolumeCapability_Mount{ @@ -402,7 +322,6 @@ var _ = Describe("DeleteVolume [Controller Server]", func() { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), }) Expect(err).NotTo(HaveOccurred()) @@ -418,25 +337,11 @@ var _ = Describe("ValidateVolumeCapabilities [Controller Server]", func() { c = csi.NewControllerClient(conn) }) - It("should fail when no version is provided", func() { - - _, err := c.ValidateVolumeCapabilities( - context.Background(), - &csi.ValidateVolumeCapabilitiesRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should fail when no volume id is provided", func() { _, err := c.ValidateVolumeCapabilities( context.Background(), - &csi.ValidateVolumeCapabilitiesRequest{ - Version: csiClientVersion, - }) + &csi.ValidateVolumeCapabilitiesRequest{}) Expect(err).To(HaveOccurred()) serverError, ok := status.FromError(err) @@ -449,7 +354,6 @@ var _ = Describe("ValidateVolumeCapabilities [Controller Server]", func() { _, err := c.ValidateVolumeCapabilities( context.Background(), &csi.ValidateVolumeCapabilitiesRequest{ - Version: csiClientVersion, VolumeId: "id", }) Expect(err).To(HaveOccurred()) @@ -467,8 +371,7 @@ var _ = Describe("ValidateVolumeCapabilities [Controller Server]", func() { vol, err := c.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Version: csiClientVersion, - Name: name, + Name: name, VolumeCapabilities: []*csi.VolumeCapability{ { AccessType: &csi.VolumeCapability_Mount{ @@ -491,7 +394,6 @@ var _ = Describe("ValidateVolumeCapabilities [Controller Server]", func() { valivolcap, err := c.ValidateVolumeCapabilities( context.Background(), &csi.ValidateVolumeCapabilitiesRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), VolumeCapabilities: []*csi.VolumeCapability{ { @@ -512,7 +414,6 @@ var _ = Describe("ValidateVolumeCapabilities [Controller Server]", func() { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), }) Expect(err).NotTo(HaveOccurred()) @@ -534,25 +435,11 @@ var _ = Describe("ControllerPublishVolume [Controller Server]", func() { } }) - It("should fail when no version is provided", func() { - - _, err := c.ControllerPublishVolume( - context.Background(), - &csi.ControllerPublishVolumeRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should fail when no volume id is provided", func() { _, err := c.ControllerPublishVolume( context.Background(), - &csi.ControllerPublishVolumeRequest{ - Version: csiClientVersion, - }) + &csi.ControllerPublishVolumeRequest{}) Expect(err).To(HaveOccurred()) serverError, ok := status.FromError(err) @@ -565,7 +452,6 @@ var _ = Describe("ControllerPublishVolume [Controller Server]", func() { _, err := c.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - Version: csiClientVersion, VolumeId: "id", }) Expect(err).To(HaveOccurred()) @@ -580,7 +466,6 @@ var _ = Describe("ControllerPublishVolume [Controller Server]", func() { _, err := c.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - Version: csiClientVersion, VolumeId: "id", NodeId: "fakenode", }) @@ -599,8 +484,7 @@ var _ = Describe("ControllerPublishVolume [Controller Server]", func() { vol, err := c.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Version: csiClientVersion, - Name: name, + Name: name, VolumeCapabilities: []*csi.VolumeCapability{ { AccessType: &csi.VolumeCapability_Mount{ @@ -620,9 +504,7 @@ var _ = Describe("ControllerPublishVolume [Controller Server]", func() { By("getting a node id") nid, err := n.NodeGetId( context.Background(), - &csi.NodeGetIdRequest{ - Version: csiClientVersion, - }) + &csi.NodeGetIdRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(nid).NotTo(BeNil()) Expect(nid.GetNodeId()).NotTo(BeEmpty()) @@ -632,7 +514,6 @@ var _ = Describe("ControllerPublishVolume [Controller Server]", func() { conpubvol, err := c.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), NodeId: nid.GetNodeId(), VolumeCapability: &csi.VolumeCapability{ @@ -652,7 +533,6 @@ var _ = Describe("ControllerPublishVolume [Controller Server]", func() { conunpubvol, err := c.ControllerUnpublishVolume( context.Background(), &csi.ControllerUnpublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), // NodeID is optional in ControllerUnpublishVolume NodeId: nid.GetNodeId(), @@ -664,7 +544,6 @@ var _ = Describe("ControllerPublishVolume [Controller Server]", func() { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), }) Expect(err).NotTo(HaveOccurred()) @@ -686,25 +565,11 @@ var _ = Describe("ControllerUnpublishVolume [Controller Server]", func() { } }) - It("should fail when no version is provided", func() { - - _, err := c.ControllerUnpublishVolume( - context.Background(), - &csi.ControllerUnpublishVolumeRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should fail when no volume id is provided", func() { _, err := c.ControllerUnpublishVolume( context.Background(), - &csi.ControllerUnpublishVolumeRequest{ - Version: csiClientVersion, - }) + &csi.ControllerUnpublishVolumeRequest{}) Expect(err).To(HaveOccurred()) serverError, ok := status.FromError(err) @@ -720,8 +585,7 @@ var _ = Describe("ControllerUnpublishVolume [Controller Server]", func() { vol, err := c.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Version: csiClientVersion, - Name: name, + Name: name, VolumeCapabilities: []*csi.VolumeCapability{ { AccessType: &csi.VolumeCapability_Mount{ @@ -741,9 +605,7 @@ var _ = Describe("ControllerUnpublishVolume [Controller Server]", func() { By("getting a node id") nid, err := n.NodeGetId( context.Background(), - &csi.NodeGetIdRequest{ - Version: csiClientVersion, - }) + &csi.NodeGetIdRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(nid).NotTo(BeNil()) Expect(nid.GetNodeId()).NotTo(BeEmpty()) @@ -753,7 +615,6 @@ var _ = Describe("ControllerUnpublishVolume [Controller Server]", func() { conpubvol, err := c.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), NodeId: nid.GetNodeId(), VolumeCapability: &csi.VolumeCapability{ @@ -774,7 +635,6 @@ var _ = Describe("ControllerUnpublishVolume [Controller Server]", func() { conunpubvol, err := c.ControllerUnpublishVolume( context.Background(), &csi.ControllerUnpublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), // NodeID is optional in ControllerUnpublishVolume NodeId: nid.GetNodeId(), @@ -786,7 +646,6 @@ var _ = Describe("ControllerUnpublishVolume [Controller Server]", func() { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), }) Expect(err).NotTo(HaveOccurred()) diff --git a/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/identity.go b/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/identity.go index fec643142a..4df4d4b442 100644 --- a/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/identity.go +++ b/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/identity.go @@ -19,52 +19,16 @@ package sanity import ( "regexp" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/container-storage-interface/spec/lib/go/csi" + csi "github.com/container-storage-interface/spec/lib/go/csi/v0" context "golang.org/x/net/context" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) -var ( - csiClientVersion = &csi.Version{ - Major: 0, - Minor: 2, - Patch: 0, - } -) - -var _ = Describe("GetSupportedVersions [Identity Server]", func() { - var ( - c csi.IdentityClient - ) - - BeforeEach(func() { - c = csi.NewIdentityClient(conn) - }) - - It("should return an array of supported versions", func() { - res, err := c.GetSupportedVersions( - context.Background(), - &csi.GetSupportedVersionsRequest{}) +// TODO: Tests for GetPluginCapabilities - By("checking response to have supported versions list") - Expect(err).NotTo(HaveOccurred()) - Expect(res.GetSupportedVersions()).NotTo(BeNil()) - Expect(len(res.GetSupportedVersions()) >= 1).To(BeTrue()) - - By("checking each version") - for _, version := range res.GetSupportedVersions() { - Expect(version).NotTo(BeNil()) - Expect(version.GetMajor()).To(BeNumerically("<", 100)) - Expect(version.GetMinor()).To(BeNumerically("<", 100)) - Expect(version.GetPatch()).To(BeNumerically("<", 100)) - } - }) -}) +// TODO: Tests for Probe var _ = Describe("GetPluginInfo [Identity Server]", func() { var ( @@ -75,19 +39,8 @@ var _ = Describe("GetPluginInfo [Identity Server]", func() { c = csi.NewIdentityClient(conn) }) - It("should fail when no version is provided", func() { - _, err := c.GetPluginInfo(context.Background(), &csi.GetPluginInfoRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should return appropriate information", func() { - req := &csi.GetPluginInfoRequest{ - Version: csiClientVersion, - } + req := &csi.GetPluginInfoRequest{} res, err := c.GetPluginInfo(context.Background(), req) Expect(err).NotTo(HaveOccurred()) Expect(res).NotTo(BeNil()) diff --git a/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/node.go b/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/node.go index 67106a410c..7943c5ad9a 100644 --- a/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/node.go +++ b/vendor/github.com/kubernetes-csi/csi-test/pkg/sanity/node.go @@ -22,7 +22,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/container-storage-interface/spec/lib/go/csi" + csi "github.com/container-storage-interface/spec/lib/go/csi/v0" context "golang.org/x/net/context" . "github.com/onsi/ginkgo" @@ -38,23 +38,10 @@ var _ = Describe("NodeGetCapabilities [Node Server]", func() { c = csi.NewNodeClient(conn) }) - It("should fail when no version is provided", func() { - _, err := c.NodeGetCapabilities( - context.Background(), - &csi.NodeGetCapabilitiesRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should return appropriate capabilities", func() { caps, err := c.NodeGetCapabilities( context.Background(), - &csi.NodeGetCapabilitiesRequest{ - Version: csiClientVersion, - }) + &csi.NodeGetCapabilitiesRequest{}) By("checking successful response") Expect(err).NotTo(HaveOccurred()) @@ -73,38 +60,6 @@ var _ = Describe("NodeGetCapabilities [Node Server]", func() { }) }) -var _ = Describe("NodeProbe [Node Server]", func() { - var ( - c csi.NodeClient - ) - - BeforeEach(func() { - c = csi.NewNodeClient(conn) - }) - - It("should fail when no version is provided", func() { - _, err := c.NodeProbe( - context.Background(), - &csi.NodeProbeRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - - It("should return appropriate values", func() { - pro, err := c.NodeProbe( - context.Background(), - &csi.NodeProbeRequest{ - Version: csiClientVersion, - }) - - Expect(err).NotTo(HaveOccurred()) - Expect(pro).NotTo(BeNil()) - }) -}) - var _ = Describe("NodeGetId [Node Server]", func() { var ( c csi.NodeClient @@ -114,24 +69,10 @@ var _ = Describe("NodeGetId [Node Server]", func() { c = csi.NewNodeClient(conn) }) - It("should fail when no version is provided", func() { - // _, err := c.NodeGetId( - _, err := c.NodeGetId( - context.Background(), - &csi.NodeGetIdRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should return appropriate values", func() { nid, err := c.NodeGetId( context.Background(), - &csi.NodeGetIdRequest{ - Version: csiClientVersion, - }) + &csi.NodeGetIdRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(nid).NotTo(BeNil()) @@ -154,25 +95,11 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME) }) - It("should fail when no version is provided", func() { - - _, err := c.NodePublishVolume( - context.Background(), - &csi.NodePublishVolumeRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should fail when no volume id is provided", func() { _, err := c.NodePublishVolume( context.Background(), - &csi.NodePublishVolumeRequest{ - Version: csiClientVersion, - }) + &csi.NodePublishVolumeRequest{}) Expect(err).To(HaveOccurred()) serverError, ok := status.FromError(err) @@ -185,7 +112,6 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { _, err := c.NodePublishVolume( context.Background(), &csi.NodePublishVolumeRequest{ - Version: csiClientVersion, VolumeId: "id", }) Expect(err).To(HaveOccurred()) @@ -200,7 +126,6 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { _, err := c.NodePublishVolume( context.Background(), &csi.NodePublishVolumeRequest{ - Version: csiClientVersion, VolumeId: "id", TargetPath: csiTargetPath, }) @@ -219,8 +144,7 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { vol, err := s.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Version: csiClientVersion, - Name: name, + Name: name, VolumeCapabilities: []*csi.VolumeCapability{ { AccessType: &csi.VolumeCapability_Mount{ @@ -240,9 +164,7 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { By("getting a node id") nid, err := c.NodeGetId( context.Background(), - &csi.NodeGetIdRequest{ - Version: csiClientVersion, - }) + &csi.NodeGetIdRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(nid).NotTo(BeNil()) Expect(nid.GetNodeId()).NotTo(BeEmpty()) @@ -253,7 +175,6 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { conpubvol, err = s.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), NodeId: nid.GetNodeId(), VolumeCapability: &csi.VolumeCapability{ @@ -273,7 +194,6 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { // NodePublishVolume By("publishing the volume on a node") nodepubvolRequest := &csi.NodePublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), TargetPath: csiTargetPath, VolumeCapability: &csi.VolumeCapability{ @@ -297,7 +217,6 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { nodeunpubvol, err := c.NodeUnpublishVolume( context.Background(), &csi.NodeUnpublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), TargetPath: csiTargetPath, }) @@ -309,7 +228,6 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { nodeunpubvol, err := c.NodeUnpublishVolume( context.Background(), &csi.NodeUnpublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), TargetPath: csiTargetPath, }) @@ -321,7 +239,6 @@ var _ = Describe("NodePublishVolume [Node Server]", func() { _, err = s.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), }) Expect(err).NotTo(HaveOccurred()) @@ -343,25 +260,11 @@ var _ = Describe("NodeUnpublishVolume [Node Server]", func() { csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME) }) - It("should fail when no version is provided", func() { - - _, err := c.NodeUnpublishVolume( - context.Background(), - &csi.NodeUnpublishVolumeRequest{}) - Expect(err).To(HaveOccurred()) - - serverError, ok := status.FromError(err) - Expect(ok).To(BeTrue()) - Expect(serverError.Code()).To(Equal(codes.InvalidArgument)) - }) - It("should fail when no volume id is provided", func() { _, err := c.NodeUnpublishVolume( context.Background(), - &csi.NodeUnpublishVolumeRequest{ - Version: csiClientVersion, - }) + &csi.NodeUnpublishVolumeRequest{}) Expect(err).To(HaveOccurred()) serverError, ok := status.FromError(err) @@ -374,7 +277,6 @@ var _ = Describe("NodeUnpublishVolume [Node Server]", func() { _, err := c.NodeUnpublishVolume( context.Background(), &csi.NodeUnpublishVolumeRequest{ - Version: csiClientVersion, VolumeId: "id", }) Expect(err).To(HaveOccurred()) @@ -392,8 +294,7 @@ var _ = Describe("NodeUnpublishVolume [Node Server]", func() { vol, err := s.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Version: csiClientVersion, - Name: name, + Name: name, VolumeCapabilities: []*csi.VolumeCapability{ { AccessType: &csi.VolumeCapability_Mount{ @@ -417,7 +318,6 @@ var _ = Describe("NodeUnpublishVolume [Node Server]", func() { conpubvol, err = s.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), NodeId: "foobar", VolumeCapability: &csi.VolumeCapability{ @@ -437,7 +337,6 @@ var _ = Describe("NodeUnpublishVolume [Node Server]", func() { // NodePublishVolume By("publishing the volume on a node") nodepubvolRequest := &csi.NodePublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), TargetPath: csiTargetPath, VolumeCapability: &csi.VolumeCapability{ @@ -460,7 +359,6 @@ var _ = Describe("NodeUnpublishVolume [Node Server]", func() { nodeunpubvol, err := c.NodeUnpublishVolume( context.Background(), &csi.NodeUnpublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), TargetPath: csiTargetPath, }) @@ -472,7 +370,6 @@ var _ = Describe("NodeUnpublishVolume [Node Server]", func() { nodeunpubvol, err := c.NodeUnpublishVolume( context.Background(), &csi.NodeUnpublishVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), TargetPath: csiTargetPath, }) @@ -484,9 +381,10 @@ var _ = Describe("NodeUnpublishVolume [Node Server]", func() { _, err = s.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - Version: csiClientVersion, VolumeId: vol.GetVolume().GetId(), }) Expect(err).NotTo(HaveOccurred()) }) }) + +// TODO: Tests for NodeStageVolume/NodeUnstageVolume diff --git a/vendor/github.com/kubernetes-csi/csi-test/test/co_test.go b/vendor/github.com/kubernetes-csi/csi-test/test/co_test.go index 49ad8283e1..d4e5dfc381 100644 --- a/vendor/github.com/kubernetes-csi/csi-test/test/co_test.go +++ b/vendor/github.com/kubernetes-csi/csi-test/test/co_test.go @@ -18,7 +18,7 @@ package test import ( "testing" - "github.com/container-storage-interface/spec/lib/go/csi" + csi "github.com/container-storage-interface/spec/lib/go/csi/v0" gomock "github.com/golang/mock/gomock" mock_driver "github.com/kubernetes-csi/csi-test/driver" mock_utils "github.com/kubernetes-csi/csi-test/utils" @@ -33,13 +33,7 @@ func TestPluginInfoResponse(t *testing.T) { driver := mock_driver.NewMockIdentityServer(m) // Setup input - in := &csi.GetPluginInfoRequest{ - Version: &csi.Version{ - Major: 0, - Minor: 1, - Patch: 0, - }, - } + in := &csi.GetPluginInfoRequest{} // Setup mock outout out := &csi.GetPluginInfoResponse{ @@ -72,13 +66,7 @@ func TestGRPCGetPluginInfoReponse(t *testing.T) { driver := mock_driver.NewMockIdentityServer(m) // Setup input - in := &csi.GetPluginInfoRequest{ - Version: &csi.Version{ - Major: 0, - Minor: 1, - Patch: 0, - }, - } + in := &csi.GetPluginInfoRequest{} // Setup mock outout out := &csi.GetPluginInfoResponse{ diff --git a/vendor/github.com/kubernetes-csi/csi-test/test/driver_test.go b/vendor/github.com/kubernetes-csi/csi-test/test/driver_test.go index 7db29d9180..4b0122b6ce 100644 --- a/vendor/github.com/kubernetes-csi/csi-test/test/driver_test.go +++ b/vendor/github.com/kubernetes-csi/csi-test/test/driver_test.go @@ -21,7 +21,7 @@ import ( "sync" "testing" - "github.com/container-storage-interface/spec/lib/go/csi" + csi "github.com/container-storage-interface/spec/lib/go/csi/v0" "github.com/kubernetes-csi/csi-test/utils" "google.golang.org/grpc" "google.golang.org/grpc/reflection" @@ -36,17 +36,13 @@ type simpleDriver struct { wg sync.WaitGroup } -func (s *simpleDriver) GetSupportedVersions( - context.Context, *csi.GetSupportedVersionsRequest) (*csi.GetSupportedVersionsResponse, error) { - return &csi.GetSupportedVersionsResponse{ - SupportedVersions: []*csi.Version{ - { - Major: 0, - Minor: 2, - Patch: 0, - }, - }, - }, nil +func (s *simpleDriver) GetPluginCapabilities(context.Context, *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error) { + // TODO: Return some simple Plugin Capabilities + return &csi.GetPluginCapabilitiesResponse{}, nil +} + +func (s *simpleDriver) Probe(context.Context, *csi.ProbeRequest) (*csi.ProbeResponse, error) { + return &csi.ProbeResponse{}, nil } func (s *simpleDriver) GetPluginInfo( From 7d64d129dea79535298d745a70acfaeaa6829c93 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Tue, 27 Feb 2018 17:46:50 -0500 Subject: [PATCH 2/2] refactor attacher for CSI 0.2.0 spec --- Dockerfile | 2 +- Dockerfile.builder | 8 --- Gopkg.lock | 10 ++-- Gopkg.toml | 6 +-- Makefile | 6 +-- cmd/csi-attacher/main.go | 7 ++- pkg/connection/connection.go | 58 +++++++++------------- pkg/connection/connection_test.go | 82 +++---------------------------- pkg/connection/util.go | 2 +- pkg/connection/util_test.go | 2 +- pkg/controller/framework_test.go | 6 +-- 11 files changed, 49 insertions(+), 140 deletions(-) delete mode 100644 Dockerfile.builder diff --git a/Dockerfile b/Dockerfile index f9b862ed96..599f4375cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,5 +2,5 @@ FROM alpine LABEL maintainers="Kubernetes Authors" LABEL description="CSI External Attacher" -COPY csi-attacher csi-attacher +COPY ./bin/csi-attacher csi-attacher ENTRYPOINT ["/csi-attacher"] diff --git a/Dockerfile.builder b/Dockerfile.builder deleted file mode 100644 index dcb6d422cf..0000000000 --- a/Dockerfile.builder +++ /dev/null @@ -1,8 +0,0 @@ -FROM golang:alpine -LABEL maintainers="Kubernetes Authors" -LABEL description="CSI External Attacher" - -WORKDIR /go/src/github.com/kubernetes-csi/external-attacher -COPY . . -RUN cd cmd/csi-attacher && \ - go install diff --git a/Gopkg.lock b/Gopkg.lock index 446b7bacd9..521e240e1b 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,10 +2,10 @@ [[projects]] - branch = "master" name = "github.com/container-storage-interface/spec" - packages = ["lib/go/csi"] - revision = "7ab01a90da87f9fef3ee1de0494962fdefaf7db7" + packages = ["lib/go/csi/v0"] + revision = "35d9f9d77954980e449e52c3f3e43c21bd8171f5" + version = "v0.2.0-rc1" [[projects]] name = "github.com/davecgh/go-spew" @@ -107,7 +107,7 @@ branch = "master" name = "github.com/kubernetes-csi/csi-test" packages = ["driver","utils"] - revision = "e56fa7f7a0416476964a01323ad041b9324d3d8c" + revision = "9aed34bd6fe031caae3d055b19d041c2c64420cc" [[projects]] branch = "master" @@ -202,6 +202,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "d0a70215a47e123a33e1a996ff2a651546f613c740d9b720106d071ca649ebe9" + inputs-digest = "00961fce4012503c6a4d232ef6d0655c7d375776d7a459a2be340235b717103d" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index f5b4facdef..fa0183885a 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -8,9 +8,9 @@ branch = "master" name = "github.com/golang/glog" -[[constraint]] - name = "github.com/golang/mock" - version = "1.0.0" +#[[constraint]] +# name = "github.com/golang/mock" +# version = "1.0.0" [[constraint]] branch = "master" diff --git a/Makefile b/Makefile index db923fda04..38b29f7642 100644 --- a/Makefile +++ b/Makefile @@ -27,15 +27,13 @@ endif all: csi-attacher csi-attacher: - go install github.com/kubernetes-csi/external-attacher/cmd/csi-attacher mkdir -p bin - cp ${GOPATH}/bin/csi-attacher bin/csi-attacher + CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./bin/csi-attacher ./cmd/csi-attacher clean: - -rm -rf bin deploy/docker/csi-attacher + -rm -rf bin container: csi-attacher - cp bin/csi-attacher deploy/docker docker build -t $(IMAGE_NAME):$(IMAGE_VERSION) . push: container diff --git a/cmd/csi-attacher/main.go b/cmd/csi-attacher/main.go index 723846a990..447e0444a8 100644 --- a/cmd/csi-attacher/main.go +++ b/cmd/csi-attacher/main.go @@ -152,16 +152,15 @@ func waitForDriverReady(csiConn connection.CSIConnection, timeout time.Duration) now := time.Now() finish := now.Add(timeout) var err error - for { ctx, cancel := context.WithTimeout(context.Background(), csiTimeout) defer cancel() - err = csiConn.ControllerProbe(ctx) + err = csiConn.Probe(ctx) if err == nil { - glog.V(2).Infof("ControllerProbe succeeded") + glog.V(2).Infof("Probe succeeded") return nil } - glog.V(2).Infof("ControllerProbe failed with %s", err) + glog.V(2).Infof("Probe failed with %s", err) now := time.Now() if now.After(finish) { diff --git a/pkg/connection/connection.go b/pkg/connection/connection.go index f7f8103c10..fc5bb98677 100644 --- a/pkg/connection/connection.go +++ b/pkg/connection/connection.go @@ -23,7 +23,7 @@ import ( "strings" "time" - "github.com/container-storage-interface/spec/lib/go/csi" + "github.com/container-storage-interface/spec/lib/go/csi/v0" "github.com/golang/glog" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -56,7 +56,7 @@ type CSIConnection interface { Detach(ctx context.Context, volumeID string, nodeID string) (detached bool, err error) // Probe checks that the CSI driver is ready to process requests - ControllerProbe(ctx context.Context) error + Probe(ctx context.Context) error // Close the connection Close() error @@ -68,13 +68,6 @@ type csiConnection struct { var ( _ CSIConnection = &csiConnection{} - - // Version of CSI this client implements - csiVersion = csi.Version{ - Major: 0, - Minor: 2, - Patch: 0, - } ) func New(address string, timeout time.Duration) (CSIConnection, error) { @@ -122,9 +115,7 @@ func connect(address string, timeout time.Duration) (*grpc.ClientConn, error) { func (c *csiConnection) GetDriverName(ctx context.Context) (string, error) { client := csi.NewIdentityClient(c.conn) - req := csi.GetPluginInfoRequest{ - Version: &csiVersion, - } + req := csi.GetPluginInfoRequest{} rsp, err := client.GetPluginInfo(ctx, &req) if err != nil { @@ -137,11 +128,21 @@ func (c *csiConnection) GetDriverName(ctx context.Context) (string, error) { return name, nil } +func (c *csiConnection) Probe(ctx context.Context) error { + client := csi.NewIdentityClient(c.conn) + + req := csi.ProbeRequest{} + + _, err := client.Probe(ctx, &req) + if err != nil { + return err + } + return nil +} + func (c *csiConnection) SupportsControllerPublish(ctx context.Context) (bool, error) { client := csi.NewControllerClient(c.conn) - req := csi.ControllerGetCapabilitiesRequest{ - Version: &csiVersion, - } + req := csi.ControllerGetCapabilitiesRequest{} rsp, err := client.ControllerGetCapabilities(ctx, &req) if err != nil { @@ -167,13 +168,12 @@ func (c *csiConnection) Attach(ctx context.Context, volumeID string, readOnly bo client := csi.NewControllerClient(c.conn) req := csi.ControllerPublishVolumeRequest{ - Version: &csiVersion, - VolumeId: volumeID, - NodeId: nodeID, - VolumeCapability: caps, - Readonly: readOnly, - VolumeAttributes: attributes, - ControllerPublishCredentials: nil, + VolumeId: volumeID, + NodeId: nodeID, + VolumeCapability: caps, + Readonly: readOnly, + VolumeAttributes: attributes, + ControllerPublishSecrets: nil, } rsp, err := client.ControllerPublishVolume(ctx, &req) @@ -187,10 +187,9 @@ func (c *csiConnection) Detach(ctx context.Context, volumeID string, nodeID stri client := csi.NewControllerClient(c.conn) req := csi.ControllerUnpublishVolumeRequest{ - Version: &csiVersion, VolumeId: volumeID, NodeId: nodeID, - ControllerUnpublishCredentials: nil, + ControllerUnpublishSecrets: nil, } _, err = client.ControllerUnpublishVolume(ctx, &req) @@ -200,17 +199,6 @@ func (c *csiConnection) Detach(ctx context.Context, volumeID string, nodeID stri return true, nil } -func (c *csiConnection) ControllerProbe(ctx context.Context) error { - client := csi.NewControllerClient(c.conn) - - req := csi.ControllerProbeRequest{ - Version: &csiVersion, - } - - _, err := client.ControllerProbe(ctx, &req) - return err -} - func (c *csiConnection) Close() error { return c.conn.Close() } diff --git a/pkg/connection/connection_test.go b/pkg/connection/connection_test.go index 9f62b25863..af2dfe653a 100644 --- a/pkg/connection/connection_test.go +++ b/pkg/connection/connection_test.go @@ -22,7 +22,7 @@ import ( "reflect" "testing" - "github.com/container-storage-interface/spec/lib/go/csi" + "github.com/container-storage-interface/spec/lib/go/csi/v0" "github.com/golang/mock/gomock" "github.com/kubernetes-csi/csi-test/driver" "google.golang.org/grpc/codes" @@ -97,13 +97,7 @@ func TestGetPluginInfo(t *testing.T) { for _, test := range tests { - in := &csi.GetPluginInfoRequest{ - Version: &csi.Version{ - Major: 0, - Minor: 2, - Patch: 0, - }, - } + in := &csi.GetPluginInfoRequest{} out := test.output var injectedErr error = nil @@ -138,14 +132,14 @@ func TestSupportsControllerPublish(t *testing.T) { name: "success", output: &csi.ControllerGetCapabilitiesResponse{ Capabilities: []*csi.ControllerServiceCapability{ - &csi.ControllerServiceCapability{ + { Type: &csi.ControllerServiceCapability_Rpc{ Rpc: &csi.ControllerServiceCapability_RPC{ Type: csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME, }, }, }, - &csi.ControllerServiceCapability{ + { Type: &csi.ControllerServiceCapability_Rpc{ Rpc: &csi.ControllerServiceCapability_RPC{ Type: csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME, @@ -166,7 +160,7 @@ func TestSupportsControllerPublish(t *testing.T) { name: "no publish", output: &csi.ControllerGetCapabilitiesResponse{ Capabilities: []*csi.ControllerServiceCapability{ - &csi.ControllerServiceCapability{ + { Type: &csi.ControllerServiceCapability_Rpc{ Rpc: &csi.ControllerServiceCapability_RPC{ Type: csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME, @@ -181,7 +175,7 @@ func TestSupportsControllerPublish(t *testing.T) { name: "empty capability", output: &csi.ControllerGetCapabilitiesResponse{ Capabilities: []*csi.ControllerServiceCapability{ - &csi.ControllerServiceCapability{ + { Type: nil, }, }, @@ -207,13 +201,7 @@ func TestSupportsControllerPublish(t *testing.T) { for _, test := range tests { - in := &csi.ControllerGetCapabilitiesRequest{ - Version: &csi.Version{ - Major: 0, - Minor: 2, - Patch: 0, - }, - } + in := &csi.ControllerGetCapabilitiesRequest{} out := test.output var injectedErr error = nil @@ -251,21 +239,18 @@ func TestAttach(t *testing.T) { "third": "baz", } defaultRequest := &csi.ControllerPublishVolumeRequest{ - Version: &csiVersion, VolumeId: defaultVolumeID, NodeId: defaultNodeID, VolumeCapability: defaultCaps, Readonly: false, } readOnlyRequest := &csi.ControllerPublishVolumeRequest{ - Version: &csiVersion, VolumeId: defaultVolumeID, NodeId: defaultNodeID, VolumeCapability: defaultCaps, Readonly: true, } attributesRequest := &csi.ControllerPublishVolumeRequest{ - Version: &csiVersion, VolumeId: defaultVolumeID, NodeId: defaultNodeID, VolumeCapability: defaultCaps, @@ -406,7 +391,6 @@ func TestDetachAttach(t *testing.T) { defaultNodeID := "MyNodeID" defaultRequest := &csi.ControllerUnpublishVolumeRequest{ - Version: &csiVersion, VolumeId: defaultVolumeID, NodeId: defaultNodeID, } @@ -485,55 +469,3 @@ func TestDetachAttach(t *testing.T) { } } } - -func TestControllerProbe(t *testing.T) { - tests := []struct { - name string - injectError bool - expectError bool - }{ - { - name: "success", - expectError: false, - }, - { - name: "gRPC error", - injectError: true, - expectError: true, - }, - } - - mockController, driver, _, controllerServer, csiConn, err := createMockServer(t) - if err != nil { - t.Fatal(err) - } - defer mockController.Finish() - defer driver.Stop() - defer csiConn.Close() - - for _, test := range tests { - in := &csi.ControllerProbeRequest{ - Version: &csi.Version{ - Major: 0, - Minor: 2, - Patch: 0, - }, - } - out := &csi.ControllerProbeResponse{} - var injectedErr error = nil - if test.injectError { - injectedErr = fmt.Errorf("mock error") - } - - // Setup expectation - controllerServer.EXPECT().ControllerProbe(gomock.Any(), in).Return(out, injectedErr).Times(1) - - err := csiConn.ControllerProbe(context.Background()) - if test.expectError && err == nil { - t.Errorf("test %q: Expected error, got none", test.name) - } - if !test.expectError && err != nil { - t.Errorf("test %q: got error: %v", test.name, err) - } - } -} diff --git a/pkg/connection/util.go b/pkg/connection/util.go index 1fd67f8fe2..29b4be2acd 100644 --- a/pkg/connection/util.go +++ b/pkg/connection/util.go @@ -5,7 +5,7 @@ import ( "fmt" "regexp" - "github.com/container-storage-interface/spec/lib/go/csi" + "github.com/container-storage-interface/spec/lib/go/csi/v0" "k8s.io/api/core/v1" ) diff --git a/pkg/connection/util_test.go b/pkg/connection/util_test.go index 0ec504a36f..8559907f69 100644 --- a/pkg/connection/util_test.go +++ b/pkg/connection/util_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/container-storage-interface/spec/lib/go/csi" + "github.com/container-storage-interface/spec/lib/go/csi/v0" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/controller/framework_test.go b/pkg/controller/framework_test.go index dd8bfc3e01..cb69237bd5 100644 --- a/pkg/controller/framework_test.go +++ b/pkg/controller/framework_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - "github.com/container-storage-interface/spec/lib/go/csi" + "github.com/container-storage-interface/spec/lib/go/csi/v0" "github.com/davecgh/go-spew/spew" "github.com/golang/glog" "github.com/kubernetes-csi/external-attacher/pkg/connection" @@ -395,6 +395,6 @@ func (f *fakeCSIConnection) Close() error { return fmt.Errorf("Not implemented") } -func (f *fakeCSIConnection) ControllerProbe(ctx context.Context) error { - return fmt.Errorf("Not implemented") +func (f *fakeCSIConnection) Probe(ctx context.Context) error { + return nil }