From f6689529f5268dfa81a2514a43f4294c8025dac7 Mon Sep 17 00:00:00 2001 From: Mauricio Poppe Date: Fri, 11 Jun 2021 19:49:06 +0000 Subject: [PATCH 1/2] use csi-proxy@v1.0.0-rc.1 --- deploy/kubernetes/base/node_windows/node.yaml | 22 + deploy/kubernetes/base/node_windows/psp.yaml | 8 +- .../overlays/noauth-debug/kustomization.yaml | 1 + .../overlays/noauth-debug/node-overlay.yaml | 21 + go.mod | 2 +- go.sum | 21 +- manifest_osversion.sh | 1 - pkg/gce-pd-csi-driver/utils_windows.go | 18 +- pkg/mount-manager/safe-mounter-v1_windows.go | 333 +++ .../safe-mounter-v1beta_windows.go | 327 +++ pkg/mount-manager/safe-mounter_windows.go | 338 +-- pkg/mount-manager/statter_windows.go | 51 +- pkg/resizefs/resizefs_windows.go | 46 +- vendor/github.com/Microsoft/go-winio/go.mod | 4 +- vendor/github.com/Microsoft/go-winio/go.sum | 8 +- vendor/github.com/Microsoft/go-winio/pipe.go | 21 +- .../csi-proxy/client/api/disk/v1/api.pb.go | 1476 +++++++++++++ .../csi-proxy/client/api/disk/v1/api.proto | 111 + .../client/api/filesystem/v1/api.pb.go | 1041 +++++++++ .../client/api/filesystem/v1/api.proto | 136 ++ .../csi-proxy/client/api/volume/v1/api.pb.go | 1876 +++++++++++++++++ .../csi-proxy/client/api/volume/v1/api.proto | 143 ++ .../kubernetes-csi/csi-proxy/client/go.mod | 6 +- .../kubernetes-csi/csi-proxy/client/go.sum | 6 + .../client/groups/disk/v1/client_generated.go | 94 + .../groups/disk/v1beta2/client_generated.go | 20 +- .../groups/filesystem/v1/client_generated.go | 86 + .../filesystem/v1beta1/client_generated.go | 20 +- .../groups/volume/v1/client_generated.go | 106 + .../groups/volume/v1beta1/client_generated.go | 20 +- vendor/github.com/pkg/errors/.travis.yml | 11 +- vendor/github.com/pkg/errors/Makefile | 44 + vendor/github.com/pkg/errors/README.md | 11 +- vendor/github.com/pkg/errors/errors.go | 8 +- vendor/github.com/pkg/errors/go113.go | 38 + vendor/github.com/pkg/errors/stack.go | 58 +- vendor/k8s.io/utils/exec/README.md | 5 + vendor/k8s.io/utils/io/README.md | 4 + vendor/k8s.io/utils/mount/OWNERS | 15 - vendor/k8s.io/utils/mount/doc.go | 18 - vendor/k8s.io/utils/mount/fake_mounter.go | 216 -- vendor/k8s.io/utils/mount/mount.go | 370 ---- .../k8s.io/utils/mount/mount_helper_common.go | 103 - .../k8s.io/utils/mount/mount_helper_unix.go | 158 -- .../utils/mount/mount_helper_windows.go | 101 - vendor/k8s.io/utils/mount/mount_linux.go | 551 ----- .../k8s.io/utils/mount/mount_unsupported.go | 77 - vendor/k8s.io/utils/mount/mount_windows.go | 313 --- vendor/modules.txt | 17 +- 49 files changed, 6174 insertions(+), 2307 deletions(-) create mode 100644 deploy/kubernetes/overlays/noauth-debug/node-overlay.yaml create mode 100644 pkg/mount-manager/safe-mounter-v1_windows.go create mode 100644 pkg/mount-manager/safe-mounter-v1beta_windows.go create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.pb.go create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.pb.go create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.pb.go create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1/client_generated.go create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1/client_generated.go create mode 100644 vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1/client_generated.go create mode 100644 vendor/github.com/pkg/errors/Makefile create mode 100644 vendor/github.com/pkg/errors/go113.go create mode 100644 vendor/k8s.io/utils/exec/README.md create mode 100644 vendor/k8s.io/utils/io/README.md delete mode 100644 vendor/k8s.io/utils/mount/OWNERS delete mode 100644 vendor/k8s.io/utils/mount/doc.go delete mode 100644 vendor/k8s.io/utils/mount/fake_mounter.go delete mode 100644 vendor/k8s.io/utils/mount/mount.go delete mode 100644 vendor/k8s.io/utils/mount/mount_helper_common.go delete mode 100644 vendor/k8s.io/utils/mount/mount_helper_unix.go delete mode 100644 vendor/k8s.io/utils/mount/mount_helper_windows.go delete mode 100644 vendor/k8s.io/utils/mount/mount_linux.go delete mode 100644 vendor/k8s.io/utils/mount/mount_unsupported.go delete mode 100644 vendor/k8s.io/utils/mount/mount_windows.go diff --git a/deploy/kubernetes/base/node_windows/node.yaml b/deploy/kubernetes/base/node_windows/node.yaml index b2f72f149..63c01a791 100644 --- a/deploy/kubernetes/base/node_windows/node.yaml +++ b/deploy/kubernetes/base/node_windows/node.yaml @@ -53,6 +53,14 @@ spec: mountPropagation: "None" - name: plugin-dir mountPath: C:\csi + - name: csi-proxy-volume-v1 + mountPath: \\.\pipe\csi-proxy-volume-v1 + - name: csi-proxy-filesystem-v1 + mountPath: \\.\pipe\csi-proxy-filesystem-v1 + - name: csi-proxy-disk-v1 + mountPath: \\.\pipe\csi-proxy-disk-v1 + # these paths are still included for compatibility, they're used + # only if the node has still the beta version of the CSI proxy - name: csi-proxy-volume-v1beta1 mountPath: \\.\pipe\csi-proxy-volume-v1beta1 - name: csi-proxy-filesystem-v1beta1 @@ -60,6 +68,20 @@ spec: - name: csi-proxy-disk-v1beta2 mountPath: \\.\pipe\csi-proxy-disk-v1beta2 volumes: + - name: csi-proxy-disk-v1 + hostPath: + path: \\.\pipe\csi-proxy-disk-v1 + type: "" + - name: csi-proxy-volume-v1 + hostPath: + path: \\.\pipe\csi-proxy-volume-v1 + type: "" + - name: csi-proxy-filesystem-v1 + hostPath: + path: \\.\pipe\csi-proxy-filesystem-v1 + type: "" + # these paths are still included for compatibility, they're used + # only if the node has still the beta version of the CSI proxy - name: csi-proxy-disk-v1beta2 hostPath: path: \\.\pipe\csi-proxy-disk-v1beta2 diff --git a/deploy/kubernetes/base/node_windows/psp.yaml b/deploy/kubernetes/base/node_windows/psp.yaml index 1863cb9df..557660a00 100644 --- a/deploy/kubernetes/base/node_windows/psp.yaml +++ b/deploy/kubernetes/base/node_windows/psp.yaml @@ -18,7 +18,13 @@ spec: - pathPrefix: \var\lib\kubelet - pathPrefix: \var\lib\kubelet\plugins_registry - pathPrefix: \var\lib\kubelet\plugins\pd.csi.storage.gke.io - - pathPrefix: \\.\pipe\csi-proxy-disk-v1beta1 + - pathPrefix: \\.\pipe\csi-proxy-disk-v1 + - pathPrefix: \\.\pipe\csi-proxy-volume-v1 + - pathPrefix: \\.\pipe\csi-proxy-filesystem-v1 + # these paths are allowed only for compatibility mode if the PD CSI driver + # is using the CSI Proxy v1 client and the node is still using the + # beta version of the CSI proxy + - pathPrefix: \\.\pipe\csi-proxy-disk-v1beta2 - pathPrefix: \\.\pipe\csi-proxy-volume-v1beta1 - pathPrefix: \\.\pipe\csi-proxy-filesystem-v1beta1 diff --git a/deploy/kubernetes/overlays/noauth-debug/kustomization.yaml b/deploy/kubernetes/overlays/noauth-debug/kustomization.yaml index d920895f0..ce063e75b 100644 --- a/deploy/kubernetes/overlays/noauth-debug/kustomization.yaml +++ b/deploy/kubernetes/overlays/noauth-debug/kustomization.yaml @@ -8,6 +8,7 @@ transformers: patchesStrategicMerge: - noauth.yaml - controller-overlay.yaml +- node-overlay.yaml namespace: gce-pd-csi-driver # To change the dev image, add something like the following. # images: diff --git a/deploy/kubernetes/overlays/noauth-debug/node-overlay.yaml b/deploy/kubernetes/overlays/noauth-debug/node-overlay.yaml new file mode 100644 index 000000000..c754b7002 --- /dev/null +++ b/deploy/kubernetes/overlays/noauth-debug/node-overlay.yaml @@ -0,0 +1,21 @@ +kind: DaemonSet +apiVersion: apps/v1 +metadata: + name: csi-gce-pd-node +spec: + template: + spec: + containers: + - name: gce-pd-driver + imagePullPolicy: Always +--- +kind: DaemonSet +apiVersion: apps/v1 +metadata: + name: csi-gce-pd-node-win +spec: + template: + spec: + containers: + - name: gce-pd-driver + imagePullPolicy: Always diff --git a/go.mod b/go.mod index d2e21f526..793f01c49 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/golang/protobuf v1.4.2 github.com/google/uuid v1.1.1 github.com/hashicorp/go-multierror v1.0.0 // indirect - github.com/kubernetes-csi/csi-proxy/client v0.2.2 + github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1 github.com/kubernetes-csi/csi-test/v3 v3.0.0 github.com/onsi/ginkgo v1.11.0 github.com/onsi/gomega v1.7.1 diff --git a/go.sum b/go.sum index 2d9efe46c..05186f18f 100644 --- a/go.sum +++ b/go.sum @@ -64,8 +64,9 @@ github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced3 github.com/GoogleCloudPlatform/testgrid v0.0.1-alpha.3/go.mod h1:f96W2HYy3tiBNV5zbbRc+NczwYHgG1PHXMQfoEWv680= github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= -github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= @@ -458,8 +459,8 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.0.0/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -467,8 +468,8 @@ github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kubernetes-csi/csi-proxy/client v0.2.2 h1:VpMddHnbYA1oBeU5nrisdyrpOAAT0HqME7fsTi6BG2w= -github.com/kubernetes-csi/csi-proxy/client v0.2.2/go.mod h1:6ptQQmti5QHwBxSsh8Cy00oGdogj0JXewFnu8FFjgOs= +github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1 h1:rWwsNUTbgFfUMYGe/w4N+AJAR8Z/wQ1QMgf5JdTlv8g= +github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1/go.mod h1:URLOkEbRhOwKVvGvug6HSKRTpLSFuQ/Gt3xahDag8qc= github.com/kubernetes-csi/csi-test/v3 v3.0.0 h1:mVsfA4J67uNm8fdF/Pr84oMqL92qjIhjWbEUH8zv1fU= github.com/kubernetes-csi/csi-test/v3 v3.0.0/go.mod h1:VdIKGnDZHOjg4M5yd0OZICtsoEzdn64d0K33N6dm35Q= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= @@ -564,8 +565,9 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= @@ -653,10 +655,8 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= @@ -858,6 +858,7 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190912141932-bc967efca4b8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1063,8 +1064,8 @@ gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4 gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1095,6 +1096,7 @@ gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190709130402-674ba3eaed22/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= @@ -1161,7 +1163,6 @@ k8s.io/test-infra v0.0.0-20200115230622-70a5174aa78d h1:7zSVb69fwXGyyBrtMttOXdZh k8s.io/test-infra v0.0.0-20200115230622-70a5174aa78d/go.mod h1:d8SKryJBXAwfCFVL4wieRez47J2NOOAb9d029sWLseQ= k8s.io/utils v0.0.0-20181019225348-5e321f9a457c/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= diff --git a/manifest_osversion.sh b/manifest_osversion.sh index c978c7e6c..82293d526 100755 --- a/manifest_osversion.sh +++ b/manifest_osversion.sh @@ -6,7 +6,6 @@ # replace the following with annotation approach. https://github.com/docker/cli/pull/2578 export DOCKER_CLI_EXPERIMENTAL=enabled -_WINDOWS_VERSIONS="20H2 2004 1909 ltsc2019" BASE="mcr.microsoft.com/windows/servercore" IFS=', ' read -r -a imagetags <<< "$WINDOWS_IMAGE_TAGS" diff --git a/pkg/gce-pd-csi-driver/utils_windows.go b/pkg/gce-pd-csi-driver/utils_windows.go index f89a2d7d6..64ace7ce8 100644 --- a/pkg/gce-pd-csi-driver/utils_windows.go +++ b/pkg/gce-pd-csi-driver/utils_windows.go @@ -28,7 +28,7 @@ func formatAndMount(source, target, fstype string, options []string, m *mount.Sa if !strings.EqualFold(fstype, defaultWindowsFsType) { return fmt.Errorf("GCE PD CSI driver can only supports %s file system, it does not support %s", defaultWindowsFsType, fstype) } - proxy, ok := m.Interface.(*mounter.CSIProxyMounter) + proxy, ok := m.Interface.(mounter.CSIProxyMounter) if !ok { return fmt.Errorf("could not cast to csi proxy class") } @@ -39,7 +39,7 @@ func formatAndMount(source, target, fstype string, options []string, m *mount.Sa // not exist. Currently kubelet creates the path beforehand, this is a workaround to // remove the path first. func preparePublishPath(path string, m *mount.SafeFormatAndMount) error { - proxy, ok := m.Interface.(*mounter.CSIProxyMounter) + proxy, ok := m.Interface.(mounter.CSIProxyMounter) if !ok { return fmt.Errorf("could not cast to csi proxy class") } @@ -60,7 +60,7 @@ func prepareStagePath(path string, m *mount.SafeFormatAndMount) error { } func cleanupPublishPath(path string, m *mount.SafeFormatAndMount) error { - proxy, ok := m.Interface.(*mounter.CSIProxyMounter) + proxy, ok := m.Interface.(mounter.CSIProxyMounter) if !ok { return fmt.Errorf("could not cast to csi proxy class") } @@ -68,7 +68,7 @@ func cleanupPublishPath(path string, m *mount.SafeFormatAndMount) error { } func cleanupStagePath(path string, m *mount.SafeFormatAndMount) error { - proxy, ok := m.Interface.(*mounter.CSIProxyMounter) + proxy, ok := m.Interface.(mounter.CSIProxyMounter) if !ok { return fmt.Errorf("could not cast to csi proxy class") } @@ -85,18 +85,18 @@ func getDevicePath(ns *GCENodeServer, volumeID, partition string) (string, error if err != nil { return "", fmt.Errorf("error getting device name: %v", err) } - proxy, ok := ns.Mounter.Interface.(*mounter.CSIProxyMounter) + + proxy, ok := ns.Mounter.Interface.(mounter.CSIProxyMounter) if !ok { return "", fmt.Errorf("could not cast to csi proxy class") } - return proxy.GetDevicePath(deviceName, partition, volumeKey.Name) + return proxy.GetDiskNumber(deviceName, partition, volumeKey.Name) } func getBlockSizeBytes(devicePath string, m *mount.SafeFormatAndMount) (int64, error) { - proxy, ok := m.Interface.(*mounter.CSIProxyMounter) + proxy, ok := m.Interface.(mounter.CSIProxyMounter) if !ok { return 0, fmt.Errorf("could not cast to csi proxy class") } - - return proxy.GetBlockSizeBytes(devicePath) + return proxy.GetDiskTotalBytes(devicePath) } diff --git a/pkg/mount-manager/safe-mounter-v1_windows.go b/pkg/mount-manager/safe-mounter-v1_windows.go new file mode 100644 index 000000000..03c97bc48 --- /dev/null +++ b/pkg/mount-manager/safe-mounter-v1_windows.go @@ -0,0 +1,333 @@ +// +build windows + +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package mountmanager + +import ( + "context" + "errors" + "fmt" + "os" + "path/filepath" + "strconv" + "strings" + + diskapi "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1" + diskclient "github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1" + + fsapi "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1" + fsclient "github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1" + + volumeapi "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1" + volumeclient "github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1" + + "k8s.io/klog" + mount "k8s.io/mount-utils" +) + +// CSIProxyMounterV1 is the mounter implementation that uses the v1 API +type CSIProxyMounterV1 struct { + FsClient *fsclient.Client + DiskClient *diskclient.Client + VolumeClient *volumeclient.Client +} + +// check that CSIProxyMounterV1 implements CSIProxyMounter +var _ CSIProxyMounter = &CSIProxyMounterV1{} + +func NewCSIProxyMounterV1() (*CSIProxyMounterV1, error) { + fsClient, err := fsclient.NewClient() + if err != nil { + return nil, err + } + diskClient, err := diskclient.NewClient() + if err != nil { + return nil, err + } + volumeClient, err := volumeclient.NewClient() + if err != nil { + return nil, err + } + return &CSIProxyMounterV1{ + FsClient: fsClient, + DiskClient: diskClient, + VolumeClient: volumeClient, + }, nil +} + +// GetAPIVersions returns the versions of the client APIs this mounter is using. +func (mounter *CSIProxyMounterV1) GetAPIVersions() string { + return fmt.Sprintf( + "API Versions Disk: %s, Filesystem: %s, Volume: %s", + diskclient.Version, + fsclient.Version, + volumeclient.Version, + ) +} + +// Mount just creates a soft link at target pointing to source. +func (mounter *CSIProxyMounterV1) Mount(source string, target string, fstype string, options []string) error { + return mounter.MountSensitive(source, target, fstype, options, nil /* sensitiveOptions */) +} + +// MountSensitive is the same as Mount() but this method allows +// sensitiveOptions to be passed in a separate parameter from the normal +// mount options and ensures the sensitiveOptions are never logged. +// Since Mount here is just create a synlink, so options and sensitiveOptions +// are not used here +func (mounter *CSIProxyMounterV1) MountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { + // Mount is called after the format is done. + // TODO: Confirm that fstype is empty. + // Call the LinkPath CSI proxy from the source path to the target path + parentDir := filepath.Dir(target) + if err := os.MkdirAll(parentDir, 0755); err != nil { + return err + } + createSymlinkRequest := &fsapi.CreateSymlinkRequest{ + SourcePath: mount.NormalizeWindowsPath(source), + TargetPath: mount.NormalizeWindowsPath(target), + } + _, err := mounter.FsClient.CreateSymlink(context.Background(), createSymlinkRequest) + if err != nil { + return err + } + return nil +} + +// Delete the given directory with Pod context. CSI proxy does a check for path prefix +// based on context +func (mounter *CSIProxyMounterV1) RemovePodDir(target string) error { + rmdirRequest := &fsapi.RmdirRequest{ + Path: mount.NormalizeWindowsPath(target), + Force: true, + } + _, err := mounter.FsClient.Rmdir(context.Background(), rmdirRequest) + if err != nil { + return err + } + return nil +} + +// UnmountDevice uses target path to find the volume id first, and then +// call DismountVolume through csi-proxy. If succeeded, it will delete the given path +// at last step. CSI proxy does a check for path prefix +// based on context +func (mounter *CSIProxyMounterV1) UnmountDevice(target string) error { + target = mount.NormalizeWindowsPath(target) + if exists, err := mounter.ExistsPath(target); !exists { + return err + } + idRequest := &volumeapi.GetVolumeIDFromTargetPathRequest{ + TargetPath: target, + } + idResponse, err := mounter.VolumeClient.GetVolumeIDFromTargetPath(context.Background(), idRequest) + if err != nil { + return err + } + volumeId := idResponse.GetVolumeId() + + unmountRequest := &volumeapi.UnmountVolumeRequest{ + TargetPath: target, + VolumeId: volumeId, + } + _, err = mounter.VolumeClient.UnmountVolume(context.Background(), unmountRequest) + if err != nil { + return err + } + rmdirRequest := &fsapi.RmdirRequest{ + Path: target, + Force: true, + } + _, err = mounter.FsClient.Rmdir(context.Background(), rmdirRequest) + if err != nil { + return err + } + + // Set disk to offline mode to have a clean state + getDiskNumberRequest := &volumeapi.GetDiskNumberFromVolumeIDRequest{ + VolumeId: volumeId, + } + getDiskNumberResponse, err := mounter.VolumeClient.GetDiskNumberFromVolumeID(context.Background(), getDiskNumberRequest) + if err != nil { + return err + } + diskNumber := getDiskNumberResponse.GetDiskNumber() + klog.V(4).Infof("get disk number %d from volume %s", diskNumber, volumeId) + setDiskStateRequest := &diskapi.SetDiskStateRequest{ + DiskNumber: diskNumber, + IsOnline: false, + } + if _, err = mounter.DiskClient.SetDiskState(context.Background(), setDiskStateRequest); err != nil { + return err + } + + return nil +} + +func (mounter *CSIProxyMounterV1) Unmount(target string) error { + return mounter.RemovePodDir(target) +} + +func (mounter *CSIProxyMounterV1) GetDiskNumber(deviceName string, partition string, volumeKey string) (string, error) { + listRequest := &diskapi.ListDiskIDsRequest{} + diskIDsResponse, err := mounter.DiskClient.ListDiskIDs(context.Background(), listRequest) + if err != nil { + return "", err + } + diskIDsMap := diskIDsResponse.GetDiskIDs() + for diskNum, diskInfo := range diskIDsMap { + klog.V(4).Infof("found disk number %d, disk info %v", diskNum, diskInfo) + idValue := diskInfo.Page83 + // The page83 id for gce pd has format of "Google pvc-xxxxxxx(the device name passed in here)" + if idValue == "" { + continue + } + klog.V(4).Infof("get page83 id %s", idValue) + names := strings.Fields(idValue) + if names[len(names)-1] == deviceName { + return strconv.FormatUint(uint64(diskNum), 10), nil + } + } + return "", fmt.Errorf("could not find disk number for device %s", deviceName) + +} + +// FormatAndMount accepts the source disk number, target path to mount, the fstype to format with and options to be used. +// After formatting, it will mount the disk to target path on the host +func (mounter *CSIProxyMounterV1) FormatAndMount(source string, target string, fstype string, options []string) error { + diskNumberUint64, err := strconv.ParseUint(source, 10, 64) + if err != nil { + return err + } + diskNumber := uint32(diskNumberUint64) + + // Call PartitionDisk CSI proxy call to partition the disk and return the volume id + partionDiskRequest := &diskapi.PartitionDiskRequest{ + DiskNumber: diskNumber, + } + + _, err = mounter.DiskClient.PartitionDisk(context.Background(), partionDiskRequest) + if err != nil { + return err + } + + // make sure disk is online. if disk is already online, this call should also succeed. + setDiskStateRequest := &diskapi.SetDiskStateRequest{ + DiskNumber: diskNumber, + IsOnline: true, + } + _, err = mounter.DiskClient.SetDiskState(context.Background(), setDiskStateRequest) + if err != nil { + return err + } + + volumeIDsRequest := &volumeapi.ListVolumesOnDiskRequest{ + DiskNumber: diskNumber, + } + volumeIdResponse, err := mounter.VolumeClient.ListVolumesOnDisk(context.Background(), volumeIDsRequest) + if err != nil { + return err + } + // TODO: consider partitions and choose the right partition. + if len(volumeIdResponse.VolumeIds) == 0 { + return fmt.Errorf("ListVolumesOnDisk does not return any volumes") + } + volumeID := volumeIdResponse.VolumeIds[0] + isVolumeFormattedRequest := &volumeapi.IsVolumeFormattedRequest{ + VolumeId: volumeID, + } + isVolumeFormattedResponse, err := mounter.VolumeClient.IsVolumeFormatted(context.Background(), isVolumeFormattedRequest) + if err != nil { + return err + } + if !isVolumeFormattedResponse.Formatted { + formatVolumeRequest := &volumeapi.FormatVolumeRequest{ + VolumeId: volumeID, + // TODO (jingxu97): Accept the filesystem and other options + } + _, err = mounter.VolumeClient.FormatVolume(context.Background(), formatVolumeRequest) + if err != nil { + return err + } + } + // Mount the volume by calling the CSI proxy call. + mountVolumeRequest := &volumeapi.MountVolumeRequest{ + VolumeId: volumeID, + TargetPath: target, + } + _, err = mounter.VolumeClient.MountVolume(context.Background(), mountVolumeRequest) + if err != nil { + return err + } + return nil +} + +func (mounter *CSIProxyMounterV1) GetMountRefs(pathname string) ([]string, error) { + return []string{}, fmt.Errorf("GetMountRefs not implemented for ProxyMounter") +} + +func (mounter *CSIProxyMounterV1) IsLikelyNotMountPoint(file string) (bool, error) { + isSymlinkRequest := &fsapi.IsSymlinkRequest{ + Path: file, + } + + isSymlinkResponse, err := mounter.FsClient.IsSymlink(context.Background(), isSymlinkRequest) + if err != nil { + return true, err + } + + return !isSymlinkResponse.IsSymlink, nil +} + +func (mounter *CSIProxyMounterV1) List() ([]mount.MountPoint, error) { + return []mount.MountPoint{}, nil +} + +func (mounter *CSIProxyMounterV1) IsMountPointMatch(mp mount.MountPoint, dir string) bool { + return mp.Path == dir +} + +// ExistsPath - Checks if a path exists. Unlike util ExistsPath, this call does not perform follow link. +func (mounter *CSIProxyMounterV1) ExistsPath(path string) (bool, error) { + isExistsResponse, err := mounter.FsClient.PathExists(context.Background(), + &fsapi.PathExistsRequest{ + Path: mount.NormalizeWindowsPath(path), + }) + if err != nil { + return false, err + } + return isExistsResponse.Exists, err +} + +func (mounter *CSIProxyMounterV1) GetDiskTotalBytes(devicePath string) (int64, error) { + diskNumberUint64, err := strconv.ParseUint(devicePath, 10, 64) + if err != nil { + return 0, err + } + diskNumber := uint32(diskNumberUint64) + + DiskStatsResponse, err := mounter.DiskClient.GetDiskStats(context.Background(), + &diskapi.GetDiskStatsRequest{ + DiskNumber: diskNumber, + }) + return DiskStatsResponse.TotalBytes, err +} + +// MountSensitiveWithoutSystemd is the same as MountSensitive() but this method disable using systemd mount. +// It's unimplemented in PD CSI Driver +func (mounter *CSIProxyMounterV1) MountSensitiveWithoutSystemd(source string, target string, fstype string, options []string, sensitiveOptions []string) error { + return errors.New("MountSensitiveWithoutSystemd is not implemented") +} diff --git a/pkg/mount-manager/safe-mounter-v1beta_windows.go b/pkg/mount-manager/safe-mounter-v1beta_windows.go new file mode 100644 index 000000000..b96db39ff --- /dev/null +++ b/pkg/mount-manager/safe-mounter-v1beta_windows.go @@ -0,0 +1,327 @@ +// +build windows + +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package mountmanager + +import ( + "context" + "errors" + "fmt" + "os" + "path/filepath" + "strconv" + "strings" + + diskapi "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2" + diskclient "github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2" + + fsapi "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1" + fsclient "github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1" + + volumeapi "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1" + volumeclient "github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta1" + + "k8s.io/klog" + mount "k8s.io/mount-utils" +) + +// CSIProxyMounterV1Beta is the mounter implementaiton that uses the v1beta API +type CSIProxyMounterV1Beta struct { + FsClient *fsclient.Client + DiskClient *diskclient.Client + VolumeClient *volumeclient.Client +} + +// check that CSIProxyMounterV1Beta implements CSIProxyMounter +var _ CSIProxyMounter = &CSIProxyMounterV1Beta{} + +func NewCSIProxyMounterV1Beta() (*CSIProxyMounterV1Beta, error) { + fsClient, err := fsclient.NewClient() + if err != nil { + return nil, err + } + diskClient, err := diskclient.NewClient() + if err != nil { + return nil, err + } + volumeClient, err := volumeclient.NewClient() + if err != nil { + return nil, err + } + return &CSIProxyMounterV1Beta{ + FsClient: fsClient, + DiskClient: diskClient, + VolumeClient: volumeClient, + }, nil +} + +// GetAPIVersions returns the versions of the client APIs this mounter is using. +func (mounter *CSIProxyMounterV1Beta) GetAPIVersions() string { + return fmt.Sprintf( + "API Versions Disk: %s, Filesystem: %s, Volume: %s", + diskclient.Version, + fsclient.Version, + volumeclient.Version, + ) +} + +// Mount just creates a soft link at target pointing to source. +func (mounter *CSIProxyMounterV1Beta) Mount(source string, target string, fstype string, options []string) error { + return mounter.MountSensitive(source, target, fstype, options, nil /* sensitiveOptions */) +} + +// MountSensitive is the same as Mount() but this method allows +// sensitiveOptions to be passed in a separate parameter from the normal +// mount options and ensures the sensitiveOptions are never logged. +// Since Mount here is just create a synlink, so options and sensitiveOptions +// are not used here +func (mounter *CSIProxyMounterV1Beta) MountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { + // Mount is called after the format is done. + // TODO: Confirm that fstype is empty. + // Call the LinkPath CSI proxy from the source path to the target path + parentDir := filepath.Dir(target) + if err := os.MkdirAll(parentDir, 0755); err != nil { + return err + } + linkRequest := &fsapi.LinkPathRequest{ + SourcePath: mount.NormalizeWindowsPath(source), + TargetPath: mount.NormalizeWindowsPath(target), + } + response, err := mounter.FsClient.LinkPath(context.Background(), linkRequest) + if err != nil { + return err + } + if response.Error != "" { + return errors.New(response.Error) + } + return nil +} + +// Delete the given directory with Pod context. CSI proxy does a check for path prefix +// based on context +func (mounter *CSIProxyMounterV1Beta) RemovePodDir(target string) error { + rmdirRequest := &fsapi.RmdirRequest{ + Path: mount.NormalizeWindowsPath(target), + Context: fsapi.PathContext_POD, + Force: true, + } + _, err := mounter.FsClient.Rmdir(context.Background(), rmdirRequest) + if err != nil { + return err + } + return nil +} + +// UnmountDevice uses target path to find the volume id first, and then +// call DismountVolume through csi-proxy. If succeeded, it will delete the given path +// at last step. CSI proxy does a check for path prefix +// based on context +func (mounter *CSIProxyMounterV1Beta) UnmountDevice(target string) error { + target = mount.NormalizeWindowsPath(target) + if exists, err := mounter.ExistsPath(target); !exists { + return err + } + idRequest := &volumeapi.VolumeIDFromMountRequest{ + Mount: target, + } + idResponse, err := mounter.VolumeClient.GetVolumeIDFromMount(context.Background(), idRequest) + if err != nil { + return err + } + volumeId := idResponse.GetVolumeId() + + dismountRequest := &volumeapi.DismountVolumeRequest{ + Path: target, + VolumeId: volumeId, + } + _, err = mounter.VolumeClient.DismountVolume(context.Background(), dismountRequest) + if err != nil { + return err + } + rmdirRequest := &fsapi.RmdirRequest{ + Path: target, + Context: fsapi.PathContext_PLUGIN, + Force: true, + } + _, err = mounter.FsClient.Rmdir(context.Background(), rmdirRequest) + if err != nil { + return err + } + + // Set disk to offline mode to have a clean state + getDiskNumberRequest := &volumeapi.VolumeDiskNumberRequest{ + VolumeId: volumeId, + } + id, err := mounter.VolumeClient.GetVolumeDiskNumber(context.Background(), getDiskNumberRequest) + if err != nil { + return err + } + diskId := id.GetDiskNumber() + klog.V(4).Infof("get disk number %d from volume %s", diskId, volumeId) + setDiskRequest := &diskapi.SetAttachStateRequest{ + DiskID: strconv.FormatInt(diskId, 10), + IsOnline: false, + } + if _, err = mounter.DiskClient.SetAttachState(context.Background(), setDiskRequest); err != nil { + return err + } + + return nil +} + +func (mounter *CSIProxyMounterV1Beta) Unmount(target string) error { + return mounter.RemovePodDir(target) +} + +func (mounter *CSIProxyMounterV1Beta) GetDiskNumber(deviceName string, partition string, volumeKey string) (string, error) { + id := "page83" + listRequest := &diskapi.ListDiskIDsRequest{} + diskIDsResponse, err := mounter.DiskClient.ListDiskIDs(context.Background(), listRequest) + if err != nil { + return "", err + } + diskIDsMap := diskIDsResponse.GetDiskIDs() + for diskNum, diskInfo := range diskIDsMap { + klog.V(4).Infof("found disk number %s, disk info %v", diskNum, diskInfo) + idValue, found := diskInfo.Identifiers[id] + // The page83 id for gce pd has format of "Google pvc-xxxxxxx(the device name passed in here)" + if !found || idValue == "" { + continue + } + names := strings.Fields(idValue) + klog.V(4).Infof("get page83 id %s", idValue) + if names[len(names)-1] == deviceName { + return diskNum, nil + } + } + return "", fmt.Errorf("could not find disk number for device %s", deviceName) + +} + +// FormatAndMount accepts the source disk number, target path to mount, the fstype to format with and options to be used. +// After formatting, it will mount the disk to target path on the host +func (mounter *CSIProxyMounterV1Beta) FormatAndMount(source string, target string, fstype string, options []string) error { + // Call PartitionDisk CSI proxy call to partition the disk and return the volume id + partionDiskRequest := &diskapi.PartitionDiskRequest{ + DiskID: source, + } + + _, err := mounter.DiskClient.PartitionDisk(context.Background(), partionDiskRequest) + if err != nil { + return err + } + + // make sure disk is online. if disk is already online, this call should also succeed. + setDiskRequest := &diskapi.SetAttachStateRequest{ + DiskID: source, + IsOnline: true, + } + _, err = mounter.DiskClient.SetAttachState(context.Background(), setDiskRequest) + if err != nil { + return err + } + + volumeIDsRequest := &volumeapi.ListVolumesOnDiskRequest{ + DiskId: source, + } + volumeIdResponse, err := mounter.VolumeClient.ListVolumesOnDisk(context.Background(), volumeIDsRequest) + if err != nil { + return err + } + // TODO: consider partitions and choose the right partition. + if len(volumeIdResponse.VolumeIds) == 0 { + return fmt.Errorf("ListVolumesOnDisk does not return any volumes") + } + volumeID := volumeIdResponse.VolumeIds[0] + isVolumeFormattedRequest := &volumeapi.IsVolumeFormattedRequest{ + VolumeId: volumeID, + } + isVolumeFormattedResponse, err := mounter.VolumeClient.IsVolumeFormatted(context.Background(), isVolumeFormattedRequest) + if err != nil { + return err + } + if !isVolumeFormattedResponse.Formatted { + formatVolumeRequest := &volumeapi.FormatVolumeRequest{ + VolumeId: volumeID, + // TODO (jingxu97): Accept the filesystem and other options + } + _, err = mounter.VolumeClient.FormatVolume(context.Background(), formatVolumeRequest) + if err != nil { + return err + } + } + // Mount the volume by calling the CSI proxy call. + mountVolumeRequest := &volumeapi.MountVolumeRequest{ + VolumeId: volumeID, + Path: target, + } + _, err = mounter.VolumeClient.MountVolume(context.Background(), mountVolumeRequest) + if err != nil { + return err + } + return nil +} + +func (mounter *CSIProxyMounterV1Beta) GetMountRefs(pathname string) ([]string, error) { + return []string{}, fmt.Errorf("GetMountRefs not implemented for ProxyMounter") +} + +func (mounter *CSIProxyMounterV1Beta) IsLikelyNotMountPoint(file string) (bool, error) { + isMountRequest := &fsapi.IsMountPointRequest{ + Path: file, + } + + isMountResponse, err := mounter.FsClient.IsMountPoint(context.Background(), isMountRequest) + if err != nil { + return true, err + } + + return !isMountResponse.IsMountPoint, nil +} + +func (mounter *CSIProxyMounterV1Beta) List() ([]mount.MountPoint, error) { + return []mount.MountPoint{}, nil +} + +func (mounter *CSIProxyMounterV1Beta) IsMountPointMatch(mp mount.MountPoint, dir string) bool { + return mp.Path == dir +} + +// ExistsPath - Checks if a path exists. Unlike util ExistsPath, this call does not perform follow link. +func (mounter *CSIProxyMounterV1Beta) ExistsPath(path string) (bool, error) { + isExistsResponse, err := mounter.FsClient.PathExists(context.Background(), + &fsapi.PathExistsRequest{ + Path: mount.NormalizeWindowsPath(path), + }) + if err != nil { + return false, err + } + return isExistsResponse.Exists, err +} + +func (mounter *CSIProxyMounterV1Beta) GetDiskTotalBytes(devicePath string) (int64, error) { + DiskStatsResponse, err := mounter.DiskClient.DiskStats(context.Background(), + &diskapi.DiskStatsRequest{ + DiskID: devicePath, + }) + return DiskStatsResponse.DiskSize, err +} + +// MountSensitiveWithoutSystemd is the same as MountSensitive() but this method disable using systemd mount. +// It's unimplemented in PD CSI Driver +func (mounter *CSIProxyMounterV1Beta) MountSensitiveWithoutSystemd(source string, target string, fstype string, options []string, sensitiveOptions []string) error { + return errors.New("MountSensitiveWithoutSystemd is not implemented") +} diff --git a/pkg/mount-manager/safe-mounter_windows.go b/pkg/mount-manager/safe-mounter_windows.go index 1ae720b39..fb95b0c05 100644 --- a/pkg/mount-manager/safe-mounter_windows.go +++ b/pkg/mount-manager/safe-mounter_windows.go @@ -17,310 +17,66 @@ limitations under the License. package mountmanager import ( - "context" - "errors" - "fmt" - "os" - "path/filepath" - "strconv" - "strings" - - diskapi "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2" - diskclient "github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2" - - fsapi "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1" - fsclient "github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1" - - volumeapi "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1" - volumeclient "github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta1" - "k8s.io/klog" "k8s.io/mount-utils" utilexec "k8s.io/utils/exec" ) -var _ mount.Interface = &CSIProxyMounter{} - -type CSIProxyMounter struct { - FsClient *fsclient.Client - DiskClient *diskclient.Client - VolumeClient *volumeclient.Client -} - -func NewCSIProxyMounter() (*CSIProxyMounter, error) { - fsClient, err := fsclient.NewClient() - if err != nil { - return nil, err - } - diskClient, err := diskclient.NewClient() - if err != nil { - return nil, err - } - volumeClient, err := volumeclient.NewClient() - if err != nil { - return nil, err - } - return &CSIProxyMounter{ - FsClient: fsClient, - DiskClient: diskClient, - VolumeClient: volumeClient, - }, nil -} - -func NewSafeMounter() (*mount.SafeFormatAndMount, error) { - csiProxyMounter, err := NewCSIProxyMounter() - if err != nil { - return nil, err - } - return &mount.SafeFormatAndMount{ - Interface: csiProxyMounter, - Exec: utilexec.New(), - }, nil -} - -// Mount just creates a soft link at target pointing to source. -func (mounter *CSIProxyMounter) Mount(source string, target string, fstype string, options []string) error { - return mounter.MountSensitive(source, target, fstype, options, nil /* sensitiveOptions */) -} - -// MountSensitive is the same as Mount() but this method allows -// sensitiveOptions to be passed in a separate parameter from the normal -// mount options and ensures the sensitiveOptions are never logged. -// Since Mount here is just create a synlink, so options and sensitiveOptions -// are not used here -func (mounter *CSIProxyMounter) MountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - // Mount is called after the format is done. - // TODO: Confirm that fstype is empty. - // Call the LinkPath CSI proxy from the source path to the target path - parentDir := filepath.Dir(target) - if err := os.MkdirAll(parentDir, 0755); err != nil { - return err - } - linkRequest := &fsapi.LinkPathRequest{ - SourcePath: mount.NormalizeWindowsPath(source), - TargetPath: mount.NormalizeWindowsPath(target), - } - response, err := mounter.FsClient.LinkPath(context.Background(), linkRequest) - if err != nil { - return err - } - if response.Error != "" { - return errors.New(response.Error) - } - return nil -} - -// MountSensitiveWithoutSystemd is the same as MountSensitive for Windows -func (mounter *CSIProxyMounter) MountSensitiveWithoutSystemd(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - return mounter.MountSensitive(source, target, fstype, options, sensitiveOptions) -} - -// Delete the given directory with Pod context. CSI proxy does a check for path prefix -// based on context -func (mounter *CSIProxyMounter) RemovePodDir(target string) error { - rmdirRequest := &fsapi.RmdirRequest{ - Path: mount.NormalizeWindowsPath(target), - Context: fsapi.PathContext_POD, - Force: true, - } - _, err := mounter.FsClient.Rmdir(context.Background(), rmdirRequest) - if err != nil { - return err - } - return nil -} - -// UnmountDevice uses target path to find the volume id first, and then -// call DismountVolume through csi-proxy. If succeeded, it will delete the given path -// at last step. CSI proxy does a check for path prefix -// based on context -func (mounter *CSIProxyMounter) UnmountDevice(target string) error { - target = mount.NormalizeWindowsPath(target) - if exists, err := mounter.ExistsPath(target); !exists { - return err - } - idRequest := &volumeapi.VolumeIDFromMountRequest{ - Mount: target, - } - idResponse, err := mounter.VolumeClient.GetVolumeIDFromMount(context.Background(), idRequest) - if err != nil { - return err - } - volumeId := idResponse.GetVolumeId() - - dismountRequest := &volumeapi.DismountVolumeRequest{ - Path: target, - VolumeId: volumeId, - } - _, err = mounter.VolumeClient.DismountVolume(context.Background(), dismountRequest) - if err != nil { - return err - } - rmdirRequest := &fsapi.RmdirRequest{ - Path: target, - Context: fsapi.PathContext_PLUGIN, - Force: true, - } - _, err = mounter.FsClient.Rmdir(context.Background(), rmdirRequest) - if err != nil { - return err - } - - // Set disk to offline mode to have a clean state - getDiskNumberRequest := &volumeapi.VolumeDiskNumberRequest{ - VolumeId: volumeId, - } - id, err := mounter.VolumeClient.GetVolumeDiskNumber(context.Background(), getDiskNumberRequest) - if err != nil { - return err - } - diskId := id.GetDiskNumber() - klog.V(4).Infof("get disk number %d from volume %s", diskId, volumeId) - setDiskRequest := &diskapi.SetAttachStateRequest{ - DiskID: strconv.FormatInt(diskId, 10), - IsOnline: false, - } - if _, err = mounter.DiskClient.SetAttachState(context.Background(), setDiskRequest); err != nil { - return err - } - - return nil -} - -func (mounter *CSIProxyMounter) Unmount(target string) error { - return mounter.RemovePodDir(target) -} - -func (mounter *CSIProxyMounter) GetDevicePath(deviceName string, partition string, volumeKey string) (string, error) { - id := "page83" - listRequest := &diskapi.ListDiskIDsRequest{} - diskIDsResponse, err := mounter.DiskClient.ListDiskIDs(context.Background(), listRequest) - if err != nil { - return "", err - } - diskIDsMap := diskIDsResponse.GetDiskIDs() - for diskNum, diskInfo := range diskIDsMap { - klog.V(4).Infof("found disk number %s, disk info %v", diskNum, diskInfo) - idValue, found := diskInfo.Identifiers[id] - // The page83 id for gce pd has format of "Google pvc-xxxxxxx(the device name passed in here)" - if !found || idValue == "" { - continue - } - names := strings.Fields(idValue) - klog.V(4).Infof("get page83 id %s", idValue) - if names[len(names)-1] == deviceName { - return diskNum, nil - } - } - return "", fmt.Errorf("could not find disk number for device %s", deviceName) - -} - -// FormatAndMount accepts the source disk number, target path to mount, the fstype to format with and options to be used. -// After formatting, it will mount the disk to target path on the host -func (mounter *CSIProxyMounter) FormatAndMount(source string, target string, fstype string, options []string) error { - // Call PartitionDisk CSI proxy call to partition the disk and return the volume id - partionDiskRequest := &diskapi.PartitionDiskRequest{ - DiskID: source, - } - - _, err := mounter.DiskClient.PartitionDisk(context.Background(), partionDiskRequest) - if err != nil { - return err - } - - // make sure disk is online. if disk is already online, this call should also succeed. - setDiskRequest := &diskapi.SetAttachStateRequest{ - DiskID: source, - IsOnline: true, - } - _, err = mounter.DiskClient.SetAttachState(context.Background(), setDiskRequest) - if err != nil { - return err - } +// CSIProxyMounter is the mounter interface exposed as a utility to +// internal methods +type CSIProxyMounter interface { + mount.Interface - volumeIDsRequest := &volumeapi.ListVolumesOnDiskRequest{ - DiskId: source, - } - volumeIdResponse, err := mounter.VolumeClient.ListVolumesOnDisk(context.Background(), volumeIDsRequest) - if err != nil { - return err - } - // TODO: consider partitions and choose the right partition. - if len(volumeIdResponse.VolumeIds) == 0 { - return fmt.Errorf("ListVolumesOnDisk does not return any volumes") - } - volumeID := volumeIdResponse.VolumeIds[0] - isVolumeFormattedRequest := &volumeapi.IsVolumeFormattedRequest{ - VolumeId: volumeID, - } - isVolumeFormattedResponse, err := mounter.VolumeClient.IsVolumeFormatted(context.Background(), isVolumeFormattedRequest) - if err != nil { - return err - } - if !isVolumeFormattedResponse.Formatted { - formatVolumeRequest := &volumeapi.FormatVolumeRequest{ - VolumeId: volumeID, - // TODO (jingxu97): Accept the filesystem and other options - } - _, err = mounter.VolumeClient.FormatVolume(context.Background(), formatVolumeRequest) - if err != nil { - return err - } - } - // Mount the volume by calling the CSI proxy call. - mountVolumeRequest := &volumeapi.MountVolumeRequest{ - VolumeId: volumeID, - Path: target, - } - _, err = mounter.VolumeClient.MountVolume(context.Background(), mountVolumeRequest) - if err != nil { - return err - } - return nil -} + // GetAPIVersions returns the versions of the client APIs this mounter is using. + GetAPIVersions() string -func (mounter *CSIProxyMounter) GetMountRefs(pathname string) ([]string, error) { - return []string{}, fmt.Errorf("GetMountRefs not implemented for ProxyMounter") -} + // Delete the given directory with Pod context. CSI proxy does a check for path prefix + // based on context + RemovePodDir(target string) error -func (mounter *CSIProxyMounter) IsLikelyNotMountPoint(file string) (bool, error) { - isMountRequest := &fsapi.IsMountPointRequest{ - Path: file, - } + // UnmountDevice uses target path to find the volume id first, and then + // call DismountVolume through csi-proxy. If succeeded, it will delete the given path + // at last step. CSI proxy does a check for path prefix + // based on context + UnmountDevice(target string) error - isMountResponse, err := mounter.FsClient.IsMountPoint(context.Background(), isMountRequest) - if err != nil { - return true, err - } + // GetDiskNumber finds the disk number of the given device name + GetDiskNumber(deviceName string, partition string, volumeKey string) (string, error) - return !isMountResponse.IsMountPoint, nil -} + // FormatAndMount accepts the source disk number, target path to mount, the fstype to format with and options to be used. + // After formatting, it will mount the disk to target path on the host + FormatAndMount(source string, target string, fstype string, options []string) error -func (mounter *CSIProxyMounter) List() ([]mount.MountPoint, error) { - return []mount.MountPoint{}, nil -} + // IsMountPointMatch checks if the mount point matches the directory `dir` + IsMountPointMatch(mp mount.MountPoint, dir string) bool -func (mounter *CSIProxyMounter) IsMountPointMatch(mp mount.MountPoint, dir string) bool { - return mp.Path == dir -} + // ExistsPath checks if a path exists. + // Unlike util ExistsPath, this call does not perform follow link. + ExistsPath(path string) (bool, error) -// ExistsPath - Checks if a path exists. Unlike util ExistsPath, this call does not perform follow link. -func (mounter *CSIProxyMounter) ExistsPath(path string) (bool, error) { - isExistsResponse, err := mounter.FsClient.PathExists(context.Background(), - &fsapi.PathExistsRequest{ - Path: mount.NormalizeWindowsPath(path), - }) - if err != nil { - return false, err - } - return isExistsResponse.Exists, err + // GetDiskTotalBytes gets the total size of a disk + GetDiskTotalBytes(devicePath string) (int64, error) } -func (mounter *CSIProxyMounter) GetBlockSizeBytes(diskId string) (int64, error) { - DiskStatsResponse, err := mounter.DiskClient.DiskStats(context.Background(), - &diskapi.DiskStatsRequest{ - DiskID: diskId, - }) - return DiskStatsResponse.DiskSize, err +func NewSafeMounter() (*mount.SafeFormatAndMount, error) { + csiProxyMounterV1, err := NewCSIProxyMounterV1() + if err == nil { + klog.V(4).Infof("using CSIProxyMounterV1, %s", csiProxyMounterV1.GetAPIVersions()) + return &mount.SafeFormatAndMount{ + Interface: csiProxyMounterV1, + Exec: utilexec.New(), + }, nil + } + klog.V(4).Infof("failed to connect to csi-proxy v1 with error=%v, will try with v1Beta", err) + + csiProxyMounterV1Beta, err := NewCSIProxyMounterV1Beta() + if err == nil { + klog.V(4).Infof("using CSIProxyMounterV1Beta, %s", csiProxyMounterV1Beta.GetAPIVersions()) + return &mount.SafeFormatAndMount{ + Interface: csiProxyMounterV1Beta, + Exec: utilexec.New(), + }, nil + } + klog.V(4).Infof("failed to connect to csi-proxy v1beta with error=%v", err) + return nil, err } diff --git a/pkg/mount-manager/statter_windows.go b/pkg/mount-manager/statter_windows.go index 8a926b1fb..78dfbc3ef 100644 --- a/pkg/mount-manager/statter_windows.go +++ b/pkg/mount-manager/statter_windows.go @@ -19,7 +19,8 @@ import ( "context" "fmt" - volumeapi "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1" + volumeapiv1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1" + volumeapiv1beta1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1" "k8s.io/mount-utils" ) @@ -40,24 +41,58 @@ func (r *realStatter) IsBlockDevice(fullPath string) (bool, error) { // StatFS returns volume usage information func (r *realStatter) StatFS(path string) (available, capacity, used, inodesFree, inodes, inodesUsed int64, err error) { + switch r.mounter.Interface.(type) { + case *CSIProxyMounterV1: + return r.StatFSV1(path) + case *CSIProxyMounterV1Beta: + return r.StatFSV1Beta(path) + } + + return 0, 0, 0, 0, 0, 0, fmt.Errorf("Invalid interface type=%v", r.mounter.Interface) +} + +func (r *realStatter) StatFSV1(path string) (available, capacity, used, inodesFree, inodes, inodesUsed int64, err error) { zero := int64(0) - proxy, ok := r.mounter.Interface.(*CSIProxyMounter) - if !ok { - return zero, zero, zero, zero, zero, zero, fmt.Errorf("could not cast to csi proxy class") + proxy := r.mounter.Interface.(*CSIProxyMounterV1) + idRequest := &volumeapiv1.GetVolumeIDFromTargetPathRequest{ + TargetPath: path, + } + idResponse, err := proxy.VolumeClient.GetVolumeIDFromTargetPath(context.Background(), idRequest) + if err != nil { + return zero, zero, zero, zero, zero, zero, err + } + volumeID := idResponse.GetVolumeId() + + request := &volumeapiv1.GetVolumeStatsRequest{ + VolumeId: volumeID, } + response, err := proxy.VolumeClient.GetVolumeStats(context.Background(), request) + if err != nil { + return zero, zero, zero, zero, zero, zero, err + } + capacity = response.GetTotalBytes() + used = response.GetUsedBytes() + available = capacity - used + return available, capacity, used, zero, zero, zero, nil +} + +func (r *realStatter) StatFSV1Beta(path string) (available, capacity, used, inodesFree, inodes, inodesUsed int64, err error) { + zero := int64(0) + + proxy := r.mounter.Interface.(*CSIProxyMounterV1Beta) - idRequest := &volumeapi.VolumeIDFromMountRequest{ + idRequest := &volumeapiv1beta1.VolumeIDFromMountRequest{ Mount: path, } idResponse, err := proxy.VolumeClient.GetVolumeIDFromMount(context.Background(), idRequest) if err != nil { return zero, zero, zero, zero, zero, zero, err } - volumeId := idResponse.GetVolumeId() + volumeID := idResponse.GetVolumeId() - request := &volumeapi.VolumeStatsRequest{ - VolumeId: volumeId, + request := &volumeapiv1beta1.VolumeStatsRequest{ + VolumeId: volumeID, } response, err := proxy.VolumeClient.VolumeStats(context.Background(), request) if err != nil { diff --git a/pkg/resizefs/resizefs_windows.go b/pkg/resizefs/resizefs_windows.go index 015988b15..8065db0a6 100644 --- a/pkg/resizefs/resizefs_windows.go +++ b/pkg/resizefs/resizefs_windows.go @@ -22,7 +22,9 @@ import ( "context" "fmt" - volumeapi "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1" + volumeapiv1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1" + volumeapiv1beta1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1" + "k8s.io/klog" "k8s.io/mount-utils" mounter "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/mount-manager" @@ -42,14 +44,46 @@ func NewResizeFs(mounter *mount.SafeFormatAndMount) *resizeFs { // resize perform resize of file system func (resizefs *resizeFs) Resize(devicePath string, deviceMountPath string) (bool, error) { + switch resizefs.mounter.Interface.(type) { + case *mounter.CSIProxyMounterV1: + return resizefs.resizeV1(devicePath, deviceMountPath) + case *mounter.CSIProxyMounterV1Beta: + return resizefs.resizeV1Beta(devicePath, deviceMountPath) + } + return false, fmt.Errorf("resize.mounter.Interface is not valid") +} + +func (resizefs *resizeFs) resizeV1(devicePath string, deviceMountPath string) (bool, error) { klog.V(3).Infof("resizeFS.Resize - Expanding mounted volume %s", deviceMountPath) - proxy, ok := resizefs.mounter.Interface.(*mounter.CSIProxyMounter) - if !ok { - return false, fmt.Errorf("could not cast to csi proxy class") + proxy := resizefs.mounter.Interface.(*mounter.CSIProxyMounterV1) + + idRequest := &volumeapiv1.GetVolumeIDFromTargetPathRequest{ + TargetPath: deviceMountPath, + } + idResponse, err := proxy.VolumeClient.GetVolumeIDFromTargetPath(context.Background(), idRequest) + if err != nil { + return false, err + } + volumeId := idResponse.GetVolumeId() + + request := &volumeapiv1.ResizeVolumeRequest{ + VolumeId: volumeId, + } + _, err = proxy.VolumeClient.ResizeVolume(context.Background(), request) + if err != nil { + return false, err } + return true, nil +} + +// resize perform resize of file system +func (resizefs *resizeFs) resizeV1Beta(devicePath string, deviceMountPath string) (bool, error) { + klog.V(3).Infof("resizeFS.Resize - Expanding mounted volume %s", deviceMountPath) + + proxy := resizefs.mounter.Interface.(*mounter.CSIProxyMounterV1Beta) - idRequest := &volumeapi.VolumeIDFromMountRequest{ + idRequest := &volumeapiv1beta1.VolumeIDFromMountRequest{ Mount: deviceMountPath, } idResponse, err := proxy.VolumeClient.GetVolumeIDFromMount(context.Background(), idRequest) @@ -58,7 +92,7 @@ func (resizefs *resizeFs) Resize(devicePath string, deviceMountPath string) (boo } volumeId := idResponse.GetVolumeId() - request := &volumeapi.ResizeVolumeRequest{ + request := &volumeapiv1beta1.ResizeVolumeRequest{ VolumeId: volumeId, } _, err = proxy.VolumeClient.ResizeVolume(context.Background(), request) diff --git a/vendor/github.com/Microsoft/go-winio/go.mod b/vendor/github.com/Microsoft/go-winio/go.mod index b3846826b..a2eb6496c 100644 --- a/vendor/github.com/Microsoft/go-winio/go.mod +++ b/vendor/github.com/Microsoft/go-winio/go.mod @@ -3,7 +3,7 @@ module github.com/Microsoft/go-winio go 1.12 require ( - github.com/pkg/errors v0.8.1 + github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.4.1 - golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b + golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 ) diff --git a/vendor/github.com/Microsoft/go-winio/go.sum b/vendor/github.com/Microsoft/go-winio/go.sum index babb4a70d..6da76a492 100644 --- a/vendor/github.com/Microsoft/go-winio/go.sum +++ b/vendor/github.com/Microsoft/go-winio/go.sum @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= @@ -12,5 +12,5 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1cHUZgO1Ebq5r2hIjfo= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/Microsoft/go-winio/pipe.go b/vendor/github.com/Microsoft/go-winio/pipe.go index d6a46f6a2..96700a73d 100644 --- a/vendor/github.com/Microsoft/go-winio/pipe.go +++ b/vendor/github.com/Microsoft/go-winio/pipe.go @@ -182,13 +182,14 @@ func (s pipeAddress) String() string { } // tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout. -func tryDialPipe(ctx context.Context, path *string) (syscall.Handle, error) { +func tryDialPipe(ctx context.Context, path *string, access uint32) (syscall.Handle, error) { for { + select { case <-ctx.Done(): return syscall.Handle(0), ctx.Err() default: - h, err := createFile(*path, syscall.GENERIC_READ|syscall.GENERIC_WRITE, 0, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_OVERLAPPED|cSECURITY_SQOS_PRESENT|cSECURITY_ANONYMOUS, 0) + h, err := createFile(*path, access, 0, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_OVERLAPPED|cSECURITY_SQOS_PRESENT|cSECURITY_ANONYMOUS, 0) if err == nil { return h, nil } @@ -197,7 +198,7 @@ func tryDialPipe(ctx context.Context, path *string) (syscall.Handle, error) { } // Wait 10 msec and try again. This is a rather simplistic // view, as we always try each 10 milliseconds. - time.Sleep(time.Millisecond * 10) + time.Sleep(10 * time.Millisecond) } } } @@ -210,7 +211,7 @@ func DialPipe(path string, timeout *time.Duration) (net.Conn, error) { if timeout != nil { absTimeout = time.Now().Add(*timeout) } else { - absTimeout = time.Now().Add(time.Second * 2) + absTimeout = time.Now().Add(2 * time.Second) } ctx, _ := context.WithDeadline(context.Background(), absTimeout) conn, err := DialPipeContext(ctx, path) @@ -223,9 +224,15 @@ func DialPipe(path string, timeout *time.Duration) (net.Conn, error) { // DialPipeContext attempts to connect to a named pipe by `path` until `ctx` // cancellation or timeout. func DialPipeContext(ctx context.Context, path string) (net.Conn, error) { + return DialPipeAccess(ctx, path, syscall.GENERIC_READ|syscall.GENERIC_WRITE) +} + +// DialPipeAccess attempts to connect to a named pipe by `path` with `access` until `ctx` +// cancellation or timeout. +func DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) { var err error var h syscall.Handle - h, err = tryDialPipe(ctx, &path) + h, err = tryDialPipe(ctx, &path, access) if err != nil { return nil, err } @@ -422,10 +429,10 @@ type PipeConfig struct { // when the pipe is in message mode. MessageMode bool - // InputBufferSize specifies the size the input buffer, in bytes. + // InputBufferSize specifies the size of the input buffer, in bytes. InputBufferSize int32 - // OutputBufferSize specifies the size the input buffer, in bytes. + // OutputBufferSize specifies the size of the output buffer, in bytes. OutputBufferSize int32 } diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.pb.go new file mode 100644 index 000000000..70bb981e9 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.pb.go @@ -0,0 +1,1476 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.4 +// source: github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListDiskLocationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListDiskLocationsRequest) Reset() { + *x = ListDiskLocationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDiskLocationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDiskLocationsRequest) ProtoMessage() {} + +func (x *ListDiskLocationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDiskLocationsRequest.ProtoReflect.Descriptor instead. +func (*ListDiskLocationsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{0} +} + +type DiskLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Adapter string `protobuf:"bytes,1,opt,name=Adapter,proto3" json:"Adapter,omitempty"` + Bus string `protobuf:"bytes,2,opt,name=Bus,proto3" json:"Bus,omitempty"` + Target string `protobuf:"bytes,3,opt,name=Target,proto3" json:"Target,omitempty"` + LUNID string `protobuf:"bytes,4,opt,name=LUNID,proto3" json:"LUNID,omitempty"` +} + +func (x *DiskLocation) Reset() { + *x = DiskLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskLocation) ProtoMessage() {} + +func (x *DiskLocation) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskLocation.ProtoReflect.Descriptor instead. +func (*DiskLocation) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{1} +} + +func (x *DiskLocation) GetAdapter() string { + if x != nil { + return x.Adapter + } + return "" +} + +func (x *DiskLocation) GetBus() string { + if x != nil { + return x.Bus + } + return "" +} + +func (x *DiskLocation) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *DiskLocation) GetLUNID() string { + if x != nil { + return x.LUNID + } + return "" +} + +type ListDiskLocationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Map of disk number and associated with each disk device. + DiskLocations map[uint32]*DiskLocation `protobuf:"bytes,1,rep,name=disk_locations,json=diskLocations,proto3" json:"disk_locations,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ListDiskLocationsResponse) Reset() { + *x = ListDiskLocationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDiskLocationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDiskLocationsResponse) ProtoMessage() {} + +func (x *ListDiskLocationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDiskLocationsResponse.ProtoReflect.Descriptor instead. +func (*ListDiskLocationsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{2} +} + +func (x *ListDiskLocationsResponse) GetDiskLocations() map[uint32]*DiskLocation { + if x != nil { + return x.DiskLocations + } + return nil +} + +type PartitionDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk to partition. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` +} + +func (x *PartitionDiskRequest) Reset() { + *x = PartitionDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartitionDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartitionDiskRequest) ProtoMessage() {} + +func (x *PartitionDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PartitionDiskRequest.ProtoReflect.Descriptor instead. +func (*PartitionDiskRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{3} +} + +func (x *PartitionDiskRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +type PartitionDiskResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PartitionDiskResponse) Reset() { + *x = PartitionDiskResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartitionDiskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartitionDiskResponse) ProtoMessage() {} + +func (x *PartitionDiskResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PartitionDiskResponse.ProtoReflect.Descriptor instead. +func (*PartitionDiskResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{4} +} + +type RescanRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RescanRequest) Reset() { + *x = RescanRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RescanRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RescanRequest) ProtoMessage() {} + +func (x *RescanRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RescanRequest.ProtoReflect.Descriptor instead. +func (*RescanRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{5} +} + +type RescanResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RescanResponse) Reset() { + *x = RescanResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RescanResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RescanResponse) ProtoMessage() {} + +func (x *RescanResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RescanResponse.ProtoReflect.Descriptor instead. +func (*RescanResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{6} +} + +type ListDiskIDsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListDiskIDsRequest) Reset() { + *x = ListDiskIDsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDiskIDsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDiskIDsRequest) ProtoMessage() {} + +func (x *ListDiskIDsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDiskIDsRequest.ProtoReflect.Descriptor instead. +func (*ListDiskIDsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{7} +} + +type DiskIDs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The disk page83 id. + Page83 string `protobuf:"bytes,1,opt,name=page83,proto3" json:"page83,omitempty"` + // The disk serial number. + SerialNumber string `protobuf:"bytes,2,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` +} + +func (x *DiskIDs) Reset() { + *x = DiskIDs{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskIDs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskIDs) ProtoMessage() {} + +func (x *DiskIDs) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskIDs.ProtoReflect.Descriptor instead. +func (*DiskIDs) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{8} +} + +func (x *DiskIDs) GetPage83() string { + if x != nil { + return x.Page83 + } + return "" +} + +func (x *DiskIDs) GetSerialNumber() string { + if x != nil { + return x.SerialNumber + } + return "" +} + +type ListDiskIDsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Map of disk numbers and disk identifiers associated with each disk device. + DiskIDs map[uint32]*DiskIDs `protobuf:"bytes,1,rep,name=diskIDs,proto3" json:"diskIDs,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // the case is intentional for protoc to generate the field as DiskIDs +} + +func (x *ListDiskIDsResponse) Reset() { + *x = ListDiskIDsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDiskIDsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDiskIDsResponse) ProtoMessage() {} + +func (x *ListDiskIDsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDiskIDsResponse.ProtoReflect.Descriptor instead. +func (*ListDiskIDsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{9} +} + +func (x *ListDiskIDsResponse) GetDiskIDs() map[uint32]*DiskIDs { + if x != nil { + return x.DiskIDs + } + return nil +} + +type GetDiskStatsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk to get the stats from. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` +} + +func (x *GetDiskStatsRequest) Reset() { + *x = GetDiskStatsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskStatsRequest) ProtoMessage() {} + +func (x *GetDiskStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskStatsRequest.ProtoReflect.Descriptor instead. +func (*GetDiskStatsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{10} +} + +func (x *GetDiskStatsRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +type GetDiskStatsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Total size of the volume. + TotalBytes int64 `protobuf:"varint,1,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"` +} + +func (x *GetDiskStatsResponse) Reset() { + *x = GetDiskStatsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskStatsResponse) ProtoMessage() {} + +func (x *GetDiskStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskStatsResponse.ProtoReflect.Descriptor instead. +func (*GetDiskStatsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{11} +} + +func (x *GetDiskStatsResponse) GetTotalBytes() int64 { + if x != nil { + return x.TotalBytes + } + return 0 +} + +type SetDiskStateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` + // Online state to set for the disk. true for online, false for offline. + IsOnline bool `protobuf:"varint,2,opt,name=is_online,json=isOnline,proto3" json:"is_online,omitempty"` +} + +func (x *SetDiskStateRequest) Reset() { + *x = SetDiskStateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetDiskStateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDiskStateRequest) ProtoMessage() {} + +func (x *SetDiskStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDiskStateRequest.ProtoReflect.Descriptor instead. +func (*SetDiskStateRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{12} +} + +func (x *SetDiskStateRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +func (x *SetDiskStateRequest) GetIsOnline() bool { + if x != nil { + return x.IsOnline + } + return false +} + +type SetDiskStateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetDiskStateResponse) Reset() { + *x = SetDiskStateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetDiskStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDiskStateResponse) ProtoMessage() {} + +func (x *SetDiskStateResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDiskStateResponse.ProtoReflect.Descriptor instead. +func (*SetDiskStateResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{13} +} + +type GetDiskStateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` +} + +func (x *GetDiskStateRequest) Reset() { + *x = GetDiskStateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskStateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskStateRequest) ProtoMessage() {} + +func (x *GetDiskStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskStateRequest.ProtoReflect.Descriptor instead. +func (*GetDiskStateRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{14} +} + +func (x *GetDiskStateRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +type GetDiskStateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Online state of the disk. true for online, false for offline. + IsOnline bool `protobuf:"varint,1,opt,name=is_online,json=isOnline,proto3" json:"is_online,omitempty"` +} + +func (x *GetDiskStateResponse) Reset() { + *x = GetDiskStateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskStateResponse) ProtoMessage() {} + +func (x *GetDiskStateResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskStateResponse.ProtoReflect.Descriptor instead. +func (*GetDiskStateResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{15} +} + +func (x *GetDiskStateResponse) GetIsOnline() bool { + if x != nil { + return x.IsOnline + } + return false +} + +var File_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto protoreflect.FileDescriptor + +var file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, + 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x68, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, + 0x42, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x42, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x55, 0x4e, 0x49, 0x44, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4c, 0x55, 0x4e, 0x49, 0x44, 0x22, 0xc8, 0x01, 0x0a, + 0x19, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x64, 0x69, + 0x73, 0x6b, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0x52, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x37, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x22, 0x17, 0x0a, 0x15, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x73, + 0x63, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, + 0x73, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x0a, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x46, 0x0a, 0x07, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x67, 0x65, 0x38, 0x33, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x61, 0x67, 0x65, 0x38, 0x33, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x9e, 0x01, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, + 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x69, 0x73, + 0x6b, 0x49, 0x44, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x64, 0x69, 0x73, 0x6b, 0x49, + 0x44, 0x73, 0x1a, 0x47, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x36, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x22, 0x37, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x53, 0x0a, 0x13, + 0x53, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x22, 0x33, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, + 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, + 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x32, 0xe6, 0x03, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, + 0x52, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, + 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x69, 0x73, 0x6b, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x06, 0x52, + 0x65, 0x73, 0x63, 0x61, 0x6e, 0x12, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x63, 0x61, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, + 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x12, 0x16, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, + 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x43, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x69, + 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x47, 0x65, + 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, + 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, + 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescOnce sync.Once + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescData = file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDesc +) + +func file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP() []byte { + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescOnce.Do(func() { + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescData) + }) + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescData +} + +var file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_goTypes = []interface{}{ + (*ListDiskLocationsRequest)(nil), // 0: v1.ListDiskLocationsRequest + (*DiskLocation)(nil), // 1: v1.DiskLocation + (*ListDiskLocationsResponse)(nil), // 2: v1.ListDiskLocationsResponse + (*PartitionDiskRequest)(nil), // 3: v1.PartitionDiskRequest + (*PartitionDiskResponse)(nil), // 4: v1.PartitionDiskResponse + (*RescanRequest)(nil), // 5: v1.RescanRequest + (*RescanResponse)(nil), // 6: v1.RescanResponse + (*ListDiskIDsRequest)(nil), // 7: v1.ListDiskIDsRequest + (*DiskIDs)(nil), // 8: v1.DiskIDs + (*ListDiskIDsResponse)(nil), // 9: v1.ListDiskIDsResponse + (*GetDiskStatsRequest)(nil), // 10: v1.GetDiskStatsRequest + (*GetDiskStatsResponse)(nil), // 11: v1.GetDiskStatsResponse + (*SetDiskStateRequest)(nil), // 12: v1.SetDiskStateRequest + (*SetDiskStateResponse)(nil), // 13: v1.SetDiskStateResponse + (*GetDiskStateRequest)(nil), // 14: v1.GetDiskStateRequest + (*GetDiskStateResponse)(nil), // 15: v1.GetDiskStateResponse + nil, // 16: v1.ListDiskLocationsResponse.DiskLocationsEntry + nil, // 17: v1.ListDiskIDsResponse.DiskIDsEntry +} +var file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_depIdxs = []int32{ + 16, // 0: v1.ListDiskLocationsResponse.disk_locations:type_name -> v1.ListDiskLocationsResponse.DiskLocationsEntry + 17, // 1: v1.ListDiskIDsResponse.diskIDs:type_name -> v1.ListDiskIDsResponse.DiskIDsEntry + 1, // 2: v1.ListDiskLocationsResponse.DiskLocationsEntry.value:type_name -> v1.DiskLocation + 8, // 3: v1.ListDiskIDsResponse.DiskIDsEntry.value:type_name -> v1.DiskIDs + 0, // 4: v1.Disk.ListDiskLocations:input_type -> v1.ListDiskLocationsRequest + 3, // 5: v1.Disk.PartitionDisk:input_type -> v1.PartitionDiskRequest + 5, // 6: v1.Disk.Rescan:input_type -> v1.RescanRequest + 7, // 7: v1.Disk.ListDiskIDs:input_type -> v1.ListDiskIDsRequest + 10, // 8: v1.Disk.GetDiskStats:input_type -> v1.GetDiskStatsRequest + 12, // 9: v1.Disk.SetDiskState:input_type -> v1.SetDiskStateRequest + 14, // 10: v1.Disk.GetDiskState:input_type -> v1.GetDiskStateRequest + 2, // 11: v1.Disk.ListDiskLocations:output_type -> v1.ListDiskLocationsResponse + 4, // 12: v1.Disk.PartitionDisk:output_type -> v1.PartitionDiskResponse + 6, // 13: v1.Disk.Rescan:output_type -> v1.RescanResponse + 9, // 14: v1.Disk.ListDiskIDs:output_type -> v1.ListDiskIDsResponse + 11, // 15: v1.Disk.GetDiskStats:output_type -> v1.GetDiskStatsResponse + 13, // 16: v1.Disk.SetDiskState:output_type -> v1.SetDiskStateResponse + 15, // 17: v1.Disk.GetDiskState:output_type -> v1.GetDiskStateResponse + 11, // [11:18] is the sub-list for method output_type + 4, // [4:11] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_init() } +func file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_init() { + if File_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDiskLocationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiskLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDiskLocationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartitionDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartitionDiskResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RescanRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RescanResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDiskIDsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiskIDs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDiskIDsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskStatsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetDiskStateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetDiskStateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskStateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskStateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_goTypes, + DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_depIdxs, + MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes, + }.Build() + File_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto = out.File + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDesc = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_goTypes = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// DiskClient is the client API for Disk service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DiskClient interface { + // ListDiskLocations returns locations of all + // disk devices enumerated by the host. + ListDiskLocations(ctx context.Context, in *ListDiskLocationsRequest, opts ...grpc.CallOption) (*ListDiskLocationsResponse, error) + // PartitionDisk initializes and partitions a disk device with the GPT partition style + // (if the disk has not been partitioned already) and returns the resulting volume device ID. + PartitionDisk(ctx context.Context, in *PartitionDiskRequest, opts ...grpc.CallOption) (*PartitionDiskResponse, error) + // Rescan refreshes the host's storage cache. + Rescan(ctx context.Context, in *RescanRequest, opts ...grpc.CallOption) (*RescanResponse, error) + // ListDiskIDs returns a map of DiskID objects where the key is the disk number. + ListDiskIDs(ctx context.Context, in *ListDiskIDsRequest, opts ...grpc.CallOption) (*ListDiskIDsResponse, error) + // GetDiskStats returns the stats of a disk (currently it returns the disk size). + GetDiskStats(ctx context.Context, in *GetDiskStatsRequest, opts ...grpc.CallOption) (*GetDiskStatsResponse, error) + // SetDiskState sets the offline/online state of a disk. + SetDiskState(ctx context.Context, in *SetDiskStateRequest, opts ...grpc.CallOption) (*SetDiskStateResponse, error) + // GetDiskState gets the offline/online state of a disk. + GetDiskState(ctx context.Context, in *GetDiskStateRequest, opts ...grpc.CallOption) (*GetDiskStateResponse, error) +} + +type diskClient struct { + cc grpc.ClientConnInterface +} + +func NewDiskClient(cc grpc.ClientConnInterface) DiskClient { + return &diskClient{cc} +} + +func (c *diskClient) ListDiskLocations(ctx context.Context, in *ListDiskLocationsRequest, opts ...grpc.CallOption) (*ListDiskLocationsResponse, error) { + out := new(ListDiskLocationsResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/ListDiskLocations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) PartitionDisk(ctx context.Context, in *PartitionDiskRequest, opts ...grpc.CallOption) (*PartitionDiskResponse, error) { + out := new(PartitionDiskResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/PartitionDisk", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) Rescan(ctx context.Context, in *RescanRequest, opts ...grpc.CallOption) (*RescanResponse, error) { + out := new(RescanResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/Rescan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) ListDiskIDs(ctx context.Context, in *ListDiskIDsRequest, opts ...grpc.CallOption) (*ListDiskIDsResponse, error) { + out := new(ListDiskIDsResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/ListDiskIDs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) GetDiskStats(ctx context.Context, in *GetDiskStatsRequest, opts ...grpc.CallOption) (*GetDiskStatsResponse, error) { + out := new(GetDiskStatsResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/GetDiskStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) SetDiskState(ctx context.Context, in *SetDiskStateRequest, opts ...grpc.CallOption) (*SetDiskStateResponse, error) { + out := new(SetDiskStateResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/SetDiskState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) GetDiskState(ctx context.Context, in *GetDiskStateRequest, opts ...grpc.CallOption) (*GetDiskStateResponse, error) { + out := new(GetDiskStateResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/GetDiskState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DiskServer is the server API for Disk service. +type DiskServer interface { + // ListDiskLocations returns locations of all + // disk devices enumerated by the host. + ListDiskLocations(context.Context, *ListDiskLocationsRequest) (*ListDiskLocationsResponse, error) + // PartitionDisk initializes and partitions a disk device with the GPT partition style + // (if the disk has not been partitioned already) and returns the resulting volume device ID. + PartitionDisk(context.Context, *PartitionDiskRequest) (*PartitionDiskResponse, error) + // Rescan refreshes the host's storage cache. + Rescan(context.Context, *RescanRequest) (*RescanResponse, error) + // ListDiskIDs returns a map of DiskID objects where the key is the disk number. + ListDiskIDs(context.Context, *ListDiskIDsRequest) (*ListDiskIDsResponse, error) + // GetDiskStats returns the stats of a disk (currently it returns the disk size). + GetDiskStats(context.Context, *GetDiskStatsRequest) (*GetDiskStatsResponse, error) + // SetDiskState sets the offline/online state of a disk. + SetDiskState(context.Context, *SetDiskStateRequest) (*SetDiskStateResponse, error) + // GetDiskState gets the offline/online state of a disk. + GetDiskState(context.Context, *GetDiskStateRequest) (*GetDiskStateResponse, error) +} + +// UnimplementedDiskServer can be embedded to have forward compatible implementations. +type UnimplementedDiskServer struct { +} + +func (*UnimplementedDiskServer) ListDiskLocations(context.Context, *ListDiskLocationsRequest) (*ListDiskLocationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDiskLocations not implemented") +} +func (*UnimplementedDiskServer) PartitionDisk(context.Context, *PartitionDiskRequest) (*PartitionDiskResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PartitionDisk not implemented") +} +func (*UnimplementedDiskServer) Rescan(context.Context, *RescanRequest) (*RescanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Rescan not implemented") +} +func (*UnimplementedDiskServer) ListDiskIDs(context.Context, *ListDiskIDsRequest) (*ListDiskIDsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDiskIDs not implemented") +} +func (*UnimplementedDiskServer) GetDiskStats(context.Context, *GetDiskStatsRequest) (*GetDiskStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDiskStats not implemented") +} +func (*UnimplementedDiskServer) SetDiskState(context.Context, *SetDiskStateRequest) (*SetDiskStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetDiskState not implemented") +} +func (*UnimplementedDiskServer) GetDiskState(context.Context, *GetDiskStateRequest) (*GetDiskStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDiskState not implemented") +} + +func RegisterDiskServer(s *grpc.Server, srv DiskServer) { + s.RegisterService(&_Disk_serviceDesc, srv) +} + +func _Disk_ListDiskLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDiskLocationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).ListDiskLocations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/ListDiskLocations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).ListDiskLocations(ctx, req.(*ListDiskLocationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_PartitionDisk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PartitionDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).PartitionDisk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/PartitionDisk", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).PartitionDisk(ctx, req.(*PartitionDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_Rescan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RescanRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).Rescan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/Rescan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).Rescan(ctx, req.(*RescanRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_ListDiskIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDiskIDsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).ListDiskIDs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/ListDiskIDs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).ListDiskIDs(ctx, req.(*ListDiskIDsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_GetDiskStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDiskStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).GetDiskStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/GetDiskStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).GetDiskStats(ctx, req.(*GetDiskStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_SetDiskState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetDiskStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).SetDiskState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/SetDiskState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).SetDiskState(ctx, req.(*SetDiskStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_GetDiskState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDiskStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).GetDiskState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/GetDiskState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).GetDiskState(ctx, req.(*GetDiskStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Disk_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v1.Disk", + HandlerType: (*DiskServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListDiskLocations", + Handler: _Disk_ListDiskLocations_Handler, + }, + { + MethodName: "PartitionDisk", + Handler: _Disk_PartitionDisk_Handler, + }, + { + MethodName: "Rescan", + Handler: _Disk_Rescan_Handler, + }, + { + MethodName: "ListDiskIDs", + Handler: _Disk_ListDiskIDs_Handler, + }, + { + MethodName: "GetDiskStats", + Handler: _Disk_GetDiskStats_Handler, + }, + { + MethodName: "SetDiskState", + Handler: _Disk_SetDiskState_Handler, + }, + { + MethodName: "GetDiskState", + Handler: _Disk_GetDiskState_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto", +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto new file mode 100644 index 000000000..f73f412d6 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto @@ -0,0 +1,111 @@ +syntax = "proto3"; + +package v1; + +option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1"; + +service Disk { + // ListDiskLocations returns locations of all + // disk devices enumerated by the host. + rpc ListDiskLocations(ListDiskLocationsRequest) returns (ListDiskLocationsResponse) {} + + // PartitionDisk initializes and partitions a disk device with the GPT partition style + // (if the disk has not been partitioned already) and returns the resulting volume device ID. + rpc PartitionDisk(PartitionDiskRequest) returns (PartitionDiskResponse) {} + + // Rescan refreshes the host's storage cache. + rpc Rescan(RescanRequest) returns (RescanResponse) {} + + // ListDiskIDs returns a map of DiskID objects where the key is the disk number. + rpc ListDiskIDs(ListDiskIDsRequest) returns (ListDiskIDsResponse) {} + + // GetDiskStats returns the stats of a disk (currently it returns the disk size). + rpc GetDiskStats(GetDiskStatsRequest) returns (GetDiskStatsResponse) {} + + // SetDiskState sets the offline/online state of a disk. + rpc SetDiskState(SetDiskStateRequest) returns (SetDiskStateResponse) {} + + // GetDiskState gets the offline/online state of a disk. + rpc GetDiskState(GetDiskStateRequest) returns (GetDiskStateResponse) {} +} + +message ListDiskLocationsRequest { + // Intentionally empty. +} + +message DiskLocation { + string Adapter = 1; + string Bus = 2; + string Target = 3; + string LUNID = 4; +} + +message ListDiskLocationsResponse { + // Map of disk number and associated with each disk device. + map disk_locations = 1; +} + +message PartitionDiskRequest { + // Disk device number of the disk to partition. + uint32 disk_number = 1; +} + +message PartitionDiskResponse { + // Intentionally empty. +} + +message RescanRequest { + // Intentionally empty. +} + +message RescanResponse { + // Intentionally empty. +} + +message ListDiskIDsRequest { + // Intentionally empty. +} + +message DiskIDs { + // The disk page83 id. + string page83 = 1; + // The disk serial number. + string serial_number = 2; +} + +message ListDiskIDsResponse { + // Map of disk numbers and disk identifiers associated with each disk device. + map diskIDs = 1; // the case is intentional for protoc to generate the field as DiskIDs +} + +message GetDiskStatsRequest { + // Disk device number of the disk to get the stats from. + uint32 disk_number = 1; +} + +message GetDiskStatsResponse { + // Total size of the volume. + int64 total_bytes = 1; +} + +message SetDiskStateRequest { + // Disk device number of the disk. + uint32 disk_number = 1; + + // Online state to set for the disk. true for online, false for offline. + bool is_online = 2; +} + +message SetDiskStateResponse { + // Intentionally empty. +} + +message GetDiskStateRequest { + // Disk device number of the disk. + uint32 disk_number = 1; +} + +message GetDiskStateResponse { + // Online state of the disk. true for online, false for offline. + bool is_online = 1; +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.pb.go new file mode 100644 index 000000000..8bf9cd654 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.pb.go @@ -0,0 +1,1041 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.4 +// source: github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PathExistsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path whose existence we want to check in the host's filesystem + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *PathExistsRequest) Reset() { + *x = PathExistsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathExistsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathExistsRequest) ProtoMessage() {} + +func (x *PathExistsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathExistsRequest.ProtoReflect.Descriptor instead. +func (*PathExistsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{0} +} + +func (x *PathExistsRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type PathExistsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates whether the path in PathExistsRequest exists in the host's filesystem + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *PathExistsResponse) Reset() { + *x = PathExistsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathExistsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathExistsResponse) ProtoMessage() {} + +func (x *PathExistsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathExistsResponse.ProtoReflect.Descriptor instead. +func (*PathExistsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{1} +} + +func (x *PathExistsResponse) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +type MkdirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to create in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // Non-existent parent directories in the path will be automatically created. + // Directories will be created with Read and Write privileges of the Windows + // User account under which csi-proxy is started (typically LocalSystem). + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // The path parameter cannot already exist in the host's filesystem. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Maximum path length will be capped to 260 characters. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *MkdirRequest) Reset() { + *x = MkdirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirRequest) ProtoMessage() {} + +func (x *MkdirRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MkdirRequest.ProtoReflect.Descriptor instead. +func (*MkdirRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{2} +} + +func (x *MkdirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type MkdirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MkdirResponse) Reset() { + *x = MkdirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirResponse) ProtoMessage() {} + +func (x *MkdirResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MkdirResponse.ProtoReflect.Descriptor instead. +func (*MkdirResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{3} +} + +type RmdirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to remove in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Path cannot be a file of type symlink. + // Maximum path length will be capped to 260 characters. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // Force remove all contents under path (if any). + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *RmdirRequest) Reset() { + *x = RmdirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RmdirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RmdirRequest) ProtoMessage() {} + +func (x *RmdirRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RmdirRequest.ProtoReflect.Descriptor instead. +func (*RmdirRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{4} +} + +func (x *RmdirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *RmdirRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type RmdirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RmdirResponse) Reset() { + *x = RmdirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RmdirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RmdirResponse) ProtoMessage() {} + +func (x *RmdirResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RmdirResponse.ProtoReflect.Descriptor instead. +func (*RmdirResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{5} +} + +type CreateSymlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path of the existing directory to be linked. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs needs to match the paths specified as + // kubelet-csi-plugins-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // source_path cannot already exist in the host filesystem. + // Maximum path length will be capped to 260 characters. + SourcePath string `protobuf:"bytes,1,opt,name=source_path,json=sourcePath,proto3" json:"source_path,omitempty"` + // Target path is the location of the new directory entry to be created in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs to match the paths specified as + // kubelet-pod-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // target_path needs to exist as a directory in the host that is empty. + // target_path cannot be a symbolic link. + // Maximum path length will be capped to 260 characters. + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *CreateSymlinkRequest) Reset() { + *x = CreateSymlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSymlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSymlinkRequest) ProtoMessage() {} + +func (x *CreateSymlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSymlinkRequest.ProtoReflect.Descriptor instead. +func (*CreateSymlinkRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateSymlinkRequest) GetSourcePath() string { + if x != nil { + return x.SourcePath + } + return "" +} + +func (x *CreateSymlinkRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type CreateSymlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateSymlinkResponse) Reset() { + *x = CreateSymlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSymlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSymlinkResponse) ProtoMessage() {} + +func (x *CreateSymlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSymlinkResponse.ProtoReflect.Descriptor instead. +func (*CreateSymlinkResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{7} +} + +type IsSymlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path whose existence as a symlink we want to check in the host's filesystem. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *IsSymlinkRequest) Reset() { + *x = IsSymlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSymlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSymlinkRequest) ProtoMessage() {} + +func (x *IsSymlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsSymlinkRequest.ProtoReflect.Descriptor instead. +func (*IsSymlinkRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{8} +} + +func (x *IsSymlinkRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type IsSymlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates whether the path in IsSymlinkRequest is a symlink. + IsSymlink bool `protobuf:"varint,1,opt,name=is_symlink,json=isSymlink,proto3" json:"is_symlink,omitempty"` +} + +func (x *IsSymlinkResponse) Reset() { + *x = IsSymlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSymlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSymlinkResponse) ProtoMessage() {} + +func (x *IsSymlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsSymlinkResponse.ProtoReflect.Descriptor instead. +func (*IsSymlinkResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{9} +} + +func (x *IsSymlinkResponse) GetIsSymlink() bool { + if x != nil { + return x.IsSymlink + } + return false +} + +var File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto protoreflect.FileDescriptor + +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDesc = []byte{ + 0x0a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x61, + 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0x27, 0x0a, 0x11, + 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, + 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x22, 0x22, 0x0a, 0x0c, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x6b, 0x64, 0x69, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x0a, 0x0c, 0x52, 0x6d, 0x64, 0x69, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, + 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, + 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x32, + 0x0a, 0x11, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, + 0x6e, 0x6b, 0x32, 0xaf, 0x02, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x12, 0x3d, 0x0a, 0x0a, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, + 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x2e, 0x0a, 0x05, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x12, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x2e, 0x0a, 0x05, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x12, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x46, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, + 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x09, 0x49, 0x73, 0x53, 0x79, + 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, + 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, + 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescOnce sync.Once + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescData = file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDesc +) + +func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP() []byte { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescOnce.Do(func() { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescData) + }) + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescData +} + +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_goTypes = []interface{}{ + (*PathExistsRequest)(nil), // 0: v1.PathExistsRequest + (*PathExistsResponse)(nil), // 1: v1.PathExistsResponse + (*MkdirRequest)(nil), // 2: v1.MkdirRequest + (*MkdirResponse)(nil), // 3: v1.MkdirResponse + (*RmdirRequest)(nil), // 4: v1.RmdirRequest + (*RmdirResponse)(nil), // 5: v1.RmdirResponse + (*CreateSymlinkRequest)(nil), // 6: v1.CreateSymlinkRequest + (*CreateSymlinkResponse)(nil), // 7: v1.CreateSymlinkResponse + (*IsSymlinkRequest)(nil), // 8: v1.IsSymlinkRequest + (*IsSymlinkResponse)(nil), // 9: v1.IsSymlinkResponse +} +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_depIdxs = []int32{ + 0, // 0: v1.Filesystem.PathExists:input_type -> v1.PathExistsRequest + 2, // 1: v1.Filesystem.Mkdir:input_type -> v1.MkdirRequest + 4, // 2: v1.Filesystem.Rmdir:input_type -> v1.RmdirRequest + 6, // 3: v1.Filesystem.CreateSymlink:input_type -> v1.CreateSymlinkRequest + 8, // 4: v1.Filesystem.IsSymlink:input_type -> v1.IsSymlinkRequest + 1, // 5: v1.Filesystem.PathExists:output_type -> v1.PathExistsResponse + 3, // 6: v1.Filesystem.Mkdir:output_type -> v1.MkdirResponse + 5, // 7: v1.Filesystem.Rmdir:output_type -> v1.RmdirResponse + 7, // 8: v1.Filesystem.CreateSymlink:output_type -> v1.CreateSymlinkResponse + 9, // 9: v1.Filesystem.IsSymlink:output_type -> v1.IsSymlinkResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_init() } +func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_init() { + if File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathExistsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathExistsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RmdirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RmdirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsSymlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsSymlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_goTypes, + DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_depIdxs, + MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes, + }.Build() + File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto = out.File + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDesc = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_goTypes = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// FilesystemClient is the client API for Filesystem service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type FilesystemClient interface { + // PathExists checks if the requested path exists in the host filesystem. + PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) + // Mkdir creates a directory at the requested path in the host filesystem. + Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + CreateSymlink(ctx context.Context, in *CreateSymlinkRequest, opts ...grpc.CallOption) (*CreateSymlinkResponse, error) + // IsSymlink checks if a given path is a symlink. + IsSymlink(ctx context.Context, in *IsSymlinkRequest, opts ...grpc.CallOption) (*IsSymlinkResponse, error) +} + +type filesystemClient struct { + cc grpc.ClientConnInterface +} + +func NewFilesystemClient(cc grpc.ClientConnInterface) FilesystemClient { + return &filesystemClient{cc} +} + +func (c *filesystemClient) PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) { + out := new(PathExistsResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/PathExists", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) { + out := new(MkdirResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/Mkdir", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) { + out := new(RmdirResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/Rmdir", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) CreateSymlink(ctx context.Context, in *CreateSymlinkRequest, opts ...grpc.CallOption) (*CreateSymlinkResponse, error) { + out := new(CreateSymlinkResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/CreateSymlink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) IsSymlink(ctx context.Context, in *IsSymlinkRequest, opts ...grpc.CallOption) (*IsSymlinkResponse, error) { + out := new(IsSymlinkResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/IsSymlink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FilesystemServer is the server API for Filesystem service. +type FilesystemServer interface { + // PathExists checks if the requested path exists in the host filesystem. + PathExists(context.Context, *PathExistsRequest) (*PathExistsResponse, error) + // Mkdir creates a directory at the requested path in the host filesystem. + Mkdir(context.Context, *MkdirRequest) (*MkdirResponse, error) + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + Rmdir(context.Context, *RmdirRequest) (*RmdirResponse, error) + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + CreateSymlink(context.Context, *CreateSymlinkRequest) (*CreateSymlinkResponse, error) + // IsSymlink checks if a given path is a symlink. + IsSymlink(context.Context, *IsSymlinkRequest) (*IsSymlinkResponse, error) +} + +// UnimplementedFilesystemServer can be embedded to have forward compatible implementations. +type UnimplementedFilesystemServer struct { +} + +func (*UnimplementedFilesystemServer) PathExists(context.Context, *PathExistsRequest) (*PathExistsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PathExists not implemented") +} +func (*UnimplementedFilesystemServer) Mkdir(context.Context, *MkdirRequest) (*MkdirResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Mkdir not implemented") +} +func (*UnimplementedFilesystemServer) Rmdir(context.Context, *RmdirRequest) (*RmdirResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Rmdir not implemented") +} +func (*UnimplementedFilesystemServer) CreateSymlink(context.Context, *CreateSymlinkRequest) (*CreateSymlinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSymlink not implemented") +} +func (*UnimplementedFilesystemServer) IsSymlink(context.Context, *IsSymlinkRequest) (*IsSymlinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsSymlink not implemented") +} + +func RegisterFilesystemServer(s *grpc.Server, srv FilesystemServer) { + s.RegisterService(&_Filesystem_serviceDesc, srv) +} + +func _Filesystem_PathExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PathExistsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).PathExists(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/PathExists", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).PathExists(ctx, req.(*PathExistsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_Mkdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MkdirRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).Mkdir(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/Mkdir", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).Mkdir(ctx, req.(*MkdirRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_Rmdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RmdirRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).Rmdir(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/Rmdir", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).Rmdir(ctx, req.(*RmdirRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_CreateSymlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSymlinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).CreateSymlink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/CreateSymlink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).CreateSymlink(ctx, req.(*CreateSymlinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_IsSymlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsSymlinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).IsSymlink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/IsSymlink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).IsSymlink(ctx, req.(*IsSymlinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Filesystem_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v1.Filesystem", + HandlerType: (*FilesystemServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PathExists", + Handler: _Filesystem_PathExists_Handler, + }, + { + MethodName: "Mkdir", + Handler: _Filesystem_Mkdir_Handler, + }, + { + MethodName: "Rmdir", + Handler: _Filesystem_Rmdir_Handler, + }, + { + MethodName: "CreateSymlink", + Handler: _Filesystem_CreateSymlink_Handler, + }, + { + MethodName: "IsSymlink", + Handler: _Filesystem_IsSymlink_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto", +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto new file mode 100644 index 000000000..151a1ffd4 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto @@ -0,0 +1,136 @@ +syntax = "proto3"; + +package v1; + +option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1"; + +service Filesystem { + // PathExists checks if the requested path exists in the host filesystem. + rpc PathExists(PathExistsRequest) returns (PathExistsResponse) {} + + // Mkdir creates a directory at the requested path in the host filesystem. + rpc Mkdir(MkdirRequest) returns (MkdirResponse) {} + + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + rpc Rmdir(RmdirRequest) returns (RmdirResponse) {} + + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + rpc CreateSymlink(CreateSymlinkRequest) returns (CreateSymlinkResponse) {} + + // IsSymlink checks if a given path is a symlink. + rpc IsSymlink(IsSymlinkRequest) returns (IsSymlinkResponse) {} +} + +message PathExistsRequest { + // The path whose existence we want to check in the host's filesystem + string path = 1; +} + +message PathExistsResponse { + // Indicates whether the path in PathExistsRequest exists in the host's filesystem + bool exists = 1; +} + +message MkdirRequest { + // The path to create in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // Non-existent parent directories in the path will be automatically created. + // Directories will be created with Read and Write privileges of the Windows + // User account under which csi-proxy is started (typically LocalSystem). + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // The path parameter cannot already exist in the host's filesystem. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Maximum path length will be capped to 260 characters. + string path = 1; +} + +message MkdirResponse { + // Intentionally empty. +} + +message RmdirRequest { + // The path to remove in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Path cannot be a file of type symlink. + // Maximum path length will be capped to 260 characters. + string path = 1; + + // Force remove all contents under path (if any). + bool force = 2; +} + +message RmdirResponse { + // Intentionally empty. +} + +message CreateSymlinkRequest { + // The path of the existing directory to be linked. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs needs to match the paths specified as + // kubelet-csi-plugins-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // source_path cannot already exist in the host filesystem. + // Maximum path length will be capped to 260 characters. + string source_path = 1; + + // Target path is the location of the new directory entry to be created in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs to match the paths specified as + // kubelet-pod-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // target_path needs to exist as a directory in the host that is empty. + // target_path cannot be a symbolic link. + // Maximum path length will be capped to 260 characters. + string target_path = 2; +} + +message CreateSymlinkResponse { + // Intentionally empty. +} + +message IsSymlinkRequest { + // The path whose existence as a symlink we want to check in the host's filesystem. + string path = 1; +} + +message IsSymlinkResponse { + // Indicates whether the path in IsSymlinkRequest is a symlink. + bool is_symlink = 1; +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.pb.go new file mode 100644 index 000000000..2a7a9be18 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.pb.go @@ -0,0 +1,1876 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.4 +// source: github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListVolumesOnDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk to query for volumes. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` + // The partition number (optional), by default it uses the first partition of the disk. + PartitionNumber uint32 `protobuf:"varint,2,opt,name=partition_number,json=partitionNumber,proto3" json:"partition_number,omitempty"` +} + +func (x *ListVolumesOnDiskRequest) Reset() { + *x = ListVolumesOnDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVolumesOnDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVolumesOnDiskRequest) ProtoMessage() {} + +func (x *ListVolumesOnDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVolumesOnDiskRequest.ProtoReflect.Descriptor instead. +func (*ListVolumesOnDiskRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{0} +} + +func (x *ListVolumesOnDiskRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +func (x *ListVolumesOnDiskRequest) GetPartitionNumber() uint32 { + if x != nil { + return x.PartitionNumber + } + return 0 +} + +type ListVolumesOnDiskResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device IDs of volumes on the specified disk. + VolumeIds []string `protobuf:"bytes,1,rep,name=volume_ids,json=volumeIds,proto3" json:"volume_ids,omitempty"` +} + +func (x *ListVolumesOnDiskResponse) Reset() { + *x = ListVolumesOnDiskResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVolumesOnDiskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVolumesOnDiskResponse) ProtoMessage() {} + +func (x *ListVolumesOnDiskResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVolumesOnDiskResponse.ProtoReflect.Descriptor instead. +func (*ListVolumesOnDiskResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{1} +} + +func (x *ListVolumesOnDiskResponse) GetVolumeIds() []string { + if x != nil { + return x.VolumeIds + } + return nil +} + +type MountVolumeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to mount. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // Path in the host's file system where the volume needs to be mounted. + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *MountVolumeRequest) Reset() { + *x = MountVolumeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MountVolumeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MountVolumeRequest) ProtoMessage() {} + +func (x *MountVolumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MountVolumeRequest.ProtoReflect.Descriptor instead. +func (*MountVolumeRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{2} +} + +func (x *MountVolumeRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +func (x *MountVolumeRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type MountVolumeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MountVolumeResponse) Reset() { + *x = MountVolumeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MountVolumeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MountVolumeResponse) ProtoMessage() {} + +func (x *MountVolumeResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MountVolumeResponse.ProtoReflect.Descriptor instead. +func (*MountVolumeResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{3} +} + +type UnmountVolumeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to dismount. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // Path where the volume has been mounted. + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *UnmountVolumeRequest) Reset() { + *x = UnmountVolumeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnmountVolumeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnmountVolumeRequest) ProtoMessage() {} + +func (x *UnmountVolumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnmountVolumeRequest.ProtoReflect.Descriptor instead. +func (*UnmountVolumeRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{4} +} + +func (x *UnmountVolumeRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +func (x *UnmountVolumeRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type UnmountVolumeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UnmountVolumeResponse) Reset() { + *x = UnmountVolumeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnmountVolumeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnmountVolumeResponse) ProtoMessage() {} + +func (x *UnmountVolumeResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnmountVolumeResponse.ProtoReflect.Descriptor instead. +func (*UnmountVolumeResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{5} +} + +type IsVolumeFormattedRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to check. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *IsVolumeFormattedRequest) Reset() { + *x = IsVolumeFormattedRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsVolumeFormattedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsVolumeFormattedRequest) ProtoMessage() {} + +func (x *IsVolumeFormattedRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsVolumeFormattedRequest.ProtoReflect.Descriptor instead. +func (*IsVolumeFormattedRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{6} +} + +func (x *IsVolumeFormattedRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type IsVolumeFormattedResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Is the volume formatted with NTFS. + Formatted bool `protobuf:"varint,1,opt,name=formatted,proto3" json:"formatted,omitempty"` +} + +func (x *IsVolumeFormattedResponse) Reset() { + *x = IsVolumeFormattedResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsVolumeFormattedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsVolumeFormattedResponse) ProtoMessage() {} + +func (x *IsVolumeFormattedResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsVolumeFormattedResponse.ProtoReflect.Descriptor instead. +func (*IsVolumeFormattedResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{7} +} + +func (x *IsVolumeFormattedResponse) GetFormatted() bool { + if x != nil { + return x.Formatted + } + return false +} + +type FormatVolumeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to format. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *FormatVolumeRequest) Reset() { + *x = FormatVolumeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FormatVolumeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FormatVolumeRequest) ProtoMessage() {} + +func (x *FormatVolumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FormatVolumeRequest.ProtoReflect.Descriptor instead. +func (*FormatVolumeRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{8} +} + +func (x *FormatVolumeRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type FormatVolumeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FormatVolumeResponse) Reset() { + *x = FormatVolumeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FormatVolumeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FormatVolumeResponse) ProtoMessage() {} + +func (x *FormatVolumeResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FormatVolumeResponse.ProtoReflect.Descriptor instead. +func (*FormatVolumeResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{9} +} + +type ResizeVolumeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to resize. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // New size in bytes of the volume. + SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` +} + +func (x *ResizeVolumeRequest) Reset() { + *x = ResizeVolumeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResizeVolumeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResizeVolumeRequest) ProtoMessage() {} + +func (x *ResizeVolumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResizeVolumeRequest.ProtoReflect.Descriptor instead. +func (*ResizeVolumeRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{10} +} + +func (x *ResizeVolumeRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +func (x *ResizeVolumeRequest) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +type ResizeVolumeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResizeVolumeResponse) Reset() { + *x = ResizeVolumeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResizeVolumeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResizeVolumeResponse) ProtoMessage() {} + +func (x *ResizeVolumeResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResizeVolumeResponse.ProtoReflect.Descriptor instead. +func (*ResizeVolumeResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{11} +} + +type GetVolumeStatsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device Id of the volume to get the stats for. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *GetVolumeStatsRequest) Reset() { + *x = GetVolumeStatsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeStatsRequest) ProtoMessage() {} + +func (x *GetVolumeStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeStatsRequest.ProtoReflect.Descriptor instead. +func (*GetVolumeStatsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{12} +} + +func (x *GetVolumeStatsRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type GetVolumeStatsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Total bytes + TotalBytes int64 `protobuf:"varint,1,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"` + // Used bytes + UsedBytes int64 `protobuf:"varint,2,opt,name=used_bytes,json=usedBytes,proto3" json:"used_bytes,omitempty"` +} + +func (x *GetVolumeStatsResponse) Reset() { + *x = GetVolumeStatsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeStatsResponse) ProtoMessage() {} + +func (x *GetVolumeStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeStatsResponse.ProtoReflect.Descriptor instead. +func (*GetVolumeStatsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{13} +} + +func (x *GetVolumeStatsResponse) GetTotalBytes() int64 { + if x != nil { + return x.TotalBytes + } + return 0 +} + +func (x *GetVolumeStatsResponse) GetUsedBytes() int64 { + if x != nil { + return x.UsedBytes + } + return 0 +} + +type GetDiskNumberFromVolumeIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to get the disk number for. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *GetDiskNumberFromVolumeIDRequest) Reset() { + *x = GetDiskNumberFromVolumeIDRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskNumberFromVolumeIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskNumberFromVolumeIDRequest) ProtoMessage() {} + +func (x *GetDiskNumberFromVolumeIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskNumberFromVolumeIDRequest.ProtoReflect.Descriptor instead. +func (*GetDiskNumberFromVolumeIDRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{14} +} + +func (x *GetDiskNumberFromVolumeIDRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type GetDiskNumberFromVolumeIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Corresponding disk number. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` +} + +func (x *GetDiskNumberFromVolumeIDResponse) Reset() { + *x = GetDiskNumberFromVolumeIDResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskNumberFromVolumeIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskNumberFromVolumeIDResponse) ProtoMessage() {} + +func (x *GetDiskNumberFromVolumeIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskNumberFromVolumeIDResponse.ProtoReflect.Descriptor instead. +func (*GetDiskNumberFromVolumeIDResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{15} +} + +func (x *GetDiskNumberFromVolumeIDResponse) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +type GetVolumeIDFromTargetPathRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The target path. + TargetPath string `protobuf:"bytes,1,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *GetVolumeIDFromTargetPathRequest) Reset() { + *x = GetVolumeIDFromTargetPathRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeIDFromTargetPathRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeIDFromTargetPathRequest) ProtoMessage() {} + +func (x *GetVolumeIDFromTargetPathRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeIDFromTargetPathRequest.ProtoReflect.Descriptor instead. +func (*GetVolumeIDFromTargetPathRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{16} +} + +func (x *GetVolumeIDFromTargetPathRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type GetVolumeIDFromTargetPathResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The volume device ID. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *GetVolumeIDFromTargetPathResponse) Reset() { + *x = GetVolumeIDFromTargetPathResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeIDFromTargetPathResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeIDFromTargetPathResponse) ProtoMessage() {} + +func (x *GetVolumeIDFromTargetPathResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeIDFromTargetPathResponse.ProtoReflect.Descriptor instead. +func (*GetVolumeIDFromTargetPathResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{17} +} + +func (x *GetVolumeIDFromTargetPathResponse) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type WriteVolumeCacheRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to flush the cache. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *WriteVolumeCacheRequest) Reset() { + *x = WriteVolumeCacheRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteVolumeCacheRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteVolumeCacheRequest) ProtoMessage() {} + +func (x *WriteVolumeCacheRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteVolumeCacheRequest.ProtoReflect.Descriptor instead. +func (*WriteVolumeCacheRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{18} +} + +func (x *WriteVolumeCacheRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type WriteVolumeCacheResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WriteVolumeCacheResponse) Reset() { + *x = WriteVolumeCacheResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteVolumeCacheResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteVolumeCacheResponse) ProtoMessage() {} + +func (x *WriteVolumeCacheResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteVolumeCacheResponse.ProtoReflect.Descriptor instead. +func (*WriteVolumeCacheResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{19} +} + +var File_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto protoreflect.FileDescriptor + +var file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDesc = []byte{ + 0x0a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0x66, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x22, 0x3a, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4f, + 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x73, 0x22, 0x52, 0x0a, 0x12, + 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, + 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x54, 0x0a, 0x14, 0x55, 0x6e, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, + 0x15, 0x55, 0x6e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, 0x18, 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, + 0x39, 0x0a, 0x19, 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x22, 0x32, 0x0a, 0x13, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x16, + 0x0a, 0x14, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, + 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x73, + 0x69, 0x7a, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x34, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x73, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x22, 0x3f, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x49, 0x64, 0x22, 0x44, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, + 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x43, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x40, 0x0a, + 0x21, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x46, 0x72, 0x6f, 0x6d, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, + 0x36, 0x0a, 0x17, 0x57, 0x72, 0x69, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x06, 0x0a, 0x06, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x52, + 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x44, + 0x69, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x73, 0x4f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x12, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0d, 0x55, 0x6e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x11, + 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, + 0x64, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x43, 0x0a, 0x0c, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x7a, + 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x19, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x49, 0x44, 0x12, 0x24, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, + 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x6a, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, + 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x24, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x46, + 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x49, 0x44, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, + 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, + 0x10, 0x57, 0x72, 0x69, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x12, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3a, + 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescOnce sync.Once + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescData = file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDesc +) + +func file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP() []byte { + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescOnce.Do(func() { + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescData) + }) + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescData +} + +var file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_goTypes = []interface{}{ + (*ListVolumesOnDiskRequest)(nil), // 0: v1.ListVolumesOnDiskRequest + (*ListVolumesOnDiskResponse)(nil), // 1: v1.ListVolumesOnDiskResponse + (*MountVolumeRequest)(nil), // 2: v1.MountVolumeRequest + (*MountVolumeResponse)(nil), // 3: v1.MountVolumeResponse + (*UnmountVolumeRequest)(nil), // 4: v1.UnmountVolumeRequest + (*UnmountVolumeResponse)(nil), // 5: v1.UnmountVolumeResponse + (*IsVolumeFormattedRequest)(nil), // 6: v1.IsVolumeFormattedRequest + (*IsVolumeFormattedResponse)(nil), // 7: v1.IsVolumeFormattedResponse + (*FormatVolumeRequest)(nil), // 8: v1.FormatVolumeRequest + (*FormatVolumeResponse)(nil), // 9: v1.FormatVolumeResponse + (*ResizeVolumeRequest)(nil), // 10: v1.ResizeVolumeRequest + (*ResizeVolumeResponse)(nil), // 11: v1.ResizeVolumeResponse + (*GetVolumeStatsRequest)(nil), // 12: v1.GetVolumeStatsRequest + (*GetVolumeStatsResponse)(nil), // 13: v1.GetVolumeStatsResponse + (*GetDiskNumberFromVolumeIDRequest)(nil), // 14: v1.GetDiskNumberFromVolumeIDRequest + (*GetDiskNumberFromVolumeIDResponse)(nil), // 15: v1.GetDiskNumberFromVolumeIDResponse + (*GetVolumeIDFromTargetPathRequest)(nil), // 16: v1.GetVolumeIDFromTargetPathRequest + (*GetVolumeIDFromTargetPathResponse)(nil), // 17: v1.GetVolumeIDFromTargetPathResponse + (*WriteVolumeCacheRequest)(nil), // 18: v1.WriteVolumeCacheRequest + (*WriteVolumeCacheResponse)(nil), // 19: v1.WriteVolumeCacheResponse +} +var file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_depIdxs = []int32{ + 0, // 0: v1.Volume.ListVolumesOnDisk:input_type -> v1.ListVolumesOnDiskRequest + 2, // 1: v1.Volume.MountVolume:input_type -> v1.MountVolumeRequest + 4, // 2: v1.Volume.UnmountVolume:input_type -> v1.UnmountVolumeRequest + 6, // 3: v1.Volume.IsVolumeFormatted:input_type -> v1.IsVolumeFormattedRequest + 8, // 4: v1.Volume.FormatVolume:input_type -> v1.FormatVolumeRequest + 10, // 5: v1.Volume.ResizeVolume:input_type -> v1.ResizeVolumeRequest + 12, // 6: v1.Volume.GetVolumeStats:input_type -> v1.GetVolumeStatsRequest + 14, // 7: v1.Volume.GetDiskNumberFromVolumeID:input_type -> v1.GetDiskNumberFromVolumeIDRequest + 16, // 8: v1.Volume.GetVolumeIDFromTargetPath:input_type -> v1.GetVolumeIDFromTargetPathRequest + 18, // 9: v1.Volume.WriteVolumeCache:input_type -> v1.WriteVolumeCacheRequest + 1, // 10: v1.Volume.ListVolumesOnDisk:output_type -> v1.ListVolumesOnDiskResponse + 3, // 11: v1.Volume.MountVolume:output_type -> v1.MountVolumeResponse + 5, // 12: v1.Volume.UnmountVolume:output_type -> v1.UnmountVolumeResponse + 7, // 13: v1.Volume.IsVolumeFormatted:output_type -> v1.IsVolumeFormattedResponse + 9, // 14: v1.Volume.FormatVolume:output_type -> v1.FormatVolumeResponse + 11, // 15: v1.Volume.ResizeVolume:output_type -> v1.ResizeVolumeResponse + 13, // 16: v1.Volume.GetVolumeStats:output_type -> v1.GetVolumeStatsResponse + 15, // 17: v1.Volume.GetDiskNumberFromVolumeID:output_type -> v1.GetDiskNumberFromVolumeIDResponse + 17, // 18: v1.Volume.GetVolumeIDFromTargetPath:output_type -> v1.GetVolumeIDFromTargetPathResponse + 19, // 19: v1.Volume.WriteVolumeCache:output_type -> v1.WriteVolumeCacheResponse + 10, // [10:20] is the sub-list for method output_type + 0, // [0:10] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_init() } +func file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_init() { + if File_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVolumesOnDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVolumesOnDiskResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MountVolumeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MountVolumeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnmountVolumeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnmountVolumeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsVolumeFormattedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsVolumeFormattedResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FormatVolumeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FormatVolumeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResizeVolumeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResizeVolumeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeStatsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskNumberFromVolumeIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskNumberFromVolumeIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeIDFromTargetPathRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeIDFromTargetPathResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteVolumeCacheRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteVolumeCacheResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_goTypes, + DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_depIdxs, + MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes, + }.Build() + File_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto = out.File + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDesc = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_goTypes = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// VolumeClient is the client API for Volume service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type VolumeClient interface { + // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for all volumes from a + // given disk number and partition number (optional) + ListVolumesOnDisk(ctx context.Context, in *ListVolumesOnDiskRequest, opts ...grpc.CallOption) (*ListVolumesOnDiskResponse, error) + // MountVolume mounts the volume at the requested global staging path. + MountVolume(ctx context.Context, in *MountVolumeRequest, opts ...grpc.CallOption) (*MountVolumeResponse, error) + // UnmountVolume flushes data cache to disk and removes the global staging path. + UnmountVolume(ctx context.Context, in *UnmountVolumeRequest, opts ...grpc.CallOption) (*UnmountVolumeResponse, error) + // IsVolumeFormatted checks if a volume is formatted. + IsVolumeFormatted(ctx context.Context, in *IsVolumeFormattedRequest, opts ...grpc.CallOption) (*IsVolumeFormattedResponse, error) + // FormatVolume formats a volume with NTFS. + FormatVolume(ctx context.Context, in *FormatVolumeRequest, opts ...grpc.CallOption) (*FormatVolumeResponse, error) + // ResizeVolume performs resizing of the partition and file system for a block based volume. + ResizeVolume(ctx context.Context, in *ResizeVolumeRequest, opts ...grpc.CallOption) (*ResizeVolumeResponse, error) + // GetVolumeStats gathers total bytes and used bytes for a volume. + GetVolumeStats(ctx context.Context, in *GetVolumeStatsRequest, opts ...grpc.CallOption) (*GetVolumeStatsResponse, error) + // GetDiskNumberFromVolumeID gets the disk number of the disk where the volume is located. + GetDiskNumberFromVolumeID(ctx context.Context, in *GetDiskNumberFromVolumeIDRequest, opts ...grpc.CallOption) (*GetDiskNumberFromVolumeIDResponse, error) + // GetVolumeIDFromTargetPath gets the volume id for a given target path. + GetVolumeIDFromTargetPath(ctx context.Context, in *GetVolumeIDFromTargetPathRequest, opts ...grpc.CallOption) (*GetVolumeIDFromTargetPathResponse, error) + // WriteVolumeCache write volume cache to disk. + WriteVolumeCache(ctx context.Context, in *WriteVolumeCacheRequest, opts ...grpc.CallOption) (*WriteVolumeCacheResponse, error) +} + +type volumeClient struct { + cc grpc.ClientConnInterface +} + +func NewVolumeClient(cc grpc.ClientConnInterface) VolumeClient { + return &volumeClient{cc} +} + +func (c *volumeClient) ListVolumesOnDisk(ctx context.Context, in *ListVolumesOnDiskRequest, opts ...grpc.CallOption) (*ListVolumesOnDiskResponse, error) { + out := new(ListVolumesOnDiskResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/ListVolumesOnDisk", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) MountVolume(ctx context.Context, in *MountVolumeRequest, opts ...grpc.CallOption) (*MountVolumeResponse, error) { + out := new(MountVolumeResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/MountVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) UnmountVolume(ctx context.Context, in *UnmountVolumeRequest, opts ...grpc.CallOption) (*UnmountVolumeResponse, error) { + out := new(UnmountVolumeResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/UnmountVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) IsVolumeFormatted(ctx context.Context, in *IsVolumeFormattedRequest, opts ...grpc.CallOption) (*IsVolumeFormattedResponse, error) { + out := new(IsVolumeFormattedResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/IsVolumeFormatted", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) FormatVolume(ctx context.Context, in *FormatVolumeRequest, opts ...grpc.CallOption) (*FormatVolumeResponse, error) { + out := new(FormatVolumeResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/FormatVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) ResizeVolume(ctx context.Context, in *ResizeVolumeRequest, opts ...grpc.CallOption) (*ResizeVolumeResponse, error) { + out := new(ResizeVolumeResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/ResizeVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) GetVolumeStats(ctx context.Context, in *GetVolumeStatsRequest, opts ...grpc.CallOption) (*GetVolumeStatsResponse, error) { + out := new(GetVolumeStatsResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/GetVolumeStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) GetDiskNumberFromVolumeID(ctx context.Context, in *GetDiskNumberFromVolumeIDRequest, opts ...grpc.CallOption) (*GetDiskNumberFromVolumeIDResponse, error) { + out := new(GetDiskNumberFromVolumeIDResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/GetDiskNumberFromVolumeID", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) GetVolumeIDFromTargetPath(ctx context.Context, in *GetVolumeIDFromTargetPathRequest, opts ...grpc.CallOption) (*GetVolumeIDFromTargetPathResponse, error) { + out := new(GetVolumeIDFromTargetPathResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/GetVolumeIDFromTargetPath", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) WriteVolumeCache(ctx context.Context, in *WriteVolumeCacheRequest, opts ...grpc.CallOption) (*WriteVolumeCacheResponse, error) { + out := new(WriteVolumeCacheResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/WriteVolumeCache", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VolumeServer is the server API for Volume service. +type VolumeServer interface { + // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for all volumes from a + // given disk number and partition number (optional) + ListVolumesOnDisk(context.Context, *ListVolumesOnDiskRequest) (*ListVolumesOnDiskResponse, error) + // MountVolume mounts the volume at the requested global staging path. + MountVolume(context.Context, *MountVolumeRequest) (*MountVolumeResponse, error) + // UnmountVolume flushes data cache to disk and removes the global staging path. + UnmountVolume(context.Context, *UnmountVolumeRequest) (*UnmountVolumeResponse, error) + // IsVolumeFormatted checks if a volume is formatted. + IsVolumeFormatted(context.Context, *IsVolumeFormattedRequest) (*IsVolumeFormattedResponse, error) + // FormatVolume formats a volume with NTFS. + FormatVolume(context.Context, *FormatVolumeRequest) (*FormatVolumeResponse, error) + // ResizeVolume performs resizing of the partition and file system for a block based volume. + ResizeVolume(context.Context, *ResizeVolumeRequest) (*ResizeVolumeResponse, error) + // GetVolumeStats gathers total bytes and used bytes for a volume. + GetVolumeStats(context.Context, *GetVolumeStatsRequest) (*GetVolumeStatsResponse, error) + // GetDiskNumberFromVolumeID gets the disk number of the disk where the volume is located. + GetDiskNumberFromVolumeID(context.Context, *GetDiskNumberFromVolumeIDRequest) (*GetDiskNumberFromVolumeIDResponse, error) + // GetVolumeIDFromTargetPath gets the volume id for a given target path. + GetVolumeIDFromTargetPath(context.Context, *GetVolumeIDFromTargetPathRequest) (*GetVolumeIDFromTargetPathResponse, error) + // WriteVolumeCache write volume cache to disk. + WriteVolumeCache(context.Context, *WriteVolumeCacheRequest) (*WriteVolumeCacheResponse, error) +} + +// UnimplementedVolumeServer can be embedded to have forward compatible implementations. +type UnimplementedVolumeServer struct { +} + +func (*UnimplementedVolumeServer) ListVolumesOnDisk(context.Context, *ListVolumesOnDiskRequest) (*ListVolumesOnDiskResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListVolumesOnDisk not implemented") +} +func (*UnimplementedVolumeServer) MountVolume(context.Context, *MountVolumeRequest) (*MountVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MountVolume not implemented") +} +func (*UnimplementedVolumeServer) UnmountVolume(context.Context, *UnmountVolumeRequest) (*UnmountVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnmountVolume not implemented") +} +func (*UnimplementedVolumeServer) IsVolumeFormatted(context.Context, *IsVolumeFormattedRequest) (*IsVolumeFormattedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsVolumeFormatted not implemented") +} +func (*UnimplementedVolumeServer) FormatVolume(context.Context, *FormatVolumeRequest) (*FormatVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FormatVolume not implemented") +} +func (*UnimplementedVolumeServer) ResizeVolume(context.Context, *ResizeVolumeRequest) (*ResizeVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResizeVolume not implemented") +} +func (*UnimplementedVolumeServer) GetVolumeStats(context.Context, *GetVolumeStatsRequest) (*GetVolumeStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVolumeStats not implemented") +} +func (*UnimplementedVolumeServer) GetDiskNumberFromVolumeID(context.Context, *GetDiskNumberFromVolumeIDRequest) (*GetDiskNumberFromVolumeIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDiskNumberFromVolumeID not implemented") +} +func (*UnimplementedVolumeServer) GetVolumeIDFromTargetPath(context.Context, *GetVolumeIDFromTargetPathRequest) (*GetVolumeIDFromTargetPathResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVolumeIDFromTargetPath not implemented") +} +func (*UnimplementedVolumeServer) WriteVolumeCache(context.Context, *WriteVolumeCacheRequest) (*WriteVolumeCacheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteVolumeCache not implemented") +} + +func RegisterVolumeServer(s *grpc.Server, srv VolumeServer) { + s.RegisterService(&_Volume_serviceDesc, srv) +} + +func _Volume_ListVolumesOnDisk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListVolumesOnDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).ListVolumesOnDisk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/ListVolumesOnDisk", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).ListVolumesOnDisk(ctx, req.(*ListVolumesOnDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_MountVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MountVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).MountVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/MountVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).MountVolume(ctx, req.(*MountVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_UnmountVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnmountVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).UnmountVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/UnmountVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).UnmountVolume(ctx, req.(*UnmountVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_IsVolumeFormatted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsVolumeFormattedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).IsVolumeFormatted(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/IsVolumeFormatted", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).IsVolumeFormatted(ctx, req.(*IsVolumeFormattedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_FormatVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FormatVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).FormatVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/FormatVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).FormatVolume(ctx, req.(*FormatVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_ResizeVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResizeVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).ResizeVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/ResizeVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).ResizeVolume(ctx, req.(*ResizeVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_GetVolumeStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetVolumeStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).GetVolumeStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/GetVolumeStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).GetVolumeStats(ctx, req.(*GetVolumeStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_GetDiskNumberFromVolumeID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDiskNumberFromVolumeIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).GetDiskNumberFromVolumeID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/GetDiskNumberFromVolumeID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).GetDiskNumberFromVolumeID(ctx, req.(*GetDiskNumberFromVolumeIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_GetVolumeIDFromTargetPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetVolumeIDFromTargetPathRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).GetVolumeIDFromTargetPath(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/GetVolumeIDFromTargetPath", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).GetVolumeIDFromTargetPath(ctx, req.(*GetVolumeIDFromTargetPathRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_WriteVolumeCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteVolumeCacheRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).WriteVolumeCache(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/WriteVolumeCache", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).WriteVolumeCache(ctx, req.(*WriteVolumeCacheRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Volume_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v1.Volume", + HandlerType: (*VolumeServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListVolumesOnDisk", + Handler: _Volume_ListVolumesOnDisk_Handler, + }, + { + MethodName: "MountVolume", + Handler: _Volume_MountVolume_Handler, + }, + { + MethodName: "UnmountVolume", + Handler: _Volume_UnmountVolume_Handler, + }, + { + MethodName: "IsVolumeFormatted", + Handler: _Volume_IsVolumeFormatted_Handler, + }, + { + MethodName: "FormatVolume", + Handler: _Volume_FormatVolume_Handler, + }, + { + MethodName: "ResizeVolume", + Handler: _Volume_ResizeVolume_Handler, + }, + { + MethodName: "GetVolumeStats", + Handler: _Volume_GetVolumeStats_Handler, + }, + { + MethodName: "GetDiskNumberFromVolumeID", + Handler: _Volume_GetDiskNumberFromVolumeID_Handler, + }, + { + MethodName: "GetVolumeIDFromTargetPath", + Handler: _Volume_GetVolumeIDFromTargetPath_Handler, + }, + { + MethodName: "WriteVolumeCache", + Handler: _Volume_WriteVolumeCache_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto", +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto new file mode 100644 index 000000000..a06538104 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto @@ -0,0 +1,143 @@ +syntax = "proto3"; + +package v1; + +option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1"; + +service Volume { + // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for all volumes from a + // given disk number and partition number (optional) + rpc ListVolumesOnDisk(ListVolumesOnDiskRequest) returns (ListVolumesOnDiskResponse) {} + + // MountVolume mounts the volume at the requested global staging path. + rpc MountVolume(MountVolumeRequest) returns (MountVolumeResponse) {} + + // UnmountVolume flushes data cache to disk and removes the global staging path. + rpc UnmountVolume(UnmountVolumeRequest) returns (UnmountVolumeResponse) {} + + // IsVolumeFormatted checks if a volume is formatted. + rpc IsVolumeFormatted(IsVolumeFormattedRequest) returns (IsVolumeFormattedResponse) {} + + // FormatVolume formats a volume with NTFS. + rpc FormatVolume(FormatVolumeRequest) returns (FormatVolumeResponse) {} + + // ResizeVolume performs resizing of the partition and file system for a block based volume. + rpc ResizeVolume(ResizeVolumeRequest) returns (ResizeVolumeResponse) {} + + // GetVolumeStats gathers total bytes and used bytes for a volume. + rpc GetVolumeStats(GetVolumeStatsRequest) returns (GetVolumeStatsResponse) {} + + // GetDiskNumberFromVolumeID gets the disk number of the disk where the volume is located. + rpc GetDiskNumberFromVolumeID(GetDiskNumberFromVolumeIDRequest) returns (GetDiskNumberFromVolumeIDResponse ) {} + + // GetVolumeIDFromTargetPath gets the volume id for a given target path. + rpc GetVolumeIDFromTargetPath(GetVolumeIDFromTargetPathRequest) returns (GetVolumeIDFromTargetPathResponse) {} + + // WriteVolumeCache write volume cache to disk. + rpc WriteVolumeCache(WriteVolumeCacheRequest) returns (WriteVolumeCacheResponse) {} +} + +message ListVolumesOnDiskRequest { + // Disk device number of the disk to query for volumes. + uint32 disk_number = 1; + // The partition number (optional), by default it uses the first partition of the disk. + uint32 partition_number = 2; +} + +message ListVolumesOnDiskResponse { + // Volume device IDs of volumes on the specified disk. + repeated string volume_ids = 1; +} + +message MountVolumeRequest { + // Volume device ID of the volume to mount. + string volume_id = 1; + // Path in the host's file system where the volume needs to be mounted. + string target_path = 2; +} + +message MountVolumeResponse { + // Intentionally empty. +} + +message UnmountVolumeRequest { + // Volume device ID of the volume to dismount. + string volume_id = 1; + // Path where the volume has been mounted. + string target_path = 2; +} + +message UnmountVolumeResponse { + // Intentionally empty. +} + +message IsVolumeFormattedRequest { + // Volume device ID of the volume to check. + string volume_id = 1; +} + +message IsVolumeFormattedResponse { + // Is the volume formatted with NTFS. + bool formatted = 1; +} + +message FormatVolumeRequest { + // Volume device ID of the volume to format. + string volume_id = 1; +} + +message FormatVolumeResponse { + // Intentionally empty. +} + +message ResizeVolumeRequest { + // Volume device ID of the volume to resize. + string volume_id = 1; + // New size in bytes of the volume. + int64 size_bytes = 2; +} + +message ResizeVolumeResponse { + // Intentionally empty. +} + +message GetVolumeStatsRequest{ + // Volume device Id of the volume to get the stats for. + string volume_id = 1; +} + +message GetVolumeStatsResponse{ + // Total bytes + int64 total_bytes = 1; + // Used bytes + int64 used_bytes = 2; +} + +message GetDiskNumberFromVolumeIDRequest { + // Volume device ID of the volume to get the disk number for. + string volume_id = 1; +} + +message GetDiskNumberFromVolumeIDResponse { + // Corresponding disk number. + uint32 disk_number = 1; +} + +message GetVolumeIDFromTargetPathRequest { + // The target path. + string target_path = 1; +} + +message GetVolumeIDFromTargetPathResponse { + // The volume device ID. + string volume_id = 1; +} + +message WriteVolumeCacheRequest { + // Volume device ID of the volume to flush the cache. + string volume_id = 1; +} + +message WriteVolumeCacheResponse { + // Intentionally empty. +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/go.mod b/vendor/github.com/kubernetes-csi/csi-proxy/client/go.mod index 85501884a..5fedd0365 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/go.mod +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/go.mod @@ -1,11 +1,11 @@ module github.com/kubernetes-csi/csi-proxy/client -go 1.12 +go 1.16 require ( - github.com/Microsoft/go-winio v0.4.14 + github.com/Microsoft/go-winio v0.4.16 github.com/golang/protobuf v1.4.1 - github.com/pkg/errors v0.8.1 + github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.2.2 google.golang.org/grpc v1.27.0 google.golang.org/protobuf v1.25.0 diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/go.sum b/vendor/github.com/kubernetes-csi/csi-proxy/client/go.sum index 7b2beee32..a5931e299 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/go.sum +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/go.sum @@ -2,6 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -30,6 +32,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -56,6 +60,8 @@ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1cHUZgO1Ebq5r2hIjfo= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1/client_generated.go new file mode 100644 index 000000000..524814e95 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1/client_generated.go @@ -0,0 +1,94 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "net" + + "github.com/Microsoft/go-winio" + "github.com/kubernetes-csi/csi-proxy/client" + v1 "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1" + "github.com/kubernetes-csi/csi-proxy/client/apiversion" + "google.golang.org/grpc" +) + +// GroupName is the group name of this API. +const GroupName = "disk" + +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v1") + +type Client struct { + client v1.DiskClient + connection *grpc.ClientConn +} + +// NewClient returns a client to make calls to the disk API group version v1. +// It's the caller's responsibility to Close the client when done. +func NewClient() (*Client, error) { + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } + + connection, err := grpc.Dial(pipePath, + grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { + return winio.DialPipeContext(context, s) + }), + grpc.WithInsecure()) + if err != nil { + return nil, err + } + + client := v1.NewDiskClient(connection) + return &Client{ + client: client, + connection: connection, + }, nil +} + +// Close closes the client. It must be called before the client gets GC-ed. +func (w *Client) Close() error { + return w.connection.Close() +} + +// ensures we implement all the required methods +var _ v1.DiskClient = &Client{} + +func (w *Client) GetDiskState(context context.Context, request *v1.GetDiskStateRequest, opts ...grpc.CallOption) (*v1.GetDiskStateResponse, error) { + return w.client.GetDiskState(context, request, opts...) +} + +func (w *Client) GetDiskStats(context context.Context, request *v1.GetDiskStatsRequest, opts ...grpc.CallOption) (*v1.GetDiskStatsResponse, error) { + return w.client.GetDiskStats(context, request, opts...) +} + +func (w *Client) ListDiskIDs(context context.Context, request *v1.ListDiskIDsRequest, opts ...grpc.CallOption) (*v1.ListDiskIDsResponse, error) { + return w.client.ListDiskIDs(context, request, opts...) +} + +func (w *Client) ListDiskLocations(context context.Context, request *v1.ListDiskLocationsRequest, opts ...grpc.CallOption) (*v1.ListDiskLocationsResponse, error) { + return w.client.ListDiskLocations(context, request, opts...) +} + +func (w *Client) PartitionDisk(context context.Context, request *v1.PartitionDiskRequest, opts ...grpc.CallOption) (*v1.PartitionDiskResponse, error) { + return w.client.PartitionDisk(context, request, opts...) +} + +func (w *Client) Rescan(context context.Context, request *v1.RescanRequest, opts ...grpc.CallOption) (*v1.RescanResponse, error) { + return w.client.Rescan(context, request, opts...) +} + +func (w *Client) SetDiskState(context context.Context, request *v1.SetDiskStateRequest, opts ...grpc.CallOption) (*v1.SetDiskStateResponse, error) { + return w.client.SetDiskState(context, request, opts...) +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2/client_generated.go index a5e85d813..95866cde7 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2/client_generated.go +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2/client_generated.go @@ -13,9 +13,11 @@ import ( "google.golang.org/grpc" ) -const groupName = "disk" +// GroupName is the group name of this API. +const GroupName = "disk" -var version = apiversion.NewVersionOrPanic("v1beta2") +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v1beta2") type Client struct { client v1beta2.DiskClient @@ -25,7 +27,19 @@ type Client struct { // NewClient returns a client to make calls to the disk API group version v1beta2. // It's the caller's responsibility to Close the client when done. func NewClient() (*Client, error) { - pipePath := client.PipePath(groupName, version) + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } connection, err := grpc.Dial(pipePath, grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1/client_generated.go new file mode 100644 index 000000000..b3ffc7fa7 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1/client_generated.go @@ -0,0 +1,86 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "net" + + "github.com/Microsoft/go-winio" + "github.com/kubernetes-csi/csi-proxy/client" + v1 "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1" + "github.com/kubernetes-csi/csi-proxy/client/apiversion" + "google.golang.org/grpc" +) + +// GroupName is the group name of this API. +const GroupName = "filesystem" + +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v1") + +type Client struct { + client v1.FilesystemClient + connection *grpc.ClientConn +} + +// NewClient returns a client to make calls to the filesystem API group version v1. +// It's the caller's responsibility to Close the client when done. +func NewClient() (*Client, error) { + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } + + connection, err := grpc.Dial(pipePath, + grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { + return winio.DialPipeContext(context, s) + }), + grpc.WithInsecure()) + if err != nil { + return nil, err + } + + client := v1.NewFilesystemClient(connection) + return &Client{ + client: client, + connection: connection, + }, nil +} + +// Close closes the client. It must be called before the client gets GC-ed. +func (w *Client) Close() error { + return w.connection.Close() +} + +// ensures we implement all the required methods +var _ v1.FilesystemClient = &Client{} + +func (w *Client) CreateSymlink(context context.Context, request *v1.CreateSymlinkRequest, opts ...grpc.CallOption) (*v1.CreateSymlinkResponse, error) { + return w.client.CreateSymlink(context, request, opts...) +} + +func (w *Client) IsSymlink(context context.Context, request *v1.IsSymlinkRequest, opts ...grpc.CallOption) (*v1.IsSymlinkResponse, error) { + return w.client.IsSymlink(context, request, opts...) +} + +func (w *Client) Mkdir(context context.Context, request *v1.MkdirRequest, opts ...grpc.CallOption) (*v1.MkdirResponse, error) { + return w.client.Mkdir(context, request, opts...) +} + +func (w *Client) PathExists(context context.Context, request *v1.PathExistsRequest, opts ...grpc.CallOption) (*v1.PathExistsResponse, error) { + return w.client.PathExists(context, request, opts...) +} + +func (w *Client) Rmdir(context context.Context, request *v1.RmdirRequest, opts ...grpc.CallOption) (*v1.RmdirResponse, error) { + return w.client.Rmdir(context, request, opts...) +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1/client_generated.go index a68e86fa9..b75847250 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1/client_generated.go +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1/client_generated.go @@ -13,9 +13,11 @@ import ( "google.golang.org/grpc" ) -const groupName = "filesystem" +// GroupName is the group name of this API. +const GroupName = "filesystem" -var version = apiversion.NewVersionOrPanic("v1beta1") +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v1beta1") type Client struct { client v1beta1.FilesystemClient @@ -25,7 +27,19 @@ type Client struct { // NewClient returns a client to make calls to the filesystem API group version v1beta1. // It's the caller's responsibility to Close the client when done. func NewClient() (*Client, error) { - pipePath := client.PipePath(groupName, version) + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } connection, err := grpc.Dial(pipePath, grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1/client_generated.go new file mode 100644 index 000000000..659ed34b8 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1/client_generated.go @@ -0,0 +1,106 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "net" + + "github.com/Microsoft/go-winio" + "github.com/kubernetes-csi/csi-proxy/client" + v1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1" + "github.com/kubernetes-csi/csi-proxy/client/apiversion" + "google.golang.org/grpc" +) + +// GroupName is the group name of this API. +const GroupName = "volume" + +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v1") + +type Client struct { + client v1.VolumeClient + connection *grpc.ClientConn +} + +// NewClient returns a client to make calls to the volume API group version v1. +// It's the caller's responsibility to Close the client when done. +func NewClient() (*Client, error) { + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } + + connection, err := grpc.Dial(pipePath, + grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { + return winio.DialPipeContext(context, s) + }), + grpc.WithInsecure()) + if err != nil { + return nil, err + } + + client := v1.NewVolumeClient(connection) + return &Client{ + client: client, + connection: connection, + }, nil +} + +// Close closes the client. It must be called before the client gets GC-ed. +func (w *Client) Close() error { + return w.connection.Close() +} + +// ensures we implement all the required methods +var _ v1.VolumeClient = &Client{} + +func (w *Client) FormatVolume(context context.Context, request *v1.FormatVolumeRequest, opts ...grpc.CallOption) (*v1.FormatVolumeResponse, error) { + return w.client.FormatVolume(context, request, opts...) +} + +func (w *Client) GetDiskNumberFromVolumeID(context context.Context, request *v1.GetDiskNumberFromVolumeIDRequest, opts ...grpc.CallOption) (*v1.GetDiskNumberFromVolumeIDResponse, error) { + return w.client.GetDiskNumberFromVolumeID(context, request, opts...) +} + +func (w *Client) GetVolumeIDFromTargetPath(context context.Context, request *v1.GetVolumeIDFromTargetPathRequest, opts ...grpc.CallOption) (*v1.GetVolumeIDFromTargetPathResponse, error) { + return w.client.GetVolumeIDFromTargetPath(context, request, opts...) +} + +func (w *Client) GetVolumeStats(context context.Context, request *v1.GetVolumeStatsRequest, opts ...grpc.CallOption) (*v1.GetVolumeStatsResponse, error) { + return w.client.GetVolumeStats(context, request, opts...) +} + +func (w *Client) IsVolumeFormatted(context context.Context, request *v1.IsVolumeFormattedRequest, opts ...grpc.CallOption) (*v1.IsVolumeFormattedResponse, error) { + return w.client.IsVolumeFormatted(context, request, opts...) +} + +func (w *Client) ListVolumesOnDisk(context context.Context, request *v1.ListVolumesOnDiskRequest, opts ...grpc.CallOption) (*v1.ListVolumesOnDiskResponse, error) { + return w.client.ListVolumesOnDisk(context, request, opts...) +} + +func (w *Client) MountVolume(context context.Context, request *v1.MountVolumeRequest, opts ...grpc.CallOption) (*v1.MountVolumeResponse, error) { + return w.client.MountVolume(context, request, opts...) +} + +func (w *Client) ResizeVolume(context context.Context, request *v1.ResizeVolumeRequest, opts ...grpc.CallOption) (*v1.ResizeVolumeResponse, error) { + return w.client.ResizeVolume(context, request, opts...) +} + +func (w *Client) UnmountVolume(context context.Context, request *v1.UnmountVolumeRequest, opts ...grpc.CallOption) (*v1.UnmountVolumeResponse, error) { + return w.client.UnmountVolume(context, request, opts...) +} + +func (w *Client) WriteVolumeCache(context context.Context, request *v1.WriteVolumeCacheRequest, opts ...grpc.CallOption) (*v1.WriteVolumeCacheResponse, error) { + return w.client.WriteVolumeCache(context, request, opts...) +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta1/client_generated.go index 8e3d2e804..9fca55dce 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta1/client_generated.go +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta1/client_generated.go @@ -13,9 +13,11 @@ import ( "google.golang.org/grpc" ) -const groupName = "volume" +// GroupName is the group name of this API. +const GroupName = "volume" -var version = apiversion.NewVersionOrPanic("v1beta1") +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v1beta1") type Client struct { client v1beta1.VolumeClient @@ -25,7 +27,19 @@ type Client struct { // NewClient returns a client to make calls to the volume API group version v1beta1. // It's the caller's responsibility to Close the client when done. func NewClient() (*Client, error) { - pipePath := client.PipePath(groupName, version) + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } connection, err := grpc.Dial(pipePath, grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { diff --git a/vendor/github.com/pkg/errors/.travis.yml b/vendor/github.com/pkg/errors/.travis.yml index d4b92663b..9159de03e 100644 --- a/vendor/github.com/pkg/errors/.travis.yml +++ b/vendor/github.com/pkg/errors/.travis.yml @@ -1,15 +1,10 @@ language: go go_import_path: github.com/pkg/errors go: - - 1.4.x - - 1.5.x - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - - 1.10.x - 1.11.x + - 1.12.x + - 1.13.x - tip script: - - go test -v ./... + - make check diff --git a/vendor/github.com/pkg/errors/Makefile b/vendor/github.com/pkg/errors/Makefile new file mode 100644 index 000000000..ce9d7cded --- /dev/null +++ b/vendor/github.com/pkg/errors/Makefile @@ -0,0 +1,44 @@ +PKGS := github.com/pkg/errors +SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) +GO := go + +check: test vet gofmt misspell unconvert staticcheck ineffassign unparam + +test: + $(GO) test $(PKGS) + +vet: | test + $(GO) vet $(PKGS) + +staticcheck: + $(GO) get honnef.co/go/tools/cmd/staticcheck + staticcheck -checks all $(PKGS) + +misspell: + $(GO) get github.com/client9/misspell/cmd/misspell + misspell \ + -locale GB \ + -error \ + *.md *.go + +unconvert: + $(GO) get github.com/mdempsky/unconvert + unconvert -v $(PKGS) + +ineffassign: + $(GO) get github.com/gordonklaus/ineffassign + find $(SRCDIRS) -name '*.go' | xargs ineffassign + +pedantic: check errcheck + +unparam: + $(GO) get mvdan.cc/unparam + unparam ./... + +errcheck: + $(GO) get github.com/kisielk/errcheck + errcheck $(PKGS) + +gofmt: + @echo Checking code is gofmted + @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" diff --git a/vendor/github.com/pkg/errors/README.md b/vendor/github.com/pkg/errors/README.md index 6483ba2af..54dfdcb12 100644 --- a/vendor/github.com/pkg/errors/README.md +++ b/vendor/github.com/pkg/errors/README.md @@ -41,11 +41,18 @@ default: [Read the package documentation for more information](https://godoc.org/github.com/pkg/errors). +## Roadmap + +With the upcoming [Go2 error proposals](https://go.googlesource.com/proposal/+/master/design/go2draft.md) this package is moving into maintenance mode. The roadmap for a 1.0 release is as follows: + +- 0.9. Remove pre Go 1.9 and Go 1.10 support, address outstanding pull requests (if possible) +- 1.0. Final release. + ## Contributing -We welcome pull requests, bug fixes and issue reports. With that said, the bar for adding new symbols to this package is intentionally set high. +Because of the Go2 errors changes, this package is not accepting proposals for new functionality. With that said, we welcome pull requests, bug fixes and issue reports. -Before proposing a change, please discuss your change by raising an issue. +Before sending a PR, please discuss your change by raising an issue. ## License diff --git a/vendor/github.com/pkg/errors/errors.go b/vendor/github.com/pkg/errors/errors.go index 7421f326f..161aea258 100644 --- a/vendor/github.com/pkg/errors/errors.go +++ b/vendor/github.com/pkg/errors/errors.go @@ -82,7 +82,7 @@ // // if err, ok := err.(stackTracer); ok { // for _, f := range err.StackTrace() { -// fmt.Printf("%+s:%d", f) +// fmt.Printf("%+s:%d\n", f, f) // } // } // @@ -159,6 +159,9 @@ type withStack struct { func (w *withStack) Cause() error { return w.error } +// Unwrap provides compatibility for Go 1.13 error chains. +func (w *withStack) Unwrap() error { return w.error } + func (w *withStack) Format(s fmt.State, verb rune) { switch verb { case 'v': @@ -241,6 +244,9 @@ type withMessage struct { func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() } func (w *withMessage) Cause() error { return w.cause } +// Unwrap provides compatibility for Go 1.13 error chains. +func (w *withMessage) Unwrap() error { return w.cause } + func (w *withMessage) Format(s fmt.State, verb rune) { switch verb { case 'v': diff --git a/vendor/github.com/pkg/errors/go113.go b/vendor/github.com/pkg/errors/go113.go new file mode 100644 index 000000000..be0d10d0c --- /dev/null +++ b/vendor/github.com/pkg/errors/go113.go @@ -0,0 +1,38 @@ +// +build go1.13 + +package errors + +import ( + stderrors "errors" +) + +// Is reports whether any error in err's chain matches target. +// +// The chain consists of err itself followed by the sequence of errors obtained by +// repeatedly calling Unwrap. +// +// An error is considered to match a target if it is equal to that target or if +// it implements a method Is(error) bool such that Is(target) returns true. +func Is(err, target error) bool { return stderrors.Is(err, target) } + +// As finds the first error in err's chain that matches target, and if so, sets +// target to that error value and returns true. +// +// The chain consists of err itself followed by the sequence of errors obtained by +// repeatedly calling Unwrap. +// +// An error matches target if the error's concrete value is assignable to the value +// pointed to by target, or if the error has a method As(interface{}) bool such that +// As(target) returns true. In the latter case, the As method is responsible for +// setting target. +// +// As will panic if target is not a non-nil pointer to either a type that implements +// error, or to any interface type. As returns false if err is nil. +func As(err error, target interface{}) bool { return stderrors.As(err, target) } + +// Unwrap returns the result of calling the Unwrap method on err, if err's +// type contains an Unwrap method returning error. +// Otherwise, Unwrap returns nil. +func Unwrap(err error) error { + return stderrors.Unwrap(err) +} diff --git a/vendor/github.com/pkg/errors/stack.go b/vendor/github.com/pkg/errors/stack.go index 2874a048c..779a8348f 100644 --- a/vendor/github.com/pkg/errors/stack.go +++ b/vendor/github.com/pkg/errors/stack.go @@ -5,10 +5,13 @@ import ( "io" "path" "runtime" + "strconv" "strings" ) // Frame represents a program counter inside a stack frame. +// For historical reasons if Frame is interpreted as a uintptr +// its value represents the program counter + 1. type Frame uintptr // pc returns the program counter for this frame; @@ -37,6 +40,15 @@ func (f Frame) line() int { return line } +// name returns the name of this function, if known. +func (f Frame) name() string { + fn := runtime.FuncForPC(f.pc()) + if fn == nil { + return "unknown" + } + return fn.Name() +} + // Format formats the frame according to the fmt.Formatter interface. // // %s source file @@ -54,22 +66,16 @@ func (f Frame) Format(s fmt.State, verb rune) { case 's': switch { case s.Flag('+'): - pc := f.pc() - fn := runtime.FuncForPC(pc) - if fn == nil { - io.WriteString(s, "unknown") - } else { - file, _ := fn.FileLine(pc) - fmt.Fprintf(s, "%s\n\t%s", fn.Name(), file) - } + io.WriteString(s, f.name()) + io.WriteString(s, "\n\t") + io.WriteString(s, f.file()) default: io.WriteString(s, path.Base(f.file())) } case 'd': - fmt.Fprintf(s, "%d", f.line()) + io.WriteString(s, strconv.Itoa(f.line())) case 'n': - name := runtime.FuncForPC(f.pc()).Name() - io.WriteString(s, funcname(name)) + io.WriteString(s, funcname(f.name())) case 'v': f.Format(s, 's') io.WriteString(s, ":") @@ -77,6 +83,16 @@ func (f Frame) Format(s fmt.State, verb rune) { } } +// MarshalText formats a stacktrace Frame as a text string. The output is the +// same as that of fmt.Sprintf("%+v", f), but without newlines or tabs. +func (f Frame) MarshalText() ([]byte, error) { + name := f.name() + if name == "unknown" { + return []byte(name), nil + } + return []byte(fmt.Sprintf("%s %s:%d", name, f.file(), f.line())), nil +} + // StackTrace is stack of Frames from innermost (newest) to outermost (oldest). type StackTrace []Frame @@ -94,16 +110,30 @@ func (st StackTrace) Format(s fmt.State, verb rune) { switch { case s.Flag('+'): for _, f := range st { - fmt.Fprintf(s, "\n%+v", f) + io.WriteString(s, "\n") + f.Format(s, verb) } case s.Flag('#'): fmt.Fprintf(s, "%#v", []Frame(st)) default: - fmt.Fprintf(s, "%v", []Frame(st)) + st.formatSlice(s, verb) } case 's': - fmt.Fprintf(s, "%s", []Frame(st)) + st.formatSlice(s, verb) + } +} + +// formatSlice will format this StackTrace into the given buffer as a slice of +// Frame, only valid when called with '%s' or '%v'. +func (st StackTrace) formatSlice(s fmt.State, verb rune) { + io.WriteString(s, "[") + for i, f := range st { + if i > 0 { + io.WriteString(s, " ") + } + f.Format(s, verb) } + io.WriteString(s, "]") } // stack represents a stack of program counters. diff --git a/vendor/k8s.io/utils/exec/README.md b/vendor/k8s.io/utils/exec/README.md new file mode 100644 index 000000000..7944e8dd3 --- /dev/null +++ b/vendor/k8s.io/utils/exec/README.md @@ -0,0 +1,5 @@ +# Exec + +This package provides an interface for `os/exec`. It makes it easier to mock +and replace in tests, especially with the [FakeExec](testing/fake_exec.go) +struct. diff --git a/vendor/k8s.io/utils/io/README.md b/vendor/k8s.io/utils/io/README.md new file mode 100644 index 000000000..aa4cc4104 --- /dev/null +++ b/vendor/k8s.io/utils/io/README.md @@ -0,0 +1,4 @@ +# IO + +This package provides interfaces for working with file IO. Currently it +provides functionality for consistently reading a file. diff --git a/vendor/k8s.io/utils/mount/OWNERS b/vendor/k8s.io/utils/mount/OWNERS deleted file mode 100644 index aacc6685b..000000000 --- a/vendor/k8s.io/utils/mount/OWNERS +++ /dev/null @@ -1,15 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -reviewers: - - jingxu97 - - saad-ali - - jsafrane - - msau42 - - andyzhangx - - gnufied -approvers: - - andyzhangx - - jingxu97 - - saad-ali - - jsafrane - diff --git a/vendor/k8s.io/utils/mount/doc.go b/vendor/k8s.io/utils/mount/doc.go deleted file mode 100644 index c81b426ce..000000000 --- a/vendor/k8s.io/utils/mount/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package mount defines an interface to mounting filesystems. -package mount // import "k8s.io/utils/mount" diff --git a/vendor/k8s.io/utils/mount/fake_mounter.go b/vendor/k8s.io/utils/mount/fake_mounter.go deleted file mode 100644 index f48c2badb..000000000 --- a/vendor/k8s.io/utils/mount/fake_mounter.go +++ /dev/null @@ -1,216 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mount - -import ( - "os" - "path/filepath" - "sync" - - "k8s.io/klog/v2" -) - -// FakeMounter implements mount.Interface for tests. -type FakeMounter struct { - MountPoints []MountPoint - log []FakeAction - // Error to return for a path when calling IsLikelyNotMountPoint - MountCheckErrors map[string]error - // Some tests run things in parallel, make sure the mounter does not produce - // any golang's DATA RACE warnings. - mutex sync.Mutex - UnmountFunc UnmountFunc -} - -// UnmountFunc is a function callback to be executed during the Unmount() call. -type UnmountFunc func(path string) error - -var _ Interface = &FakeMounter{} - -const ( - // FakeActionMount is the string for specifying mount as FakeAction.Action - FakeActionMount = "mount" - // FakeActionUnmount is the string for specifying unmount as FakeAction.Action - FakeActionUnmount = "unmount" -) - -// FakeAction objects are logged every time a fake mount or unmount is called. -type FakeAction struct { - Action string // "mount" or "unmount" - Target string // applies to both mount and unmount actions - Source string // applies only to "mount" actions - FSType string // applies only to "mount" actions -} - -// NewFakeMounter returns a FakeMounter struct that implements Interface and is -// suitable for testing purposes. -func NewFakeMounter(mps []MountPoint) *FakeMounter { - return &FakeMounter{ - MountPoints: mps, - } -} - -// ResetLog clears all the log entries in FakeMounter -func (f *FakeMounter) ResetLog() { - f.mutex.Lock() - defer f.mutex.Unlock() - - f.log = []FakeAction{} -} - -// GetLog returns the slice of FakeActions taken by the mounter -func (f *FakeMounter) GetLog() []FakeAction { - f.mutex.Lock() - defer f.mutex.Unlock() - - return f.log -} - -// Mount records the mount event and updates the in-memory mount points for FakeMounter -func (f *FakeMounter) Mount(source string, target string, fstype string, options []string) error { - return f.MountSensitive(source, target, fstype, options, nil /* sensitiveOptions */) -} - -// Mount records the mount event and updates the in-memory mount points for FakeMounter -// sensitiveOptions to be passed in a separate parameter from the normal -// mount options and ensures the sensitiveOptions are never logged. This -// method should be used by callers that pass sensitive material (like -// passwords) as mount options. -func (f *FakeMounter) MountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - f.mutex.Lock() - defer f.mutex.Unlock() - - opts := []string{} - - for _, option := range options { - // find 'bind' option - if option == "bind" { - // This is a bind-mount. In order to mimic linux behaviour, we must - // use the original device of the bind-mount as the real source. - // E.g. when mounted /dev/sda like this: - // $ mount /dev/sda /mnt/test - // $ mount -o bind /mnt/test /mnt/bound - // then /proc/mount contains: - // /dev/sda /mnt/test - // /dev/sda /mnt/bound - // (and not /mnt/test /mnt/bound) - // I.e. we must use /dev/sda as source instead of /mnt/test in the - // bind mount. - for _, mnt := range f.MountPoints { - if source == mnt.Path { - source = mnt.Device - break - } - } - } - // reuse MountPoint.Opts field to mark mount as readonly - opts = append(opts, option) - } - - // If target is a symlink, get its absolute path - absTarget, err := filepath.EvalSymlinks(target) - if err != nil { - absTarget = target - } - f.MountPoints = append(f.MountPoints, MountPoint{Device: source, Path: absTarget, Type: fstype, Opts: append(opts, sensitiveOptions...)}) - klog.V(5).Infof("Fake mounter: mounted %s to %s", source, absTarget) - f.log = append(f.log, FakeAction{Action: FakeActionMount, Target: absTarget, Source: source, FSType: fstype}) - return nil -} - -// Unmount records the unmount event and updates the in-memory mount points for FakeMounter -func (f *FakeMounter) Unmount(target string) error { - f.mutex.Lock() - defer f.mutex.Unlock() - - // If target is a symlink, get its absolute path - absTarget, err := filepath.EvalSymlinks(target) - if err != nil { - absTarget = target - } - - newMountpoints := []MountPoint{} - for _, mp := range f.MountPoints { - if mp.Path == absTarget { - if f.UnmountFunc != nil { - err := f.UnmountFunc(absTarget) - if err != nil { - return err - } - } - klog.V(5).Infof("Fake mounter: unmounted %s from %s", mp.Device, absTarget) - // Don't copy it to newMountpoints - continue - } - newMountpoints = append(newMountpoints, MountPoint{Device: mp.Device, Path: mp.Path, Type: mp.Type}) - } - f.MountPoints = newMountpoints - f.log = append(f.log, FakeAction{Action: FakeActionUnmount, Target: absTarget}) - delete(f.MountCheckErrors, target) - return nil -} - -// List returns all the in-memory mountpoints for FakeMounter -func (f *FakeMounter) List() ([]MountPoint, error) { - f.mutex.Lock() - defer f.mutex.Unlock() - - return f.MountPoints, nil -} - -// IsLikelyNotMountPoint determines whether a path is a mountpoint by checking -// if the absolute path to file is in the in-memory mountpoints -func (f *FakeMounter) IsLikelyNotMountPoint(file string) (bool, error) { - f.mutex.Lock() - defer f.mutex.Unlock() - - err := f.MountCheckErrors[file] - if err != nil { - return false, err - } - - _, err = os.Stat(file) - if err != nil { - return true, err - } - - // If file is a symlink, get its absolute path - absFile, err := filepath.EvalSymlinks(file) - if err != nil { - absFile = file - } - - for _, mp := range f.MountPoints { - if mp.Path == absFile { - klog.V(5).Infof("isLikelyNotMountPoint for %s: mounted %s, false", file, mp.Path) - return false, nil - } - } - klog.V(5).Infof("isLikelyNotMountPoint for %s: true", file) - return true, nil -} - -// GetMountRefs finds all mount references to the path, returns a -// list of paths. -func (f *FakeMounter) GetMountRefs(pathname string) ([]string, error) { - realpath, err := filepath.EvalSymlinks(pathname) - if err != nil { - // Ignore error in FakeMounter, because we actually didn't create files. - realpath = pathname - } - return getMountRefsByDev(f, realpath) -} diff --git a/vendor/k8s.io/utils/mount/mount.go b/vendor/k8s.io/utils/mount/mount.go deleted file mode 100644 index 14997a75c..000000000 --- a/vendor/k8s.io/utils/mount/mount.go +++ /dev/null @@ -1,370 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// TODO(thockin): This whole pkg is pretty linux-centric. As soon as we have -// an alternate platform, we will need to abstract further. - -package mount - -import ( - "fmt" - "os" - "path/filepath" - "strings" - - utilexec "k8s.io/utils/exec" -) - -const ( - // Default mount command if mounter path is not specified. - defaultMountCommand = "mount" - // Log message where sensitive mount options were removed - sensitiveOptionsRemoved = "" -) - -// Interface defines the set of methods to allow for mount operations on a system. -type Interface interface { - // Mount mounts source to target as fstype with given options. - // options MUST not contain sensitive material (like passwords). - Mount(source string, target string, fstype string, options []string) error - // MountSensitive is the same as Mount() but this method allows - // sensitiveOptions to be passed in a separate parameter from the normal - // mount options and ensures the sensitiveOptions are never logged. This - // method should be used by callers that pass sensitive material (like - // passwords) as mount options. - MountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error - // Unmount unmounts given target. - Unmount(target string) error - // List returns a list of all mounted filesystems. This can be large. - // On some platforms, reading mounts directly from the OS is not guaranteed - // consistent (i.e. it could change between chunked reads). This is guaranteed - // to be consistent. - List() ([]MountPoint, error) - // IsLikelyNotMountPoint uses heuristics to determine if a directory - // is not a mountpoint. - // It should return ErrNotExist when the directory does not exist. - // IsLikelyNotMountPoint does NOT properly detect all mountpoint types - // most notably linux bind mounts and symbolic link. For callers that do not - // care about such situations, this is a faster alternative to calling List() - // and scanning that output. - IsLikelyNotMountPoint(file string) (bool, error) - // GetMountRefs finds all mount references to pathname, returning a slice of - // paths. Pathname can be a mountpoint path or a normal directory - // (for bind mount). On Linux, pathname is excluded from the slice. - // For example, if /dev/sdc was mounted at /path/a and /path/b, - // GetMountRefs("/path/a") would return ["/path/b"] - // GetMountRefs("/path/b") would return ["/path/a"] - // On Windows there is no way to query all mount points; as long as pathname is - // a valid mount, it will be returned. - GetMountRefs(pathname string) ([]string, error) -} - -// Compile-time check to ensure all Mounter implementations satisfy -// the mount interface. -var _ Interface = &Mounter{} - -// MountPoint represents a single line in /proc/mounts or /etc/fstab. -type MountPoint struct { // nolint: golint - Device string - Path string - Type string - Opts []string // Opts may contain sensitive mount options (like passwords) and MUST be treated as such (e.g. not logged). - Freq int - Pass int -} - -type MountErrorType string // nolint: golint - -const ( - FilesystemMismatch MountErrorType = "FilesystemMismatch" - HasFilesystemErrors MountErrorType = "HasFilesystemErrors" - UnformattedReadOnly MountErrorType = "UnformattedReadOnly" - FormatFailed MountErrorType = "FormatFailed" - GetDiskFormatFailed MountErrorType = "GetDiskFormatFailed" - UnknownMountError MountErrorType = "UnknownMountError" -) - -type MountError struct { // nolint: golint - Type MountErrorType - Message string -} - -func (mountError MountError) String() string { - return mountError.Message -} - -func (mountError MountError) Error() string { - return mountError.Message -} - -func NewMountError(mountErrorValue MountErrorType, format string, args ...interface{}) error { - mountError := MountError{ - Type: mountErrorValue, - Message: fmt.Sprintf(format, args...), - } - return mountError -} - -// SafeFormatAndMount probes a device to see if it is formatted. -// Namely it checks to see if a file system is present. If so it -// mounts it otherwise the device is formatted first then mounted. -type SafeFormatAndMount struct { - Interface - Exec utilexec.Interface -} - -// FormatAndMount formats the given disk, if needed, and mounts it. -// That is if the disk is not formatted and it is not being mounted as -// read-only it will format it first then mount it. Otherwise, if the -// disk is already formatted or it is being mounted as read-only, it -// will be mounted without formatting. -// options MUST not contain sensitive material (like passwords). -func (mounter *SafeFormatAndMount) FormatAndMount(source string, target string, fstype string, options []string) error { - return mounter.FormatAndMountSensitive(source, target, fstype, options, nil /* sensitiveOptions */) -} - -// FormatAndMountSensitive is the same as FormatAndMount but this method allows -// sensitiveOptions to be passed in a separate parameter from the normal mount -// options and ensures the sensitiveOptions are never logged. This method should -// be used by callers that pass sensitive material (like passwords) as mount -// options. -func (mounter *SafeFormatAndMount) FormatAndMountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - return mounter.formatAndMountSensitive(source, target, fstype, options, sensitiveOptions) -} - -// getMountRefsByDev finds all references to the device provided -// by mountPath; returns a list of paths. -// Note that mountPath should be path after the evaluation of any symblolic links. -func getMountRefsByDev(mounter Interface, mountPath string) ([]string, error) { - mps, err := mounter.List() - if err != nil { - return nil, err - } - - // Finding the device mounted to mountPath. - diskDev := "" - for i := range mps { - if mountPath == mps[i].Path { - diskDev = mps[i].Device - break - } - } - - // Find all references to the device. - var refs []string - for i := range mps { - if mps[i].Device == diskDev || mps[i].Device == mountPath { - if mps[i].Path != mountPath { - refs = append(refs, mps[i].Path) - } - } - } - return refs, nil -} - -// GetDeviceNameFromMount given a mnt point, find the device from /proc/mounts -// returns the device name, reference count, and error code. -func GetDeviceNameFromMount(mounter Interface, mountPath string) (string, int, error) { - mps, err := mounter.List() - if err != nil { - return "", 0, err - } - - // Find the device name. - // FIXME if multiple devices mounted on the same mount path, only the first one is returned. - device := "" - // If mountPath is symlink, need get its target path. - slTarget, err := filepath.EvalSymlinks(mountPath) - if err != nil { - slTarget = mountPath - } - for i := range mps { - if mps[i].Path == slTarget { - device = mps[i].Device - break - } - } - - // Find all references to the device. - refCount := 0 - for i := range mps { - if mps[i].Device == device { - refCount++ - } - } - return device, refCount, nil -} - -// IsNotMountPoint determines if a directory is a mountpoint. -// It should return ErrNotExist when the directory does not exist. -// IsNotMountPoint is more expensive than IsLikelyNotMountPoint. -// IsNotMountPoint detects bind mounts in linux. -// IsNotMountPoint enumerates all the mountpoints using List() and -// the list of mountpoints may be large, then it uses -// isMountPointMatch to evaluate whether the directory is a mountpoint. -func IsNotMountPoint(mounter Interface, file string) (bool, error) { - // IsLikelyNotMountPoint provides a quick check - // to determine whether file IS A mountpoint. - notMnt, notMntErr := mounter.IsLikelyNotMountPoint(file) - if notMntErr != nil && os.IsPermission(notMntErr) { - // We were not allowed to do the simple stat() check, e.g. on NFS with - // root_squash. Fall back to /proc/mounts check below. - notMnt = true - notMntErr = nil - } - if notMntErr != nil { - return notMnt, notMntErr - } - // identified as mountpoint, so return this fact. - if notMnt == false { - return notMnt, nil - } - - // Resolve any symlinks in file, kernel would do the same and use the resolved path in /proc/mounts. - resolvedFile, err := filepath.EvalSymlinks(file) - if err != nil { - return true, err - } - - // check all mountpoints since IsLikelyNotMountPoint - // is not reliable for some mountpoint types. - mountPoints, mountPointsErr := mounter.List() - if mountPointsErr != nil { - return notMnt, mountPointsErr - } - for _, mp := range mountPoints { - if isMountPointMatch(mp, resolvedFile) { - notMnt = false - break - } - } - return notMnt, nil -} - -// MakeBindOpts detects whether a bind mount is being requested and makes the remount options to -// use in case of bind mount, due to the fact that bind mount doesn't respect mount options. -// The list equals: -// options - 'bind' + 'remount' (no duplicate) -func MakeBindOpts(options []string) (bool, []string, []string) { - bind, bindOpts, bindRemountOpts, _ := MakeBindOptsSensitive(options, nil /* sensitiveOptions */) - return bind, bindOpts, bindRemountOpts -} - -// MakeBindOptsSensitive is the same as MakeBindOpts but this method allows -// sensitiveOptions to be passed in a separate parameter from the normal mount -// options and ensures the sensitiveOptions are never logged. This method should -// be used by callers that pass sensitive material (like passwords) as mount -// options. -func MakeBindOptsSensitive(options []string, sensitiveOptions []string) (bool, []string, []string, []string) { - // Because we have an FD opened on the subpath bind mount, the "bind" option - // needs to be included, otherwise the mount target will error as busy if you - // remount as readonly. - // - // As a consequence, all read only bind mounts will no longer change the underlying - // volume mount to be read only. - bindRemountOpts := []string{"bind", "remount"} - bindRemountSensitiveOpts := []string{} - bind := false - bindOpts := []string{"bind"} - - // _netdev is a userspace mount option and does not automatically get added when - // bind mount is created and hence we must carry it over. - if checkForNetDev(options, sensitiveOptions) { - bindOpts = append(bindOpts, "_netdev") - } - - for _, option := range options { - switch option { - case "bind": - bind = true - break - case "remount": - break - default: - bindRemountOpts = append(bindRemountOpts, option) - } - } - - for _, sensitiveOption := range sensitiveOptions { - switch sensitiveOption { - case "bind": - bind = true - break - case "remount": - break - default: - bindRemountSensitiveOpts = append(bindRemountSensitiveOpts, sensitiveOption) - } - } - - return bind, bindOpts, bindRemountOpts, bindRemountSensitiveOpts -} - -func checkForNetDev(options []string, sensitiveOptions []string) bool { - for _, option := range options { - if option == "_netdev" { - return true - } - } - for _, sensitiveOption := range sensitiveOptions { - if sensitiveOption == "_netdev" { - return true - } - } - return false -} - -// PathWithinBase checks if give path is within given base directory. -func PathWithinBase(fullPath, basePath string) bool { - rel, err := filepath.Rel(basePath, fullPath) - if err != nil { - return false - } - if StartsWithBackstep(rel) { - // Needed to escape the base path. - return false - } - return true -} - -// StartsWithBackstep checks if the given path starts with a backstep segment. -func StartsWithBackstep(rel string) bool { - // normalize to / and check for ../ - return rel == ".." || strings.HasPrefix(filepath.ToSlash(rel), "../") -} - -// sanitizedOptionsForLogging will return a comma separated string containing -// options and sensitiveOptions. Each entry in sensitiveOptions will be -// replaced with the string sensitiveOptionsRemoved -// e.g. o1,o2,, -func sanitizedOptionsForLogging(options []string, sensitiveOptions []string) string { - separator := "" - if len(options) > 0 && len(sensitiveOptions) > 0 { - separator = "," - } - - sensitiveOptionsStart := "" - sensitiveOptionsEnd := "" - if len(sensitiveOptions) > 0 { - sensitiveOptionsStart = strings.Repeat(sensitiveOptionsRemoved+",", len(sensitiveOptions)-1) - sensitiveOptionsEnd = sensitiveOptionsRemoved - } - - return strings.Join(options, ",") + - separator + - sensitiveOptionsStart + - sensitiveOptionsEnd -} diff --git a/vendor/k8s.io/utils/mount/mount_helper_common.go b/vendor/k8s.io/utils/mount/mount_helper_common.go deleted file mode 100644 index 1d40549b5..000000000 --- a/vendor/k8s.io/utils/mount/mount_helper_common.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mount - -import ( - "fmt" - "os" - - "k8s.io/klog/v2" -) - -// CleanupMountPoint unmounts the given path and deletes the remaining directory -// if successful. If extensiveMountPointCheck is true IsNotMountPoint will be -// called instead of IsLikelyNotMountPoint. IsNotMountPoint is more expensive -// but properly handles bind mounts within the same fs. -func CleanupMountPoint(mountPath string, mounter Interface, extensiveMountPointCheck bool) error { - pathExists, pathErr := PathExists(mountPath) - if !pathExists { - klog.Warningf("Warning: Unmount skipped because path does not exist: %v", mountPath) - return nil - } - corruptedMnt := IsCorruptedMnt(pathErr) - if pathErr != nil && !corruptedMnt { - return fmt.Errorf("Error checking path: %v", pathErr) - } - return doCleanupMountPoint(mountPath, mounter, extensiveMountPointCheck, corruptedMnt) -} - -// doCleanupMountPoint unmounts the given path and -// deletes the remaining directory if successful. -// if extensiveMountPointCheck is true -// IsNotMountPoint will be called instead of IsLikelyNotMountPoint. -// IsNotMountPoint is more expensive but properly handles bind mounts within the same fs. -// if corruptedMnt is true, it means that the mountPath is a corrupted mountpoint, and the mount point check -// will be skipped -func doCleanupMountPoint(mountPath string, mounter Interface, extensiveMountPointCheck bool, corruptedMnt bool) error { - var notMnt bool - var err error - if !corruptedMnt { - if extensiveMountPointCheck { - notMnt, err = IsNotMountPoint(mounter, mountPath) - } else { - notMnt, err = mounter.IsLikelyNotMountPoint(mountPath) - } - - if err != nil { - return err - } - - if notMnt { - klog.Warningf("Warning: %q is not a mountpoint, deleting", mountPath) - return os.Remove(mountPath) - } - } - - // Unmount the mount path - klog.V(4).Infof("%q is a mountpoint, unmounting", mountPath) - if err := mounter.Unmount(mountPath); err != nil { - return err - } - - if extensiveMountPointCheck { - notMnt, err = IsNotMountPoint(mounter, mountPath) - } else { - notMnt, err = mounter.IsLikelyNotMountPoint(mountPath) - } - if err != nil { - return err - } - if notMnt { - klog.V(4).Infof("%q is unmounted, deleting the directory", mountPath) - return os.Remove(mountPath) - } - return fmt.Errorf("Failed to unmount path %v", mountPath) -} - -// PathExists returns true if the specified path exists. -// TODO: clean this up to use pkg/util/file/FileExists -func PathExists(path string) (bool, error) { - _, err := os.Stat(path) - if err == nil { - return true, nil - } else if os.IsNotExist(err) { - return false, nil - } else if IsCorruptedMnt(err) { - return true, err - } - return false, err -} diff --git a/vendor/k8s.io/utils/mount/mount_helper_unix.go b/vendor/k8s.io/utils/mount/mount_helper_unix.go deleted file mode 100644 index 11b70ebc2..000000000 --- a/vendor/k8s.io/utils/mount/mount_helper_unix.go +++ /dev/null @@ -1,158 +0,0 @@ -// +build !windows - -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mount - -import ( - "fmt" - "os" - "strconv" - "strings" - "syscall" - - utilio "k8s.io/utils/io" -) - -const ( - // At least number of fields per line in /proc//mountinfo. - expectedAtLeastNumFieldsPerMountInfo = 10 - // How many times to retry for a consistent read of /proc/mounts. - maxListTries = 3 -) - -// IsCorruptedMnt return true if err is about corrupted mount point -func IsCorruptedMnt(err error) bool { - if err == nil { - return false - } - var underlyingError error - switch pe := err.(type) { - case nil: - return false - case *os.PathError: - underlyingError = pe.Err - case *os.LinkError: - underlyingError = pe.Err - case *os.SyscallError: - underlyingError = pe.Err - } - - return underlyingError == syscall.ENOTCONN || underlyingError == syscall.ESTALE || underlyingError == syscall.EIO || underlyingError == syscall.EACCES -} - -// MountInfo represents a single line in /proc//mountinfo. -type MountInfo struct { // nolint: golint - // Unique ID for the mount (maybe reused after umount). - ID int - // The ID of the parent mount (or of self for the root of this mount namespace's mount tree). - ParentID int - // Major indicates one half of the device ID which identifies the device class - // (parsed from `st_dev` for files on this filesystem). - Major int - // Minor indicates one half of the device ID which identifies a specific - // instance of device (parsed from `st_dev` for files on this filesystem). - Minor int - // The pathname of the directory in the filesystem which forms the root of this mount. - Root string - // Mount source, filesystem-specific information. e.g. device, tmpfs name. - Source string - // Mount point, the pathname of the mount point. - MountPoint string - // Optional fieds, zero or more fields of the form "tag[:value]". - OptionalFields []string - // The filesystem type in the form "type[.subtype]". - FsType string - // Per-mount options. - MountOptions []string - // Per-superblock options. - SuperOptions []string -} - -// ParseMountInfo parses /proc/xxx/mountinfo. -func ParseMountInfo(filename string) ([]MountInfo, error) { - content, err := utilio.ConsistentRead(filename, maxListTries) - if err != nil { - return []MountInfo{}, err - } - contentStr := string(content) - infos := []MountInfo{} - - for _, line := range strings.Split(contentStr, "\n") { - if line == "" { - // the last split() item is empty string following the last \n - continue - } - // See `man proc` for authoritative description of format of the file. - fields := strings.Fields(line) - if len(fields) < expectedAtLeastNumFieldsPerMountInfo { - return nil, fmt.Errorf("wrong number of fields in (expected at least %d, got %d): %s", expectedAtLeastNumFieldsPerMountInfo, len(fields), line) - } - id, err := strconv.Atoi(fields[0]) - if err != nil { - return nil, err - } - parentID, err := strconv.Atoi(fields[1]) - if err != nil { - return nil, err - } - mm := strings.Split(fields[2], ":") - if len(mm) != 2 { - return nil, fmt.Errorf("parsing '%s' failed: unexpected minor:major pair %s", line, mm) - } - major, err := strconv.Atoi(mm[0]) - if err != nil { - return nil, fmt.Errorf("parsing '%s' failed: unable to parse major device id, err:%v", mm[0], err) - } - minor, err := strconv.Atoi(mm[1]) - if err != nil { - return nil, fmt.Errorf("parsing '%s' failed: unable to parse minor device id, err:%v", mm[1], err) - } - - info := MountInfo{ - ID: id, - ParentID: parentID, - Major: major, - Minor: minor, - Root: fields[3], - MountPoint: fields[4], - MountOptions: strings.Split(fields[5], ","), - } - // All fields until "-" are "optional fields". - i := 6 - for ; i < len(fields) && fields[i] != "-"; i++ { - info.OptionalFields = append(info.OptionalFields, fields[i]) - } - // Parse the rest 3 fields. - i++ - if len(fields)-i < 3 { - return nil, fmt.Errorf("expect 3 fields in %s, got %d", line, len(fields)-i) - } - info.FsType = fields[i] - info.Source = fields[i+1] - info.SuperOptions = strings.Split(fields[i+2], ",") - infos = append(infos, info) - } - return infos, nil -} - -// isMountPointMatch returns true if the path in mp is the same as dir. -// Handles case where mountpoint dir has been renamed due to stale NFS mount. -func isMountPointMatch(mp MountPoint, dir string) bool { - deletedDir := fmt.Sprintf("%s\\040(deleted)", dir) - return ((mp.Path == dir) || (mp.Path == deletedDir)) -} diff --git a/vendor/k8s.io/utils/mount/mount_helper_windows.go b/vendor/k8s.io/utils/mount/mount_helper_windows.go deleted file mode 100644 index b308ce76d..000000000 --- a/vendor/k8s.io/utils/mount/mount_helper_windows.go +++ /dev/null @@ -1,101 +0,0 @@ -// +build windows - -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mount - -import ( - "fmt" - "os" - "strconv" - "strings" - "syscall" - - "k8s.io/klog/v2" -) - -// following failure codes are from https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes--1300-1699- -// ERROR_BAD_NETPATH = 53 -// ERROR_NETWORK_BUSY = 54 -// ERROR_UNEXP_NET_ERR = 59 -// ERROR_NETNAME_DELETED = 64 -// ERROR_NETWORK_ACCESS_DENIED = 65 -// ERROR_BAD_DEV_TYPE = 66 -// ERROR_BAD_NET_NAME = 67 -// ERROR_SESSION_CREDENTIAL_CONFLICT = 1219 -// ERROR_LOGON_FAILURE = 1326 -var errorNoList = [...]int{53, 54, 59, 64, 65, 66, 67, 1219, 1326} - -// IsCorruptedMnt return true if err is about corrupted mount point -func IsCorruptedMnt(err error) bool { - if err == nil { - return false - } - - var underlyingError error - switch pe := err.(type) { - case nil: - return false - case *os.PathError: - underlyingError = pe.Err - case *os.LinkError: - underlyingError = pe.Err - case *os.SyscallError: - underlyingError = pe.Err - } - - if ee, ok := underlyingError.(syscall.Errno); ok { - for _, errno := range errorNoList { - if int(ee) == errno { - klog.Warningf("IsCorruptedMnt failed with error: %v, error code: %v", err, errno) - return true - } - } - } - - return false -} - -// NormalizeWindowsPath makes sure the given path is a valid path on Windows -// systems by making sure all instances of `/` are replaced with `\\`, and the -// path beings with `c:` -func NormalizeWindowsPath(path string) string { - normalizedPath := strings.Replace(path, "/", "\\", -1) - if strings.HasPrefix(normalizedPath, "\\") { - normalizedPath = "c:" + normalizedPath - } - return normalizedPath -} - -// ValidateDiskNumber : disk number should be a number in [0, 99] -func ValidateDiskNumber(disk string) error { - diskNum, err := strconv.Atoi(disk) - if err != nil { - return fmt.Errorf("wrong disk number format: %q, err:%v", disk, err) - } - - if diskNum < 0 || diskNum > 99 { - return fmt.Errorf("disk number out of range: %q", disk) - } - - return nil -} - -// isMountPointMatch determines if the mountpoint matches the dir -func isMountPointMatch(mp MountPoint, dir string) bool { - return mp.Path == dir -} diff --git a/vendor/k8s.io/utils/mount/mount_linux.go b/vendor/k8s.io/utils/mount/mount_linux.go deleted file mode 100644 index b7a443fdf..000000000 --- a/vendor/k8s.io/utils/mount/mount_linux.go +++ /dev/null @@ -1,551 +0,0 @@ -// +build linux - -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mount - -import ( - "fmt" - "os" - "os/exec" - "path/filepath" - "strconv" - "strings" - "syscall" - - "k8s.io/klog/v2" - utilexec "k8s.io/utils/exec" - utilio "k8s.io/utils/io" -) - -const ( - // Number of fields per line in /proc/mounts as per the fstab man page. - expectedNumFieldsPerLine = 6 - // Location of the mount file to use - procMountsPath = "/proc/mounts" - // Location of the mountinfo file - procMountInfoPath = "/proc/self/mountinfo" - // 'fsck' found errors and corrected them - fsckErrorsCorrected = 1 - // 'fsck' found errors but exited without correcting them - fsckErrorsUncorrected = 4 -) - -// Mounter provides the default implementation of mount.Interface -// for the linux platform. This implementation assumes that the -// kubelet is running in the host's root mount namespace. -type Mounter struct { - mounterPath string - withSystemd bool -} - -// New returns a mount.Interface for the current system. -// It provides options to override the default mounter behavior. -// mounterPath allows using an alternative to `/bin/mount` for mounting. -func New(mounterPath string) Interface { - return &Mounter{ - mounterPath: mounterPath, - withSystemd: detectSystemd(), - } -} - -// Mount mounts source to target as fstype with given options. 'source' and 'fstype' must -// be an empty string in case it's not required, e.g. for remount, or for auto filesystem -// type, where kernel handles fstype for you. The mount 'options' is a list of options, -// currently come from mount(8), e.g. "ro", "remount", "bind", etc. If no more option is -// required, call Mount with an empty string list or nil. -func (mounter *Mounter) Mount(source string, target string, fstype string, options []string) error { - return mounter.MountSensitive(source, target, fstype, options, nil) -} - -// MountSensitive is the same as Mount() but this method allows -// sensitiveOptions to be passed in a separate parameter from the normal -// mount options and ensures the sensitiveOptions are never logged. This -// method should be used by callers that pass sensitive material (like -// passwords) as mount options. -func (mounter *Mounter) MountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - // Path to mounter binary if containerized mounter is needed. Otherwise, it is set to empty. - // All Linux distros are expected to be shipped with a mount utility that a support bind mounts. - mounterPath := "" - bind, bindOpts, bindRemountOpts, bindRemountOptsSensitive := MakeBindOptsSensitive(options, sensitiveOptions) - if bind { - err := mounter.doMount(mounterPath, defaultMountCommand, source, target, fstype, bindOpts, bindRemountOptsSensitive) - if err != nil { - return err - } - return mounter.doMount(mounterPath, defaultMountCommand, source, target, fstype, bindRemountOpts, bindRemountOptsSensitive) - } - // The list of filesystems that require containerized mounter on GCI image cluster - fsTypesNeedMounter := map[string]struct{}{ - "nfs": {}, - "glusterfs": {}, - "ceph": {}, - "cifs": {}, - } - if _, ok := fsTypesNeedMounter[fstype]; ok { - mounterPath = mounter.mounterPath - } - return mounter.doMount(mounterPath, defaultMountCommand, source, target, fstype, options, sensitiveOptions) -} - -// doMount runs the mount command. mounterPath is the path to mounter binary if containerized mounter is used. -// sensitiveOptions is an extension of options except they will not be logged (because they may contain sensitive material) -func (mounter *Mounter) doMount(mounterPath string, mountCmd string, source string, target string, fstype string, options []string, sensitiveOptions []string) error { - mountArgs, mountArgsLogStr := MakeMountArgsSensitive(source, target, fstype, options, sensitiveOptions) - if len(mounterPath) > 0 { - mountArgs = append([]string{mountCmd}, mountArgs...) - mountArgsLogStr = mountCmd + " " + mountArgsLogStr - mountCmd = mounterPath - } - - if mounter.withSystemd { - // Try to run mount via systemd-run --scope. This will escape the - // service where kubelet runs and any fuse daemons will be started in a - // specific scope. kubelet service than can be restarted without killing - // these fuse daemons. - // - // Complete command line (when mounterPath is not used): - // systemd-run --description=... --scope -- mount -t - // - // Expected flow: - // * systemd-run creates a transient scope (=~ cgroup) and executes its - // argument (/bin/mount) there. - // * mount does its job, forks a fuse daemon if necessary and finishes. - // (systemd-run --scope finishes at this point, returning mount's exit - // code and stdout/stderr - thats one of --scope benefits). - // * systemd keeps the fuse daemon running in the scope (i.e. in its own - // cgroup) until the fuse daemon dies (another --scope benefit). - // Kubelet service can be restarted and the fuse daemon survives. - // * When the fuse daemon dies (e.g. during unmount) systemd removes the - // scope automatically. - // - // systemd-mount is not used because it's too new for older distros - // (CentOS 7, Debian Jessie). - mountCmd, mountArgs, mountArgsLogStr = AddSystemdScopeSensitive("systemd-run", target, mountCmd, mountArgs, mountArgsLogStr) - } else { - // No systemd-run on the host (or we failed to check it), assume kubelet - // does not run as a systemd service. - // No code here, mountCmd and mountArgs are already populated. - } - - // Logging with sensitive mount options removed. - klog.V(4).Infof("Mounting cmd (%s) with arguments (%s)", mountCmd, mountArgsLogStr) - command := exec.Command(mountCmd, mountArgs...) - output, err := command.CombinedOutput() - if err != nil { - klog.Errorf("Mount failed: %v\nMounting command: %s\nMounting arguments: %s\nOutput: %s\n", err, mountCmd, mountArgsLogStr, string(output)) - return fmt.Errorf("mount failed: %v\nMounting command: %s\nMounting arguments: %s\nOutput: %s", - err, mountCmd, mountArgsLogStr, string(output)) - } - return err -} - -// detectSystemd returns true if OS runs with systemd as init. When not sure -// (permission errors, ...), it returns false. -// There may be different ways how to detect systemd, this one makes sure that -// systemd-runs (needed by Mount()) works. -func detectSystemd() bool { - if _, err := exec.LookPath("systemd-run"); err != nil { - klog.V(2).Infof("Detected OS without systemd") - return false - } - // Try to run systemd-run --scope /bin/true, that should be enough - // to make sure that systemd is really running and not just installed, - // which happens when running in a container with a systemd-based image - // but with different pid 1. - cmd := exec.Command("systemd-run", "--description=Kubernetes systemd probe", "--scope", "true") - output, err := cmd.CombinedOutput() - if err != nil { - klog.V(2).Infof("Cannot run systemd-run, assuming non-systemd OS") - klog.V(4).Infof("systemd-run failed with: %v", err) - klog.V(4).Infof("systemd-run output: %s", string(output)) - return false - } - klog.V(2).Infof("Detected OS with systemd") - return true -} - -// MakeMountArgs makes the arguments to the mount(8) command. -// options MUST not contain sensitive material (like passwords). -func MakeMountArgs(source, target, fstype string, options []string) (mountArgs []string) { - mountArgs, _ = MakeMountArgsSensitive(source, target, fstype, options, nil /* sensitiveOptions */) - return mountArgs -} - -// MakeMountArgsSensitive makes the arguments to the mount(8) command. -// sensitiveOptions is an extension of options except they will not be logged (because they may contain sensitive material) -func MakeMountArgsSensitive(source, target, fstype string, options []string, sensitiveOptions []string) (mountArgs []string, mountArgsLogStr string) { - // Build mount command as follows: - // mount [-t $fstype] [-o $options] [$source] $target - mountArgs = []string{} - mountArgsLogStr = "" - if len(fstype) > 0 { - mountArgs = append(mountArgs, "-t", fstype) - mountArgsLogStr += strings.Join(mountArgs, " ") - } - if len(options) > 0 || len(sensitiveOptions) > 0 { - combinedOptions := []string{} - combinedOptions = append(combinedOptions, options...) - combinedOptions = append(combinedOptions, sensitiveOptions...) - mountArgs = append(mountArgs, "-o", strings.Join(combinedOptions, ",")) - // exclude sensitiveOptions from log string - mountArgsLogStr += " -o " + sanitizedOptionsForLogging(options, sensitiveOptions) - } - if len(source) > 0 { - mountArgs = append(mountArgs, source) - mountArgsLogStr += " " + source - } - mountArgs = append(mountArgs, target) - mountArgsLogStr += " " + target - - return mountArgs, mountArgsLogStr -} - -// AddSystemdScope adds "system-run --scope" to given command line -// If args contains sensitive material, use AddSystemdScopeSensitive to construct -// a safe to log string. -func AddSystemdScope(systemdRunPath, mountName, command string, args []string) (string, []string) { - descriptionArg := fmt.Sprintf("--description=Kubernetes transient mount for %s", mountName) - systemdRunArgs := []string{descriptionArg, "--scope", "--", command} - return systemdRunPath, append(systemdRunArgs, args...) -} - -// AddSystemdScopeSensitive adds "system-run --scope" to given command line -// It also accepts takes a sanitized string containing mount arguments, mountArgsLogStr, -// and returns the string appended to the systemd command for logging. -func AddSystemdScopeSensitive(systemdRunPath, mountName, command string, args []string, mountArgsLogStr string) (string, []string, string) { - descriptionArg := fmt.Sprintf("--description=Kubernetes transient mount for %s", mountName) - systemdRunArgs := []string{descriptionArg, "--scope", "--", command} - return systemdRunPath, append(systemdRunArgs, args...), strings.Join(systemdRunArgs, " ") + " " + mountArgsLogStr -} - -// Unmount unmounts the target. -func (mounter *Mounter) Unmount(target string) error { - klog.V(4).Infof("Unmounting %s", target) - command := exec.Command("umount", target) - output, err := command.CombinedOutput() - if err != nil { - return fmt.Errorf("unmount failed: %v\nUnmounting arguments: %s\nOutput: %s", err, target, string(output)) - } - return nil -} - -// List returns a list of all mounted filesystems. -func (*Mounter) List() ([]MountPoint, error) { - return ListProcMounts(procMountsPath) -} - -// IsLikelyNotMountPoint determines if a directory is not a mountpoint. -// It is fast but not necessarily ALWAYS correct. If the path is in fact -// a bind mount from one part of a mount to another it will not be detected. -// It also can not distinguish between mountpoints and symbolic links. -// mkdir /tmp/a /tmp/b; mount --bind /tmp/a /tmp/b; IsLikelyNotMountPoint("/tmp/b") -// will return true. When in fact /tmp/b is a mount point. If this situation -// is of interest to you, don't use this function... -func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) { - stat, err := os.Stat(file) - if err != nil { - return true, err - } - rootStat, err := os.Stat(filepath.Dir(strings.TrimSuffix(file, "/"))) - if err != nil { - return true, err - } - // If the directory has a different device as parent, then it is a mountpoint. - if stat.Sys().(*syscall.Stat_t).Dev != rootStat.Sys().(*syscall.Stat_t).Dev { - return false, nil - } - - return true, nil -} - -// GetMountRefs finds all mount references to pathname, returns a -// list of paths. Path could be a mountpoint or a normal -// directory (for bind mount). -func (mounter *Mounter) GetMountRefs(pathname string) ([]string, error) { - pathExists, pathErr := PathExists(pathname) - if !pathExists { - return []string{}, nil - } else if IsCorruptedMnt(pathErr) { - klog.Warningf("GetMountRefs found corrupted mount at %s, treating as unmounted path", pathname) - return []string{}, nil - } else if pathErr != nil { - return nil, fmt.Errorf("error checking path %s: %v", pathname, pathErr) - } - realpath, err := filepath.EvalSymlinks(pathname) - if err != nil { - return nil, err - } - return SearchMountPoints(realpath, procMountInfoPath) -} - -// checkAndRepairFileSystem checks and repairs filesystems using command fsck. -func (mounter *SafeFormatAndMount) checkAndRepairFilesystem(source string) error { - klog.V(4).Infof("Checking for issues with fsck on disk: %s", source) - args := []string{"-a", source} - out, err := mounter.Exec.Command("fsck", args...).CombinedOutput() - if err != nil { - ee, isExitError := err.(utilexec.ExitError) - switch { - case err == utilexec.ErrExecutableNotFound: - klog.Warningf("'fsck' not found on system; continuing mount without running 'fsck'.") - case isExitError && ee.ExitStatus() == fsckErrorsCorrected: - klog.Infof("Device %s has errors which were corrected by fsck.", source) - case isExitError && ee.ExitStatus() == fsckErrorsUncorrected: - return NewMountError(HasFilesystemErrors, "'fsck' found errors on device %s but could not correct them: %s", source, string(out)) - case isExitError && ee.ExitStatus() > fsckErrorsUncorrected: - klog.Infof("`fsck` error %s", string(out)) - } - } - return nil -} - -// formatAndMount uses unix utils to format and mount the given disk -func (mounter *SafeFormatAndMount) formatAndMountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - readOnly := false - for _, option := range options { - if option == "ro" { - readOnly = true - break - } - } - if !readOnly { - // Check sensitiveOptions for ro - for _, option := range sensitiveOptions { - if option == "ro" { - readOnly = true - break - } - } - } - - options = append(options, "defaults") - mountErrorValue := UnknownMountError - - // Check if the disk is already formatted - existingFormat, err := mounter.GetDiskFormat(source) - if err != nil { - return NewMountError(GetDiskFormatFailed, "failed to get disk format of disk %s: %v", source, err) - } - - // Use 'ext4' as the default - if len(fstype) == 0 { - fstype = "ext4" - } - - if existingFormat == "" { - // Do not attempt to format the disk if mounting as readonly, return an error to reflect this. - if readOnly { - return NewMountError(UnformattedReadOnly, "cannot mount unformatted disk %s as we are manipulating it in read-only mode", source) - } - - // Disk is unformatted so format it. - args := []string{source} - if fstype == "ext4" || fstype == "ext3" { - args = []string{ - "-F", // Force flag - "-m0", // Zero blocks reserved for super-user - source, - } - } - - klog.Infof("Disk %q appears to be unformatted, attempting to format as type: %q with options: %v", source, fstype, args) - output, err := mounter.Exec.Command("mkfs."+fstype, args...).CombinedOutput() - if err != nil { - // Do not log sensitiveOptions only options - sensitiveOptionsLog := sanitizedOptionsForLogging(options, sensitiveOptions) - detailedErr := fmt.Sprintf("format of disk %q failed: type:(%q) target:(%q) options:(%q) errcode:(%v) output:(%v) ", source, fstype, target, sensitiveOptionsLog, err, string(output)) - klog.Error(detailedErr) - return NewMountError(FormatFailed, detailedErr) - } - - klog.Infof("Disk successfully formatted (mkfs): %s - %s %s", fstype, source, target) - } else { - if fstype != existingFormat { - // Verify that the disk is formatted with filesystem type we are expecting - mountErrorValue = FilesystemMismatch - klog.Warningf("Configured to mount disk %s as %s but current format is %s, things might break", source, existingFormat, fstype) - } - - if !readOnly { - // Run check tools on the disk to fix repairable issues, only do this for formatted volumes requested as rw. - err := mounter.checkAndRepairFilesystem(source) - if err != nil { - return err - } - } - } - - // Mount the disk - klog.V(4).Infof("Attempting to mount disk %s in %s format at %s", source, fstype, target) - if err := mounter.MountSensitive(source, target, fstype, options, sensitiveOptions); err != nil { - return NewMountError(mountErrorValue, err.Error()) - } - - return nil -} - -// GetDiskFormat uses 'blkid' to see if the given disk is unformatted -func (mounter *SafeFormatAndMount) GetDiskFormat(disk string) (string, error) { - args := []string{"-p", "-s", "TYPE", "-s", "PTTYPE", "-o", "export", disk} - klog.V(4).Infof("Attempting to determine if disk %q is formatted using blkid with args: (%v)", disk, args) - dataOut, err := mounter.Exec.Command("blkid", args...).CombinedOutput() - output := string(dataOut) - klog.V(4).Infof("Output: %q, err: %v", output, err) - - if err != nil { - if exit, ok := err.(utilexec.ExitError); ok { - if exit.ExitStatus() == 2 { - // Disk device is unformatted. - // For `blkid`, if the specified token (TYPE/PTTYPE, etc) was - // not found, or no (specified) devices could be identified, an - // exit code of 2 is returned. - return "", nil - } - } - klog.Errorf("Could not determine if disk %q is formatted (%v)", disk, err) - return "", err - } - - var fstype, pttype string - - lines := strings.Split(output, "\n") - for _, l := range lines { - if len(l) <= 0 { - // Ignore empty line. - continue - } - cs := strings.Split(l, "=") - if len(cs) != 2 { - return "", fmt.Errorf("blkid returns invalid output: %s", output) - } - // TYPE is filesystem type, and PTTYPE is partition table type, according - // to https://www.kernel.org/pub/linux/utils/util-linux/v2.21/libblkid-docs/. - if cs[0] == "TYPE" { - fstype = cs[1] - } else if cs[0] == "PTTYPE" { - pttype = cs[1] - } - } - - if len(pttype) > 0 { - klog.V(4).Infof("Disk %s detected partition table type: %s", disk, pttype) - // Returns a special non-empty string as filesystem type, then kubelet - // will not format it. - return "unknown data, probably partitions", nil - } - - return fstype, nil -} - -// ListProcMounts is shared with NsEnterMounter -func ListProcMounts(mountFilePath string) ([]MountPoint, error) { - content, err := utilio.ConsistentRead(mountFilePath, maxListTries) - if err != nil { - return nil, err - } - return parseProcMounts(content) -} - -func parseProcMounts(content []byte) ([]MountPoint, error) { - out := []MountPoint{} - lines := strings.Split(string(content), "\n") - for _, line := range lines { - if line == "" { - // the last split() item is empty string following the last \n - continue - } - fields := strings.Fields(line) - if len(fields) != expectedNumFieldsPerLine { - // Do not log line in case it contains sensitive Mount options - return nil, fmt.Errorf("wrong number of fields (expected %d, got %d)", expectedNumFieldsPerLine, len(fields)) - } - - mp := MountPoint{ - Device: fields[0], - Path: fields[1], - Type: fields[2], - Opts: strings.Split(fields[3], ","), - } - - freq, err := strconv.Atoi(fields[4]) - if err != nil { - return nil, err - } - mp.Freq = freq - - pass, err := strconv.Atoi(fields[5]) - if err != nil { - return nil, err - } - mp.Pass = pass - - out = append(out, mp) - } - return out, nil -} - -// SearchMountPoints finds all mount references to the source, returns a list of -// mountpoints. -// The source can be a mount point or a normal directory (bind mount). We -// didn't support device because there is no use case by now. -// Some filesystems may share a source name, e.g. tmpfs. And for bind mounting, -// it's possible to mount a non-root path of a filesystem, so we need to use -// root path and major:minor to represent mount source uniquely. -// This implementation is shared between Linux and NsEnterMounter -func SearchMountPoints(hostSource, mountInfoPath string) ([]string, error) { - mis, err := ParseMountInfo(mountInfoPath) - if err != nil { - return nil, err - } - - mountID := 0 - rootPath := "" - major := -1 - minor := -1 - - // Finding the underlying root path and major:minor if possible. - // We need search in backward order because it's possible for later mounts - // to overlap earlier mounts. - for i := len(mis) - 1; i >= 0; i-- { - if hostSource == mis[i].MountPoint || PathWithinBase(hostSource, mis[i].MountPoint) { - // If it's a mount point or path under a mount point. - mountID = mis[i].ID - rootPath = filepath.Join(mis[i].Root, strings.TrimPrefix(hostSource, mis[i].MountPoint)) - major = mis[i].Major - minor = mis[i].Minor - break - } - } - - if rootPath == "" || major == -1 || minor == -1 { - return nil, fmt.Errorf("failed to get root path and major:minor for %s", hostSource) - } - - var refs []string - for i := range mis { - if mis[i].ID == mountID { - // Ignore mount entry for mount source itself. - continue - } - if mis[i].Root == rootPath && mis[i].Major == major && mis[i].Minor == minor { - refs = append(refs, mis[i].MountPoint) - } - } - - return refs, nil -} diff --git a/vendor/k8s.io/utils/mount/mount_unsupported.go b/vendor/k8s.io/utils/mount/mount_unsupported.go deleted file mode 100644 index 985edbe3d..000000000 --- a/vendor/k8s.io/utils/mount/mount_unsupported.go +++ /dev/null @@ -1,77 +0,0 @@ -// +build !linux,!windows - -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mount - -import ( - "errors" -) - -// Mounter implements mount.Interface for unsupported platforms -type Mounter struct { - mounterPath string -} - -var errUnsupported = errors.New("util/mount on this platform is not supported") - -// New returns a mount.Interface for the current system. -// It provides options to override the default mounter behavior. -// mounterPath allows using an alternative to `/bin/mount` for mounting. -func New(mounterPath string) Interface { - return &Mounter{ - mounterPath: mounterPath, - } -} - -// Mount always returns an error on unsupported platforms -func (mounter *Mounter) Mount(source string, target string, fstype string, options []string) error { - return errUnsupported -} - -// Mount always returns an error on unsupported platforms -func (mounter *Mounter) MountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - return errUnsupported -} - -// Unmount always returns an error on unsupported platforms -func (mounter *Mounter) Unmount(target string) error { - return errUnsupported -} - -// List always returns an error on unsupported platforms -func (mounter *Mounter) List() ([]MountPoint, error) { - return []MountPoint{}, errUnsupported -} - -// IsLikelyNotMountPoint always returns an error on unsupported platforms -func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) { - return true, errUnsupported -} - -// GetMountRefs always returns an error on unsupported platforms -func (mounter *Mounter) GetMountRefs(pathname string) ([]string, error) { - return nil, errUnsupported -} - -func (mounter *SafeFormatAndMount) formatAndMountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - return mounter.Interface.Mount(source, target, fstype, options) -} - -func (mounter *SafeFormatAndMount) diskLooksUnformatted(disk string) (bool, error) { - return true, errUnsupported -} diff --git a/vendor/k8s.io/utils/mount/mount_windows.go b/vendor/k8s.io/utils/mount/mount_windows.go deleted file mode 100644 index 4ec70fbd1..000000000 --- a/vendor/k8s.io/utils/mount/mount_windows.go +++ /dev/null @@ -1,313 +0,0 @@ -// +build windows - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mount - -import ( - "fmt" - "os" - "os/exec" - "path/filepath" - "strings" - - "k8s.io/klog/v2" - "k8s.io/utils/keymutex" -) - -const ( - accessDenied string = "access is denied" -) - -// Mounter provides the default implementation of mount.Interface -// for the windows platform. This implementation assumes that the -// kubelet is running in the host's root mount namespace. -type Mounter struct { - mounterPath string -} - -// New returns a mount.Interface for the current system. -// It provides options to override the default mounter behavior. -// mounterPath allows using an alternative to `/bin/mount` for mounting. -func New(mounterPath string) Interface { - return &Mounter{ - mounterPath: mounterPath, - } -} - -// acquire lock for smb mount -var getSMBMountMutex = keymutex.NewHashed(0) - -// Mount : mounts source to target with given options. -// currently only supports cifs(smb), bind mount(for disk) -func (mounter *Mounter) Mount(source string, target string, fstype string, options []string) error { - return mounter.MountSensitive(source, target, fstype, options, nil /* sensitiveOptions */) -} - -// MountSensitive is the same as Mount() but this method allows -// sensitiveOptions to be passed in a separate parameter from the normal -// mount options and ensures the sensitiveOptions are never logged. This -// method should be used by callers that pass sensitive material (like -// passwords) as mount options. -func (mounter *Mounter) MountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - target = NormalizeWindowsPath(target) - sanitizedOptionsForLogging := sanitizedOptionsForLogging(options, sensitiveOptions) - - if source == "tmpfs" { - klog.V(3).Infof("mounting source (%q), target (%q), with options (%q)", source, target, sanitizedOptionsForLogging) - return os.MkdirAll(target, 0755) - } - - parentDir := filepath.Dir(target) - if err := os.MkdirAll(parentDir, 0755); err != nil { - return err - } - - klog.V(4).Infof("mount options(%q) source:%q, target:%q, fstype:%q, begin to mount", - sanitizedOptionsForLogging, source, target, fstype) - bindSource := source - - if bind, _, _, _ := MakeBindOptsSensitive(options, sensitiveOptions); bind { - bindSource = NormalizeWindowsPath(source) - } else { - allOptions := []string{} - allOptions = append(allOptions, options...) - allOptions = append(allOptions, sensitiveOptions...) - if len(allOptions) < 2 { - return fmt.Errorf("mount options(%q) should have at least 2 options, current number:%d, source:%q, target:%q", - sanitizedOptionsForLogging, len(allOptions), source, target) - } - - // currently only cifs mount is supported - if strings.ToLower(fstype) != "cifs" { - return fmt.Errorf("only cifs mount is supported now, fstype: %q, mounting source (%q), target (%q), with options (%q)", fstype, source, target, sanitizedOptionsForLogging) - } - - // lock smb mount for the same source - getSMBMountMutex.LockKey(source) - defer getSMBMountMutex.UnlockKey(source) - - username := allOptions[0] - password := allOptions[1] - if output, err := newSMBMapping(username, password, source); err != nil { - klog.Warningf("SMB Mapping(%s) returned with error(%v), output(%s)", source, err, string(output)) - if isSMBMappingExist(source) { - valid, err := isValidPath(source) - if !valid { - if err == nil || isAccessDeniedError(err) { - klog.V(2).Infof("SMB Mapping(%s) already exists while it's not valid, return error: %v, now begin to remove and remount", source, err) - if output, err = removeSMBMapping(source); err != nil { - return fmt.Errorf("Remove-SmbGlobalMapping failed: %v, output: %q", err, output) - } - if output, err := newSMBMapping(username, password, source); err != nil { - return fmt.Errorf("New-SmbGlobalMapping(%s) failed: %v, output: %q", source, err, output) - } - } - } else { - klog.V(2).Infof("SMB Mapping(%s) already exists and is still valid, skip error(%v)", source, err) - } - } else { - return fmt.Errorf("New-SmbGlobalMapping(%s) failed: %v, output: %q", source, err, output) - } - } - } - - output, err := exec.Command("cmd", "/c", "mklink", "/D", target, bindSource).CombinedOutput() - if err != nil { - klog.Errorf("mklink failed: %v, source(%q) target(%q) output: %q", err, bindSource, target, string(output)) - return err - } - klog.V(2).Infof("mklink source(%q) on target(%q) successfully, output: %q", bindSource, target, string(output)) - - return nil -} - -// do the SMB mount with username, password, remotepath -// return (output, error) -func newSMBMapping(username, password, remotepath string) (string, error) { - if username == "" || password == "" || remotepath == "" { - return "", fmt.Errorf("invalid parameter(username: %s, password: %s, remoteapth: %s)", username, sensitiveOptionsRemoved, remotepath) - } - - // use PowerShell Environment Variables to store user input string to prevent command line injection - // https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-5.1 - cmdLine := `$PWord = ConvertTo-SecureString -String $Env:smbpassword -AsPlainText -Force` + - `;$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Env:smbuser, $PWord` + - `;New-SmbGlobalMapping -RemotePath $Env:smbremotepath -Credential $Credential` - cmd := exec.Command("powershell", "/c", cmdLine) - cmd.Env = append(os.Environ(), - fmt.Sprintf("smbuser=%s", username), - fmt.Sprintf("smbpassword=%s", password), - fmt.Sprintf("smbremotepath=%s", remotepath)) - - output, err := cmd.CombinedOutput() - return string(output), err -} - -// check whether remotepath is already mounted -func isSMBMappingExist(remotepath string) bool { - cmd := exec.Command("powershell", "/c", `Get-SmbGlobalMapping -RemotePath $Env:smbremotepath`) - cmd.Env = append(os.Environ(), fmt.Sprintf("smbremotepath=%s", remotepath)) - _, err := cmd.CombinedOutput() - return err == nil -} - -// check whether remotepath is valid -// return (true, nil) if remotepath is valid -func isValidPath(remotepath string) (bool, error) { - cmd := exec.Command("powershell", "/c", `Test-Path $Env:remoteapth`) - cmd.Env = append(os.Environ(), fmt.Sprintf("remoteapth=%s", remotepath)) - output, err := cmd.CombinedOutput() - if err != nil { - return false, fmt.Errorf("returned output: %s, error: %v", string(output), err) - } - - return strings.HasPrefix(strings.ToLower(string(output)), "true"), nil -} - -func isAccessDeniedError(err error) bool { - return err != nil && strings.Contains(strings.ToLower(err.Error()), accessDenied) -} - -// remove SMB mapping -func removeSMBMapping(remotepath string) (string, error) { - cmd := exec.Command("powershell", "/c", `Remove-SmbGlobalMapping -RemotePath $Env:smbremotepath -Force`) - cmd.Env = append(os.Environ(), fmt.Sprintf("smbremotepath=%s", remotepath)) - output, err := cmd.CombinedOutput() - return string(output), err -} - -// Unmount unmounts the target. -func (mounter *Mounter) Unmount(target string) error { - klog.V(4).Infof("azureMount: Unmount target (%q)", target) - target = NormalizeWindowsPath(target) - if output, err := exec.Command("cmd", "/c", "rmdir", target).CombinedOutput(); err != nil { - klog.Errorf("rmdir failed: %v, output: %q", err, string(output)) - return err - } - return nil -} - -// List returns a list of all mounted filesystems. todo -func (mounter *Mounter) List() ([]MountPoint, error) { - return []MountPoint{}, nil -} - -// IsLikelyNotMountPoint determines if a directory is not a mountpoint. -func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) { - stat, err := os.Lstat(file) - if err != nil { - return true, err - } - - if stat.Mode()&os.ModeSymlink != 0 { - return false, err - } - return true, nil -} - -// GetMountRefs : empty implementation here since there is no place to query all mount points on Windows -func (mounter *Mounter) GetMountRefs(pathname string) ([]string, error) { - windowsPath := NormalizeWindowsPath(pathname) - pathExists, pathErr := PathExists(windowsPath) - if !pathExists { - return []string{}, nil - } else if IsCorruptedMnt(pathErr) { - klog.Warningf("GetMountRefs found corrupted mount at %s, treating as unmounted path", windowsPath) - return []string{}, nil - } else if pathErr != nil { - return nil, fmt.Errorf("error checking path %s: %v", windowsPath, pathErr) - } - return []string{pathname}, nil -} - -func (mounter *SafeFormatAndMount) formatAndMountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error { - // Try to mount the disk - klog.V(4).Infof("Attempting to formatAndMount disk: %s %s %s", fstype, source, target) - - if err := ValidateDiskNumber(source); err != nil { - klog.Errorf("diskMount: formatAndMount failed, err: %v", err) - return err - } - - if len(fstype) == 0 { - // Use 'NTFS' as the default - fstype = "NTFS" - } - - // format disk if it is unformatted(raw) - cmd := fmt.Sprintf("Get-Disk -Number %s | Where partitionstyle -eq 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru"+ - " | New-Partition -UseMaximumSize | Format-Volume -FileSystem %s -Confirm:$false", source, fstype) - if output, err := mounter.Exec.Command("powershell", "/c", cmd).CombinedOutput(); err != nil { - return fmt.Errorf("diskMount: format disk failed, error: %v, output: %q", err, string(output)) - } - klog.V(4).Infof("diskMount: Disk successfully formatted, disk: %q, fstype: %q", source, fstype) - - volumeIds, err := listVolumesOnDisk(source) - if err != nil { - return err - } - driverPath := volumeIds[0] - target = NormalizeWindowsPath(target) - output, err := mounter.Exec.Command("cmd", "/c", "mklink", "/D", target, driverPath).CombinedOutput() - if err != nil { - klog.Errorf("mklink(%s, %s) failed: %v, output: %q", target, driverPath, err, string(output)) - return err - } - klog.V(2).Infof("formatAndMount disk(%s) fstype(%s) on(%s) with output(%s) successfully", driverPath, fstype, target, string(output)) - return nil -} - -// ListVolumesOnDisk - returns back list of volumes(volumeIDs) in the disk (requested in diskID). -func listVolumesOnDisk(diskID string) (volumeIDs []string, err error) { - cmd := fmt.Sprintf("(Get-Disk -DeviceId %s | Get-Partition | Get-Volume).UniqueId", diskID) - output, err := exec.Command("powershell", "/c", cmd).CombinedOutput() - klog.V(4).Infof("listVolumesOnDisk id from %s: %s", diskID, string(output)) - if err != nil { - return []string{}, fmt.Errorf("error list volumes on disk. cmd: %s, output: %s, error: %v", cmd, string(output), err) - } - - volumeIds := strings.Split(strings.TrimSpace(string(output)), "\r\n") - return volumeIds, nil -} - -// getAllParentLinks walks all symbolic links and return all the parent targets recursively -func getAllParentLinks(path string) ([]string, error) { - const maxIter = 255 - links := []string{} - for { - links = append(links, path) - if len(links) > maxIter { - return links, fmt.Errorf("unexpected length of parent links: %v", links) - } - - fi, err := os.Lstat(path) - if err != nil { - return links, fmt.Errorf("Lstat: %v", err) - } - if fi.Mode()&os.ModeSymlink == 0 { - break - } - - path, err = os.Readlink(path) - if err != nil { - return links, fmt.Errorf("Readlink error: %v", err) - } - } - - return links, nil -} diff --git a/vendor/modules.txt b/vendor/modules.txt index d3b47a17b..606636341 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -4,7 +4,7 @@ cloud.google.com/go/iam cloud.google.com/go/kms/apiv1 # github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534 github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta -# github.com/Microsoft/go-winio v0.4.14 +# github.com/Microsoft/go-winio v0.4.16 github.com/Microsoft/go-winio github.com/Microsoft/go-winio/pkg/guid # github.com/beorn7/perks v1.0.1 @@ -62,19 +62,21 @@ github.com/imdario/mergo github.com/json-iterator/go # github.com/konsorten/go-windows-terminal-sequences v1.0.2 github.com/konsorten/go-windows-terminal-sequences -# github.com/kubernetes-csi/csi-proxy/client v0.2.2 +# github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1 github.com/kubernetes-csi/csi-proxy/client -github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta1 +github.com/kubernetes-csi/csi-proxy/client/api/disk/v1 github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2 +github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1 github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1 +github.com/kubernetes-csi/csi-proxy/client/api/volume/v1 github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1 -github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2 github.com/kubernetes-csi/csi-proxy/client/apiversion -github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta1 +github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1 github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2 +github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1 github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1 +github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1 github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta1 -github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta2 # github.com/kubernetes-csi/csi-test/v3 v3.0.0 github.com/kubernetes-csi/csi-test/v3/pkg/sanity github.com/kubernetes-csi/csi-test/v3/utils @@ -116,7 +118,7 @@ github.com/onsi/gomega/matchers/support/goraph/edge github.com/onsi/gomega/matchers/support/goraph/node github.com/onsi/gomega/matchers/support/goraph/util github.com/onsi/gomega/types -# github.com/pkg/errors v0.8.1 +# github.com/pkg/errors v0.9.1 github.com/pkg/errors # github.com/prometheus/client_golang v1.0.0 github.com/prometheus/client_golang/prometheus @@ -511,7 +513,6 @@ k8s.io/utils/exec/testing k8s.io/utils/integer k8s.io/utils/io k8s.io/utils/keymutex -k8s.io/utils/mount k8s.io/utils/path # sigs.k8s.io/structured-merge-diff/v3 v3.0.0 sigs.k8s.io/structured-merge-diff/v3/value From 2d0e8dd2661ba881a765c2ec5d139039b9464db8 Mon Sep 17 00:00:00 2001 From: Mauricio Poppe Date: Wed, 14 Jul 2021 23:58:37 +0000 Subject: [PATCH 2/2] bump csi-proxy v1.rc to v1 --- go.mod | 2 +- go.sum | 4 ++-- vendor/modules.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 793f01c49..7c76297cb 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/golang/protobuf v1.4.2 github.com/google/uuid v1.1.1 github.com/hashicorp/go-multierror v1.0.0 // indirect - github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1 + github.com/kubernetes-csi/csi-proxy/client v1.0.0 github.com/kubernetes-csi/csi-test/v3 v3.0.0 github.com/onsi/ginkgo v1.11.0 github.com/onsi/gomega v1.7.1 diff --git a/go.sum b/go.sum index 05186f18f..89529b431 100644 --- a/go.sum +++ b/go.sum @@ -468,8 +468,8 @@ github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1 h1:rWwsNUTbgFfUMYGe/w4N+AJAR8Z/wQ1QMgf5JdTlv8g= -github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1/go.mod h1:URLOkEbRhOwKVvGvug6HSKRTpLSFuQ/Gt3xahDag8qc= +github.com/kubernetes-csi/csi-proxy/client v1.0.0 h1:jqxpu9VidCtxnjgiIjT1xsIndX1wVRGzOp7R0mCZ+gI= +github.com/kubernetes-csi/csi-proxy/client v1.0.0/go.mod h1:URLOkEbRhOwKVvGvug6HSKRTpLSFuQ/Gt3xahDag8qc= github.com/kubernetes-csi/csi-test/v3 v3.0.0 h1:mVsfA4J67uNm8fdF/Pr84oMqL92qjIhjWbEUH8zv1fU= github.com/kubernetes-csi/csi-test/v3 v3.0.0/go.mod h1:VdIKGnDZHOjg4M5yd0OZICtsoEzdn64d0K33N6dm35Q= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= diff --git a/vendor/modules.txt b/vendor/modules.txt index 606636341..bb3feea62 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -62,7 +62,7 @@ github.com/imdario/mergo github.com/json-iterator/go # github.com/konsorten/go-windows-terminal-sequences v1.0.2 github.com/konsorten/go-windows-terminal-sequences -# github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1 +# github.com/kubernetes-csi/csi-proxy/client v1.0.0 github.com/kubernetes-csi/csi-proxy/client github.com/kubernetes-csi/csi-proxy/client/api/disk/v1 github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2