diff --git a/Gopkg.lock b/Gopkg.lock index 2737ba71..443ad970 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,18 +2,23 @@ [[projects]] + digest = "1:26ee2356254e58b9872ba736f66aff1c54a26f08c7d16afbf49695131a87d454" name = "github.com/container-storage-interface/spec" - packages = ["lib/go/csi/v0"] - revision = "2178fdeea87f1150a17a63252eee28d4d8141f72" - version = "v0.3.0" + packages = ["lib/go/csi"] + pruneopts = "UT" + revision = "8efcc85c45550571fba8134182013ed7dc34038a" + version = "v1.0.0-rc2" [[projects]] + digest = "1:bc38c7c481812e178d85160472e231c5e1c9a7f5845d67e23ee4e706933c10d8" name = "github.com/golang/mock" packages = ["gomock"] + pruneopts = "UT" revision = "c34cdb4725f4c3844d095133c6e40e448b86589b" version = "v1.1.1" [[projects]] + digest = "1:588beb9f80d2b0afddf05663b32d01c867da419458b560471d81cca0286e76b8" name = "github.com/golang/protobuf" packages = [ "proto", @@ -22,12 +27,14 @@ "ptypes/any", "ptypes/duration", "ptypes/timestamp", - "ptypes/wrappers" + "ptypes/wrappers", ] - revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265" - version = "v1.1.0" + pruneopts = "UT" + revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" + version = "v1.2.0" [[projects]] + digest = "1:72f35d3e412bc67b121e15ea4c88a3b3da8bcbc2264339e7ffa4a1865799840c" name = "github.com/onsi/ginkgo" packages = [ ".", @@ -47,12 +54,14 @@ "reporters/stenographer", "reporters/stenographer/support/go-colorable", "reporters/stenographer/support/go-isatty", - "types" + "types", ] + pruneopts = "UT" revision = "fa5fabab2a1bfbd924faf4c067d07ae414e2aedf" version = "v1.5.0" [[projects]] + digest = "1:d0c2c4e2d0006cd28c220a549cda1de8e67abc65ed4c572421492bbf0492ceaf" name = "github.com/onsi/gomega" packages = [ ".", @@ -66,25 +75,31 @@ "matchers/support/goraph/edge", "matchers/support/goraph/node", "matchers/support/goraph/util", - "types" + "types", ] + pruneopts = "UT" revision = "62bff4df71bdbc266561a0caee19f0594b17c240" version = "v1.4.0" [[projects]] + digest = "1:9e9193aa51197513b3abcb108970d831fbcf40ef96aa845c4f03276e1fa316d2" name = "github.com/sirupsen/logrus" packages = ["."] + pruneopts = "UT" revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc" version = "v1.0.5" [[projects]] branch = "master" + digest = "1:3f3a05ae0b95893d90b9b3b5afdb79a9b3d96e4e36e099d841ae602e4aca0da8" name = "golang.org/x/crypto" packages = ["ssh/terminal"] + pruneopts = "UT" revision = "8ac0e0d97ce45cd83d1d7243c060cb8461dda5e9" [[projects]] branch = "master" + digest = "1:0bb2e6ef036484991ed446a6c698698b8901766981d4d22cc8e53fedb09709ac" name = "golang.org/x/net" packages = [ "context", @@ -96,20 +111,24 @@ "http2/hpack", "idna", "internal/timeseries", - "trace" + "trace", ] + pruneopts = "UT" revision = "1e491301e022f8f977054da4c2d852decd59571f" [[projects]] branch = "master" + digest = "1:8fbfc6ea1a8a078697633be97f07dd83a83d32a96959d42195464c13c25be374" name = "golang.org/x/sys" packages = [ "unix", - "windows" + "windows", ] + pruneopts = "UT" revision = "9527bec2660bd847c050fda93a0f0c6dee0800bb" [[projects]] + digest = "1:436b24586f8fee329e0dd65fd67c817681420cda1d7f934345c13fe78c212a73" name = "golang.org/x/text" packages = [ "collate", @@ -137,18 +156,22 @@ "unicode/bidi", "unicode/cldr", "unicode/norm", - "unicode/rangetable" + "unicode/rangetable", ] + pruneopts = "UT" revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" version = "v0.3.0" [[projects]] branch = "master" + digest = "1:601e63e7d4577f907118bec825902505291918859d223bce015539e79f1160e3" name = "google.golang.org/genproto" packages = ["googleapis/rpc/status"] + pruneopts = "UT" revision = "32ee49c4dd805befd833990acba36cb75042378c" [[projects]] + digest = "1:7a977fdcd5abff03e94f92e7b374ef37e91c7c389581e5c4348fa98616e6c6be" name = "google.golang.org/grpc" packages = [ ".", @@ -176,20 +199,39 @@ "stats", "status", "tap", - "transport" + "transport", ] + pruneopts = "UT" revision = "7a6a684ca69eb4cae85ad0a484f2e531598c047b" version = "v1.12.2" [[projects]] + digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202" name = "gopkg.in/yaml.v2" packages = ["."] + pruneopts = "UT" revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" version = "v2.2.1" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "5dd480018adbb94025564b74bad8dd269cc516183b7b428317f6dd04b07726f4" + input-imports = [ + "github.com/container-storage-interface/spec/lib/go/csi", + "github.com/golang/mock/gomock", + "github.com/golang/protobuf/proto", + "github.com/golang/protobuf/ptypes", + "github.com/golang/protobuf/ptypes/wrappers", + "github.com/onsi/ginkgo", + "github.com/onsi/gomega", + "github.com/sirupsen/logrus", + "golang.org/x/net/context", + "google.golang.org/grpc", + "google.golang.org/grpc/codes", + "google.golang.org/grpc/connectivity", + "google.golang.org/grpc/reflection", + "google.golang.org/grpc/status", + "gopkg.in/yaml.v2", + ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index e7312785..4e0836d0 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -27,7 +27,7 @@ [[constraint]] name = "github.com/container-storage-interface/spec" - version = "~0.3.0" + version = "v1.0.0-rc2" [[constraint]] name = "github.com/golang/mock" @@ -35,7 +35,7 @@ [[constraint]] name = "github.com/golang/protobuf" - version = "v1.1.0" + version = "v1.2.0" [[constraint]] name = "github.com/onsi/ginkgo" diff --git a/driver/driver.go b/driver/driver.go index 8f2b1564..01224a3a 100644 --- a/driver/driver.go +++ b/driver/driver.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -//go:generate mockgen -package=driver -destination=driver.mock.go github.com/container-storage-interface/spec/lib/go/csi/v0 IdentityServer,ControllerServer,NodeServer +//go:generate mockgen -package=driver -destination=driver.mock.go github.com/container-storage-interface/spec/lib/go/csi IdentityServer,ControllerServer,NodeServer package driver @@ -29,7 +29,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) @@ -233,35 +233,35 @@ func isAuthenticated(req interface{}, creds *CSICreds) (bool, error) { } func authenticateCreateVolume(req *csi.CreateVolumeRequest, creds *CSICreds) (bool, error) { - return credsCheck(req.GetControllerCreateSecrets(), creds.CreateVolumeSecret) + return credsCheck(req.GetSecrets(), creds.CreateVolumeSecret) } func authenticateDeleteVolume(req *csi.DeleteVolumeRequest, creds *CSICreds) (bool, error) { - return credsCheck(req.GetControllerDeleteSecrets(), creds.DeleteVolumeSecret) + return credsCheck(req.GetSecrets(), creds.DeleteVolumeSecret) } func authenticateControllerPublishVolume(req *csi.ControllerPublishVolumeRequest, creds *CSICreds) (bool, error) { - return credsCheck(req.GetControllerPublishSecrets(), creds.ControllerPublishVolumeSecret) + return credsCheck(req.GetSecrets(), creds.ControllerPublishVolumeSecret) } func authenticateControllerUnpublishVolume(req *csi.ControllerUnpublishVolumeRequest, creds *CSICreds) (bool, error) { - return credsCheck(req.GetControllerUnpublishSecrets(), creds.ControllerUnpublishVolumeSecret) + return credsCheck(req.GetSecrets(), creds.ControllerUnpublishVolumeSecret) } func authenticateNodeStageVolume(req *csi.NodeStageVolumeRequest, creds *CSICreds) (bool, error) { - return credsCheck(req.GetNodeStageSecrets(), creds.NodeStageVolumeSecret) + return credsCheck(req.GetSecrets(), creds.NodeStageVolumeSecret) } func authenticateNodePublishVolume(req *csi.NodePublishVolumeRequest, creds *CSICreds) (bool, error) { - return credsCheck(req.GetNodePublishSecrets(), creds.NodePublishVolumeSecret) + return credsCheck(req.GetSecrets(), creds.NodePublishVolumeSecret) } func authenticateCreateSnapshot(req *csi.CreateSnapshotRequest, creds *CSICreds) (bool, error) { - return credsCheck(req.GetCreateSnapshotSecrets(), creds.CreateSnapshotSecret) + return credsCheck(req.GetSecrets(), creds.CreateSnapshotSecret) } func authenticateDeleteSnapshot(req *csi.DeleteSnapshotRequest, creds *CSICreds) (bool, error) { - return credsCheck(req.GetDeleteSnapshotSecrets(), creds.DeleteSnapshotSecret) + return credsCheck(req.GetSecrets(), creds.DeleteSnapshotSecret) } func credsCheck(secrets map[string]string, secretVal string) (bool, error) { diff --git a/driver/driver.mock.go b/driver/driver.mock.go index cabecfa9..c54acaad 100644 --- a/driver/driver.mock.go +++ b/driver/driver.mock.go @@ -1,12 +1,12 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/container-storage-interface/spec/lib/go/csi/v0 (interfaces: IdentityServer,ControllerServer,NodeServer) +// Source: github.com/container-storage-interface/spec/lib/go/csi (interfaces: IdentityServer,ControllerServer,NodeServer) // Package driver is a generated GoMock package. package driver import ( context "context" - v0 "github.com/container-storage-interface/spec/lib/go/csi/v0" + csi "github.com/container-storage-interface/spec/lib/go/csi" gomock "github.com/golang/mock/gomock" reflect "reflect" ) @@ -35,9 +35,9 @@ func (m *MockIdentityServer) EXPECT() *MockIdentityServerMockRecorder { } // GetPluginCapabilities mocks base method -func (m *MockIdentityServer) GetPluginCapabilities(arg0 context.Context, arg1 *v0.GetPluginCapabilitiesRequest) (*v0.GetPluginCapabilitiesResponse, error) { +func (m *MockIdentityServer) GetPluginCapabilities(arg0 context.Context, arg1 *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error) { ret := m.ctrl.Call(m, "GetPluginCapabilities", arg0, arg1) - ret0, _ := ret[0].(*v0.GetPluginCapabilitiesResponse) + ret0, _ := ret[0].(*csi.GetPluginCapabilitiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -48,9 +48,9 @@ func (mr *MockIdentityServerMockRecorder) GetPluginCapabilities(arg0, arg1 inter } // GetPluginInfo mocks base method -func (m *MockIdentityServer) GetPluginInfo(arg0 context.Context, arg1 *v0.GetPluginInfoRequest) (*v0.GetPluginInfoResponse, error) { +func (m *MockIdentityServer) GetPluginInfo(arg0 context.Context, arg1 *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error) { ret := m.ctrl.Call(m, "GetPluginInfo", arg0, arg1) - ret0, _ := ret[0].(*v0.GetPluginInfoResponse) + ret0, _ := ret[0].(*csi.GetPluginInfoResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -61,9 +61,9 @@ func (mr *MockIdentityServerMockRecorder) GetPluginInfo(arg0, arg1 interface{}) } // Probe mocks base method -func (m *MockIdentityServer) Probe(arg0 context.Context, arg1 *v0.ProbeRequest) (*v0.ProbeResponse, error) { +func (m *MockIdentityServer) Probe(arg0 context.Context, arg1 *csi.ProbeRequest) (*csi.ProbeResponse, error) { ret := m.ctrl.Call(m, "Probe", arg0, arg1) - ret0, _ := ret[0].(*v0.ProbeResponse) + ret0, _ := ret[0].(*csi.ProbeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -97,9 +97,9 @@ func (m *MockControllerServer) EXPECT() *MockControllerServerMockRecorder { } // ControllerGetCapabilities mocks base method -func (m *MockControllerServer) ControllerGetCapabilities(arg0 context.Context, arg1 *v0.ControllerGetCapabilitiesRequest) (*v0.ControllerGetCapabilitiesResponse, error) { +func (m *MockControllerServer) ControllerGetCapabilities(arg0 context.Context, arg1 *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error) { ret := m.ctrl.Call(m, "ControllerGetCapabilities", arg0, arg1) - ret0, _ := ret[0].(*v0.ControllerGetCapabilitiesResponse) + ret0, _ := ret[0].(*csi.ControllerGetCapabilitiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -110,9 +110,9 @@ func (mr *MockControllerServerMockRecorder) ControllerGetCapabilities(arg0, arg1 } // ControllerPublishVolume mocks base method -func (m *MockControllerServer) ControllerPublishVolume(arg0 context.Context, arg1 *v0.ControllerPublishVolumeRequest) (*v0.ControllerPublishVolumeResponse, error) { +func (m *MockControllerServer) ControllerPublishVolume(arg0 context.Context, arg1 *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error) { ret := m.ctrl.Call(m, "ControllerPublishVolume", arg0, arg1) - ret0, _ := ret[0].(*v0.ControllerPublishVolumeResponse) + ret0, _ := ret[0].(*csi.ControllerPublishVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -123,9 +123,9 @@ func (mr *MockControllerServerMockRecorder) ControllerPublishVolume(arg0, arg1 i } // ControllerUnpublishVolume mocks base method -func (m *MockControllerServer) ControllerUnpublishVolume(arg0 context.Context, arg1 *v0.ControllerUnpublishVolumeRequest) (*v0.ControllerUnpublishVolumeResponse, error) { +func (m *MockControllerServer) ControllerUnpublishVolume(arg0 context.Context, arg1 *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) { ret := m.ctrl.Call(m, "ControllerUnpublishVolume", arg0, arg1) - ret0, _ := ret[0].(*v0.ControllerUnpublishVolumeResponse) + ret0, _ := ret[0].(*csi.ControllerUnpublishVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -136,9 +136,9 @@ func (mr *MockControllerServerMockRecorder) ControllerUnpublishVolume(arg0, arg1 } // CreateSnapshot mocks base method -func (m *MockControllerServer) CreateSnapshot(arg0 context.Context, arg1 *v0.CreateSnapshotRequest) (*v0.CreateSnapshotResponse, error) { +func (m *MockControllerServer) CreateSnapshot(arg0 context.Context, arg1 *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error) { ret := m.ctrl.Call(m, "CreateSnapshot", arg0, arg1) - ret0, _ := ret[0].(*v0.CreateSnapshotResponse) + ret0, _ := ret[0].(*csi.CreateSnapshotResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -149,9 +149,9 @@ func (mr *MockControllerServerMockRecorder) CreateSnapshot(arg0, arg1 interface{ } // CreateVolume mocks base method -func (m *MockControllerServer) CreateVolume(arg0 context.Context, arg1 *v0.CreateVolumeRequest) (*v0.CreateVolumeResponse, error) { +func (m *MockControllerServer) CreateVolume(arg0 context.Context, arg1 *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { ret := m.ctrl.Call(m, "CreateVolume", arg0, arg1) - ret0, _ := ret[0].(*v0.CreateVolumeResponse) + ret0, _ := ret[0].(*csi.CreateVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -162,9 +162,9 @@ func (mr *MockControllerServerMockRecorder) CreateVolume(arg0, arg1 interface{}) } // DeleteSnapshot mocks base method -func (m *MockControllerServer) DeleteSnapshot(arg0 context.Context, arg1 *v0.DeleteSnapshotRequest) (*v0.DeleteSnapshotResponse, error) { +func (m *MockControllerServer) DeleteSnapshot(arg0 context.Context, arg1 *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error) { ret := m.ctrl.Call(m, "DeleteSnapshot", arg0, arg1) - ret0, _ := ret[0].(*v0.DeleteSnapshotResponse) + ret0, _ := ret[0].(*csi.DeleteSnapshotResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -175,9 +175,9 @@ func (mr *MockControllerServerMockRecorder) DeleteSnapshot(arg0, arg1 interface{ } // DeleteVolume mocks base method -func (m *MockControllerServer) DeleteVolume(arg0 context.Context, arg1 *v0.DeleteVolumeRequest) (*v0.DeleteVolumeResponse, error) { +func (m *MockControllerServer) DeleteVolume(arg0 context.Context, arg1 *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) { ret := m.ctrl.Call(m, "DeleteVolume", arg0, arg1) - ret0, _ := ret[0].(*v0.DeleteVolumeResponse) + ret0, _ := ret[0].(*csi.DeleteVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -188,9 +188,9 @@ func (mr *MockControllerServerMockRecorder) DeleteVolume(arg0, arg1 interface{}) } // GetCapacity mocks base method -func (m *MockControllerServer) GetCapacity(arg0 context.Context, arg1 *v0.GetCapacityRequest) (*v0.GetCapacityResponse, error) { +func (m *MockControllerServer) GetCapacity(arg0 context.Context, arg1 *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error) { ret := m.ctrl.Call(m, "GetCapacity", arg0, arg1) - ret0, _ := ret[0].(*v0.GetCapacityResponse) + ret0, _ := ret[0].(*csi.GetCapacityResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -201,9 +201,9 @@ func (mr *MockControllerServerMockRecorder) GetCapacity(arg0, arg1 interface{}) } // ListSnapshots mocks base method -func (m *MockControllerServer) ListSnapshots(arg0 context.Context, arg1 *v0.ListSnapshotsRequest) (*v0.ListSnapshotsResponse, error) { +func (m *MockControllerServer) ListSnapshots(arg0 context.Context, arg1 *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error) { ret := m.ctrl.Call(m, "ListSnapshots", arg0, arg1) - ret0, _ := ret[0].(*v0.ListSnapshotsResponse) + ret0, _ := ret[0].(*csi.ListSnapshotsResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -214,9 +214,9 @@ func (mr *MockControllerServerMockRecorder) ListSnapshots(arg0, arg1 interface{} } // ListVolumes mocks base method -func (m *MockControllerServer) ListVolumes(arg0 context.Context, arg1 *v0.ListVolumesRequest) (*v0.ListVolumesResponse, error) { +func (m *MockControllerServer) ListVolumes(arg0 context.Context, arg1 *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error) { ret := m.ctrl.Call(m, "ListVolumes", arg0, arg1) - ret0, _ := ret[0].(*v0.ListVolumesResponse) + ret0, _ := ret[0].(*csi.ListVolumesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -227,9 +227,9 @@ func (mr *MockControllerServerMockRecorder) ListVolumes(arg0, arg1 interface{}) } // ValidateVolumeCapabilities mocks base method -func (m *MockControllerServer) ValidateVolumeCapabilities(arg0 context.Context, arg1 *v0.ValidateVolumeCapabilitiesRequest) (*v0.ValidateVolumeCapabilitiesResponse, error) { +func (m *MockControllerServer) ValidateVolumeCapabilities(arg0 context.Context, arg1 *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error) { ret := m.ctrl.Call(m, "ValidateVolumeCapabilities", arg0, arg1) - ret0, _ := ret[0].(*v0.ValidateVolumeCapabilitiesResponse) + ret0, _ := ret[0].(*csi.ValidateVolumeCapabilitiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -263,9 +263,9 @@ func (m *MockNodeServer) EXPECT() *MockNodeServerMockRecorder { } // NodeGetCapabilities mocks base method -func (m *MockNodeServer) NodeGetCapabilities(arg0 context.Context, arg1 *v0.NodeGetCapabilitiesRequest) (*v0.NodeGetCapabilitiesResponse, error) { +func (m *MockNodeServer) NodeGetCapabilities(arg0 context.Context, arg1 *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error) { ret := m.ctrl.Call(m, "NodeGetCapabilities", arg0, arg1) - ret0, _ := ret[0].(*v0.NodeGetCapabilitiesResponse) + ret0, _ := ret[0].(*csi.NodeGetCapabilitiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -275,23 +275,10 @@ func (mr *MockNodeServerMockRecorder) NodeGetCapabilities(arg0, arg1 interface{} return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeGetCapabilities", reflect.TypeOf((*MockNodeServer)(nil).NodeGetCapabilities), arg0, arg1) } -// NodeGetId mocks base method -func (m *MockNodeServer) NodeGetId(arg0 context.Context, arg1 *v0.NodeGetIdRequest) (*v0.NodeGetIdResponse, error) { - ret := m.ctrl.Call(m, "NodeGetId", arg0, arg1) - ret0, _ := ret[0].(*v0.NodeGetIdResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// NodeGetId indicates an expected call of NodeGetId -func (mr *MockNodeServerMockRecorder) NodeGetId(arg0, arg1 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeGetId", reflect.TypeOf((*MockNodeServer)(nil).NodeGetId), arg0, arg1) -} - // NodeGetInfo mocks base method -func (m *MockNodeServer) NodeGetInfo(arg0 context.Context, arg1 *v0.NodeGetInfoRequest) (*v0.NodeGetInfoResponse, error) { +func (m *MockNodeServer) NodeGetInfo(arg0 context.Context, arg1 *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error) { ret := m.ctrl.Call(m, "NodeGetInfo", arg0, arg1) - ret0, _ := ret[0].(*v0.NodeGetInfoResponse) + ret0, _ := ret[0].(*csi.NodeGetInfoResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -302,9 +289,9 @@ func (mr *MockNodeServerMockRecorder) NodeGetInfo(arg0, arg1 interface{}) *gomoc } // NodeGetVolumeStats mocks base method -func (m *MockNodeServer) NodeGetVolumeStats(arg0 context.Context, arg1 *v0.NodeGetVolumeStatsRequest) (*v0.NodeGetVolumeStatsResponse, error) { +func (m *MockNodeServer) NodeGetVolumeStats(arg0 context.Context, arg1 *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error) { ret := m.ctrl.Call(m, "NodeGetVolumeStats", arg0, arg1) - ret0, _ := ret[0].(*v0.NodeGetVolumeStatsResponse) + ret0, _ := ret[0].(*csi.NodeGetVolumeStatsResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -315,9 +302,9 @@ func (mr *MockNodeServerMockRecorder) NodeGetVolumeStats(arg0, arg1 interface{}) } // NodePublishVolume mocks base method -func (m *MockNodeServer) NodePublishVolume(arg0 context.Context, arg1 *v0.NodePublishVolumeRequest) (*v0.NodePublishVolumeResponse, error) { +func (m *MockNodeServer) NodePublishVolume(arg0 context.Context, arg1 *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) { ret := m.ctrl.Call(m, "NodePublishVolume", arg0, arg1) - ret0, _ := ret[0].(*v0.NodePublishVolumeResponse) + ret0, _ := ret[0].(*csi.NodePublishVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -328,9 +315,9 @@ func (mr *MockNodeServerMockRecorder) NodePublishVolume(arg0, arg1 interface{}) } // NodeStageVolume mocks base method -func (m *MockNodeServer) NodeStageVolume(arg0 context.Context, arg1 *v0.NodeStageVolumeRequest) (*v0.NodeStageVolumeResponse, error) { +func (m *MockNodeServer) NodeStageVolume(arg0 context.Context, arg1 *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error) { ret := m.ctrl.Call(m, "NodeStageVolume", arg0, arg1) - ret0, _ := ret[0].(*v0.NodeStageVolumeResponse) + ret0, _ := ret[0].(*csi.NodeStageVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -341,9 +328,9 @@ func (mr *MockNodeServerMockRecorder) NodeStageVolume(arg0, arg1 interface{}) *g } // NodeUnpublishVolume mocks base method -func (m *MockNodeServer) NodeUnpublishVolume(arg0 context.Context, arg1 *v0.NodeUnpublishVolumeRequest) (*v0.NodeUnpublishVolumeResponse, error) { +func (m *MockNodeServer) NodeUnpublishVolume(arg0 context.Context, arg1 *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error) { ret := m.ctrl.Call(m, "NodeUnpublishVolume", arg0, arg1) - ret0, _ := ret[0].(*v0.NodeUnpublishVolumeResponse) + ret0, _ := ret[0].(*csi.NodeUnpublishVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -354,9 +341,9 @@ func (mr *MockNodeServerMockRecorder) NodeUnpublishVolume(arg0, arg1 interface{} } // NodeUnstageVolume mocks base method -func (m *MockNodeServer) NodeUnstageVolume(arg0 context.Context, arg1 *v0.NodeUnstageVolumeRequest) (*v0.NodeUnstageVolumeResponse, error) { +func (m *MockNodeServer) NodeUnstageVolume(arg0 context.Context, arg1 *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error) { ret := m.ctrl.Call(m, "NodeUnstageVolume", arg0, arg1) - ret0, _ := ret[0].(*v0.NodeUnstageVolumeResponse) + ret0, _ := ret[0].(*csi.NodeUnstageVolumeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/hack/e2e.sh b/hack/e2e.sh index 3b17be3e..baf4c304 100755 --- a/hack/e2e.sh +++ b/hack/e2e.sh @@ -54,7 +54,7 @@ runTestAPI() fi } -test -x bin/mock || exit 1 +make cd cmd/csi-sanity make clean install || exit 1 diff --git a/mock/cache/SnapshotCache.go b/mock/cache/SnapshotCache.go index 14343d04..89835e11 100644 --- a/mock/cache/SnapshotCache.go +++ b/mock/cache/SnapshotCache.go @@ -4,7 +4,7 @@ import ( "strings" "sync" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" ) type SnapshotCache interface { @@ -12,7 +12,7 @@ type SnapshotCache interface { Delete(i int) - List(status csi.SnapshotStatus_Type) []csi.Snapshot + List(ready bool) []csi.Snapshot FindSnapshot(k, v string) (int, Snapshot) } @@ -49,13 +49,13 @@ func (snap *snapshotCache) Delete(i int) { snap.snapshots = snap.snapshots[:len(snap.snapshots)-1] } -func (snap *snapshotCache) List(status csi.SnapshotStatus_Type) []csi.Snapshot { +func (snap *snapshotCache) List(ready bool) []csi.Snapshot { snap.snapshotsRWL.RLock() defer snap.snapshotsRWL.RUnlock() snapshots := make([]csi.Snapshot, 0) for _, v := range snap.snapshots { - if v.SnapshotCSI.GetStatus() != nil && v.SnapshotCSI.GetStatus().Type == status { + if v.SnapshotCSI.GetReadyToUse() { snapshots = append(snapshots, v.SnapshotCSI) } } @@ -71,7 +71,7 @@ func (snap *snapshotCache) FindSnapshot(k, v string) (int, Snapshot) { for i, vi := range snap.snapshots { switch k { case "id": - if strings.EqualFold(v, vi.SnapshotCSI.Id) { + if strings.EqualFold(v, vi.SnapshotCSI.GetSnapshotId()) { return i, vi } case "sourceVolumeId": diff --git a/mock/service/controller.go b/mock/service/controller.go index e0acd5c8..eace79f8 100644 --- a/mock/service/controller.go +++ b/mock/service/controller.go @@ -12,7 +12,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" ) const ( @@ -62,7 +62,7 @@ func (s *service) CreateVolume( s.volsRWL.Lock() defer s.volsRWL.Unlock() s.vols = append(s.vols, v) - MockVolumes[v.Id] = Volume{ + MockVolumes[v.GetVolumeId()] = Volume{ VolumeCSI: v, NodeID: "", ISStaged: false, @@ -140,10 +140,10 @@ func (s *service) ControllerPublishVolume( devPathKey := path.Join(req.NodeId, "dev") // Check to see if the volume is already published. - if device := v.Attributes[devPathKey]; device != "" { + if device := v.VolumeContext[devPathKey]; device != "" { var volRo bool var roVal string - if ro, ok := v.Attributes[ReadOnlyKey]; ok { + if ro, ok := v.VolumeContext[ReadOnlyKey]; ok { roVal = ro } @@ -159,7 +159,7 @@ func (s *service) ControllerPublishVolume( } return &csi.ControllerPublishVolumeResponse{ - PublishInfo: map[string]string{ + PublishContext: map[string]string{ "device": device, "readonly": roVal, }, @@ -175,12 +175,12 @@ func (s *service) ControllerPublishVolume( // Publish the volume. device := "/dev/mock" - v.Attributes[devPathKey] = device - v.Attributes[ReadOnlyKey] = roVal + v.VolumeContext[devPathKey] = device + v.VolumeContext[ReadOnlyKey] = roVal s.vols[i] = v return &csi.ControllerPublishVolumeResponse{ - PublishInfo: map[string]string{ + PublishContext: map[string]string{ "device": device, "readonly": roVal, }, @@ -223,13 +223,13 @@ func (s *service) ControllerUnpublishVolume( devPathKey := path.Join(nodeID, "dev") // Check to see if the volume is already unpublished. - if v.Attributes[devPathKey] == "" { + if v.VolumeContext[devPathKey] == "" { return &csi.ControllerUnpublishVolumeResponse{}, nil } // Unpublish the volume. - delete(v.Attributes, devPathKey) - delete(v.Attributes, ReadOnlyKey) + delete(v.VolumeContext, devPathKey) + delete(v.VolumeContext, ReadOnlyKey) s.vols[i] = v return &csi.ControllerUnpublishVolumeResponse{}, nil @@ -252,7 +252,11 @@ func (s *service) ValidateVolumeCapabilities( } return &csi.ValidateVolumeCapabilitiesResponse{ - Supported: true, + Confirmed: &csi.ValidateVolumeCapabilitiesResponse_Confirmed{ + VolumeContext: req.GetVolumeContext(), + VolumeCapabilities: req.GetVolumeCapabilities(), + Parameters: req.GetParameters(), + }, }, nil } @@ -510,7 +514,8 @@ func getAllSnapshots(s *service, req *csi.ListSnapshotsRequest) (*csi.ListSnapsh // Copy the mock snapshots into a new slice in order to avoid // locking the service's snapshot slice for the duration of the // ListSnapshots RPC. - snapshots := s.snapshots.List(csi.SnapshotStatus_READY) + readyToUse := true + snapshots := s.snapshots.List(readyToUse) var ( ulenSnapshots = int32(len(snapshots)) diff --git a/mock/service/identity.go b/mock/service/identity.go index 2d217344..7e8735a9 100644 --- a/mock/service/identity.go +++ b/mock/service/identity.go @@ -3,7 +3,7 @@ package service import ( "golang.org/x/net/context" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" "github.com/golang/protobuf/ptypes/wrappers" ) diff --git a/mock/service/node.go b/mock/service/node.go index 0ef0726c..886a219a 100644 --- a/mock/service/node.go +++ b/mock/service/node.go @@ -8,7 +8,7 @@ import ( "golang.org/x/net/context" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" ) func (s *service) NodeStageVolume( @@ -16,7 +16,7 @@ func (s *service) NodeStageVolume( req *csi.NodeStageVolumeRequest) ( *csi.NodeStageVolumeResponse, error) { - device, ok := req.PublishInfo["device"] + device, ok := req.PublishContext["device"] if !ok { if s.config.DisableAttach { device = "mock device" @@ -52,14 +52,14 @@ func (s *service) NodeStageVolume( nodeStgPathKey := path.Join(s.nodeID, req.StagingTargetPath) // Check to see if the volume has already been staged. - if v.Attributes[nodeStgPathKey] != "" { + if v.VolumeContext[nodeStgPathKey] != "" { // TODO: Check for the capabilities to be equal. Return "ALREADY_EXISTS" // if the capabilities don't match. return &csi.NodeStageVolumeResponse{}, nil } // Stage the volume. - v.Attributes[nodeStgPathKey] = device + v.VolumeContext[nodeStgPathKey] = device s.vols[i] = v return &csi.NodeStageVolumeResponse{}, nil @@ -91,12 +91,12 @@ func (s *service) NodeUnstageVolume( nodeStgPathKey := path.Join(s.nodeID, req.StagingTargetPath) // Check to see if the volume has already been unstaged. - if v.Attributes[nodeStgPathKey] == "" { + if v.VolumeContext[nodeStgPathKey] == "" { return &csi.NodeUnstageVolumeResponse{}, nil } // Unpublish the volume. - delete(v.Attributes, nodeStgPathKey) + delete(v.VolumeContext, nodeStgPathKey) s.vols[i] = v return &csi.NodeUnstageVolumeResponse{}, nil @@ -107,7 +107,7 @@ func (s *service) NodePublishVolume( req *csi.NodePublishVolumeRequest) ( *csi.NodePublishVolumeResponse, error) { - device, ok := req.PublishInfo["device"] + device, ok := req.PublishContext["device"] if !ok { if s.config.DisableAttach { device = "mock device" @@ -143,7 +143,7 @@ func (s *service) NodePublishVolume( nodeMntPathKey := path.Join(s.nodeID, req.TargetPath) // Check to see if the volume has already been published. - if v.Attributes[nodeMntPathKey] != "" { + if v.VolumeContext[nodeMntPathKey] != "" { // Requests marked Readonly fail due to volumes published by // the Mock driver supporting only RW mode. @@ -156,9 +156,9 @@ func (s *service) NodePublishVolume( // Publish the volume. if req.GetStagingTargetPath() != "" { - v.Attributes[nodeMntPathKey] = req.GetStagingTargetPath() + v.VolumeContext[nodeMntPathKey] = req.GetStagingTargetPath() } else { - v.Attributes[nodeMntPathKey] = device + v.VolumeContext[nodeMntPathKey] = device } s.vols[i] = v @@ -190,27 +190,17 @@ func (s *service) NodeUnpublishVolume( nodeMntPathKey := path.Join(s.nodeID, req.TargetPath) // Check to see if the volume has already been unpublished. - if v.Attributes[nodeMntPathKey] == "" { + if v.VolumeContext[nodeMntPathKey] == "" { return &csi.NodeUnpublishVolumeResponse{}, nil } // Unpublish the volume. - delete(v.Attributes, nodeMntPathKey) + delete(v.VolumeContext, nodeMntPathKey) s.vols[i] = v return &csi.NodeUnpublishVolumeResponse{}, nil } -func (s *service) NodeGetId( - ctx context.Context, - req *csi.NodeGetIdRequest) ( - *csi.NodeGetIdResponse, error) { - - return &csi.NodeGetIdResponse{ - NodeId: s.nodeID, - }, nil -} - func (s *service) NodeGetCapabilities( ctx context.Context, req *csi.NodeGetCapabilitiesRequest) ( diff --git a/mock/service/service.go b/mock/service/service.go index 661ba64a..2254ccb8 100644 --- a/mock/service/service.go +++ b/mock/service/service.go @@ -5,11 +5,12 @@ import ( "strings" "sync" "sync/atomic" - "time" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" "github.com/kubernetes-csi/csi-test/mock/cache" "golang.org/x/net/context" + + "github.com/golang/protobuf/ptypes" ) const ( @@ -93,8 +94,8 @@ const ( func (s *service) newVolume(name string, capcity int64) csi.Volume { return csi.Volume{ - Id: fmt.Sprintf("%d", atomic.AddUint64(&s.volsNID, 1)), - Attributes: map[string]string{"name": name}, + VolumeId: fmt.Sprintf("%d", atomic.AddUint64(&s.volsNID, 1)), + VolumeContext: map[string]string{"name": name}, CapacityBytes: capcity, } } @@ -111,11 +112,11 @@ func (s *service) findVolNoLock(k, v string) (volIdx int, volInfo csi.Volume) { for i, vi := range s.vols { switch k { case "id": - if strings.EqualFold(v, vi.Id) { + if strings.EqualFold(v, vi.GetVolumeId()) { return i, vi } case "name": - if n, ok := vi.Attributes["name"]; ok && strings.EqualFold(v, n) { + if n, ok := vi.VolumeContext["name"]; ok && strings.EqualFold(v, n) { return i, vi } } @@ -131,17 +132,16 @@ func (s *service) findVolByName( } func (s *service) newSnapshot(name, sourceVolumeId string, parameters map[string]string) cache.Snapshot { + + ptime := ptypes.TimestampNow() return cache.Snapshot{ Name: name, Parameters: parameters, SnapshotCSI: csi.Snapshot{ - Id: fmt.Sprintf("%d", atomic.AddUint64(&s.snapshotsNID, 1)), - CreatedAt: time.Now().UnixNano(), + SnapshotId: fmt.Sprintf("%d", atomic.AddUint64(&s.snapshotsNID, 1)), + CreationTime: ptime, SourceVolumeId: sourceVolumeId, - Status: &csi.SnapshotStatus{ - Type: csi.SnapshotStatus_READY, - Details: "snapshot ready", - }, + ReadyToUse: true, }, } } diff --git a/pkg/sanity/cleanup.go b/pkg/sanity/cleanup.go index 699efe7b..65a30334 100644 --- a/pkg/sanity/cleanup.go +++ b/pkg/sanity/cleanup.go @@ -20,7 +20,7 @@ import ( "context" "log" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" . "github.com/onsi/ginkgo" ) @@ -61,8 +61,8 @@ func (cl *Cleanup) RegisterVolume(name string, info VolumeInfo) { // MaybeRegisterVolume adds or updates an entry for the volume with // the given name if CreateVolume was successful. func (cl *Cleanup) MaybeRegisterVolume(name string, vol *csi.CreateVolumeResponse, err error) { - if err == nil && vol.GetVolume().GetId() != "" { - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + if err == nil && vol.GetVolume().GetVolumeId() != "" { + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) } } @@ -112,7 +112,7 @@ func (cl *Cleanup) DeleteVolumes() { &csi.ControllerUnpublishVolumeRequest{ VolumeId: info.VolumeID, NodeId: info.NodeID, - ControllerUnpublishSecrets: cl.Context.Secrets.ControllerUnpublishVolumeSecret, + Secrets: cl.Context.Secrets.ControllerUnpublishVolumeSecret, }, ); err != nil { logger.Printf("warning: ControllerUnpublishVolume: %s", err) @@ -122,8 +122,8 @@ func (cl *Cleanup) DeleteVolumes() { if _, err := cl.ControllerClient.DeleteVolume( ctx, &csi.DeleteVolumeRequest{ - VolumeId: info.VolumeID, - ControllerDeleteSecrets: cl.Context.Secrets.DeleteVolumeSecret, + VolumeId: info.VolumeID, + Secrets: cl.Context.Secrets.DeleteVolumeSecret, }, ); err != nil { logger.Printf("error: DeleteVolume: %s", err) diff --git a/pkg/sanity/controller.go b/pkg/sanity/controller.go index c0c694ed..830d6cdb 100644 --- a/pkg/sanity/controller.go +++ b/pkg/sanity/controller.go @@ -23,11 +23,12 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" + + "strconv" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "strconv" ) const ( @@ -48,14 +49,14 @@ func TestVolumeSize(sc *SanityContext) int64 { func verifyVolumeInfo(v *csi.Volume) { Expect(v).NotTo(BeNil()) - Expect(v.GetId()).NotTo(BeEmpty()) + Expect(v.GetVolumeId()).NotTo(BeEmpty()) } func verifySnapshotInfo(snapshot *csi.Snapshot) { Expect(snapshot).NotTo(BeNil()) - Expect(snapshot.GetId()).NotTo(BeEmpty()) + Expect(snapshot.GetSnapshotId()).NotTo(BeEmpty()) Expect(snapshot.GetSourceVolumeId()).NotTo(BeEmpty()) - Expect(snapshot.GetCreatedAt()).NotTo(BeZero()) + Expect(snapshot.GetCreationTime()).NotTo(BeZero()) } func isControllerCapabilitySupported( @@ -184,8 +185,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { vol, err := c.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) cl.MaybeRegisterVolume("", vol, err) @@ -201,9 +202,9 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { vol, err := c.CreateVolume( context.Background(), &csi.CreateVolumeRequest{ - Name: name, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Name: name, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) cl.MaybeRegisterVolume(name, vol, err) @@ -233,23 +234,23 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { }, }, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) By("cleaning up deleting the volume") _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -278,8 +279,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { CapacityRange: &csi.CapacityRange{ RequiredBytes: TestVolumeSize(sc), }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) if serverError, ok := status.FromError(err); ok && @@ -289,8 +290,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) Expect(vol.GetVolume().GetCapacityBytes()).To(BeNumerically(">=", TestVolumeSize(sc))) By("cleaning up deleting the volume") @@ -298,8 +299,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -328,15 +329,15 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { CapacityRange: &csi.CapacityRange{ RequiredBytes: size, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol1).NotTo(BeNil()) Expect(vol1.GetVolume()).NotTo(BeNil()) - Expect(vol1.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol1.GetVolume().GetId()}) + Expect(vol1.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol1.GetVolume().GetVolumeId()}) Expect(vol1.GetVolume().GetCapacityBytes()).To(BeNumerically(">=", size)) vol2, err := c.CreateVolume( @@ -356,24 +357,24 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { CapacityRange: &csi.CapacityRange{ RequiredBytes: size, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol2).NotTo(BeNil()) Expect(vol2.GetVolume()).NotTo(BeNil()) - Expect(vol2.GetVolume().GetId()).NotTo(BeEmpty()) + Expect(vol2.GetVolume().GetVolumeId()).NotTo(BeEmpty()) Expect(vol2.GetVolume().GetCapacityBytes()).To(BeNumerically(">=", size)) - Expect(vol1.GetVolume().GetId()).To(Equal(vol2.GetVolume().GetId())) + Expect(vol1.GetVolume().GetVolumeId()).To(Equal(vol2.GetVolume().GetVolumeId())) By("cleaning up deleting the volume") _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol1.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol1.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -403,15 +404,15 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { RequiredBytes: size1, LimitBytes: size1, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).ToNot(HaveOccurred()) Expect(vol1).NotTo(BeNil()) Expect(vol1.GetVolume()).NotTo(BeNil()) - Expect(vol1.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol1.GetVolume().GetId()}) + Expect(vol1.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol1.GetVolume().GetVolumeId()}) size2 := 2 * TestVolumeSize(sc) _, err = c.CreateVolume( @@ -432,8 +433,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { RequiredBytes: size2, LimitBytes: size2, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).To(HaveOccurred()) @@ -446,8 +447,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol1.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol1.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -481,15 +482,15 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { CapacityRange: &csi.CapacityRange{ RequiredBytes: size, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) Expect(vol.GetVolume().GetCapacityBytes()).To(BeNumerically(">=", size)) By("cleaning up deleting the volume") @@ -497,8 +498,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -518,7 +519,7 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err := c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -533,8 +534,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err := c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: "reallyfakevolumeid", - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: "reallyfakevolumeid", + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -560,15 +561,15 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { }, }, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) // Delete Volume By("deleting a volume") @@ -576,8 +577,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -632,22 +633,22 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { }, }, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) // ValidateVolumeCapabilities By("validating volume capabilities") valivolcap, err := c.ValidateVolumeCapabilities( context.Background(), &csi.ValidateVolumeCapabilitiesRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), VolumeCapabilities: []*csi.VolumeCapability{ { AccessType: &csi.VolumeCapability_Mount{ @@ -661,15 +662,20 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { }) Expect(err).NotTo(HaveOccurred()) Expect(valivolcap).NotTo(BeNil()) - Expect(valivolcap.GetSupported()).To(BeTrue()) + + // If confirmation is provided then it is REQUIRED to provide + // the volume capabilities + if valivolcap.GetConfirmed() != nil { + Expect(valivolcap.GetConfirmed().GetVolumeCapabilities()).NotTo(BeEmpty()) + } By("cleaning up deleting the volume") _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -714,7 +720,7 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err := c.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - ControllerPublishSecrets: sc.Secrets.ControllerPublishVolumeSecret, + Secrets: sc.Secrets.ControllerPublishVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -729,8 +735,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err := c.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - VolumeId: "id", - ControllerPublishSecrets: sc.Secrets.ControllerPublishVolumeSecret, + VolumeId: "id", + Secrets: sc.Secrets.ControllerPublishVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -747,7 +753,7 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { &csi.ControllerPublishVolumeRequest{ VolumeId: "id", NodeId: "fakenode", - ControllerPublishSecrets: sc.Secrets.ControllerPublishVolumeSecret, + Secrets: sc.Secrets.ControllerPublishVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -777,20 +783,20 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { }, }, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) By("getting a node id") - nid, err := n.NodeGetId( + nid, err := n.NodeGetInfo( context.Background(), - &csi.NodeGetIdRequest{}) + &csi.NodeGetInfoRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(nid).NotTo(BeNil()) Expect(nid.GetNodeId()).NotTo(BeEmpty()) @@ -801,7 +807,7 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { conpubvol, err := c.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), NodeId: nid.GetNodeId(), VolumeCapability: &csi.VolumeCapability{ AccessType: &csi.VolumeCapability_Mount{ @@ -811,12 +817,12 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - Readonly: false, - ControllerPublishSecrets: sc.Secrets.ControllerPublishVolumeSecret, + Readonly: false, + Secrets: sc.Secrets.ControllerPublishVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId(), NodeID: nid.GetNodeId()}) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId(), NodeID: nid.GetNodeId()}) Expect(conpubvol).NotTo(BeNil()) By("cleaning up unpublishing the volume") @@ -824,10 +830,10 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { conunpubvol, err := c.ControllerUnpublishVolume( context.Background(), &csi.ControllerUnpublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), // NodeID is optional in ControllerUnpublishVolume - NodeId: nid.GetNodeId(), - ControllerUnpublishSecrets: sc.Secrets.ControllerUnpublishVolumeSecret, + NodeId: nid.GetNodeId(), + Secrets: sc.Secrets.ControllerUnpublishVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -838,8 +844,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -863,8 +869,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - Readonly: false, - ControllerPublishSecrets: sc.Secrets.ControllerPublishVolumeSecret, + Readonly: false, + Secrets: sc.Secrets.ControllerPublishVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -895,15 +901,15 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { }, }, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) // ControllerPublishVolume By("calling controllerpublish on that volume") @@ -911,7 +917,7 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { conpubvol, err := c.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), NodeId: "some-fake-node-id", VolumeCapability: &csi.VolumeCapability{ AccessType: &csi.VolumeCapability_Mount{ @@ -921,8 +927,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - Readonly: false, - ControllerPublishSecrets: sc.Secrets.ControllerPublishVolumeSecret, + Readonly: false, + Secrets: sc.Secrets.ControllerPublishVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -937,8 +943,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -965,20 +971,20 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { }, }, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) By("getting a node id") - nid, err := n.NodeGetId( + nid, err := n.NodeGetInfo( context.Background(), - &csi.NodeGetIdRequest{}) + &csi.NodeGetInfoRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(nid).NotTo(BeNil()) Expect(nid.GetNodeId()).NotTo(BeEmpty()) @@ -987,7 +993,7 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { By("calling controllerpublish on that volume") pubReq := &csi.ControllerPublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), NodeId: nid.GetNodeId(), VolumeCapability: &csi.VolumeCapability{ AccessType: &csi.VolumeCapability_Mount{ @@ -997,8 +1003,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - Readonly: false, - ControllerPublishSecrets: sc.Secrets.ControllerPublishVolumeSecret, + Readonly: false, + Secrets: sc.Secrets.ControllerPublishVolumeSecret, } conpubvol, err := c.ControllerPublishVolume(context.Background(), pubReq) @@ -1021,10 +1027,10 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { conunpubvol, err := c.ControllerUnpublishVolume( context.Background(), &csi.ControllerUnpublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), // NodeID is optional in ControllerUnpublishVolume - NodeId: nid.GetNodeId(), - ControllerUnpublishSecrets: sc.Secrets.ControllerUnpublishVolumeSecret, + NodeId: nid.GetNodeId(), + Secrets: sc.Secrets.ControllerUnpublishVolumeSecret, }, ) @@ -1036,8 +1042,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -1057,7 +1063,7 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err := c.ControllerUnpublishVolume( context.Background(), &csi.ControllerUnpublishVolumeRequest{ - ControllerUnpublishSecrets: sc.Secrets.ControllerUnpublishVolumeSecret, + Secrets: sc.Secrets.ControllerUnpublishVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -1087,20 +1093,20 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { }, }, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, - Parameters: sc.Config.TestVolumeParameters, + Secrets: sc.Secrets.CreateVolumeSecret, + Parameters: sc.Config.TestVolumeParameters, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) By("getting a node id") - nid, err := n.NodeGetId( + nid, err := n.NodeGetInfo( context.Background(), - &csi.NodeGetIdRequest{}) + &csi.NodeGetInfoRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(nid).NotTo(BeNil()) Expect(nid.GetNodeId()).NotTo(BeEmpty()) @@ -1111,7 +1117,7 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { conpubvol, err := c.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), NodeId: nid.GetNodeId(), VolumeCapability: &csi.VolumeCapability{ AccessType: &csi.VolumeCapability_Mount{ @@ -1121,12 +1127,12 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - Readonly: false, - ControllerPublishSecrets: sc.Secrets.ControllerPublishVolumeSecret, + Readonly: false, + Secrets: sc.Secrets.ControllerPublishVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId(), NodeID: nid.GetNodeId()}) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId(), NodeID: nid.GetNodeId()}) Expect(conpubvol).NotTo(BeNil()) // ControllerUnpublishVolume @@ -1135,10 +1141,10 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { conunpubvol, err := c.ControllerUnpublishVolume( context.Background(), &csi.ControllerUnpublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), // NodeID is optional in ControllerUnpublishVolume - NodeId: nid.GetNodeId(), - ControllerUnpublishSecrets: sc.Secrets.ControllerUnpublishVolumeSecret, + NodeId: nid.GetNodeId(), + Secrets: sc.Secrets.ControllerUnpublishVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -1149,8 +1155,8 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) { _, err = c.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -1192,26 +1198,26 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte Expect(err).NotTo(HaveOccurred()) By("creating a snapshot") - snapshotReq := MakeCreateSnapshotReq(sc, "listSnapshots-snapshot-1", volume.GetVolume().GetId(), nil) + snapshotReq := MakeCreateSnapshotReq(sc, "listSnapshots-snapshot-1", volume.GetVolume().GetVolumeId(), nil) snapshot, err := c.CreateSnapshot(context.Background(), snapshotReq) Expect(err).NotTo(HaveOccurred()) snapshots, err := c.ListSnapshots( context.Background(), - &csi.ListSnapshotsRequest{SnapshotId: snapshot.GetSnapshot().GetId()}) + &csi.ListSnapshotsRequest{SnapshotId: snapshot.GetSnapshot().GetSnapshotId()}) Expect(err).NotTo(HaveOccurred()) Expect(snapshots).NotTo(BeNil()) Expect(len(snapshots.GetEntries())).To(BeNumerically("==", 1)) verifySnapshotInfo(snapshots.GetEntries()[0].GetSnapshot()) - Expect(snapshots.GetEntries()[0].GetSnapshot().GetId()).To(Equal(snapshot.GetSnapshot().GetId())) + Expect(snapshots.GetEntries()[0].GetSnapshot().GetSnapshotId()).To(Equal(snapshot.GetSnapshot().GetSnapshotId())) By("cleaning up deleting the snapshot") - delSnapReq := MakeDeleteSnapshotReq(sc, snapshot.GetSnapshot().GetId()) + delSnapReq := MakeDeleteSnapshotReq(sc, snapshot.GetSnapshot().GetSnapshotId()) _, err = c.DeleteSnapshot(context.Background(), delSnapReq) Expect(err).NotTo(HaveOccurred()) By("cleaning up deleting the volume") - delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetId()) + delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetVolumeId()) _, err = c.DeleteVolume(context.Background(), delVolReq) Expect(err).NotTo(HaveOccurred()) }) @@ -1234,7 +1240,7 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte Expect(err).NotTo(HaveOccurred()) By("creating a snapshot") - snapshotReq := MakeCreateSnapshotReq(sc, "listSnapshots-snapshot-2", volume.GetVolume().GetId(), nil) + snapshotReq := MakeCreateSnapshotReq(sc, "listSnapshots-snapshot-2", volume.GetVolume().GetVolumeId(), nil) snapshot, err := c.CreateSnapshot(context.Background(), snapshotReq) Expect(err).NotTo(HaveOccurred()) @@ -1249,12 +1255,12 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte } By("cleaning up deleting the snapshot") - delSnapReq := MakeDeleteSnapshotReq(sc, snapshot.GetSnapshot().GetId()) + delSnapReq := MakeDeleteSnapshotReq(sc, snapshot.GetSnapshot().GetSnapshotId()) _, err = c.DeleteSnapshot(context.Background(), delSnapReq) Expect(err).NotTo(HaveOccurred()) By("cleaning up deleting the volume") - delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetId()) + delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetVolumeId()) _, err = c.DeleteVolume(context.Background(), delVolReq) Expect(err).NotTo(HaveOccurred()) }) @@ -1285,7 +1291,7 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte Expect(err).NotTo(HaveOccurred()) By("creating a snapshot") - snapReq := MakeCreateSnapshotReq(sc, "listSnapshots-snapshot-3", volume.GetVolume().GetId(), nil) + snapReq := MakeCreateSnapshotReq(sc, "listSnapshots-snapshot-3", volume.GetVolume().GetVolumeId(), nil) snapshot, err := c.CreateSnapshot(context.Background(), snapReq) Expect(err).NotTo(HaveOccurred()) Expect(snapshot).NotTo(BeNil()) @@ -1299,12 +1305,12 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte Expect(len(snapshots.GetEntries())).To(Equal(totalSnapshots + 1)) By("cleaning up deleting the snapshot") - delSnapReq := MakeDeleteSnapshotReq(sc, snapshot.GetSnapshot().GetId()) + delSnapReq := MakeDeleteSnapshotReq(sc, snapshot.GetSnapshot().GetSnapshotId()) _, err = c.DeleteSnapshot(context.Background(), delSnapReq) Expect(err).NotTo(HaveOccurred()) By("cleaning up deleting the volume") - delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetId()) + delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetVolumeId()) _, err = c.DeleteVolume(context.Background(), delVolReq) Expect(err).NotTo(HaveOccurred()) @@ -1353,7 +1359,7 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte Expect(volume).NotTo(BeNil()) createVols = append(createVols, volume.GetVolume()) - snapReq := MakeCreateSnapshotReq(sc, "snapshot"+strconv.Itoa(i), volume.GetVolume().GetId(), nil) + snapReq := MakeCreateSnapshotReq(sc, "snapshot"+strconv.Itoa(i), volume.GetVolume().GetVolumeId(), nil) snapshot, err := c.CreateSnapshot(context.Background(), snapReq) Expect(err).NotTo(HaveOccurred()) Expect(snapshot).NotTo(BeNil()) @@ -1395,7 +1401,7 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte By("cleaning up deleting the snapshots") for _, snap := range createSnapshots { - delSnapReq := MakeDeleteSnapshotReq(sc, snap.GetId()) + delSnapReq := MakeDeleteSnapshotReq(sc, snap.GetSnapshotId()) _, err = c.DeleteSnapshot(context.Background(), delSnapReq) Expect(err).NotTo(HaveOccurred()) } @@ -1403,7 +1409,7 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte By("cleaning up deleting the volumes") for _, vol := range createVols { - delVolReq := MakeDeleteVolumeReq(sc, vol.GetId()) + delVolReq := MakeDeleteVolumeReq(sc, vol.GetVolumeId()) _, err = c.DeleteVolume(context.Background(), delVolReq) Expect(err).NotTo(HaveOccurred()) } @@ -1430,7 +1436,7 @@ var _ = DescribeSanity("DeleteSnapshot [Controller Server]", func(sc *SanityCont req := &csi.DeleteSnapshotRequest{} if sc.Secrets != nil { - req.DeleteSnapshotSecrets = sc.Secrets.DeleteSnapshotSecret + req.Secrets = sc.Secrets.DeleteSnapshotSecret } _, err := c.DeleteSnapshot(context.Background(), req) @@ -1457,19 +1463,19 @@ var _ = DescribeSanity("DeleteSnapshot [Controller Server]", func(sc *SanityCont // Create Snapshot First By("creating a snapshot") - snapshotReq := MakeCreateSnapshotReq(sc, "DeleteSnapshot-snapshot-1", volume.GetVolume().GetId(), nil) + snapshotReq := MakeCreateSnapshotReq(sc, "DeleteSnapshot-snapshot-1", volume.GetVolume().GetVolumeId(), nil) snapshot, err := c.CreateSnapshot(context.Background(), snapshotReq) Expect(err).NotTo(HaveOccurred()) Expect(snapshot).NotTo(BeNil()) verifySnapshotInfo(snapshot.GetSnapshot()) By("cleaning up deleting the snapshot") - delSnapReq := MakeDeleteSnapshotReq(sc, snapshot.GetSnapshot().GetId()) + delSnapReq := MakeDeleteSnapshotReq(sc, snapshot.GetSnapshot().GetSnapshotId()) _, err = c.DeleteSnapshot(context.Background(), delSnapReq) Expect(err).NotTo(HaveOccurred()) By("cleaning up deleting the volume") - delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetId()) + delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetVolumeId()) _, err = c.DeleteVolume(context.Background(), delVolReq) Expect(err).NotTo(HaveOccurred()) }) @@ -1495,7 +1501,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont } if sc.Secrets != nil { - req.CreateSnapshotSecrets = sc.Secrets.CreateSnapshotSecret + req.Secrets = sc.Secrets.CreateSnapshotSecret } _, err := c.CreateSnapshot(context.Background(), req) @@ -1512,7 +1518,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont } if sc.Secrets != nil { - req.CreateSnapshotSecrets = sc.Secrets.CreateSnapshotSecret + req.Secrets = sc.Secrets.CreateSnapshotSecret } _, err := c.CreateSnapshot(context.Background(), req) @@ -1530,7 +1536,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont Expect(err).NotTo(HaveOccurred()) By("creating a snapshot") - snapReq1 := MakeCreateSnapshotReq(sc, "CreateSnapshot-snapshot-1", volume.GetVolume().GetId(), nil) + snapReq1 := MakeCreateSnapshotReq(sc, "CreateSnapshot-snapshot-1", volume.GetVolume().GetVolumeId(), nil) snap1, err := c.CreateSnapshot(context.Background(), snapReq1) Expect(err).NotTo(HaveOccurred()) Expect(snap1).NotTo(BeNil()) @@ -1542,12 +1548,12 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont verifySnapshotInfo(snap2.GetSnapshot()) By("cleaning up deleting the snapshot") - delSnapReq := MakeDeleteSnapshotReq(sc, snap1.GetSnapshot().GetId()) + delSnapReq := MakeDeleteSnapshotReq(sc, snap1.GetSnapshot().GetSnapshotId()) _, err = c.DeleteSnapshot(context.Background(), delSnapReq) Expect(err).NotTo(HaveOccurred()) By("cleaning up deleting the volume") - delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetId()) + delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetVolumeId()) _, err = c.DeleteVolume(context.Background(), delVolReq) Expect(err).NotTo(HaveOccurred()) }) @@ -1559,7 +1565,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont Expect(err).ToNot(HaveOccurred()) By("creating a snapshot with the created volume source id") - req1 := MakeCreateSnapshotReq(sc, "CreateSnapshot-snapshot-2", volume.GetVolume().GetId(), nil) + req1 := MakeCreateSnapshotReq(sc, "CreateSnapshot-snapshot-2", volume.GetVolume().GetVolumeId(), nil) snap1, err := c.CreateSnapshot(context.Background(), req1) Expect(err).NotTo(HaveOccurred()) Expect(snap1).NotTo(BeNil()) @@ -1569,7 +1575,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont Expect(err).ToNot(HaveOccurred()) By("creating a snapshot with the same name but different volume source id") - req2 := MakeCreateSnapshotReq(sc, "CreateSnapshot-snapshot-2", volume2.GetVolume().GetId(), nil) + req2 := MakeCreateSnapshotReq(sc, "CreateSnapshot-snapshot-2", volume2.GetVolume().GetVolumeId(), nil) _, err = c.CreateSnapshot(context.Background(), req2) Expect(err).To(HaveOccurred()) serverError, ok := status.FromError(err) @@ -1577,12 +1583,12 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont Expect(serverError.Code()).To(Equal(codes.AlreadyExists)) By("cleaning up deleting the snapshot") - delSnapReq := MakeDeleteSnapshotReq(sc, snap1.GetSnapshot().GetId()) + delSnapReq := MakeDeleteSnapshotReq(sc, snap1.GetSnapshot().GetSnapshotId()) _, err = c.DeleteSnapshot(context.Background(), delSnapReq) Expect(err).NotTo(HaveOccurred()) By("cleaning up deleting the volume") - delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetId()) + delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetVolumeId()) _, err = c.DeleteVolume(context.Background(), delVolReq) Expect(err).NotTo(HaveOccurred()) }) @@ -1601,7 +1607,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont name := string(nameBytes) By("creating a snapshot") - snapReq1 := MakeCreateSnapshotReq(sc, name, volume.GetVolume().GetId(), nil) + snapReq1 := MakeCreateSnapshotReq(sc, name, volume.GetVolume().GetVolumeId(), nil) snap1, err := c.CreateSnapshot(context.Background(), snapReq1) Expect(err).NotTo(HaveOccurred()) Expect(snap1).NotTo(BeNil()) @@ -1613,12 +1619,12 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont verifySnapshotInfo(snap2.GetSnapshot()) By("cleaning up deleting the snapshot") - delSnapReq := MakeDeleteSnapshotReq(sc, snap1.GetSnapshot().GetId()) + delSnapReq := MakeDeleteSnapshotReq(sc, snap1.GetSnapshot().GetSnapshotId()) _, err = c.DeleteSnapshot(context.Background(), delSnapReq) Expect(err).NotTo(HaveOccurred()) By("cleaning up deleting the volume") - delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetId()) + delVolReq := MakeDeleteVolumeReq(sc, volume.GetVolume().GetVolumeId()) _, err = c.DeleteVolume(context.Background(), delVolReq) Expect(err).NotTo(HaveOccurred()) }) @@ -1647,7 +1653,7 @@ func MakeCreateVolumeReq(sc *SanityContext, name string) *csi.CreateVolumeReques } if sc.Secrets != nil { - req.ControllerCreateSecrets = sc.Secrets.CreateVolumeSecret + req.Secrets = sc.Secrets.CreateVolumeSecret } return req @@ -1661,7 +1667,7 @@ func MakeCreateSnapshotReq(sc *SanityContext, name, sourceVolumeId string, param } if sc.Secrets != nil { - req.CreateSnapshotSecrets = sc.Secrets.CreateSnapshotSecret + req.Secrets = sc.Secrets.CreateSnapshotSecret } return req @@ -1673,7 +1679,7 @@ func MakeDeleteSnapshotReq(sc *SanityContext, id string) *csi.DeleteSnapshotRequ } if sc.Secrets != nil { - delSnapReq.DeleteSnapshotSecrets = sc.Secrets.DeleteSnapshotSecret + delSnapReq.Secrets = sc.Secrets.DeleteSnapshotSecret } return delSnapReq @@ -1685,7 +1691,7 @@ func MakeDeleteVolumeReq(sc *SanityContext, id string) *csi.DeleteVolumeRequest } if sc.Secrets != nil { - delVolReq.ControllerDeleteSecrets = sc.Secrets.DeleteVolumeSecret + delVolReq.Secrets = sc.Secrets.DeleteVolumeSecret } return delVolReq diff --git a/pkg/sanity/identity.go b/pkg/sanity/identity.go index e60439b3..c1a5eb7e 100644 --- a/pkg/sanity/identity.go +++ b/pkg/sanity/identity.go @@ -24,7 +24,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -51,7 +51,7 @@ var _ = DescribeSanity("Identity Service", func(sc *SanityContext) { for _, cap := range res.GetCapabilities() { switch cap.GetService().GetType() { case csi.PluginCapability_Service_CONTROLLER_SERVICE: - case csi.PluginCapability_Service_ACCESSIBILITY_CONSTRAINTS: + case csi.PluginCapability_Service_VOLUME_ACCESSIBILITY_CONSTRAINTS: default: Fail(fmt.Sprintf("Unknown capability: %v\n", cap.GetService().GetType())) } diff --git a/pkg/sanity/node.go b/pkg/sanity/node.go index c56ed598..9bd9194b 100644 --- a/pkg/sanity/node.go +++ b/pkg/sanity/node.go @@ -23,7 +23,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -127,18 +127,6 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { }) }) - Describe("NodeGetId", func() { - It("should return appropriate values", func() { - nid, err := c.NodeGetId( - context.Background(), - &csi.NodeGetIdRequest{}) - - Expect(err).NotTo(HaveOccurred()) - Expect(nid).NotTo(BeNil()) - Expect(nid.GetNodeId()).NotTo(BeEmpty()) - }) - }) - Describe("NodeGetInfo", func() { var ( i csi.IdentityClient @@ -147,7 +135,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { BeforeEach(func() { i = csi.NewIdentityClient(sc.Conn) - accessibilityConstraintSupported = isPluginCapabilitySupported(i, csi.PluginCapability_Service_ACCESSIBILITY_CONSTRAINTS) + accessibilityConstraintSupported = isPluginCapabilitySupported(i, csi.PluginCapability_Service_VOLUME_ACCESSIBILITY_CONSTRAINTS) }) It("should return approproate values", func() { @@ -171,7 +159,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { _, err := c.NodePublishVolume( context.Background(), &csi.NodePublishVolumeRequest{ - NodePublishSecrets: sc.Secrets.NodePublishVolumeSecret, + Secrets: sc.Secrets.NodePublishVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -185,8 +173,8 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { _, err := c.NodePublishVolume( context.Background(), &csi.NodePublishVolumeRequest{ - VolumeId: "id", - NodePublishSecrets: sc.Secrets.NodePublishVolumeSecret, + VolumeId: "id", + Secrets: sc.Secrets.NodePublishVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -200,9 +188,9 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { _, err := c.NodePublishVolume( context.Background(), &csi.NodePublishVolumeRequest{ - VolumeId: "id", - TargetPath: sc.Config.TargetPath, - NodePublishSecrets: sc.Secrets.NodePublishVolumeSecret, + VolumeId: "id", + TargetPath: sc.Config.TargetPath, + Secrets: sc.Secrets.NodePublishVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -267,10 +255,10 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - PublishInfo: map[string]string{ + PublishContext: map[string]string{ "device": device, }, - NodeStageSecrets: sc.Secrets.NodeStageVolumeSecret, + Secrets: sc.Secrets.NodeStageVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -293,10 +281,10 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - PublishInfo: map[string]string{ + PublishContext: map[string]string{ "device": device, }, - NodeStageSecrets: sc.Secrets.NodeStageVolumeSecret, + Secrets: sc.Secrets.NodeStageVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -312,10 +300,10 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { &csi.NodeStageVolumeRequest{ VolumeId: "id", StagingTargetPath: sc.Config.StagingPath, - PublishInfo: map[string]string{ + PublishContext: map[string]string{ "device": device, }, - NodeStageSecrets: sc.Secrets.NodeStageVolumeSecret, + Secrets: sc.Secrets.NodeStageVolumeSecret, }, ) Expect(err).To(HaveOccurred()) @@ -381,19 +369,19 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { }, }, }, - ControllerCreateSecrets: sc.Secrets.CreateVolumeSecret, + Secrets: sc.Secrets.CreateVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.GetVolume()).NotTo(BeNil()) - Expect(vol.GetVolume().GetId()).NotTo(BeEmpty()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId()}) + Expect(vol.GetVolume().GetVolumeId()).NotTo(BeEmpty()) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId()}) By("getting a node id") - nid, err := c.NodeGetId( + nid, err := c.NodeGetInfo( context.Background(), - &csi.NodeGetIdRequest{}) + &csi.NodeGetInfoRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(nid).NotTo(BeNil()) Expect(nid.GetNodeId()).NotTo(BeEmpty()) @@ -405,7 +393,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { conpubvol, err = s.ControllerPublishVolume( context.Background(), &csi.ControllerPublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), NodeId: nid.GetNodeId(), VolumeCapability: &csi.VolumeCapability{ AccessType: &csi.VolumeCapability_Mount{ @@ -415,13 +403,13 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - VolumeAttributes: vol.GetVolume().GetAttributes(), - Readonly: false, - ControllerPublishSecrets: sc.Secrets.ControllerPublishVolumeSecret, + VolumeContext: vol.GetVolume().GetVolumeContext(), + Readonly: false, + Secrets: sc.Secrets.ControllerPublishVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) - cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetId(), NodeID: nid.GetNodeId()}) + cl.RegisterVolume(name, VolumeInfo{VolumeID: vol.GetVolume().GetVolumeId(), NodeID: nid.GetNodeId()}) Expect(conpubvol).NotTo(BeNil()) } // NodeStageVolume @@ -430,7 +418,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { nodestagevol, err := c.NodeStageVolume( context.Background(), &csi.NodeStageVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), VolumeCapability: &csi.VolumeCapability{ AccessType: &csi.VolumeCapability_Mount{ Mount: &csi.VolumeCapability_MountVolume{}, @@ -440,9 +428,9 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { }, }, StagingTargetPath: sc.Config.StagingPath, - VolumeAttributes: vol.GetVolume().GetAttributes(), - PublishInfo: conpubvol.GetPublishInfo(), - NodeStageSecrets: sc.Secrets.NodeStageVolumeSecret, + VolumeContext: vol.GetVolume().GetVolumeContext(), + PublishContext: conpubvol.GetPublishContext(), + Secrets: sc.Secrets.NodeStageVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -457,7 +445,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { nodepubvol, err := c.NodePublishVolume( context.Background(), &csi.NodePublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), TargetPath: sc.Config.TargetPath, StagingTargetPath: stagingPath, VolumeCapability: &csi.VolumeCapability{ @@ -468,9 +456,9 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - VolumeAttributes: vol.GetVolume().GetAttributes(), - PublishInfo: conpubvol.GetPublishInfo(), - NodePublishSecrets: sc.Secrets.NodePublishVolumeSecret, + VolumeContext: vol.GetVolume().GetVolumeContext(), + PublishContext: conpubvol.GetPublishContext(), + Secrets: sc.Secrets.NodePublishVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -481,7 +469,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { nodeunpubvol, err := c.NodeUnpublishVolume( context.Background(), &csi.NodeUnpublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), TargetPath: sc.Config.TargetPath, }) Expect(err).NotTo(HaveOccurred()) @@ -492,7 +480,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { nodeunstagevol, err := c.NodeUnstageVolume( context.Background(), &csi.NodeUnstageVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), StagingTargetPath: sc.Config.StagingPath, }, ) @@ -506,9 +494,9 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { controllerunpubvol, err := s.ControllerUnpublishVolume( context.Background(), &csi.ControllerUnpublishVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), + VolumeId: vol.GetVolume().GetVolumeId(), NodeId: nid.GetNodeId(), - ControllerUnpublishSecrets: sc.Secrets.ControllerUnpublishVolumeSecret, + Secrets: sc.Secrets.ControllerUnpublishVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) @@ -520,8 +508,8 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) { _, err = s.DeleteVolume( context.Background(), &csi.DeleteVolumeRequest{ - VolumeId: vol.GetVolume().GetId(), - ControllerDeleteSecrets: sc.Secrets.DeleteVolumeSecret, + VolumeId: vol.GetVolume().GetVolumeId(), + Secrets: sc.Secrets.DeleteVolumeSecret, }, ) Expect(err).NotTo(HaveOccurred()) diff --git a/test/co_test.go b/test/co_test.go index 5a2bbe27..03b0f052 100644 --- a/test/co_test.go +++ b/test/co_test.go @@ -21,7 +21,7 @@ import ( "reflect" "testing" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" "github.com/golang/mock/gomock" "github.com/golang/protobuf/proto" mock_driver "github.com/kubernetes-csi/csi-test/driver" @@ -157,7 +157,7 @@ func TestGRPCAttach(t *testing.T) { // Setup mock outout out := &csi.ControllerPublishVolumeResponse{ - PublishInfo: publishVolumeInfo, + PublishContext: publishVolumeInfo, } // Setup expectation @@ -181,7 +181,7 @@ func TestGRPCAttach(t *testing.T) { t.Errorf("Error: %s", err.Error()) } - info := r.GetPublishInfo() + info := r.GetPublishContext() if !reflect.DeepEqual(info, publishVolumeInfo) { t.Errorf("Invalid publish info: %v", info) } diff --git a/test/driver_test.go b/test/driver_test.go index 82080eb3..ae8c3367 100644 --- a/test/driver_test.go +++ b/test/driver_test.go @@ -21,7 +21,7 @@ import ( "sync" "testing" - "github.com/container-storage-interface/spec/lib/go/csi/v0" + "github.com/container-storage-interface/spec/lib/go/csi" "github.com/kubernetes-csi/csi-test/utils" "google.golang.org/grpc" "google.golang.org/grpc/reflection" diff --git a/vendor/github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go b/vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go similarity index 72% rename from vendor/github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go rename to vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go index ead54d58..5eef7203 100644 --- a/vendor/github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go +++ b/vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go @@ -6,6 +6,8 @@ package csi import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" +import descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" import wrappers "github.com/golang/protobuf/ptypes/wrappers" import ( @@ -30,38 +32,38 @@ const ( PluginCapability_Service_UNKNOWN PluginCapability_Service_Type = 0 // CONTROLLER_SERVICE indicates that the Plugin provides RPCs for // the ControllerService. Plugins SHOULD provide this capability. - // In rare cases certain plugins may wish to omit the + // In rare cases certain plugins MAY wish to omit the // ControllerService entirely from their implementation, but such // SHOULD NOT be the common case. // The presence of this capability determines whether the CO will // attempt to invoke the REQUIRED ControllerService RPCs, as well // as specific RPCs as indicated by ControllerGetCapabilities. PluginCapability_Service_CONTROLLER_SERVICE PluginCapability_Service_Type = 1 - // ACCESSIBILITY_CONSTRAINTS indicates that the volumes for this - // plugin may not be equally accessible by all nodes in the + // VOLUME_ACCESSIBILITY_CONSTRAINTS indicates that the volumes for + // this plugin MAY NOT be equally accessible by all nodes in the // cluster. The CO MUST use the topology information returned by // CreateVolumeRequest along with the topology information // returned by NodeGetInfo to ensure that a given volume is // accessible from a given node when scheduling workloads. - PluginCapability_Service_ACCESSIBILITY_CONSTRAINTS PluginCapability_Service_Type = 2 + PluginCapability_Service_VOLUME_ACCESSIBILITY_CONSTRAINTS PluginCapability_Service_Type = 2 ) var PluginCapability_Service_Type_name = map[int32]string{ 0: "UNKNOWN", 1: "CONTROLLER_SERVICE", - 2: "ACCESSIBILITY_CONSTRAINTS", + 2: "VOLUME_ACCESSIBILITY_CONSTRAINTS", } var PluginCapability_Service_Type_value = map[string]int32{ - "UNKNOWN": 0, - "CONTROLLER_SERVICE": 1, - "ACCESSIBILITY_CONSTRAINTS": 2, + "UNKNOWN": 0, + "CONTROLLER_SERVICE": 1, + "VOLUME_ACCESSIBILITY_CONSTRAINTS": 2, } func (x PluginCapability_Service_Type) String() string { return proto.EnumName(PluginCapability_Service_Type_name, int32(x)) } func (PluginCapability_Service_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{4, 0, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{4, 0, 0} } type VolumeCapability_AccessMode_Mode int32 @@ -105,7 +107,7 @@ func (x VolumeCapability_AccessMode_Mode) String() string { return proto.EnumName(VolumeCapability_AccessMode_Mode_name, int32(x)) } func (VolumeCapability_AccessMode_Mode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{10, 2, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{10, 2, 0} } type ControllerServiceCapability_RPC_Type int32 @@ -121,11 +123,15 @@ const ( // CREATE_DELETE_SNAPSHOT MUST support creating volume from // snapshot. ControllerServiceCapability_RPC_CREATE_DELETE_SNAPSHOT ControllerServiceCapability_RPC_Type = 5 - // LIST_SNAPSHOTS is NOT REQUIRED. For plugins that need to upload - // a snapshot after it is being cut, LIST_SNAPSHOTS COULD be used - // with the snapshot_id as the filter to query whether the - // uploading process is complete or not. - ControllerServiceCapability_RPC_LIST_SNAPSHOTS ControllerServiceCapability_RPC_Type = 6 + ControllerServiceCapability_RPC_LIST_SNAPSHOTS ControllerServiceCapability_RPC_Type = 6 + // Plugins supporting volume cloning at the storage level MAY + // report this capability. The source volume MUST be managed by + // the same plugin. Not all volume sources and parameters + // combinations MAY work. + ControllerServiceCapability_RPC_CLONE_VOLUME ControllerServiceCapability_RPC_Type = 7 + // Indicates the SP supports ControllerPublishVolume.readonly + // field. + ControllerServiceCapability_RPC_PUBLISH_READONLY ControllerServiceCapability_RPC_Type = 8 ) var ControllerServiceCapability_RPC_Type_name = map[int32]string{ @@ -136,6 +142,8 @@ var ControllerServiceCapability_RPC_Type_name = map[int32]string{ 4: "GET_CAPACITY", 5: "CREATE_DELETE_SNAPSHOT", 6: "LIST_SNAPSHOTS", + 7: "CLONE_VOLUME", + 8: "PUBLISH_READONLY", } var ControllerServiceCapability_RPC_Type_value = map[string]int32{ "UNKNOWN": 0, @@ -145,55 +153,15 @@ var ControllerServiceCapability_RPC_Type_value = map[string]int32{ "GET_CAPACITY": 4, "CREATE_DELETE_SNAPSHOT": 5, "LIST_SNAPSHOTS": 6, + "CLONE_VOLUME": 7, + "PUBLISH_READONLY": 8, } func (x ControllerServiceCapability_RPC_Type) String() string { return proto.EnumName(ControllerServiceCapability_RPC_Type_name, int32(x)) } func (ControllerServiceCapability_RPC_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{29, 0, 0} -} - -type SnapshotStatus_Type int32 - -const ( - SnapshotStatus_UNKNOWN SnapshotStatus_Type = 0 - // A snapshot is ready for use. - SnapshotStatus_READY SnapshotStatus_Type = 1 - // A snapshot is cut and is now being uploaded. - // Some cloud providers and storage systems uploads the snapshot - // to the cloud after the snapshot is cut. During this phase, - // `thaw` can be done so the application can be running again if - // `freeze` was done before taking the snapshot. - SnapshotStatus_UPLOADING SnapshotStatus_Type = 2 - // An error occurred during the snapshot uploading process. - // This error status is specific for uploading because - // `CreateSnaphot` is a blocking call before the snapshot is - // cut and therefore it SHOULD NOT come back with an error - // status when an error occurs. Instead a gRPC error code SHALL - // be returned by `CreateSnapshot` when an error occurs before - // a snapshot is cut. - SnapshotStatus_ERROR_UPLOADING SnapshotStatus_Type = 3 -) - -var SnapshotStatus_Type_name = map[int32]string{ - 0: "UNKNOWN", - 1: "READY", - 2: "UPLOADING", - 3: "ERROR_UPLOADING", -} -var SnapshotStatus_Type_value = map[string]int32{ - "UNKNOWN": 0, - "READY": 1, - "UPLOADING": 2, - "ERROR_UPLOADING": 3, -} - -func (x SnapshotStatus_Type) String() string { - return proto.EnumName(SnapshotStatus_Type_name, int32(x)) -} -func (SnapshotStatus_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{33, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{29, 0, 0} } type VolumeUsage_Unit int32 @@ -219,7 +187,7 @@ func (x VolumeUsage_Unit) String() string { return proto.EnumName(VolumeUsage_Unit_name, int32(x)) } func (VolumeUsage_Unit) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{48, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{47, 0} } type NodeServiceCapability_RPC_Type int32 @@ -248,7 +216,7 @@ func (x NodeServiceCapability_RPC_Type) String() string { return proto.EnumName(NodeServiceCapability_RPC_Type_name, int32(x)) } func (NodeServiceCapability_RPC_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{53, 0, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{50, 0, 0} } type GetPluginInfoRequest struct { @@ -261,7 +229,7 @@ func (m *GetPluginInfoRequest) Reset() { *m = GetPluginInfoRequest{} } func (m *GetPluginInfoRequest) String() string { return proto.CompactTextString(m) } func (*GetPluginInfoRequest) ProtoMessage() {} func (*GetPluginInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{0} + return fileDescriptor_csi_3932febea60d5a27, []int{0} } func (m *GetPluginInfoRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetPluginInfoRequest.Unmarshal(m, b) @@ -282,18 +250,18 @@ func (m *GetPluginInfoRequest) XXX_DiscardUnknown() { var xxx_messageInfo_GetPluginInfoRequest proto.InternalMessageInfo type GetPluginInfoResponse struct { - // The name MUST follow reverse domain name notation format - // (https://en.wikipedia.org/wiki/Reverse_domain_name_notation). - // It SHOULD include the plugin's host company name and the plugin - // name, to minimize the possibility of collisions. It MUST be 63 + // The name MUST follow domain name notation format + // (https://tools.ietf.org/html/rfc1035#section-2.3.1). It SHOULD + // include the plugin's host company name and the plugin name, + // to minimize the possibility of collisions. It MUST be 63 // characters or less, beginning and ending with an alphanumeric - // character ([a-z0-9A-Z]) with dashes (-), underscores (_), - // dots (.), and alphanumerics between. This field is REQUIRED. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // character ([a-z0-9A-Z]) with dashes (-), dots (.), and + // alphanumerics between. This field is REQUIRED. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // This field is REQUIRED. Value of this field is opaque to the CO. - VendorVersion string `protobuf:"bytes,2,opt,name=vendor_version,json=vendorVersion" json:"vendor_version,omitempty"` + VendorVersion string `protobuf:"bytes,2,opt,name=vendor_version,json=vendorVersion,proto3" json:"vendor_version,omitempty"` // This field is OPTIONAL. Values are opaque to the CO. - Manifest map[string]string `protobuf:"bytes,3,rep,name=manifest" json:"manifest,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Manifest map[string]string `protobuf:"bytes,3,rep,name=manifest,proto3" json:"manifest,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -303,7 +271,7 @@ func (m *GetPluginInfoResponse) Reset() { *m = GetPluginInfoResponse{} } func (m *GetPluginInfoResponse) String() string { return proto.CompactTextString(m) } func (*GetPluginInfoResponse) ProtoMessage() {} func (*GetPluginInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{1} + return fileDescriptor_csi_3932febea60d5a27, []int{1} } func (m *GetPluginInfoResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetPluginInfoResponse.Unmarshal(m, b) @@ -354,7 +322,7 @@ func (m *GetPluginCapabilitiesRequest) Reset() { *m = GetPluginCapabilit func (m *GetPluginCapabilitiesRequest) String() string { return proto.CompactTextString(m) } func (*GetPluginCapabilitiesRequest) ProtoMessage() {} func (*GetPluginCapabilitiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{2} + return fileDescriptor_csi_3932febea60d5a27, []int{2} } func (m *GetPluginCapabilitiesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetPluginCapabilitiesRequest.Unmarshal(m, b) @@ -377,7 +345,7 @@ var xxx_messageInfo_GetPluginCapabilitiesRequest proto.InternalMessageInfo type GetPluginCapabilitiesResponse struct { // All the capabilities that the controller service supports. This // field is OPTIONAL. - Capabilities []*PluginCapability `protobuf:"bytes,2,rep,name=capabilities" json:"capabilities,omitempty"` + Capabilities []*PluginCapability `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -387,7 +355,7 @@ func (m *GetPluginCapabilitiesResponse) Reset() { *m = GetPluginCapabili func (m *GetPluginCapabilitiesResponse) String() string { return proto.CompactTextString(m) } func (*GetPluginCapabilitiesResponse) ProtoMessage() {} func (*GetPluginCapabilitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{3} + return fileDescriptor_csi_3932febea60d5a27, []int{3} } func (m *GetPluginCapabilitiesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetPluginCapabilitiesResponse.Unmarshal(m, b) @@ -428,7 +396,7 @@ func (m *PluginCapability) Reset() { *m = PluginCapability{} } func (m *PluginCapability) String() string { return proto.CompactTextString(m) } func (*PluginCapability) ProtoMessage() {} func (*PluginCapability) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{4} + return fileDescriptor_csi_3932febea60d5a27, []int{4} } func (m *PluginCapability) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PluginCapability.Unmarshal(m, b) @@ -453,7 +421,7 @@ type isPluginCapability_Type interface { } type PluginCapability_Service_ struct { - Service *PluginCapability_Service `protobuf:"bytes,1,opt,name=service,oneof"` + Service *PluginCapability_Service `protobuf:"bytes,1,opt,name=service,proto3,oneof"` } func (*PluginCapability_Service_) isPluginCapability_Type() {} @@ -528,7 +496,7 @@ func _PluginCapability_OneofSizer(msg proto.Message) (n int) { } type PluginCapability_Service struct { - Type PluginCapability_Service_Type `protobuf:"varint,1,opt,name=type,enum=csi.v0.PluginCapability_Service_Type" json:"type,omitempty"` + Type PluginCapability_Service_Type `protobuf:"varint,1,opt,name=type,proto3,enum=csi.v1.PluginCapability_Service_Type" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -538,7 +506,7 @@ func (m *PluginCapability_Service) Reset() { *m = PluginCapability_Servi func (m *PluginCapability_Service) String() string { return proto.CompactTextString(m) } func (*PluginCapability_Service) ProtoMessage() {} func (*PluginCapability_Service) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{4, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{4, 0} } func (m *PluginCapability_Service) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PluginCapability_Service.Unmarshal(m, b) @@ -575,7 +543,7 @@ func (m *ProbeRequest) Reset() { *m = ProbeRequest{} } func (m *ProbeRequest) String() string { return proto.CompactTextString(m) } func (*ProbeRequest) ProtoMessage() {} func (*ProbeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{5} + return fileDescriptor_csi_3932febea60d5a27, []int{5} } func (m *ProbeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ProbeRequest.Unmarshal(m, b) @@ -616,7 +584,7 @@ type ProbeResponse struct { // that the plugin is in a ready state and is accepting calls to its // Controller and/or Node services (according to the plugin's reported // capabilities). - Ready *wrappers.BoolValue `protobuf:"bytes,1,opt,name=ready" json:"ready,omitempty"` + Ready *wrappers.BoolValue `protobuf:"bytes,1,opt,name=ready,proto3" json:"ready,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -626,7 +594,7 @@ func (m *ProbeResponse) Reset() { *m = ProbeResponse{} } func (m *ProbeResponse) String() string { return proto.CompactTextString(m) } func (*ProbeResponse) ProtoMessage() {} func (*ProbeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{6} + return fileDescriptor_csi_3932febea60d5a27, []int{6} } func (m *ProbeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ProbeResponse.Unmarshal(m, b) @@ -657,40 +625,63 @@ type CreateVolumeRequest struct { // The suggested name for the storage space. This field is REQUIRED. // It serves two purposes: // 1) Idempotency - This name is generated by the CO to achieve - // idempotency. If `CreateVolume` fails, the volume may or may not - // be provisioned. In this case, the CO may call `CreateVolume` - // again, with the same name, to ensure the volume exists. The - // Plugin should ensure that multiple `CreateVolume` calls for the - // same name do not result in more than one piece of storage - // provisioned corresponding to that name. If a Plugin is unable to - // enforce idempotency, the CO's error recovery logic could result - // in multiple (unused) volumes being provisioned. + // idempotency. The Plugin SHOULD ensure that multiple + // `CreateVolume` calls for the same name do not result in more + // than one piece of storage provisioned corresponding to that + // name. If a Plugin is unable to enforce idempotency, the CO's + // error recovery logic could result in multiple (unused) volumes + // being provisioned. + // In the case of error, the CO MUST handle the gRPC error codes + // per the recovery behavior defined in the "CreateVolume Errors" + // section below. + // The CO is responsible for cleaning up volumes it provisioned + // that it no longer needs. If the CO is uncertain whether a volume + // was provisioned or not when a `CreateVolume` call fails, the CO + // MAY call `CreateVolume` again, with the same name, to ensure the + // volume exists and to retrieve the volume's `volume_id` (unless + // otherwise prohibited by "CreateVolume Errors"). // 2) Suggested name - Some storage systems allow callers to specify // an identifier by which to refer to the newly provisioned // storage. If a storage system supports this, it can optionally // use this name as the identifier for the new volume. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - CapacityRange *CapacityRange `protobuf:"bytes,2,opt,name=capacity_range,json=capacityRange" json:"capacity_range,omitempty"` - // The capabilities that the provisioned volume MUST have: the Plugin - // MUST provision a volume that could satisfy ALL of the - // capabilities specified in this list. The Plugin MUST assume that - // the CO MAY use the provisioned volume later with ANY of the - // capabilities specified in this list. This also enables the CO to do - // early validation: if ANY of the specified volume capabilities are - // not supported by the Plugin, the call SHALL fail. This field is - // REQUIRED. - VolumeCapabilities []*VolumeCapability `protobuf:"bytes,3,rep,name=volume_capabilities,json=volumeCapabilities" json:"volume_capabilities,omitempty"` + // Any Unicode string that conforms to the length limit is allowed + // except those containing the following banned characters: + // U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F. + // (These are control characters other than commonly used whitespace.) + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // This field is OPTIONAL. This allows the CO to specify the capacity + // requirement of the volume to be provisioned. If not specified, the + // Plugin MAY choose an implementation-defined capacity range. If + // specified it MUST always be honored, even when creating volumes + // from a source; which MAY force some backends to internally extend + // the volume after creating it. + CapacityRange *CapacityRange `protobuf:"bytes,2,opt,name=capacity_range,json=capacityRange,proto3" json:"capacity_range,omitempty"` + // The capabilities that the provisioned volume MUST have. SP MUST + // provision a volume that will satisfy ALL of the capabilities + // specified in this list. Otherwise SP MUST return the appropriate + // gRPC error code. + // The Plugin MUST assume that the CO MAY use the provisioned volume + // with ANY of the capabilities specified in this list. + // For example, a CO MAY specify two volume capabilities: one with + // access mode SINGLE_NODE_WRITER and another with access mode + // MULTI_NODE_READER_ONLY. In this case, the SP MUST verify that the + // provisioned volume can be used in either mode. + // This also enables the CO to do early validation: If ANY of the + // specified volume capabilities are not supported by the SP, the call + // MUST return the appropriate gRPC error code. + // This field is REQUIRED. + VolumeCapabilities []*VolumeCapability `protobuf:"bytes,3,rep,name=volume_capabilities,json=volumeCapabilities,proto3" json:"volume_capabilities,omitempty"` // Plugin specific parameters passed in as opaque key-value pairs. // This field is OPTIONAL. The Plugin is responsible for parsing and // validating these parameters. COs will treat these as opaque. - Parameters map[string]string `protobuf:"bytes,4,rep,name=parameters" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Parameters map[string]string `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Secrets required by plugin to complete volume creation request. // This field is OPTIONAL. Refer to the `Secrets Requirements` // section on how to use this field. - ControllerCreateSecrets map[string]string `protobuf:"bytes,5,rep,name=controller_create_secrets,json=controllerCreateSecrets" json:"controller_create_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Secrets map[string]string `protobuf:"bytes,5,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // If specified, the new volume will be pre-populated with data from // this source. This field is OPTIONAL. - VolumeContentSource *VolumeContentSource `protobuf:"bytes,6,opt,name=volume_content_source,json=volumeContentSource" json:"volume_content_source,omitempty"` + VolumeContentSource *VolumeContentSource `protobuf:"bytes,6,opt,name=volume_content_source,json=volumeContentSource,proto3" json:"volume_content_source,omitempty"` // Specifies where (regions, zones, racks, etc.) the provisioned // volume MUST be accessible from. // An SP SHALL advertise the requirements for topological @@ -698,11 +689,11 @@ type CreateVolumeRequest struct { // topological accessibility information supported by the SP. // This field is OPTIONAL. // This field SHALL NOT be specified unless the SP has the - // ACCESSIBILITY_CONSTRAINTS plugin capability. + // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. // If this field is not specified and the SP has the - // ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY choose - // where the provisioned volume is accessible from. - AccessibilityRequirements *TopologyRequirement `protobuf:"bytes,7,opt,name=accessibility_requirements,json=accessibilityRequirements" json:"accessibility_requirements,omitempty"` + // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY + // choose where the provisioned volume is accessible from. + AccessibilityRequirements *TopologyRequirement `protobuf:"bytes,7,opt,name=accessibility_requirements,json=accessibilityRequirements,proto3" json:"accessibility_requirements,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -712,7 +703,7 @@ func (m *CreateVolumeRequest) Reset() { *m = CreateVolumeRequest{} } func (m *CreateVolumeRequest) String() string { return proto.CompactTextString(m) } func (*CreateVolumeRequest) ProtoMessage() {} func (*CreateVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{7} + return fileDescriptor_csi_3932febea60d5a27, []int{7} } func (m *CreateVolumeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateVolumeRequest.Unmarshal(m, b) @@ -760,9 +751,9 @@ func (m *CreateVolumeRequest) GetParameters() map[string]string { return nil } -func (m *CreateVolumeRequest) GetControllerCreateSecrets() map[string]string { +func (m *CreateVolumeRequest) GetSecrets() map[string]string { if m != nil { - return m.ControllerCreateSecrets + return m.Secrets } return nil } @@ -786,6 +777,7 @@ func (m *CreateVolumeRequest) GetAccessibilityRequirements() *TopologyRequiremen type VolumeContentSource struct { // Types that are valid to be assigned to Type: // *VolumeContentSource_Snapshot + // *VolumeContentSource_Volume Type isVolumeContentSource_Type `protobuf_oneof:"type"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -796,7 +788,7 @@ func (m *VolumeContentSource) Reset() { *m = VolumeContentSource{} } func (m *VolumeContentSource) String() string { return proto.CompactTextString(m) } func (*VolumeContentSource) ProtoMessage() {} func (*VolumeContentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{8} + return fileDescriptor_csi_3932febea60d5a27, []int{8} } func (m *VolumeContentSource) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VolumeContentSource.Unmarshal(m, b) @@ -821,11 +813,17 @@ type isVolumeContentSource_Type interface { } type VolumeContentSource_Snapshot struct { - Snapshot *VolumeContentSource_SnapshotSource `protobuf:"bytes,1,opt,name=snapshot,oneof"` + Snapshot *VolumeContentSource_SnapshotSource `protobuf:"bytes,1,opt,name=snapshot,proto3,oneof"` +} + +type VolumeContentSource_Volume struct { + Volume *VolumeContentSource_VolumeSource `protobuf:"bytes,2,opt,name=volume,proto3,oneof"` } func (*VolumeContentSource_Snapshot) isVolumeContentSource_Type() {} +func (*VolumeContentSource_Volume) isVolumeContentSource_Type() {} + func (m *VolumeContentSource) GetType() isVolumeContentSource_Type { if m != nil { return m.Type @@ -840,10 +838,18 @@ func (m *VolumeContentSource) GetSnapshot() *VolumeContentSource_SnapshotSource return nil } +func (m *VolumeContentSource) GetVolume() *VolumeContentSource_VolumeSource { + if x, ok := m.GetType().(*VolumeContentSource_Volume); ok { + return x.Volume + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*VolumeContentSource) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _VolumeContentSource_OneofMarshaler, _VolumeContentSource_OneofUnmarshaler, _VolumeContentSource_OneofSizer, []interface{}{ (*VolumeContentSource_Snapshot)(nil), + (*VolumeContentSource_Volume)(nil), } } @@ -856,6 +862,11 @@ func _VolumeContentSource_OneofMarshaler(msg proto.Message, b *proto.Buffer) err if err := b.EncodeMessage(x.Snapshot); err != nil { return err } + case *VolumeContentSource_Volume: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Volume); err != nil { + return err + } case nil: default: return fmt.Errorf("VolumeContentSource.Type has unexpected type %T", x) @@ -874,6 +885,14 @@ func _VolumeContentSource_OneofUnmarshaler(msg proto.Message, tag, wire int, b * err := b.DecodeMessage(msg) m.Type = &VolumeContentSource_Snapshot{msg} return true, err + case 2: // type.volume + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(VolumeContentSource_VolumeSource) + err := b.DecodeMessage(msg) + m.Type = &VolumeContentSource_Volume{msg} + return true, err default: return false, nil } @@ -888,6 +907,11 @@ func _VolumeContentSource_OneofSizer(msg proto.Message) (n int) { n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s + case *VolumeContentSource_Volume: + s := proto.Size(x.Volume) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -900,7 +924,7 @@ type VolumeContentSource_SnapshotSource struct { // This field is REQUIRED. Plugin is REQUIRED to support creating // volume from snapshot if it supports the capability // CREATE_DELETE_SNAPSHOT. - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + SnapshotId string `protobuf:"bytes,1,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -910,7 +934,7 @@ func (m *VolumeContentSource_SnapshotSource) Reset() { *m = VolumeConten func (m *VolumeContentSource_SnapshotSource) String() string { return proto.CompactTextString(m) } func (*VolumeContentSource_SnapshotSource) ProtoMessage() {} func (*VolumeContentSource_SnapshotSource) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{8, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{8, 0} } func (m *VolumeContentSource_SnapshotSource) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VolumeContentSource_SnapshotSource.Unmarshal(m, b) @@ -930,9 +954,50 @@ func (m *VolumeContentSource_SnapshotSource) XXX_DiscardUnknown() { var xxx_messageInfo_VolumeContentSource_SnapshotSource proto.InternalMessageInfo -func (m *VolumeContentSource_SnapshotSource) GetId() string { +func (m *VolumeContentSource_SnapshotSource) GetSnapshotId() string { if m != nil { - return m.Id + return m.SnapshotId + } + return "" +} + +type VolumeContentSource_VolumeSource struct { + // Contains identity information for the existing source volume. + // This field is REQUIRED. Plugins reporting CLONE_VOLUME + // capability MUST support creating a volume from another volume. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeContentSource_VolumeSource) Reset() { *m = VolumeContentSource_VolumeSource{} } +func (m *VolumeContentSource_VolumeSource) String() string { return proto.CompactTextString(m) } +func (*VolumeContentSource_VolumeSource) ProtoMessage() {} +func (*VolumeContentSource_VolumeSource) Descriptor() ([]byte, []int) { + return fileDescriptor_csi_3932febea60d5a27, []int{8, 1} +} +func (m *VolumeContentSource_VolumeSource) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeContentSource_VolumeSource.Unmarshal(m, b) +} +func (m *VolumeContentSource_VolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeContentSource_VolumeSource.Marshal(b, m, deterministic) +} +func (dst *VolumeContentSource_VolumeSource) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeContentSource_VolumeSource.Merge(dst, src) +} +func (m *VolumeContentSource_VolumeSource) XXX_Size() int { + return xxx_messageInfo_VolumeContentSource_VolumeSource.Size(m) +} +func (m *VolumeContentSource_VolumeSource) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeContentSource_VolumeSource.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeContentSource_VolumeSource proto.InternalMessageInfo + +func (m *VolumeContentSource_VolumeSource) GetVolumeId() string { + if m != nil { + return m.VolumeId } return "" } @@ -941,7 +1006,7 @@ type CreateVolumeResponse struct { // Contains all attributes of the newly created volume that are // relevant to the CO along with information required by the Plugin // to uniquely identify the volume. This field is REQUIRED. - Volume *Volume `protobuf:"bytes,1,opt,name=volume" json:"volume,omitempty"` + Volume *Volume `protobuf:"bytes,1,opt,name=volume,proto3" json:"volume,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -951,7 +1016,7 @@ func (m *CreateVolumeResponse) Reset() { *m = CreateVolumeResponse{} } func (m *CreateVolumeResponse) String() string { return proto.CompactTextString(m) } func (*CreateVolumeResponse) ProtoMessage() {} func (*CreateVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{9} + return fileDescriptor_csi_3932febea60d5a27, []int{9} } func (m *CreateVolumeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateVolumeResponse.Unmarshal(m, b) @@ -988,7 +1053,7 @@ type VolumeCapability struct { // *VolumeCapability_Mount AccessType isVolumeCapability_AccessType `protobuf_oneof:"access_type"` // This is a REQUIRED field. - AccessMode *VolumeCapability_AccessMode `protobuf:"bytes,3,opt,name=access_mode,json=accessMode" json:"access_mode,omitempty"` + AccessMode *VolumeCapability_AccessMode `protobuf:"bytes,3,opt,name=access_mode,json=accessMode,proto3" json:"access_mode,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -998,7 +1063,7 @@ func (m *VolumeCapability) Reset() { *m = VolumeCapability{} } func (m *VolumeCapability) String() string { return proto.CompactTextString(m) } func (*VolumeCapability) ProtoMessage() {} func (*VolumeCapability) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{10} + return fileDescriptor_csi_3932febea60d5a27, []int{10} } func (m *VolumeCapability) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VolumeCapability.Unmarshal(m, b) @@ -1023,13 +1088,15 @@ type isVolumeCapability_AccessType interface { } type VolumeCapability_Block struct { - Block *VolumeCapability_BlockVolume `protobuf:"bytes,1,opt,name=block,oneof"` + Block *VolumeCapability_BlockVolume `protobuf:"bytes,1,opt,name=block,proto3,oneof"` } + type VolumeCapability_Mount struct { - Mount *VolumeCapability_MountVolume `protobuf:"bytes,2,opt,name=mount,oneof"` + Mount *VolumeCapability_MountVolume `protobuf:"bytes,2,opt,name=mount,proto3,oneof"` } func (*VolumeCapability_Block) isVolumeCapability_AccessType() {} + func (*VolumeCapability_Mount) isVolumeCapability_AccessType() {} func (m *VolumeCapability) GetAccessType() isVolumeCapability_AccessType { @@ -1145,7 +1212,7 @@ func (m *VolumeCapability_BlockVolume) Reset() { *m = VolumeCapability_B func (m *VolumeCapability_BlockVolume) String() string { return proto.CompactTextString(m) } func (*VolumeCapability_BlockVolume) ProtoMessage() {} func (*VolumeCapability_BlockVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{10, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{10, 0} } func (m *VolumeCapability_BlockVolume) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VolumeCapability_BlockVolume.Unmarshal(m, b) @@ -1169,13 +1236,13 @@ var xxx_messageInfo_VolumeCapability_BlockVolume proto.InternalMessageInfo type VolumeCapability_MountVolume struct { // The filesystem type. This field is OPTIONAL. // An empty string is equal to an unspecified field value. - FsType string `protobuf:"bytes,1,opt,name=fs_type,json=fsType" json:"fs_type,omitempty"` + FsType string `protobuf:"bytes,1,opt,name=fs_type,json=fsType,proto3" json:"fs_type,omitempty"` // The mount options that can be used for the volume. This field is // OPTIONAL. `mount_flags` MAY contain sensitive information. // Therefore, the CO and the Plugin MUST NOT leak this information // to untrusted entities. The total size of this repeated field // SHALL NOT exceed 4 KiB. - MountFlags []string `protobuf:"bytes,2,rep,name=mount_flags,json=mountFlags" json:"mount_flags,omitempty"` + MountFlags []string `protobuf:"bytes,2,rep,name=mount_flags,json=mountFlags,proto3" json:"mount_flags,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1185,7 +1252,7 @@ func (m *VolumeCapability_MountVolume) Reset() { *m = VolumeCapability_M func (m *VolumeCapability_MountVolume) String() string { return proto.CompactTextString(m) } func (*VolumeCapability_MountVolume) ProtoMessage() {} func (*VolumeCapability_MountVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{10, 1} + return fileDescriptor_csi_3932febea60d5a27, []int{10, 1} } func (m *VolumeCapability_MountVolume) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VolumeCapability_MountVolume.Unmarshal(m, b) @@ -1222,7 +1289,7 @@ func (m *VolumeCapability_MountVolume) GetMountFlags() []string { // Specify how a volume can be accessed. type VolumeCapability_AccessMode struct { // This field is REQUIRED. - Mode VolumeCapability_AccessMode_Mode `protobuf:"varint,1,opt,name=mode,enum=csi.v0.VolumeCapability_AccessMode_Mode" json:"mode,omitempty"` + Mode VolumeCapability_AccessMode_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=csi.v1.VolumeCapability_AccessMode_Mode" json:"mode,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1232,7 +1299,7 @@ func (m *VolumeCapability_AccessMode) Reset() { *m = VolumeCapability_Ac func (m *VolumeCapability_AccessMode) String() string { return proto.CompactTextString(m) } func (*VolumeCapability_AccessMode) ProtoMessage() {} func (*VolumeCapability_AccessMode) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{10, 2} + return fileDescriptor_csi_3932febea60d5a27, []int{10, 2} } func (m *VolumeCapability_AccessMode) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VolumeCapability_AccessMode.Unmarshal(m, b) @@ -1266,11 +1333,11 @@ type CapacityRange struct { // Volume MUST be at least this big. This field is OPTIONAL. // A value of 0 is equal to an unspecified field value. // The value of this field MUST NOT be negative. - RequiredBytes int64 `protobuf:"varint,1,opt,name=required_bytes,json=requiredBytes" json:"required_bytes,omitempty"` + RequiredBytes int64 `protobuf:"varint,1,opt,name=required_bytes,json=requiredBytes,proto3" json:"required_bytes,omitempty"` // Volume MUST not be bigger than this. This field is OPTIONAL. // A value of 0 is equal to an unspecified field value. // The value of this field MUST NOT be negative. - LimitBytes int64 `protobuf:"varint,2,opt,name=limit_bytes,json=limitBytes" json:"limit_bytes,omitempty"` + LimitBytes int64 `protobuf:"varint,2,opt,name=limit_bytes,json=limitBytes,proto3" json:"limit_bytes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1280,7 +1347,7 @@ func (m *CapacityRange) Reset() { *m = CapacityRange{} } func (m *CapacityRange) String() string { return proto.CompactTextString(m) } func (*CapacityRange) ProtoMessage() {} func (*CapacityRange) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{11} + return fileDescriptor_csi_3932febea60d5a27, []int{11} } func (m *CapacityRange) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CapacityRange.Unmarshal(m, b) @@ -1314,34 +1381,46 @@ func (m *CapacityRange) GetLimitBytes() int64 { return 0 } -// The information about a provisioned volume. +// Information about a specific volume. type Volume struct { // The capacity of the volume in bytes. This field is OPTIONAL. If not // set (value of 0), it indicates that the capacity of the volume is // unknown (e.g., NFS share). // The value of this field MUST NOT be negative. - CapacityBytes int64 `protobuf:"varint,1,opt,name=capacity_bytes,json=capacityBytes" json:"capacity_bytes,omitempty"` - // Contains identity information for the created volume. This field is - // REQUIRED. The identity information will be used by the CO in - // subsequent calls to refer to the provisioned volume. - Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` - // Attributes reflect static properties of a volume and MUST be passed - // to volume validation and publishing calls. - // Attributes SHALL be opaque to a CO. Attributes SHALL NOT be mutable - // and SHALL be safe for the CO to cache. Attributes SHOULD NOT - // contain sensitive information. Attributes MAY NOT uniquely identify - // a volume. A volume uniquely identified by `id` SHALL always report - // the same attributes. This field is OPTIONAL and when present MUST - // be passed to volume validation and publishing calls. - Attributes map[string]string `protobuf:"bytes,3,rep,name=attributes" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CapacityBytes int64 `protobuf:"varint,1,opt,name=capacity_bytes,json=capacityBytes,proto3" json:"capacity_bytes,omitempty"` + // The identifier for this volume, generated by the plugin. + // This field is REQUIRED. + // This field MUST contain enough information to uniquely identify + // this specific volume vs all other volumes supported by this plugin. + // This field SHALL be used by the CO in subsequent calls to refer to + // this volume. + // The SP is NOT responsible for global uniqueness of volume_id across + // multiple SPs. + VolumeId string `protobuf:"bytes,2,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // Opaque static properties of the volume. SP MAY use this field to + // ensure subsequent volume validation and publishing calls have + // contextual information. + // The contents of this field SHALL be opaque to a CO. + // The contents of this field SHALL NOT be mutable. + // The contents of this field SHALL be safe for the CO to cache. + // The contents of this field SHOULD NOT contain sensitive + // information. + // The contents of this field SHOULD NOT be used for uniquely + // identifying a volume. The `volume_id` alone SHOULD be sufficient to + // identify the volume. + // A volume uniquely identified by `volume_id` SHALL always report the + // same volume_context. + // This field is OPTIONAL and when present MUST be passed to volume + // validation and publishing calls. + VolumeContext map[string]string `protobuf:"bytes,3,rep,name=volume_context,json=volumeContext,proto3" json:"volume_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // If specified, indicates that the volume is not empty and is // pre-populated with data from the specified source. // This field is OPTIONAL. - ContentSource *VolumeContentSource `protobuf:"bytes,4,opt,name=content_source,json=contentSource" json:"content_source,omitempty"` + ContentSource *VolumeContentSource `protobuf:"bytes,4,opt,name=content_source,json=contentSource,proto3" json:"content_source,omitempty"` // Specifies where (regions, zones, racks, etc.) the provisioned // volume is accessible from. // A plugin that returns this field MUST also set the - // ACCESSIBILITY_CONSTRAINTS plugin capability. + // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. // An SP MAY specify multiple topologies to indicate the volume is // accessible from multiple locations. // COs MAY use this information along with the topology information @@ -1349,7 +1428,7 @@ type Volume struct { // from a given node when scheduling workloads. // This field is OPTIONAL. If it is not specified, the CO MAY assume // the volume is equally accessible from all nodes in the cluster and - // may schedule workloads referencing the volume on any available + // MAY schedule workloads referencing the volume on any available // node. // // Example 1: @@ -1363,7 +1442,7 @@ type Volume struct { // {"region": "R1", "zone": "Z3"} // Indicates a volume accessible from both "zone" "Z2" and "zone" "Z3" // in the "region" "R1". - AccessibleTopology []*Topology `protobuf:"bytes,5,rep,name=accessible_topology,json=accessibleTopology" json:"accessible_topology,omitempty"` + AccessibleTopology []*Topology `protobuf:"bytes,5,rep,name=accessible_topology,json=accessibleTopology,proto3" json:"accessible_topology,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1373,7 +1452,7 @@ func (m *Volume) Reset() { *m = Volume{} } func (m *Volume) String() string { return proto.CompactTextString(m) } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{12} + return fileDescriptor_csi_3932febea60d5a27, []int{12} } func (m *Volume) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Volume.Unmarshal(m, b) @@ -1400,16 +1479,16 @@ func (m *Volume) GetCapacityBytes() int64 { return 0 } -func (m *Volume) GetId() string { +func (m *Volume) GetVolumeId() string { if m != nil { - return m.Id + return m.VolumeId } return "" } -func (m *Volume) GetAttributes() map[string]string { +func (m *Volume) GetVolumeContext() map[string]string { if m != nil { - return m.Attributes + return m.VolumeContext } return nil } @@ -1485,7 +1564,7 @@ type TopologyRequirement struct { // then the provisioned volume MUST be accessible from the "region" // "R1" and the "zone" "Z2" and the SP may select the second zone // independently, e.g. "R1/Z4". - Requisite []*Topology `protobuf:"bytes,1,rep,name=requisite" json:"requisite,omitempty"` + Requisite []*Topology `protobuf:"bytes,1,rep,name=requisite,proto3" json:"requisite,omitempty"` // Specifies the list of topologies the CO would prefer the volume to // be provisioned in. // @@ -1555,7 +1634,7 @@ type TopologyRequirement struct { // combination of "Z3" and other possibilities from the list of // requisite. If that's not possible, it should fall back to a // combination of other possibilities from the list of requisite. - Preferred []*Topology `protobuf:"bytes,2,rep,name=preferred" json:"preferred,omitempty"` + Preferred []*Topology `protobuf:"bytes,2,rep,name=preferred,proto3" json:"preferred,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1565,7 +1644,7 @@ func (m *TopologyRequirement) Reset() { *m = TopologyRequirement{} } func (m *TopologyRequirement) String() string { return proto.CompactTextString(m) } func (*TopologyRequirement) ProtoMessage() {} func (*TopologyRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{13} + return fileDescriptor_csi_3932febea60d5a27, []int{13} } func (m *TopologyRequirement) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TopologyRequirement.Unmarshal(m, b) @@ -1605,15 +1684,18 @@ func (m *TopologyRequirement) GetPreferred() []*Topology { // A topological segment is a specific instance of a topological domain, // like "zone3", "rack3", etc. // For example {"com.company/zone": "Z1", "com.company/rack": "R3"} -// Valid keys have two segments: an optional prefix and name, separated +// Valid keys have two segments: an OPTIONAL prefix and name, separated // by a slash (/), for example: "com.company.example/zone". -// The key name segment is required. The prefix is optional. -// Both the key name and the prefix MUST each be 63 characters or less, -// begin and end with an alphanumeric character ([a-z0-9A-Z]) and -// contain only dashes (-), underscores (_), dots (.), or alphanumerics -// in between, for example "zone". -// The key prefix MUST follow reverse domain name notation format -// (https://en.wikipedia.org/wiki/Reverse_domain_name_notation). +// The key name segment is REQUIRED. The prefix is OPTIONAL. +// The key name MUST be 63 characters or less, begin and end with an +// alphanumeric character ([a-z0-9A-Z]), and contain only dashes (-), +// underscores (_), dots (.), or alphanumerics in between, for example +// "zone". +// The key prefix MUST be 63 characters or less, begin and end with a +// lower-case alphanumeric character ([a-z0-9]), contain only +// dashes (-), dots (.), or lower-case alphanumerics in between, and +// follow domain name notation format +// (https://tools.ietf.org/html/rfc1035#section-2.3.1). // The key prefix SHOULD include the plugin's host company name and/or // the plugin name, to minimize the possibility of collisions with keys // from other plugins. @@ -1626,7 +1708,7 @@ func (m *TopologyRequirement) GetPreferred() []*Topology { // alphanumeric character with '-', '_', '.', or alphanumerics in // between. type Topology struct { - Segments map[string]string `protobuf:"bytes,1,rep,name=segments" json:"segments,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Segments map[string]string `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1636,7 +1718,7 @@ func (m *Topology) Reset() { *m = Topology{} } func (m *Topology) String() string { return proto.CompactTextString(m) } func (*Topology) ProtoMessage() {} func (*Topology) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{14} + return fileDescriptor_csi_3932febea60d5a27, []int{14} } func (m *Topology) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Topology.Unmarshal(m, b) @@ -1666,21 +1748,21 @@ func (m *Topology) GetSegments() map[string]string { type DeleteVolumeRequest struct { // The ID of the volume to be deprovisioned. // This field is REQUIRED. - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // Secrets required by plugin to complete volume deletion request. // This field is OPTIONAL. Refer to the `Secrets Requirements` // section on how to use this field. - ControllerDeleteSecrets map[string]string `protobuf:"bytes,2,rep,name=controller_delete_secrets,json=controllerDeleteSecrets" json:"controller_delete_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Secrets map[string]string `protobuf:"bytes,2,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DeleteVolumeRequest) Reset() { *m = DeleteVolumeRequest{} } func (m *DeleteVolumeRequest) String() string { return proto.CompactTextString(m) } func (*DeleteVolumeRequest) ProtoMessage() {} func (*DeleteVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{15} + return fileDescriptor_csi_3932febea60d5a27, []int{15} } func (m *DeleteVolumeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteVolumeRequest.Unmarshal(m, b) @@ -1707,9 +1789,9 @@ func (m *DeleteVolumeRequest) GetVolumeId() string { return "" } -func (m *DeleteVolumeRequest) GetControllerDeleteSecrets() map[string]string { +func (m *DeleteVolumeRequest) GetSecrets() map[string]string { if m != nil { - return m.ControllerDeleteSecrets + return m.Secrets } return nil } @@ -1724,7 +1806,7 @@ func (m *DeleteVolumeResponse) Reset() { *m = DeleteVolumeResponse{} } func (m *DeleteVolumeResponse) String() string { return proto.CompactTextString(m) } func (*DeleteVolumeResponse) ProtoMessage() {} func (*DeleteVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{16} + return fileDescriptor_csi_3932febea60d5a27, []int{16} } func (m *DeleteVolumeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteVolumeResponse.Unmarshal(m, b) @@ -1747,24 +1829,28 @@ var xxx_messageInfo_DeleteVolumeResponse proto.InternalMessageInfo type ControllerPublishVolumeRequest struct { // The ID of the volume to be used on a node. // This field is REQUIRED. - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // The ID of the node. This field is REQUIRED. The CO SHALL set this // field to match the node ID returned by `NodeGetInfo`. - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` - // The capability of the volume the CO expects the volume to have. + NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + // Volume capability describing how the CO intends to use this volume. + // SP MUST ensure the CO can use the published volume as described. + // Otherwise SP MUST return the appropriate gRPC error code. // This is a REQUIRED field. - VolumeCapability *VolumeCapability `protobuf:"bytes,3,opt,name=volume_capability,json=volumeCapability" json:"volume_capability,omitempty"` - // Whether to publish the volume in readonly mode. This field is - // REQUIRED. - Readonly bool `protobuf:"varint,4,opt,name=readonly" json:"readonly,omitempty"` + VolumeCapability *VolumeCapability `protobuf:"bytes,3,opt,name=volume_capability,json=volumeCapability,proto3" json:"volume_capability,omitempty"` + // Indicates SP MUST publish the volume in readonly mode. + // CO MUST set this field to false if SP does not have the + // PUBLISH_READONLY controller capability. + // This is a REQUIRED field. + Readonly bool `protobuf:"varint,4,opt,name=readonly,proto3" json:"readonly,omitempty"` // Secrets required by plugin to complete controller publish volume // request. This field is OPTIONAL. Refer to the // `Secrets Requirements` section on how to use this field. - ControllerPublishSecrets map[string]string `protobuf:"bytes,5,rep,name=controller_publish_secrets,json=controllerPublishSecrets" json:"controller_publish_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Attributes of the volume to be used on a node. This field is - // OPTIONAL and MUST match the attributes of the Volume identified - // by `volume_id`. - VolumeAttributes map[string]string `protobuf:"bytes,6,rep,name=volume_attributes,json=volumeAttributes" json:"volume_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Secrets map[string]string `protobuf:"bytes,5,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Volume context as returned by CO in CreateVolumeRequest. This field + // is OPTIONAL and MUST match the volume_context of the volume + // identified by `volume_id`. + VolumeContext map[string]string `protobuf:"bytes,6,rep,name=volume_context,json=volumeContext,proto3" json:"volume_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1774,7 +1860,7 @@ func (m *ControllerPublishVolumeRequest) Reset() { *m = ControllerPublis func (m *ControllerPublishVolumeRequest) String() string { return proto.CompactTextString(m) } func (*ControllerPublishVolumeRequest) ProtoMessage() {} func (*ControllerPublishVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{17} + return fileDescriptor_csi_3932febea60d5a27, []int{17} } func (m *ControllerPublishVolumeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ControllerPublishVolumeRequest.Unmarshal(m, b) @@ -1822,26 +1908,35 @@ func (m *ControllerPublishVolumeRequest) GetReadonly() bool { return false } -func (m *ControllerPublishVolumeRequest) GetControllerPublishSecrets() map[string]string { +func (m *ControllerPublishVolumeRequest) GetSecrets() map[string]string { if m != nil { - return m.ControllerPublishSecrets + return m.Secrets } return nil } -func (m *ControllerPublishVolumeRequest) GetVolumeAttributes() map[string]string { +func (m *ControllerPublishVolumeRequest) GetVolumeContext() map[string]string { if m != nil { - return m.VolumeAttributes + return m.VolumeContext } return nil } type ControllerPublishVolumeResponse struct { - // The SP specific information that will be passed to the Plugin in - // the subsequent `NodeStageVolume` or `NodePublishVolume` calls - // for the given volume. - // This information is opaque to the CO. This field is OPTIONAL. - PublishInfo map[string]string `protobuf:"bytes,1,rep,name=publish_info,json=publishInfo" json:"publish_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Opaque static publish properties of the volume. SP MAY use this + // field to ensure subsequent `NodeStageVolume` or `NodePublishVolume` + // calls calls have contextual information. + // The contents of this field SHALL be opaque to a CO. + // The contents of this field SHALL NOT be mutable. + // The contents of this field SHALL be safe for the CO to cache. + // The contents of this field SHOULD NOT contain sensitive + // information. + // The contents of this field SHOULD NOT be used for uniquely + // identifying a volume. The `volume_id` alone SHOULD be sufficient to + // identify the volume. + // This field is OPTIONAL and when present MUST be passed to + // subsequent `NodeStageVolume` or `NodePublishVolume` calls + PublishContext map[string]string `protobuf:"bytes,1,rep,name=publish_context,json=publishContext,proto3" json:"publish_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1851,7 +1946,7 @@ func (m *ControllerPublishVolumeResponse) Reset() { *m = ControllerPubli func (m *ControllerPublishVolumeResponse) String() string { return proto.CompactTextString(m) } func (*ControllerPublishVolumeResponse) ProtoMessage() {} func (*ControllerPublishVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{18} + return fileDescriptor_csi_3932febea60d5a27, []int{18} } func (m *ControllerPublishVolumeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ControllerPublishVolumeResponse.Unmarshal(m, b) @@ -1871,38 +1966,38 @@ func (m *ControllerPublishVolumeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ControllerPublishVolumeResponse proto.InternalMessageInfo -func (m *ControllerPublishVolumeResponse) GetPublishInfo() map[string]string { +func (m *ControllerPublishVolumeResponse) GetPublishContext() map[string]string { if m != nil { - return m.PublishInfo + return m.PublishContext } return nil } type ControllerUnpublishVolumeRequest struct { // The ID of the volume. This field is REQUIRED. - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // The ID of the node. This field is OPTIONAL. The CO SHOULD set this // field to match the node ID returned by `NodeGetInfo` or leave it // unset. If the value is set, the SP MUST unpublish the volume from // the specified node. If the value is unset, the SP MUST unpublish // the volume from all nodes it is published to. - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` + NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // Secrets required by plugin to complete controller unpublish volume // request. This SHOULD be the same secrets passed to the // ControllerPublishVolume call for the specified volume. // This field is OPTIONAL. Refer to the `Secrets Requirements` // section on how to use this field. - ControllerUnpublishSecrets map[string]string `protobuf:"bytes,3,rep,name=controller_unpublish_secrets,json=controllerUnpublishSecrets" json:"controller_unpublish_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Secrets map[string]string `protobuf:"bytes,3,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ControllerUnpublishVolumeRequest) Reset() { *m = ControllerUnpublishVolumeRequest{} } func (m *ControllerUnpublishVolumeRequest) String() string { return proto.CompactTextString(m) } func (*ControllerUnpublishVolumeRequest) ProtoMessage() {} func (*ControllerUnpublishVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{19} + return fileDescriptor_csi_3932febea60d5a27, []int{19} } func (m *ControllerUnpublishVolumeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ControllerUnpublishVolumeRequest.Unmarshal(m, b) @@ -1936,9 +2031,9 @@ func (m *ControllerUnpublishVolumeRequest) GetNodeId() string { return "" } -func (m *ControllerUnpublishVolumeRequest) GetControllerUnpublishSecrets() map[string]string { +func (m *ControllerUnpublishVolumeRequest) GetSecrets() map[string]string { if m != nil { - return m.ControllerUnpublishSecrets + return m.Secrets } return nil } @@ -1953,7 +2048,7 @@ func (m *ControllerUnpublishVolumeResponse) Reset() { *m = ControllerUnp func (m *ControllerUnpublishVolumeResponse) String() string { return proto.CompactTextString(m) } func (*ControllerUnpublishVolumeResponse) ProtoMessage() {} func (*ControllerUnpublishVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{20} + return fileDescriptor_csi_3932febea60d5a27, []int{20} } func (m *ControllerUnpublishVolumeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ControllerUnpublishVolumeResponse.Unmarshal(m, b) @@ -1975,31 +2070,32 @@ var xxx_messageInfo_ControllerUnpublishVolumeResponse proto.InternalMessageInfo type ValidateVolumeCapabilitiesRequest struct { // The ID of the volume to check. This field is REQUIRED. - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // Volume context as returned by CO in CreateVolumeRequest. This field + // is OPTIONAL and MUST match the volume_context of the volume + // identified by `volume_id`. + VolumeContext map[string]string `protobuf:"bytes,2,rep,name=volume_context,json=volumeContext,proto3" json:"volume_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // The capabilities that the CO wants to check for the volume. This - // call SHALL return "supported" only if all the volume capabilities + // call SHALL return "confirmed" only if all the volume capabilities // specified below are supported. This field is REQUIRED. - VolumeCapabilities []*VolumeCapability `protobuf:"bytes,2,rep,name=volume_capabilities,json=volumeCapabilities" json:"volume_capabilities,omitempty"` - // Attributes of the volume to check. This field is OPTIONAL and MUST - // match the attributes of the Volume identified by `volume_id`. - VolumeAttributes map[string]string `protobuf:"bytes,3,rep,name=volume_attributes,json=volumeAttributes" json:"volume_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Specifies where (regions, zones, racks, etc.) the caller believes - // the volume is accessible from. - // A caller MAY specify multiple topologies to indicate they believe - // the volume to be accessible from multiple locations. - // This field is OPTIONAL. This field SHALL NOT be set unless the - // plugin advertises the ACCESSIBILITY_CONSTRAINTS capability. - AccessibleTopology []*Topology `protobuf:"bytes,4,rep,name=accessible_topology,json=accessibleTopology" json:"accessible_topology,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + VolumeCapabilities []*VolumeCapability `protobuf:"bytes,3,rep,name=volume_capabilities,json=volumeCapabilities,proto3" json:"volume_capabilities,omitempty"` + // See CreateVolumeRequest.parameters. + // This field is OPTIONAL. + Parameters map[string]string `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Secrets required by plugin to complete volume validation request. + // This field is OPTIONAL. Refer to the `Secrets Requirements` + // section on how to use this field. + Secrets map[string]string `protobuf:"bytes,5,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ValidateVolumeCapabilitiesRequest) Reset() { *m = ValidateVolumeCapabilitiesRequest{} } func (m *ValidateVolumeCapabilitiesRequest) String() string { return proto.CompactTextString(m) } func (*ValidateVolumeCapabilitiesRequest) ProtoMessage() {} func (*ValidateVolumeCapabilitiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{21} + return fileDescriptor_csi_3932febea60d5a27, []int{21} } func (m *ValidateVolumeCapabilitiesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ValidateVolumeCapabilitiesRequest.Unmarshal(m, b) @@ -2026,6 +2122,13 @@ func (m *ValidateVolumeCapabilitiesRequest) GetVolumeId() string { return "" } +func (m *ValidateVolumeCapabilitiesRequest) GetVolumeContext() map[string]string { + if m != nil { + return m.VolumeContext + } + return nil +} + func (m *ValidateVolumeCapabilitiesRequest) GetVolumeCapabilities() []*VolumeCapability { if m != nil { return m.VolumeCapabilities @@ -2033,28 +2136,34 @@ func (m *ValidateVolumeCapabilitiesRequest) GetVolumeCapabilities() []*VolumeCap return nil } -func (m *ValidateVolumeCapabilitiesRequest) GetVolumeAttributes() map[string]string { +func (m *ValidateVolumeCapabilitiesRequest) GetParameters() map[string]string { if m != nil { - return m.VolumeAttributes + return m.Parameters } return nil } -func (m *ValidateVolumeCapabilitiesRequest) GetAccessibleTopology() []*Topology { +func (m *ValidateVolumeCapabilitiesRequest) GetSecrets() map[string]string { if m != nil { - return m.AccessibleTopology + return m.Secrets } return nil } type ValidateVolumeCapabilitiesResponse struct { - // True if the Plugin supports the specified capabilities for the - // given volume. This field is REQUIRED. - Supported bool `protobuf:"varint,1,opt,name=supported" json:"supported,omitempty"` - // Message to the CO if `supported` above is false. This field is + // Confirmed indicates to the CO the set of capabilities that the + // plugin has validated. This field SHALL only be set to a non-empty + // value for successful validation responses. + // For successful validation responses, the CO SHALL compare the + // fields of this message to the originally requested capabilities in + // order to guard against an older plugin reporting "valid" for newer + // capability fields that it does not yet understand. + // This field is OPTIONAL. + Confirmed *ValidateVolumeCapabilitiesResponse_Confirmed `protobuf:"bytes,1,opt,name=confirmed,proto3" json:"confirmed,omitempty"` + // Message to the CO if `confirmed` above is empty. This field is // OPTIONAL. // An empty string is equal to an unspecified field value. - Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2064,7 +2173,7 @@ func (m *ValidateVolumeCapabilitiesResponse) Reset() { *m = ValidateVolu func (m *ValidateVolumeCapabilitiesResponse) String() string { return proto.CompactTextString(m) } func (*ValidateVolumeCapabilitiesResponse) ProtoMessage() {} func (*ValidateVolumeCapabilitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{22} + return fileDescriptor_csi_3932febea60d5a27, []int{22} } func (m *ValidateVolumeCapabilitiesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ValidateVolumeCapabilitiesResponse.Unmarshal(m, b) @@ -2084,11 +2193,11 @@ func (m *ValidateVolumeCapabilitiesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ValidateVolumeCapabilitiesResponse proto.InternalMessageInfo -func (m *ValidateVolumeCapabilitiesResponse) GetSupported() bool { +func (m *ValidateVolumeCapabilitiesResponse) GetConfirmed() *ValidateVolumeCapabilitiesResponse_Confirmed { if m != nil { - return m.Supported + return m.Confirmed } - return false + return nil } func (m *ValidateVolumeCapabilitiesResponse) GetMessage() string { @@ -2098,6 +2207,70 @@ func (m *ValidateVolumeCapabilitiesResponse) GetMessage() string { return "" } +type ValidateVolumeCapabilitiesResponse_Confirmed struct { + // Volume context validated by the plugin. + // This field is OPTIONAL. + VolumeContext map[string]string `protobuf:"bytes,1,rep,name=volume_context,json=volumeContext,proto3" json:"volume_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Volume capabilities supported by the plugin. + // This field is REQUIRED. + VolumeCapabilities []*VolumeCapability `protobuf:"bytes,2,rep,name=volume_capabilities,json=volumeCapabilities,proto3" json:"volume_capabilities,omitempty"` + // The volume creation parameters validated by the plugin. + // This field is OPTIONAL. + Parameters map[string]string `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ValidateVolumeCapabilitiesResponse_Confirmed) Reset() { + *m = ValidateVolumeCapabilitiesResponse_Confirmed{} +} +func (m *ValidateVolumeCapabilitiesResponse_Confirmed) String() string { + return proto.CompactTextString(m) +} +func (*ValidateVolumeCapabilitiesResponse_Confirmed) ProtoMessage() {} +func (*ValidateVolumeCapabilitiesResponse_Confirmed) Descriptor() ([]byte, []int) { + return fileDescriptor_csi_3932febea60d5a27, []int{22, 0} +} +func (m *ValidateVolumeCapabilitiesResponse_Confirmed) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ValidateVolumeCapabilitiesResponse_Confirmed.Unmarshal(m, b) +} +func (m *ValidateVolumeCapabilitiesResponse_Confirmed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ValidateVolumeCapabilitiesResponse_Confirmed.Marshal(b, m, deterministic) +} +func (dst *ValidateVolumeCapabilitiesResponse_Confirmed) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidateVolumeCapabilitiesResponse_Confirmed.Merge(dst, src) +} +func (m *ValidateVolumeCapabilitiesResponse_Confirmed) XXX_Size() int { + return xxx_messageInfo_ValidateVolumeCapabilitiesResponse_Confirmed.Size(m) +} +func (m *ValidateVolumeCapabilitiesResponse_Confirmed) XXX_DiscardUnknown() { + xxx_messageInfo_ValidateVolumeCapabilitiesResponse_Confirmed.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidateVolumeCapabilitiesResponse_Confirmed proto.InternalMessageInfo + +func (m *ValidateVolumeCapabilitiesResponse_Confirmed) GetVolumeContext() map[string]string { + if m != nil { + return m.VolumeContext + } + return nil +} + +func (m *ValidateVolumeCapabilitiesResponse_Confirmed) GetVolumeCapabilities() []*VolumeCapability { + if m != nil { + return m.VolumeCapabilities + } + return nil +} + +func (m *ValidateVolumeCapabilitiesResponse_Confirmed) GetParameters() map[string]string { + if m != nil { + return m.Parameters + } + return nil +} + type ListVolumesRequest struct { // If specified (non-zero value), the Plugin MUST NOT return more // entries than this number in the response. If the actual number of @@ -2107,12 +2280,12 @@ type ListVolumesRequest struct { // not specified (zero value), it means there is no restriction on the // number of entries that can be returned. // The value of this field MUST NOT be negative. - MaxEntries int32 `protobuf:"varint,1,opt,name=max_entries,json=maxEntries" json:"max_entries,omitempty"` + MaxEntries int32 `protobuf:"varint,1,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` // A token to specify where to start paginating. Set this field to // `next_token` returned by a previous `ListVolumes` call to get the // next page of entries. This field is OPTIONAL. // An empty string is equal to an unspecified field value. - StartingToken string `protobuf:"bytes,2,opt,name=starting_token,json=startingToken" json:"starting_token,omitempty"` + StartingToken string `protobuf:"bytes,2,opt,name=starting_token,json=startingToken,proto3" json:"starting_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2122,7 +2295,7 @@ func (m *ListVolumesRequest) Reset() { *m = ListVolumesRequest{} } func (m *ListVolumesRequest) String() string { return proto.CompactTextString(m) } func (*ListVolumesRequest) ProtoMessage() {} func (*ListVolumesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{23} + return fileDescriptor_csi_3932febea60d5a27, []int{23} } func (m *ListVolumesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListVolumesRequest.Unmarshal(m, b) @@ -2157,14 +2330,14 @@ func (m *ListVolumesRequest) GetStartingToken() string { } type ListVolumesResponse struct { - Entries []*ListVolumesResponse_Entry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` + Entries []*ListVolumesResponse_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` // This token allows you to get the next page of entries for // `ListVolumes` request. If the number of entries is larger than // `max_entries`, use the `next_token` as a value for the // `starting_token` field in the next `ListVolumes` request. This // field is OPTIONAL. // An empty string is equal to an unspecified field value. - NextToken string `protobuf:"bytes,2,opt,name=next_token,json=nextToken" json:"next_token,omitempty"` + NextToken string `protobuf:"bytes,2,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2174,7 +2347,7 @@ func (m *ListVolumesResponse) Reset() { *m = ListVolumesResponse{} } func (m *ListVolumesResponse) String() string { return proto.CompactTextString(m) } func (*ListVolumesResponse) ProtoMessage() {} func (*ListVolumesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{24} + return fileDescriptor_csi_3932febea60d5a27, []int{24} } func (m *ListVolumesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListVolumesResponse.Unmarshal(m, b) @@ -2209,7 +2382,7 @@ func (m *ListVolumesResponse) GetNextToken() string { } type ListVolumesResponse_Entry struct { - Volume *Volume `protobuf:"bytes,1,opt,name=volume" json:"volume,omitempty"` + Volume *Volume `protobuf:"bytes,1,opt,name=volume,proto3" json:"volume,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2219,7 +2392,7 @@ func (m *ListVolumesResponse_Entry) Reset() { *m = ListVolumesResponse_E func (m *ListVolumesResponse_Entry) String() string { return proto.CompactTextString(m) } func (*ListVolumesResponse_Entry) ProtoMessage() {} func (*ListVolumesResponse_Entry) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{24, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{24, 0} } func (m *ListVolumesResponse_Entry) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListVolumesResponse_Entry.Unmarshal(m, b) @@ -2252,19 +2425,19 @@ type GetCapacityRequest struct { // specified `volume_capabilities`. These are the same // `volume_capabilities` the CO will use in `CreateVolumeRequest`. // This field is OPTIONAL. - VolumeCapabilities []*VolumeCapability `protobuf:"bytes,1,rep,name=volume_capabilities,json=volumeCapabilities" json:"volume_capabilities,omitempty"` + VolumeCapabilities []*VolumeCapability `protobuf:"bytes,1,rep,name=volume_capabilities,json=volumeCapabilities,proto3" json:"volume_capabilities,omitempty"` // If specified, the Plugin SHALL report the capacity of the storage // that can be used to provision volumes with the given Plugin // specific `parameters`. These are the same `parameters` the CO will // use in `CreateVolumeRequest`. This field is OPTIONAL. - Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // If specified, the Plugin SHALL report the capacity of the storage // that can be used to provision volumes that in the specified // `accessible_topology`. This is the same as the // `accessible_topology` the CO returns in a `CreateVolumeResponse`. // This field is OPTIONAL. This field SHALL NOT be set unless the - // plugin advertises the ACCESSIBILITY_CONSTRAINTS capability. - AccessibleTopology *Topology `protobuf:"bytes,3,opt,name=accessible_topology,json=accessibleTopology" json:"accessible_topology,omitempty"` + // plugin advertises the VOLUME_ACCESSIBILITY_CONSTRAINTS capability. + AccessibleTopology *Topology `protobuf:"bytes,3,opt,name=accessible_topology,json=accessibleTopology,proto3" json:"accessible_topology,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2274,7 +2447,7 @@ func (m *GetCapacityRequest) Reset() { *m = GetCapacityRequest{} } func (m *GetCapacityRequest) String() string { return proto.CompactTextString(m) } func (*GetCapacityRequest) ProtoMessage() {} func (*GetCapacityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{25} + return fileDescriptor_csi_3932febea60d5a27, []int{25} } func (m *GetCapacityRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetCapacityRequest.Unmarshal(m, b) @@ -2322,7 +2495,7 @@ type GetCapacityResponse struct { // consideration when calculating the available capacity of the // storage. This field is REQUIRED. // The value of this field MUST NOT be negative. - AvailableCapacity int64 `protobuf:"varint,1,opt,name=available_capacity,json=availableCapacity" json:"available_capacity,omitempty"` + AvailableCapacity int64 `protobuf:"varint,1,opt,name=available_capacity,json=availableCapacity,proto3" json:"available_capacity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2332,7 +2505,7 @@ func (m *GetCapacityResponse) Reset() { *m = GetCapacityResponse{} } func (m *GetCapacityResponse) String() string { return proto.CompactTextString(m) } func (*GetCapacityResponse) ProtoMessage() {} func (*GetCapacityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{26} + return fileDescriptor_csi_3932febea60d5a27, []int{26} } func (m *GetCapacityResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetCapacityResponse.Unmarshal(m, b) @@ -2369,7 +2542,7 @@ func (m *ControllerGetCapabilitiesRequest) Reset() { *m = ControllerGetC func (m *ControllerGetCapabilitiesRequest) String() string { return proto.CompactTextString(m) } func (*ControllerGetCapabilitiesRequest) ProtoMessage() {} func (*ControllerGetCapabilitiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{27} + return fileDescriptor_csi_3932febea60d5a27, []int{27} } func (m *ControllerGetCapabilitiesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ControllerGetCapabilitiesRequest.Unmarshal(m, b) @@ -2392,7 +2565,7 @@ var xxx_messageInfo_ControllerGetCapabilitiesRequest proto.InternalMessageInfo type ControllerGetCapabilitiesResponse struct { // All the capabilities that the controller service supports. This // field is OPTIONAL. - Capabilities []*ControllerServiceCapability `protobuf:"bytes,2,rep,name=capabilities" json:"capabilities,omitempty"` + Capabilities []*ControllerServiceCapability `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2402,7 +2575,7 @@ func (m *ControllerGetCapabilitiesResponse) Reset() { *m = ControllerGet func (m *ControllerGetCapabilitiesResponse) String() string { return proto.CompactTextString(m) } func (*ControllerGetCapabilitiesResponse) ProtoMessage() {} func (*ControllerGetCapabilitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{28} + return fileDescriptor_csi_3932febea60d5a27, []int{28} } func (m *ControllerGetCapabilitiesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ControllerGetCapabilitiesResponse.Unmarshal(m, b) @@ -2443,7 +2616,7 @@ func (m *ControllerServiceCapability) Reset() { *m = ControllerServiceCa func (m *ControllerServiceCapability) String() string { return proto.CompactTextString(m) } func (*ControllerServiceCapability) ProtoMessage() {} func (*ControllerServiceCapability) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{29} + return fileDescriptor_csi_3932febea60d5a27, []int{29} } func (m *ControllerServiceCapability) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ControllerServiceCapability.Unmarshal(m, b) @@ -2468,7 +2641,7 @@ type isControllerServiceCapability_Type interface { } type ControllerServiceCapability_Rpc struct { - Rpc *ControllerServiceCapability_RPC `protobuf:"bytes,1,opt,name=rpc,oneof"` + Rpc *ControllerServiceCapability_RPC `protobuf:"bytes,1,opt,name=rpc,proto3,oneof"` } func (*ControllerServiceCapability_Rpc) isControllerServiceCapability_Type() {} @@ -2543,7 +2716,7 @@ func _ControllerServiceCapability_OneofSizer(msg proto.Message) (n int) { } type ControllerServiceCapability_RPC struct { - Type ControllerServiceCapability_RPC_Type `protobuf:"varint,1,opt,name=type,enum=csi.v0.ControllerServiceCapability_RPC_Type" json:"type,omitempty"` + Type ControllerServiceCapability_RPC_Type `protobuf:"varint,1,opt,name=type,proto3,enum=csi.v1.ControllerServiceCapability_RPC_Type" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2553,7 +2726,7 @@ func (m *ControllerServiceCapability_RPC) Reset() { *m = ControllerServi func (m *ControllerServiceCapability_RPC) String() string { return proto.CompactTextString(m) } func (*ControllerServiceCapability_RPC) ProtoMessage() {} func (*ControllerServiceCapability_RPC) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{29, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{29, 0} } func (m *ControllerServiceCapability_RPC) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ControllerServiceCapability_RPC.Unmarshal(m, b) @@ -2583,14 +2756,18 @@ func (m *ControllerServiceCapability_RPC) GetType() ControllerServiceCapability_ type CreateSnapshotRequest struct { // The ID of the source volume to be snapshotted. // This field is REQUIRED. - SourceVolumeId string `protobuf:"bytes,1,opt,name=source_volume_id,json=sourceVolumeId" json:"source_volume_id,omitempty"` + SourceVolumeId string `protobuf:"bytes,1,opt,name=source_volume_id,json=sourceVolumeId,proto3" json:"source_volume_id,omitempty"` // The suggested name for the snapshot. This field is REQUIRED for // idempotency. - Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + // Any Unicode string that conforms to the length limit is allowed + // except those containing the following banned characters: + // U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F. + // (These are control characters other than commonly used whitespace.) + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Secrets required by plugin to complete snapshot creation request. // This field is OPTIONAL. Refer to the `Secrets Requirements` // section on how to use this field. - CreateSnapshotSecrets map[string]string `protobuf:"bytes,3,rep,name=create_snapshot_secrets,json=createSnapshotSecrets" json:"create_snapshot_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Secrets map[string]string `protobuf:"bytes,3,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Plugin specific parameters passed in as opaque key-value pairs. // This field is OPTIONAL. The Plugin is responsible for parsing and // validating these parameters. COs will treat these as opaque. @@ -2601,7 +2778,7 @@ type CreateSnapshotRequest struct { // - Specify if the snapshot should be replicated to some place. // - Specify primary or secondary for replication systems that // support snapshotting only on primary. - Parameters map[string]string `protobuf:"bytes,4,rep,name=parameters" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Parameters map[string]string `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2611,7 +2788,7 @@ func (m *CreateSnapshotRequest) Reset() { *m = CreateSnapshotRequest{} } func (m *CreateSnapshotRequest) String() string { return proto.CompactTextString(m) } func (*CreateSnapshotRequest) ProtoMessage() {} func (*CreateSnapshotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{30} + return fileDescriptor_csi_3932febea60d5a27, []int{30} } func (m *CreateSnapshotRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateSnapshotRequest.Unmarshal(m, b) @@ -2645,9 +2822,9 @@ func (m *CreateSnapshotRequest) GetName() string { return "" } -func (m *CreateSnapshotRequest) GetCreateSnapshotSecrets() map[string]string { +func (m *CreateSnapshotRequest) GetSecrets() map[string]string { if m != nil { - return m.CreateSnapshotSecrets + return m.Secrets } return nil } @@ -2663,7 +2840,7 @@ type CreateSnapshotResponse struct { // Contains all attributes of the newly created snapshot that are // relevant to the CO along with information required by the Plugin // to uniquely identify the snapshot. This field is REQUIRED. - Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot" json:"snapshot,omitempty"` + Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2673,7 +2850,7 @@ func (m *CreateSnapshotResponse) Reset() { *m = CreateSnapshotResponse{} func (m *CreateSnapshotResponse) String() string { return proto.CompactTextString(m) } func (*CreateSnapshotResponse) ProtoMessage() {} func (*CreateSnapshotResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{31} + return fileDescriptor_csi_3932febea60d5a27, []int{31} } func (m *CreateSnapshotResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateSnapshotResponse.Unmarshal(m, b) @@ -2700,7 +2877,7 @@ func (m *CreateSnapshotResponse) GetSnapshot() *Snapshot { return nil } -// The information about a provisioned snapshot. +// Information about a specific snapshot. type Snapshot struct { // This is the complete size of the snapshot in bytes. The purpose of // this field is to give CO guidance on how much space is needed to @@ -2709,34 +2886,38 @@ type Snapshot struct { // OPTIONAL. If this field is not set, it indicates that this size is // unknown. The value of this field MUST NOT be negative and a size of // zero means it is unspecified. - SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes" json:"size_bytes,omitempty"` - // Uniquely identifies a snapshot and is generated by the plugin. It - // will not change over time. This field is REQUIRED. The identity - // information will be used by the CO in subsequent calls to refer to - // the provisioned snapshot. - Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` + SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + // The identifier for this snapshot, generated by the plugin. + // This field is REQUIRED. + // This field MUST contain enough information to uniquely identify + // this specific snapshot vs all other snapshots supported by this + // plugin. + // This field SHALL be used by the CO in subsequent calls to refer to + // this snapshot. + // The SP is NOT responsible for global uniqueness of snapshot_id + // across multiple SPs. + SnapshotId string `protobuf:"bytes,2,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` // Identity information for the source volume. Note that creating a // snapshot from a snapshot is not supported here so the source has to // be a volume. This field is REQUIRED. - SourceVolumeId string `protobuf:"bytes,3,opt,name=source_volume_id,json=sourceVolumeId" json:"source_volume_id,omitempty"` + SourceVolumeId string `protobuf:"bytes,3,opt,name=source_volume_id,json=sourceVolumeId,proto3" json:"source_volume_id,omitempty"` // Timestamp when the point-in-time snapshot is taken on the storage - // system. The format of this field should be a Unix nanoseconds time - // encoded as an int64. On Unix, the command `date +%s%N` returns the - // current time in nanoseconds since 1970-01-01 00:00:00 UTC. This - // field is REQUIRED. - CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` - // The status of a snapshot. - Status *SnapshotStatus `protobuf:"bytes,5,opt,name=status" json:"status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // system. This field is REQUIRED. + CreationTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` + // Indicates if a snapshot is ready to use as a + // `volume_content_source` in a `CreateVolumeRequest`. The default + // value is false. This field is REQUIRED. + ReadyToUse bool `protobuf:"varint,5,opt,name=ready_to_use,json=readyToUse,proto3" json:"ready_to_use,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Snapshot) Reset() { *m = Snapshot{} } func (m *Snapshot) String() string { return proto.CompactTextString(m) } func (*Snapshot) ProtoMessage() {} func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{32} + return fileDescriptor_csi_3932febea60d5a27, []int{32} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Snapshot.Unmarshal(m, b) @@ -2763,9 +2944,9 @@ func (m *Snapshot) GetSizeBytes() int64 { return 0 } -func (m *Snapshot) GetId() string { +func (m *Snapshot) GetSnapshotId() string { if m != nil { - return m.Id + return m.SnapshotId } return "" } @@ -2777,88 +2958,38 @@ func (m *Snapshot) GetSourceVolumeId() string { return "" } -func (m *Snapshot) GetCreatedAt() int64 { +func (m *Snapshot) GetCreationTime() *timestamp.Timestamp { if m != nil { - return m.CreatedAt - } - return 0 -} - -func (m *Snapshot) GetStatus() *SnapshotStatus { - if m != nil { - return m.Status + return m.CreationTime } return nil } -// The status of a snapshot. -type SnapshotStatus struct { - // This field is REQUIRED. - Type SnapshotStatus_Type `protobuf:"varint,1,opt,name=type,enum=csi.v0.SnapshotStatus_Type" json:"type,omitempty"` - // Additional information to describe why a snapshot ended up in the - // `ERROR_UPLOADING` status. This field is OPTIONAL. - Details string `protobuf:"bytes,2,opt,name=details" json:"details,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SnapshotStatus) Reset() { *m = SnapshotStatus{} } -func (m *SnapshotStatus) String() string { return proto.CompactTextString(m) } -func (*SnapshotStatus) ProtoMessage() {} -func (*SnapshotStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{33} -} -func (m *SnapshotStatus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SnapshotStatus.Unmarshal(m, b) -} -func (m *SnapshotStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SnapshotStatus.Marshal(b, m, deterministic) -} -func (dst *SnapshotStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotStatus.Merge(dst, src) -} -func (m *SnapshotStatus) XXX_Size() int { - return xxx_messageInfo_SnapshotStatus.Size(m) -} -func (m *SnapshotStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotStatus proto.InternalMessageInfo - -func (m *SnapshotStatus) GetType() SnapshotStatus_Type { - if m != nil { - return m.Type - } - return SnapshotStatus_UNKNOWN -} - -func (m *SnapshotStatus) GetDetails() string { +func (m *Snapshot) GetReadyToUse() bool { if m != nil { - return m.Details + return m.ReadyToUse } - return "" + return false } type DeleteSnapshotRequest struct { // The ID of the snapshot to be deleted. // This field is REQUIRED. - SnapshotId string `protobuf:"bytes,1,opt,name=snapshot_id,json=snapshotId" json:"snapshot_id,omitempty"` + SnapshotId string `protobuf:"bytes,1,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` // Secrets required by plugin to complete snapshot deletion request. // This field is OPTIONAL. Refer to the `Secrets Requirements` // section on how to use this field. - DeleteSnapshotSecrets map[string]string `protobuf:"bytes,2,rep,name=delete_snapshot_secrets,json=deleteSnapshotSecrets" json:"delete_snapshot_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Secrets map[string]string `protobuf:"bytes,2,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DeleteSnapshotRequest) Reset() { *m = DeleteSnapshotRequest{} } func (m *DeleteSnapshotRequest) String() string { return proto.CompactTextString(m) } func (*DeleteSnapshotRequest) ProtoMessage() {} func (*DeleteSnapshotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{34} + return fileDescriptor_csi_3932febea60d5a27, []int{33} } func (m *DeleteSnapshotRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteSnapshotRequest.Unmarshal(m, b) @@ -2885,9 +3016,9 @@ func (m *DeleteSnapshotRequest) GetSnapshotId() string { return "" } -func (m *DeleteSnapshotRequest) GetDeleteSnapshotSecrets() map[string]string { +func (m *DeleteSnapshotRequest) GetSecrets() map[string]string { if m != nil { - return m.DeleteSnapshotSecrets + return m.Secrets } return nil } @@ -2902,7 +3033,7 @@ func (m *DeleteSnapshotResponse) Reset() { *m = DeleteSnapshotResponse{} func (m *DeleteSnapshotResponse) String() string { return proto.CompactTextString(m) } func (*DeleteSnapshotResponse) ProtoMessage() {} func (*DeleteSnapshotResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{35} + return fileDescriptor_csi_3932febea60d5a27, []int{34} } func (m *DeleteSnapshotResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteSnapshotResponse.Unmarshal(m, b) @@ -2933,20 +3064,21 @@ type ListSnapshotsRequest struct { // not specified (zero value), it means there is no restriction on the // number of entries that can be returned. // The value of this field MUST NOT be negative. - MaxEntries int32 `protobuf:"varint,1,opt,name=max_entries,json=maxEntries" json:"max_entries,omitempty"` + MaxEntries int32 `protobuf:"varint,1,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` // A token to specify where to start paginating. Set this field to // `next_token` returned by a previous `ListSnapshots` call to get the // next page of entries. This field is OPTIONAL. // An empty string is equal to an unspecified field value. - StartingToken string `protobuf:"bytes,2,opt,name=starting_token,json=startingToken" json:"starting_token,omitempty"` + StartingToken string `protobuf:"bytes,2,opt,name=starting_token,json=startingToken,proto3" json:"starting_token,omitempty"` // Identity information for the source volume. This field is OPTIONAL. // It can be used to list snapshots by volume. - SourceVolumeId string `protobuf:"bytes,3,opt,name=source_volume_id,json=sourceVolumeId" json:"source_volume_id,omitempty"` + SourceVolumeId string `protobuf:"bytes,3,opt,name=source_volume_id,json=sourceVolumeId,proto3" json:"source_volume_id,omitempty"` // Identity information for a specific snapshot. This field is // OPTIONAL. It can be used to list only a specific snapshot. // ListSnapshots will return with current snapshot information - // and will not block if the snapshot is being uploaded. - SnapshotId string `protobuf:"bytes,4,opt,name=snapshot_id,json=snapshotId" json:"snapshot_id,omitempty"` + // and will not block if the snapshot is being processed after + // it is cut. + SnapshotId string `protobuf:"bytes,4,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2956,7 +3088,7 @@ func (m *ListSnapshotsRequest) Reset() { *m = ListSnapshotsRequest{} } func (m *ListSnapshotsRequest) String() string { return proto.CompactTextString(m) } func (*ListSnapshotsRequest) ProtoMessage() {} func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{36} + return fileDescriptor_csi_3932febea60d5a27, []int{35} } func (m *ListSnapshotsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListSnapshotsRequest.Unmarshal(m, b) @@ -3005,14 +3137,14 @@ func (m *ListSnapshotsRequest) GetSnapshotId() string { } type ListSnapshotsResponse struct { - Entries []*ListSnapshotsResponse_Entry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` + Entries []*ListSnapshotsResponse_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` // This token allows you to get the next page of entries for // `ListSnapshots` request. If the number of entries is larger than // `max_entries`, use the `next_token` as a value for the // `starting_token` field in the next `ListSnapshots` request. This // field is OPTIONAL. // An empty string is equal to an unspecified field value. - NextToken string `protobuf:"bytes,2,opt,name=next_token,json=nextToken" json:"next_token,omitempty"` + NextToken string `protobuf:"bytes,2,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3022,7 +3154,7 @@ func (m *ListSnapshotsResponse) Reset() { *m = ListSnapshotsResponse{} } func (m *ListSnapshotsResponse) String() string { return proto.CompactTextString(m) } func (*ListSnapshotsResponse) ProtoMessage() {} func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{37} + return fileDescriptor_csi_3932febea60d5a27, []int{36} } func (m *ListSnapshotsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListSnapshotsResponse.Unmarshal(m, b) @@ -3057,7 +3189,7 @@ func (m *ListSnapshotsResponse) GetNextToken() string { } type ListSnapshotsResponse_Entry struct { - Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot" json:"snapshot,omitempty"` + Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3067,7 +3199,7 @@ func (m *ListSnapshotsResponse_Entry) Reset() { *m = ListSnapshotsRespon func (m *ListSnapshotsResponse_Entry) String() string { return proto.CompactTextString(m) } func (*ListSnapshotsResponse_Entry) ProtoMessage() {} func (*ListSnapshotsResponse_Entry) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{37, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{36, 0} } func (m *ListSnapshotsResponse_Entry) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListSnapshotsResponse_Entry.Unmarshal(m, b) @@ -3096,30 +3228,35 @@ func (m *ListSnapshotsResponse_Entry) GetSnapshot() *Snapshot { type NodeStageVolumeRequest struct { // The ID of the volume to publish. This field is REQUIRED. - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // The CO SHALL set this field to the value returned by // `ControllerPublishVolume` if the corresponding Controller Plugin // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be // left unset if the corresponding Controller Plugin does not have // this capability. This is an OPTIONAL field. - PublishInfo map[string]string `protobuf:"bytes,2,rep,name=publish_info,json=publishInfo" json:"publish_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // The path to which the volume will be published. It MUST be an + PublishContext map[string]string `protobuf:"bytes,2,rep,name=publish_context,json=publishContext,proto3" json:"publish_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The path to which the volume MAY be staged. It MUST be an // absolute path in the root filesystem of the process serving this // request. The CO SHALL ensure that there is only one - // staging_target_path per volume. + // `staging_target_path` per volume. The CO SHALL ensure that the + // process serving the request has `read` and `write` permission to + // the path, and is able to create files or directories at the path + // if it does not exist. // This is a REQUIRED field. - StagingTargetPath string `protobuf:"bytes,3,opt,name=staging_target_path,json=stagingTargetPath" json:"staging_target_path,omitempty"` - // The capability of the volume the CO expects the volume to have. + StagingTargetPath string `protobuf:"bytes,3,opt,name=staging_target_path,json=stagingTargetPath,proto3" json:"staging_target_path,omitempty"` + // Volume capability describing how the CO intends to use this volume. + // SP MUST ensure the CO can use the staged volume as described. + // Otherwise SP MUST return the appropriate gRPC error code. // This is a REQUIRED field. - VolumeCapability *VolumeCapability `protobuf:"bytes,4,opt,name=volume_capability,json=volumeCapability" json:"volume_capability,omitempty"` + VolumeCapability *VolumeCapability `protobuf:"bytes,4,opt,name=volume_capability,json=volumeCapability,proto3" json:"volume_capability,omitempty"` // Secrets required by plugin to complete node stage volume request. // This field is OPTIONAL. Refer to the `Secrets Requirements` // section on how to use this field. - NodeStageSecrets map[string]string `protobuf:"bytes,5,rep,name=node_stage_secrets,json=nodeStageSecrets" json:"node_stage_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Attributes of the volume to publish. This field is OPTIONAL and - // MUST match the attributes of the `Volume` identified by - // `volume_id`. - VolumeAttributes map[string]string `protobuf:"bytes,6,rep,name=volume_attributes,json=volumeAttributes" json:"volume_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Secrets map[string]string `protobuf:"bytes,5,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Volume context as returned by CO in CreateVolumeRequest. This field + // is OPTIONAL and MUST match the volume_context of the volume + // identified by `volume_id`. + VolumeContext map[string]string `protobuf:"bytes,6,rep,name=volume_context,json=volumeContext,proto3" json:"volume_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3129,7 +3266,7 @@ func (m *NodeStageVolumeRequest) Reset() { *m = NodeStageVolumeRequest{} func (m *NodeStageVolumeRequest) String() string { return proto.CompactTextString(m) } func (*NodeStageVolumeRequest) ProtoMessage() {} func (*NodeStageVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{38} + return fileDescriptor_csi_3932febea60d5a27, []int{37} } func (m *NodeStageVolumeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeStageVolumeRequest.Unmarshal(m, b) @@ -3156,9 +3293,9 @@ func (m *NodeStageVolumeRequest) GetVolumeId() string { return "" } -func (m *NodeStageVolumeRequest) GetPublishInfo() map[string]string { +func (m *NodeStageVolumeRequest) GetPublishContext() map[string]string { if m != nil { - return m.PublishInfo + return m.PublishContext } return nil } @@ -3177,16 +3314,16 @@ func (m *NodeStageVolumeRequest) GetVolumeCapability() *VolumeCapability { return nil } -func (m *NodeStageVolumeRequest) GetNodeStageSecrets() map[string]string { +func (m *NodeStageVolumeRequest) GetSecrets() map[string]string { if m != nil { - return m.NodeStageSecrets + return m.Secrets } return nil } -func (m *NodeStageVolumeRequest) GetVolumeAttributes() map[string]string { +func (m *NodeStageVolumeRequest) GetVolumeContext() map[string]string { if m != nil { - return m.VolumeAttributes + return m.VolumeContext } return nil } @@ -3201,7 +3338,7 @@ func (m *NodeStageVolumeResponse) Reset() { *m = NodeStageVolumeResponse func (m *NodeStageVolumeResponse) String() string { return proto.CompactTextString(m) } func (*NodeStageVolumeResponse) ProtoMessage() {} func (*NodeStageVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{39} + return fileDescriptor_csi_3932febea60d5a27, []int{38} } func (m *NodeStageVolumeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeStageVolumeResponse.Unmarshal(m, b) @@ -3223,11 +3360,11 @@ var xxx_messageInfo_NodeStageVolumeResponse proto.InternalMessageInfo type NodeUnstageVolumeRequest struct { // The ID of the volume. This field is REQUIRED. - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` - // The path at which the volume was published. It MUST be an absolute + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // The path at which the volume was staged. It MUST be an absolute // path in the root filesystem of the process serving this request. // This is a REQUIRED field. - StagingTargetPath string `protobuf:"bytes,2,opt,name=staging_target_path,json=stagingTargetPath" json:"staging_target_path,omitempty"` + StagingTargetPath string `protobuf:"bytes,2,opt,name=staging_target_path,json=stagingTargetPath,proto3" json:"staging_target_path,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3237,7 +3374,7 @@ func (m *NodeUnstageVolumeRequest) Reset() { *m = NodeUnstageVolumeReque func (m *NodeUnstageVolumeRequest) String() string { return proto.CompactTextString(m) } func (*NodeUnstageVolumeRequest) ProtoMessage() {} func (*NodeUnstageVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{40} + return fileDescriptor_csi_3932febea60d5a27, []int{39} } func (m *NodeUnstageVolumeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeUnstageVolumeRequest.Unmarshal(m, b) @@ -3281,7 +3418,7 @@ func (m *NodeUnstageVolumeResponse) Reset() { *m = NodeUnstageVolumeResp func (m *NodeUnstageVolumeResponse) String() string { return proto.CompactTextString(m) } func (*NodeUnstageVolumeResponse) ProtoMessage() {} func (*NodeUnstageVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{41} + return fileDescriptor_csi_3932febea60d5a27, []int{40} } func (m *NodeUnstageVolumeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeUnstageVolumeResponse.Unmarshal(m, b) @@ -3303,41 +3440,44 @@ var xxx_messageInfo_NodeUnstageVolumeResponse proto.InternalMessageInfo type NodePublishVolumeRequest struct { // The ID of the volume to publish. This field is REQUIRED. - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // The CO SHALL set this field to the value returned by // `ControllerPublishVolume` if the corresponding Controller Plugin // has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be // left unset if the corresponding Controller Plugin does not have // this capability. This is an OPTIONAL field. - PublishInfo map[string]string `protobuf:"bytes,2,rep,name=publish_info,json=publishInfo" json:"publish_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // The path to which the device was mounted by `NodeStageVolume`. + PublishContext map[string]string `protobuf:"bytes,2,rep,name=publish_context,json=publishContext,proto3" json:"publish_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The path to which the volume was staged by `NodeStageVolume`. // It MUST be an absolute path in the root filesystem of the process // serving this request. // It MUST be set if the Node Plugin implements the // `STAGE_UNSTAGE_VOLUME` node capability. // This is an OPTIONAL field. - StagingTargetPath string `protobuf:"bytes,3,opt,name=staging_target_path,json=stagingTargetPath" json:"staging_target_path,omitempty"` + StagingTargetPath string `protobuf:"bytes,3,opt,name=staging_target_path,json=stagingTargetPath,proto3" json:"staging_target_path,omitempty"` // The path to which the volume will be published. It MUST be an // absolute path in the root filesystem of the process serving this // request. The CO SHALL ensure uniqueness of target_path per volume. - // The CO SHALL ensure that the path exists, and that the process - // serving the request has `read` and `write` permissions to the path. + // The CO SHALL ensure that the process serving the request has + // `read` and `write` permissions to the path, and is able to create + // files or directories at the path if it does not exist. // This is a REQUIRED field. - TargetPath string `protobuf:"bytes,4,opt,name=target_path,json=targetPath" json:"target_path,omitempty"` - // The capability of the volume the CO expects the volume to have. + TargetPath string `protobuf:"bytes,4,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` + // Volume capability describing how the CO intends to use this volume. + // SP MUST ensure the CO can use the published volume as described. + // Otherwise SP MUST return the appropriate gRPC error code. // This is a REQUIRED field. - VolumeCapability *VolumeCapability `protobuf:"bytes,5,opt,name=volume_capability,json=volumeCapability" json:"volume_capability,omitempty"` - // Whether to publish the volume in readonly mode. This field is - // REQUIRED. - Readonly bool `protobuf:"varint,6,opt,name=readonly" json:"readonly,omitempty"` + VolumeCapability *VolumeCapability `protobuf:"bytes,5,opt,name=volume_capability,json=volumeCapability,proto3" json:"volume_capability,omitempty"` + // Indicates SP MUST publish the volume in readonly mode. + // This field is REQUIRED. + Readonly bool `protobuf:"varint,6,opt,name=readonly,proto3" json:"readonly,omitempty"` // Secrets required by plugin to complete node publish volume request. // This field is OPTIONAL. Refer to the `Secrets Requirements` // section on how to use this field. - NodePublishSecrets map[string]string `protobuf:"bytes,7,rep,name=node_publish_secrets,json=nodePublishSecrets" json:"node_publish_secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Attributes of the volume to publish. This field is OPTIONAL and - // MUST match the attributes of the Volume identified by - // `volume_id`. - VolumeAttributes map[string]string `protobuf:"bytes,8,rep,name=volume_attributes,json=volumeAttributes" json:"volume_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Secrets map[string]string `protobuf:"bytes,7,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Volume context as returned by CO in CreateVolumeRequest. This field + // is OPTIONAL and MUST match the volume_context of the volume + // identified by `volume_id`. + VolumeContext map[string]string `protobuf:"bytes,8,rep,name=volume_context,json=volumeContext,proto3" json:"volume_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3347,7 +3487,7 @@ func (m *NodePublishVolumeRequest) Reset() { *m = NodePublishVolumeReque func (m *NodePublishVolumeRequest) String() string { return proto.CompactTextString(m) } func (*NodePublishVolumeRequest) ProtoMessage() {} func (*NodePublishVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{42} + return fileDescriptor_csi_3932febea60d5a27, []int{41} } func (m *NodePublishVolumeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodePublishVolumeRequest.Unmarshal(m, b) @@ -3374,9 +3514,9 @@ func (m *NodePublishVolumeRequest) GetVolumeId() string { return "" } -func (m *NodePublishVolumeRequest) GetPublishInfo() map[string]string { +func (m *NodePublishVolumeRequest) GetPublishContext() map[string]string { if m != nil { - return m.PublishInfo + return m.PublishContext } return nil } @@ -3409,16 +3549,16 @@ func (m *NodePublishVolumeRequest) GetReadonly() bool { return false } -func (m *NodePublishVolumeRequest) GetNodePublishSecrets() map[string]string { +func (m *NodePublishVolumeRequest) GetSecrets() map[string]string { if m != nil { - return m.NodePublishSecrets + return m.Secrets } return nil } -func (m *NodePublishVolumeRequest) GetVolumeAttributes() map[string]string { +func (m *NodePublishVolumeRequest) GetVolumeContext() map[string]string { if m != nil { - return m.VolumeAttributes + return m.VolumeContext } return nil } @@ -3433,7 +3573,7 @@ func (m *NodePublishVolumeResponse) Reset() { *m = NodePublishVolumeResp func (m *NodePublishVolumeResponse) String() string { return proto.CompactTextString(m) } func (*NodePublishVolumeResponse) ProtoMessage() {} func (*NodePublishVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{43} + return fileDescriptor_csi_3932febea60d5a27, []int{42} } func (m *NodePublishVolumeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodePublishVolumeResponse.Unmarshal(m, b) @@ -3455,11 +3595,11 @@ var xxx_messageInfo_NodePublishVolumeResponse proto.InternalMessageInfo type NodeUnpublishVolumeRequest struct { // The ID of the volume. This field is REQUIRED. - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // The path at which the volume was published. It MUST be an absolute // path in the root filesystem of the process serving this request. // This is a REQUIRED field. - TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath" json:"target_path,omitempty"` + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3469,7 +3609,7 @@ func (m *NodeUnpublishVolumeRequest) Reset() { *m = NodeUnpublishVolumeR func (m *NodeUnpublishVolumeRequest) String() string { return proto.CompactTextString(m) } func (*NodeUnpublishVolumeRequest) ProtoMessage() {} func (*NodeUnpublishVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{44} + return fileDescriptor_csi_3932febea60d5a27, []int{43} } func (m *NodeUnpublishVolumeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeUnpublishVolumeRequest.Unmarshal(m, b) @@ -3513,7 +3653,7 @@ func (m *NodeUnpublishVolumeResponse) Reset() { *m = NodeUnpublishVolume func (m *NodeUnpublishVolumeResponse) String() string { return proto.CompactTextString(m) } func (*NodeUnpublishVolumeResponse) ProtoMessage() {} func (*NodeUnpublishVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{45} + return fileDescriptor_csi_3932febea60d5a27, []int{44} } func (m *NodeUnpublishVolumeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeUnpublishVolumeResponse.Unmarshal(m, b) @@ -3535,13 +3675,13 @@ var xxx_messageInfo_NodeUnpublishVolumeResponse proto.InternalMessageInfo type NodeGetVolumeStatsRequest struct { // The ID of the volume. This field is REQUIRED. - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // It can be any valid path where volume was previously // staged or published. // It MUST be an absolute path in the root filesystem of // the process serving this request. // This is a REQUIRED field. - VolumePath string `protobuf:"bytes,2,opt,name=volume_path,json=volumePath" json:"volume_path,omitempty"` + VolumePath string `protobuf:"bytes,2,opt,name=volume_path,json=volumePath,proto3" json:"volume_path,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3551,7 +3691,7 @@ func (m *NodeGetVolumeStatsRequest) Reset() { *m = NodeGetVolumeStatsReq func (m *NodeGetVolumeStatsRequest) String() string { return proto.CompactTextString(m) } func (*NodeGetVolumeStatsRequest) ProtoMessage() {} func (*NodeGetVolumeStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{46} + return fileDescriptor_csi_3932febea60d5a27, []int{45} } func (m *NodeGetVolumeStatsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeGetVolumeStatsRequest.Unmarshal(m, b) @@ -3587,7 +3727,7 @@ func (m *NodeGetVolumeStatsRequest) GetVolumePath() string { type NodeGetVolumeStatsResponse struct { // This field is OPTIONAL. - Usage []*VolumeUsage `protobuf:"bytes,1,rep,name=usage" json:"usage,omitempty"` + Usage []*VolumeUsage `protobuf:"bytes,1,rep,name=usage,proto3" json:"usage,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3597,7 +3737,7 @@ func (m *NodeGetVolumeStatsResponse) Reset() { *m = NodeGetVolumeStatsRe func (m *NodeGetVolumeStatsResponse) String() string { return proto.CompactTextString(m) } func (*NodeGetVolumeStatsResponse) ProtoMessage() {} func (*NodeGetVolumeStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{47} + return fileDescriptor_csi_3932febea60d5a27, []int{46} } func (m *NodeGetVolumeStatsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeGetVolumeStatsResponse.Unmarshal(m, b) @@ -3627,15 +3767,15 @@ func (m *NodeGetVolumeStatsResponse) GetUsage() []*VolumeUsage { type VolumeUsage struct { // The available capacity in specified Unit. This field is OPTIONAL. // The value of this field MUST NOT be negative. - Available int64 `protobuf:"varint,1,opt,name=available" json:"available,omitempty"` + Available int64 `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` // The total capacity in specified Unit. This field is REQUIRED. // The value of this field MUST NOT be negative. - Total int64 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"` + Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // The used capacity in specified Unit. This field is OPTIONAL. // The value of this field MUST NOT be negative. - Used int64 `protobuf:"varint,3,opt,name=used" json:"used,omitempty"` + Used int64 `protobuf:"varint,3,opt,name=used,proto3" json:"used,omitempty"` // Units by which values are measured. This field is REQUIRED. - Unit VolumeUsage_Unit `protobuf:"varint,4,opt,name=unit,enum=csi.v0.VolumeUsage_Unit" json:"unit,omitempty"` + Unit VolumeUsage_Unit `protobuf:"varint,4,opt,name=unit,proto3,enum=csi.v1.VolumeUsage_Unit" json:"unit,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3645,7 +3785,7 @@ func (m *VolumeUsage) Reset() { *m = VolumeUsage{} } func (m *VolumeUsage) String() string { return proto.CompactTextString(m) } func (*VolumeUsage) ProtoMessage() {} func (*VolumeUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{48} + return fileDescriptor_csi_3932febea60d5a27, []int{47} } func (m *VolumeUsage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VolumeUsage.Unmarshal(m, b) @@ -3693,77 +3833,6 @@ func (m *VolumeUsage) GetUnit() VolumeUsage_Unit { return VolumeUsage_UNKNOWN } -type NodeGetIdRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NodeGetIdRequest) Reset() { *m = NodeGetIdRequest{} } -func (m *NodeGetIdRequest) String() string { return proto.CompactTextString(m) } -func (*NodeGetIdRequest) ProtoMessage() {} -func (*NodeGetIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{49} -} -func (m *NodeGetIdRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NodeGetIdRequest.Unmarshal(m, b) -} -func (m *NodeGetIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NodeGetIdRequest.Marshal(b, m, deterministic) -} -func (dst *NodeGetIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeGetIdRequest.Merge(dst, src) -} -func (m *NodeGetIdRequest) XXX_Size() int { - return xxx_messageInfo_NodeGetIdRequest.Size(m) -} -func (m *NodeGetIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NodeGetIdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeGetIdRequest proto.InternalMessageInfo - -type NodeGetIdResponse struct { - // The ID of the node as understood by the SP which SHALL be used by - // CO in subsequent `ControllerPublishVolume`. - // This is a REQUIRED field. - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NodeGetIdResponse) Reset() { *m = NodeGetIdResponse{} } -func (m *NodeGetIdResponse) String() string { return proto.CompactTextString(m) } -func (*NodeGetIdResponse) ProtoMessage() {} -func (*NodeGetIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{50} -} -func (m *NodeGetIdResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NodeGetIdResponse.Unmarshal(m, b) -} -func (m *NodeGetIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NodeGetIdResponse.Marshal(b, m, deterministic) -} -func (dst *NodeGetIdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeGetIdResponse.Merge(dst, src) -} -func (m *NodeGetIdResponse) XXX_Size() int { - return xxx_messageInfo_NodeGetIdResponse.Size(m) -} -func (m *NodeGetIdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NodeGetIdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeGetIdResponse proto.InternalMessageInfo - -func (m *NodeGetIdResponse) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - type NodeGetCapabilitiesRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -3774,7 +3843,7 @@ func (m *NodeGetCapabilitiesRequest) Reset() { *m = NodeGetCapabilitiesR func (m *NodeGetCapabilitiesRequest) String() string { return proto.CompactTextString(m) } func (*NodeGetCapabilitiesRequest) ProtoMessage() {} func (*NodeGetCapabilitiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{51} + return fileDescriptor_csi_3932febea60d5a27, []int{48} } func (m *NodeGetCapabilitiesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeGetCapabilitiesRequest.Unmarshal(m, b) @@ -3797,7 +3866,7 @@ var xxx_messageInfo_NodeGetCapabilitiesRequest proto.InternalMessageInfo type NodeGetCapabilitiesResponse struct { // All the capabilities that the node service supports. This field // is OPTIONAL. - Capabilities []*NodeServiceCapability `protobuf:"bytes,1,rep,name=capabilities" json:"capabilities,omitempty"` + Capabilities []*NodeServiceCapability `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3807,7 +3876,7 @@ func (m *NodeGetCapabilitiesResponse) Reset() { *m = NodeGetCapabilities func (m *NodeGetCapabilitiesResponse) String() string { return proto.CompactTextString(m) } func (*NodeGetCapabilitiesResponse) ProtoMessage() {} func (*NodeGetCapabilitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{52} + return fileDescriptor_csi_3932febea60d5a27, []int{49} } func (m *NodeGetCapabilitiesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeGetCapabilitiesResponse.Unmarshal(m, b) @@ -3848,7 +3917,7 @@ func (m *NodeServiceCapability) Reset() { *m = NodeServiceCapability{} } func (m *NodeServiceCapability) String() string { return proto.CompactTextString(m) } func (*NodeServiceCapability) ProtoMessage() {} func (*NodeServiceCapability) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{53} + return fileDescriptor_csi_3932febea60d5a27, []int{50} } func (m *NodeServiceCapability) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeServiceCapability.Unmarshal(m, b) @@ -3873,7 +3942,7 @@ type isNodeServiceCapability_Type interface { } type NodeServiceCapability_Rpc struct { - Rpc *NodeServiceCapability_RPC `protobuf:"bytes,1,opt,name=rpc,oneof"` + Rpc *NodeServiceCapability_RPC `protobuf:"bytes,1,opt,name=rpc,proto3,oneof"` } func (*NodeServiceCapability_Rpc) isNodeServiceCapability_Type() {} @@ -3948,7 +4017,7 @@ func _NodeServiceCapability_OneofSizer(msg proto.Message) (n int) { } type NodeServiceCapability_RPC struct { - Type NodeServiceCapability_RPC_Type `protobuf:"varint,1,opt,name=type,enum=csi.v0.NodeServiceCapability_RPC_Type" json:"type,omitempty"` + Type NodeServiceCapability_RPC_Type `protobuf:"varint,1,opt,name=type,proto3,enum=csi.v1.NodeServiceCapability_RPC_Type" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3958,7 +4027,7 @@ func (m *NodeServiceCapability_RPC) Reset() { *m = NodeServiceCapability func (m *NodeServiceCapability_RPC) String() string { return proto.CompactTextString(m) } func (*NodeServiceCapability_RPC) ProtoMessage() {} func (*NodeServiceCapability_RPC) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{53, 0} + return fileDescriptor_csi_3932febea60d5a27, []int{50, 0} } func (m *NodeServiceCapability_RPC) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeServiceCapability_RPC.Unmarshal(m, b) @@ -3995,7 +4064,7 @@ func (m *NodeGetInfoRequest) Reset() { *m = NodeGetInfoRequest{} } func (m *NodeGetInfoRequest) String() string { return proto.CompactTextString(m) } func (*NodeGetInfoRequest) ProtoMessage() {} func (*NodeGetInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{54} + return fileDescriptor_csi_3932febea60d5a27, []int{51} } func (m *NodeGetInfoRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeGetInfoRequest.Unmarshal(m, b) @@ -4016,20 +4085,25 @@ func (m *NodeGetInfoRequest) XXX_DiscardUnknown() { var xxx_messageInfo_NodeGetInfoRequest proto.InternalMessageInfo type NodeGetInfoResponse struct { - // The ID of the node as understood by the SP which SHALL be used by - // CO in subsequent calls to `ControllerPublishVolume`. - // This is a REQUIRED field. - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` + // The identifier of the node as understood by the SP. + // This field is REQUIRED. + // This field MUST contain enough information to uniquely identify + // this specific node vs all other nodes supported by this plugin. + // This field SHALL be used by the CO in subsequent calls, including + // `ControllerPublishVolume`, to refer to this node. + // The SP is NOT responsible for global uniqueness of node_id across + // multiple SPs. + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // Maximum number of volumes that controller can publish to the node. // If value is not set or zero CO SHALL decide how many volumes of // this type can be published by the controller to the node. The // plugin MUST NOT set negative values here. // This field is OPTIONAL. - MaxVolumesPerNode int64 `protobuf:"varint,2,opt,name=max_volumes_per_node,json=maxVolumesPerNode" json:"max_volumes_per_node,omitempty"` + MaxVolumesPerNode int64 `protobuf:"varint,2,opt,name=max_volumes_per_node,json=maxVolumesPerNode,proto3" json:"max_volumes_per_node,omitempty"` // Specifies where (regions, zones, racks, etc.) the node is // accessible from. // A plugin that returns this field MUST also set the - // ACCESSIBILITY_CONSTRAINTS plugin capability. + // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. // COs MAY use this information along with the topology information // returned in CreateVolumeResponse to ensure that a given volume is // accessible from a given node when scheduling workloads. @@ -4043,7 +4117,7 @@ type NodeGetInfoResponse struct { // {"region": "R1", "zone": "R2"} // Indicates the node exists within the "region" "R1" and the "zone" // "Z2". - AccessibleTopology *Topology `protobuf:"bytes,3,opt,name=accessible_topology,json=accessibleTopology" json:"accessible_topology,omitempty"` + AccessibleTopology *Topology `protobuf:"bytes,3,opt,name=accessible_topology,json=accessibleTopology,proto3" json:"accessible_topology,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -4053,7 +4127,7 @@ func (m *NodeGetInfoResponse) Reset() { *m = NodeGetInfoResponse{} } func (m *NodeGetInfoResponse) String() string { return proto.CompactTextString(m) } func (*NodeGetInfoResponse) ProtoMessage() {} func (*NodeGetInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_csi_d2a705310653d01b, []int{55} + return fileDescriptor_csi_3932febea60d5a27, []int{52} } func (m *NodeGetInfoResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeGetInfoResponse.Unmarshal(m, b) @@ -4094,99 +4168,111 @@ func (m *NodeGetInfoResponse) GetAccessibleTopology() *Topology { return nil } +var E_CsiSecret = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1059, + Name: "csi.v1.csi_secret", + Tag: "varint,1059,opt,name=csi_secret,json=csiSecret", + Filename: "github.com/container-storage-interface/spec/csi.proto", +} + func init() { - proto.RegisterType((*GetPluginInfoRequest)(nil), "csi.v0.GetPluginInfoRequest") - proto.RegisterType((*GetPluginInfoResponse)(nil), "csi.v0.GetPluginInfoResponse") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.GetPluginInfoResponse.ManifestEntry") - proto.RegisterType((*GetPluginCapabilitiesRequest)(nil), "csi.v0.GetPluginCapabilitiesRequest") - proto.RegisterType((*GetPluginCapabilitiesResponse)(nil), "csi.v0.GetPluginCapabilitiesResponse") - proto.RegisterType((*PluginCapability)(nil), "csi.v0.PluginCapability") - proto.RegisterType((*PluginCapability_Service)(nil), "csi.v0.PluginCapability.Service") - proto.RegisterType((*ProbeRequest)(nil), "csi.v0.ProbeRequest") - proto.RegisterType((*ProbeResponse)(nil), "csi.v0.ProbeResponse") - proto.RegisterType((*CreateVolumeRequest)(nil), "csi.v0.CreateVolumeRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.CreateVolumeRequest.ControllerCreateSecretsEntry") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.CreateVolumeRequest.ParametersEntry") - proto.RegisterType((*VolumeContentSource)(nil), "csi.v0.VolumeContentSource") - proto.RegisterType((*VolumeContentSource_SnapshotSource)(nil), "csi.v0.VolumeContentSource.SnapshotSource") - proto.RegisterType((*CreateVolumeResponse)(nil), "csi.v0.CreateVolumeResponse") - proto.RegisterType((*VolumeCapability)(nil), "csi.v0.VolumeCapability") - proto.RegisterType((*VolumeCapability_BlockVolume)(nil), "csi.v0.VolumeCapability.BlockVolume") - proto.RegisterType((*VolumeCapability_MountVolume)(nil), "csi.v0.VolumeCapability.MountVolume") - proto.RegisterType((*VolumeCapability_AccessMode)(nil), "csi.v0.VolumeCapability.AccessMode") - proto.RegisterType((*CapacityRange)(nil), "csi.v0.CapacityRange") - proto.RegisterType((*Volume)(nil), "csi.v0.Volume") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.Volume.AttributesEntry") - proto.RegisterType((*TopologyRequirement)(nil), "csi.v0.TopologyRequirement") - proto.RegisterType((*Topology)(nil), "csi.v0.Topology") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.Topology.SegmentsEntry") - proto.RegisterType((*DeleteVolumeRequest)(nil), "csi.v0.DeleteVolumeRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.DeleteVolumeRequest.ControllerDeleteSecretsEntry") - proto.RegisterType((*DeleteVolumeResponse)(nil), "csi.v0.DeleteVolumeResponse") - proto.RegisterType((*ControllerPublishVolumeRequest)(nil), "csi.v0.ControllerPublishVolumeRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.ControllerPublishVolumeRequest.ControllerPublishSecretsEntry") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.ControllerPublishVolumeRequest.VolumeAttributesEntry") - proto.RegisterType((*ControllerPublishVolumeResponse)(nil), "csi.v0.ControllerPublishVolumeResponse") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.ControllerPublishVolumeResponse.PublishInfoEntry") - proto.RegisterType((*ControllerUnpublishVolumeRequest)(nil), "csi.v0.ControllerUnpublishVolumeRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.ControllerUnpublishVolumeRequest.ControllerUnpublishSecretsEntry") - proto.RegisterType((*ControllerUnpublishVolumeResponse)(nil), "csi.v0.ControllerUnpublishVolumeResponse") - proto.RegisterType((*ValidateVolumeCapabilitiesRequest)(nil), "csi.v0.ValidateVolumeCapabilitiesRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.ValidateVolumeCapabilitiesRequest.VolumeAttributesEntry") - proto.RegisterType((*ValidateVolumeCapabilitiesResponse)(nil), "csi.v0.ValidateVolumeCapabilitiesResponse") - proto.RegisterType((*ListVolumesRequest)(nil), "csi.v0.ListVolumesRequest") - proto.RegisterType((*ListVolumesResponse)(nil), "csi.v0.ListVolumesResponse") - proto.RegisterType((*ListVolumesResponse_Entry)(nil), "csi.v0.ListVolumesResponse.Entry") - proto.RegisterType((*GetCapacityRequest)(nil), "csi.v0.GetCapacityRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.GetCapacityRequest.ParametersEntry") - proto.RegisterType((*GetCapacityResponse)(nil), "csi.v0.GetCapacityResponse") - proto.RegisterType((*ControllerGetCapabilitiesRequest)(nil), "csi.v0.ControllerGetCapabilitiesRequest") - proto.RegisterType((*ControllerGetCapabilitiesResponse)(nil), "csi.v0.ControllerGetCapabilitiesResponse") - proto.RegisterType((*ControllerServiceCapability)(nil), "csi.v0.ControllerServiceCapability") - proto.RegisterType((*ControllerServiceCapability_RPC)(nil), "csi.v0.ControllerServiceCapability.RPC") - proto.RegisterType((*CreateSnapshotRequest)(nil), "csi.v0.CreateSnapshotRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.CreateSnapshotRequest.CreateSnapshotSecretsEntry") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.CreateSnapshotRequest.ParametersEntry") - proto.RegisterType((*CreateSnapshotResponse)(nil), "csi.v0.CreateSnapshotResponse") - proto.RegisterType((*Snapshot)(nil), "csi.v0.Snapshot") - proto.RegisterType((*SnapshotStatus)(nil), "csi.v0.SnapshotStatus") - proto.RegisterType((*DeleteSnapshotRequest)(nil), "csi.v0.DeleteSnapshotRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.DeleteSnapshotRequest.DeleteSnapshotSecretsEntry") - proto.RegisterType((*DeleteSnapshotResponse)(nil), "csi.v0.DeleteSnapshotResponse") - proto.RegisterType((*ListSnapshotsRequest)(nil), "csi.v0.ListSnapshotsRequest") - proto.RegisterType((*ListSnapshotsResponse)(nil), "csi.v0.ListSnapshotsResponse") - proto.RegisterType((*ListSnapshotsResponse_Entry)(nil), "csi.v0.ListSnapshotsResponse.Entry") - proto.RegisterType((*NodeStageVolumeRequest)(nil), "csi.v0.NodeStageVolumeRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.NodeStageVolumeRequest.NodeStageSecretsEntry") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.NodeStageVolumeRequest.PublishInfoEntry") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.NodeStageVolumeRequest.VolumeAttributesEntry") - proto.RegisterType((*NodeStageVolumeResponse)(nil), "csi.v0.NodeStageVolumeResponse") - proto.RegisterType((*NodeUnstageVolumeRequest)(nil), "csi.v0.NodeUnstageVolumeRequest") - proto.RegisterType((*NodeUnstageVolumeResponse)(nil), "csi.v0.NodeUnstageVolumeResponse") - proto.RegisterType((*NodePublishVolumeRequest)(nil), "csi.v0.NodePublishVolumeRequest") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.NodePublishVolumeRequest.NodePublishSecretsEntry") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.NodePublishVolumeRequest.PublishInfoEntry") - proto.RegisterMapType((map[string]string)(nil), "csi.v0.NodePublishVolumeRequest.VolumeAttributesEntry") - proto.RegisterType((*NodePublishVolumeResponse)(nil), "csi.v0.NodePublishVolumeResponse") - proto.RegisterType((*NodeUnpublishVolumeRequest)(nil), "csi.v0.NodeUnpublishVolumeRequest") - proto.RegisterType((*NodeUnpublishVolumeResponse)(nil), "csi.v0.NodeUnpublishVolumeResponse") - proto.RegisterType((*NodeGetVolumeStatsRequest)(nil), "csi.v0.NodeGetVolumeStatsRequest") - proto.RegisterType((*NodeGetVolumeStatsResponse)(nil), "csi.v0.NodeGetVolumeStatsResponse") - proto.RegisterType((*VolumeUsage)(nil), "csi.v0.VolumeUsage") - proto.RegisterType((*NodeGetIdRequest)(nil), "csi.v0.NodeGetIdRequest") - proto.RegisterType((*NodeGetIdResponse)(nil), "csi.v0.NodeGetIdResponse") - proto.RegisterType((*NodeGetCapabilitiesRequest)(nil), "csi.v0.NodeGetCapabilitiesRequest") - proto.RegisterType((*NodeGetCapabilitiesResponse)(nil), "csi.v0.NodeGetCapabilitiesResponse") - proto.RegisterType((*NodeServiceCapability)(nil), "csi.v0.NodeServiceCapability") - proto.RegisterType((*NodeServiceCapability_RPC)(nil), "csi.v0.NodeServiceCapability.RPC") - proto.RegisterType((*NodeGetInfoRequest)(nil), "csi.v0.NodeGetInfoRequest") - proto.RegisterType((*NodeGetInfoResponse)(nil), "csi.v0.NodeGetInfoResponse") - proto.RegisterEnum("csi.v0.PluginCapability_Service_Type", PluginCapability_Service_Type_name, PluginCapability_Service_Type_value) - proto.RegisterEnum("csi.v0.VolumeCapability_AccessMode_Mode", VolumeCapability_AccessMode_Mode_name, VolumeCapability_AccessMode_Mode_value) - proto.RegisterEnum("csi.v0.ControllerServiceCapability_RPC_Type", ControllerServiceCapability_RPC_Type_name, ControllerServiceCapability_RPC_Type_value) - proto.RegisterEnum("csi.v0.SnapshotStatus_Type", SnapshotStatus_Type_name, SnapshotStatus_Type_value) - proto.RegisterEnum("csi.v0.VolumeUsage_Unit", VolumeUsage_Unit_name, VolumeUsage_Unit_value) - proto.RegisterEnum("csi.v0.NodeServiceCapability_RPC_Type", NodeServiceCapability_RPC_Type_name, NodeServiceCapability_RPC_Type_value) + proto.RegisterType((*GetPluginInfoRequest)(nil), "csi.v1.GetPluginInfoRequest") + proto.RegisterType((*GetPluginInfoResponse)(nil), "csi.v1.GetPluginInfoResponse") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.GetPluginInfoResponse.ManifestEntry") + proto.RegisterType((*GetPluginCapabilitiesRequest)(nil), "csi.v1.GetPluginCapabilitiesRequest") + proto.RegisterType((*GetPluginCapabilitiesResponse)(nil), "csi.v1.GetPluginCapabilitiesResponse") + proto.RegisterType((*PluginCapability)(nil), "csi.v1.PluginCapability") + proto.RegisterType((*PluginCapability_Service)(nil), "csi.v1.PluginCapability.Service") + proto.RegisterType((*ProbeRequest)(nil), "csi.v1.ProbeRequest") + proto.RegisterType((*ProbeResponse)(nil), "csi.v1.ProbeResponse") + proto.RegisterType((*CreateVolumeRequest)(nil), "csi.v1.CreateVolumeRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.CreateVolumeRequest.ParametersEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.CreateVolumeRequest.SecretsEntry") + proto.RegisterType((*VolumeContentSource)(nil), "csi.v1.VolumeContentSource") + proto.RegisterType((*VolumeContentSource_SnapshotSource)(nil), "csi.v1.VolumeContentSource.SnapshotSource") + proto.RegisterType((*VolumeContentSource_VolumeSource)(nil), "csi.v1.VolumeContentSource.VolumeSource") + proto.RegisterType((*CreateVolumeResponse)(nil), "csi.v1.CreateVolumeResponse") + proto.RegisterType((*VolumeCapability)(nil), "csi.v1.VolumeCapability") + proto.RegisterType((*VolumeCapability_BlockVolume)(nil), "csi.v1.VolumeCapability.BlockVolume") + proto.RegisterType((*VolumeCapability_MountVolume)(nil), "csi.v1.VolumeCapability.MountVolume") + proto.RegisterType((*VolumeCapability_AccessMode)(nil), "csi.v1.VolumeCapability.AccessMode") + proto.RegisterType((*CapacityRange)(nil), "csi.v1.CapacityRange") + proto.RegisterType((*Volume)(nil), "csi.v1.Volume") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.Volume.VolumeContextEntry") + proto.RegisterType((*TopologyRequirement)(nil), "csi.v1.TopologyRequirement") + proto.RegisterType((*Topology)(nil), "csi.v1.Topology") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.Topology.SegmentsEntry") + proto.RegisterType((*DeleteVolumeRequest)(nil), "csi.v1.DeleteVolumeRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.DeleteVolumeRequest.SecretsEntry") + proto.RegisterType((*DeleteVolumeResponse)(nil), "csi.v1.DeleteVolumeResponse") + proto.RegisterType((*ControllerPublishVolumeRequest)(nil), "csi.v1.ControllerPublishVolumeRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.ControllerPublishVolumeRequest.SecretsEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.ControllerPublishVolumeRequest.VolumeContextEntry") + proto.RegisterType((*ControllerPublishVolumeResponse)(nil), "csi.v1.ControllerPublishVolumeResponse") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.ControllerPublishVolumeResponse.PublishContextEntry") + proto.RegisterType((*ControllerUnpublishVolumeRequest)(nil), "csi.v1.ControllerUnpublishVolumeRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.ControllerUnpublishVolumeRequest.SecretsEntry") + proto.RegisterType((*ControllerUnpublishVolumeResponse)(nil), "csi.v1.ControllerUnpublishVolumeResponse") + proto.RegisterType((*ValidateVolumeCapabilitiesRequest)(nil), "csi.v1.ValidateVolumeCapabilitiesRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.ValidateVolumeCapabilitiesRequest.ParametersEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.ValidateVolumeCapabilitiesRequest.SecretsEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.ValidateVolumeCapabilitiesRequest.VolumeContextEntry") + proto.RegisterType((*ValidateVolumeCapabilitiesResponse)(nil), "csi.v1.ValidateVolumeCapabilitiesResponse") + proto.RegisterType((*ValidateVolumeCapabilitiesResponse_Confirmed)(nil), "csi.v1.ValidateVolumeCapabilitiesResponse.Confirmed") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.ValidateVolumeCapabilitiesResponse.Confirmed.ParametersEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.ValidateVolumeCapabilitiesResponse.Confirmed.VolumeContextEntry") + proto.RegisterType((*ListVolumesRequest)(nil), "csi.v1.ListVolumesRequest") + proto.RegisterType((*ListVolumesResponse)(nil), "csi.v1.ListVolumesResponse") + proto.RegisterType((*ListVolumesResponse_Entry)(nil), "csi.v1.ListVolumesResponse.Entry") + proto.RegisterType((*GetCapacityRequest)(nil), "csi.v1.GetCapacityRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.GetCapacityRequest.ParametersEntry") + proto.RegisterType((*GetCapacityResponse)(nil), "csi.v1.GetCapacityResponse") + proto.RegisterType((*ControllerGetCapabilitiesRequest)(nil), "csi.v1.ControllerGetCapabilitiesRequest") + proto.RegisterType((*ControllerGetCapabilitiesResponse)(nil), "csi.v1.ControllerGetCapabilitiesResponse") + proto.RegisterType((*ControllerServiceCapability)(nil), "csi.v1.ControllerServiceCapability") + proto.RegisterType((*ControllerServiceCapability_RPC)(nil), "csi.v1.ControllerServiceCapability.RPC") + proto.RegisterType((*CreateSnapshotRequest)(nil), "csi.v1.CreateSnapshotRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.CreateSnapshotRequest.ParametersEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.CreateSnapshotRequest.SecretsEntry") + proto.RegisterType((*CreateSnapshotResponse)(nil), "csi.v1.CreateSnapshotResponse") + proto.RegisterType((*Snapshot)(nil), "csi.v1.Snapshot") + proto.RegisterType((*DeleteSnapshotRequest)(nil), "csi.v1.DeleteSnapshotRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.DeleteSnapshotRequest.SecretsEntry") + proto.RegisterType((*DeleteSnapshotResponse)(nil), "csi.v1.DeleteSnapshotResponse") + proto.RegisterType((*ListSnapshotsRequest)(nil), "csi.v1.ListSnapshotsRequest") + proto.RegisterType((*ListSnapshotsResponse)(nil), "csi.v1.ListSnapshotsResponse") + proto.RegisterType((*ListSnapshotsResponse_Entry)(nil), "csi.v1.ListSnapshotsResponse.Entry") + proto.RegisterType((*NodeStageVolumeRequest)(nil), "csi.v1.NodeStageVolumeRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.NodeStageVolumeRequest.PublishContextEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.NodeStageVolumeRequest.SecretsEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.NodeStageVolumeRequest.VolumeContextEntry") + proto.RegisterType((*NodeStageVolumeResponse)(nil), "csi.v1.NodeStageVolumeResponse") + proto.RegisterType((*NodeUnstageVolumeRequest)(nil), "csi.v1.NodeUnstageVolumeRequest") + proto.RegisterType((*NodeUnstageVolumeResponse)(nil), "csi.v1.NodeUnstageVolumeResponse") + proto.RegisterType((*NodePublishVolumeRequest)(nil), "csi.v1.NodePublishVolumeRequest") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.NodePublishVolumeRequest.PublishContextEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.NodePublishVolumeRequest.SecretsEntry") + proto.RegisterMapType((map[string]string)(nil), "csi.v1.NodePublishVolumeRequest.VolumeContextEntry") + proto.RegisterType((*NodePublishVolumeResponse)(nil), "csi.v1.NodePublishVolumeResponse") + proto.RegisterType((*NodeUnpublishVolumeRequest)(nil), "csi.v1.NodeUnpublishVolumeRequest") + proto.RegisterType((*NodeUnpublishVolumeResponse)(nil), "csi.v1.NodeUnpublishVolumeResponse") + proto.RegisterType((*NodeGetVolumeStatsRequest)(nil), "csi.v1.NodeGetVolumeStatsRequest") + proto.RegisterType((*NodeGetVolumeStatsResponse)(nil), "csi.v1.NodeGetVolumeStatsResponse") + proto.RegisterType((*VolumeUsage)(nil), "csi.v1.VolumeUsage") + proto.RegisterType((*NodeGetCapabilitiesRequest)(nil), "csi.v1.NodeGetCapabilitiesRequest") + proto.RegisterType((*NodeGetCapabilitiesResponse)(nil), "csi.v1.NodeGetCapabilitiesResponse") + proto.RegisterType((*NodeServiceCapability)(nil), "csi.v1.NodeServiceCapability") + proto.RegisterType((*NodeServiceCapability_RPC)(nil), "csi.v1.NodeServiceCapability.RPC") + proto.RegisterType((*NodeGetInfoRequest)(nil), "csi.v1.NodeGetInfoRequest") + proto.RegisterType((*NodeGetInfoResponse)(nil), "csi.v1.NodeGetInfoResponse") + proto.RegisterEnum("csi.v1.PluginCapability_Service_Type", PluginCapability_Service_Type_name, PluginCapability_Service_Type_value) + proto.RegisterEnum("csi.v1.VolumeCapability_AccessMode_Mode", VolumeCapability_AccessMode_Mode_name, VolumeCapability_AccessMode_Mode_value) + proto.RegisterEnum("csi.v1.ControllerServiceCapability_RPC_Type", ControllerServiceCapability_RPC_Type_name, ControllerServiceCapability_RPC_Type_value) + proto.RegisterEnum("csi.v1.VolumeUsage_Unit", VolumeUsage_Unit_name, VolumeUsage_Unit_value) + proto.RegisterEnum("csi.v1.NodeServiceCapability_RPC_Type", NodeServiceCapability_RPC_Type_name, NodeServiceCapability_RPC_Type_value) + proto.RegisterExtension(E_CsiSecret) } // Reference imports to suppress errors if they are not otherwise used. @@ -4197,8 +4283,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for Identity service - +// IdentityClient is the client API for Identity service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type IdentityClient interface { GetPluginInfo(ctx context.Context, in *GetPluginInfoRequest, opts ...grpc.CallOption) (*GetPluginInfoResponse, error) GetPluginCapabilities(ctx context.Context, in *GetPluginCapabilitiesRequest, opts ...grpc.CallOption) (*GetPluginCapabilitiesResponse, error) @@ -4215,7 +4302,7 @@ func NewIdentityClient(cc *grpc.ClientConn) IdentityClient { func (c *identityClient) GetPluginInfo(ctx context.Context, in *GetPluginInfoRequest, opts ...grpc.CallOption) (*GetPluginInfoResponse, error) { out := new(GetPluginInfoResponse) - err := grpc.Invoke(ctx, "/csi.v0.Identity/GetPluginInfo", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Identity/GetPluginInfo", in, out, opts...) if err != nil { return nil, err } @@ -4224,7 +4311,7 @@ func (c *identityClient) GetPluginInfo(ctx context.Context, in *GetPluginInfoReq func (c *identityClient) GetPluginCapabilities(ctx context.Context, in *GetPluginCapabilitiesRequest, opts ...grpc.CallOption) (*GetPluginCapabilitiesResponse, error) { out := new(GetPluginCapabilitiesResponse) - err := grpc.Invoke(ctx, "/csi.v0.Identity/GetPluginCapabilities", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Identity/GetPluginCapabilities", in, out, opts...) if err != nil { return nil, err } @@ -4233,15 +4320,14 @@ func (c *identityClient) GetPluginCapabilities(ctx context.Context, in *GetPlugi func (c *identityClient) Probe(ctx context.Context, in *ProbeRequest, opts ...grpc.CallOption) (*ProbeResponse, error) { out := new(ProbeResponse) - err := grpc.Invoke(ctx, "/csi.v0.Identity/Probe", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Identity/Probe", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Identity service - +// IdentityServer is the server API for Identity service. type IdentityServer interface { GetPluginInfo(context.Context, *GetPluginInfoRequest) (*GetPluginInfoResponse, error) GetPluginCapabilities(context.Context, *GetPluginCapabilitiesRequest) (*GetPluginCapabilitiesResponse, error) @@ -4262,7 +4348,7 @@ func _Identity_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Identity/GetPluginInfo", + FullMethod: "/csi.v1.Identity/GetPluginInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IdentityServer).GetPluginInfo(ctx, req.(*GetPluginInfoRequest)) @@ -4280,7 +4366,7 @@ func _Identity_GetPluginCapabilities_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Identity/GetPluginCapabilities", + FullMethod: "/csi.v1.Identity/GetPluginCapabilities", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IdentityServer).GetPluginCapabilities(ctx, req.(*GetPluginCapabilitiesRequest)) @@ -4298,7 +4384,7 @@ func _Identity_Probe_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Identity/Probe", + FullMethod: "/csi.v1.Identity/Probe", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IdentityServer).Probe(ctx, req.(*ProbeRequest)) @@ -4307,7 +4393,7 @@ func _Identity_Probe_Handler(srv interface{}, ctx context.Context, dec func(inte } var _Identity_serviceDesc = grpc.ServiceDesc{ - ServiceName: "csi.v0.Identity", + ServiceName: "csi.v1.Identity", HandlerType: (*IdentityServer)(nil), Methods: []grpc.MethodDesc{ { @@ -4327,8 +4413,9 @@ var _Identity_serviceDesc = grpc.ServiceDesc{ Metadata: "github.com/container-storage-interface/spec/csi.proto", } -// Client API for Controller service - +// ControllerClient is the client API for Controller service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ControllerClient interface { CreateVolume(ctx context.Context, in *CreateVolumeRequest, opts ...grpc.CallOption) (*CreateVolumeResponse, error) DeleteVolume(ctx context.Context, in *DeleteVolumeRequest, opts ...grpc.CallOption) (*DeleteVolumeResponse, error) @@ -4353,7 +4440,7 @@ func NewControllerClient(cc *grpc.ClientConn) ControllerClient { func (c *controllerClient) CreateVolume(ctx context.Context, in *CreateVolumeRequest, opts ...grpc.CallOption) (*CreateVolumeResponse, error) { out := new(CreateVolumeResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/CreateVolume", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/CreateVolume", in, out, opts...) if err != nil { return nil, err } @@ -4362,7 +4449,7 @@ func (c *controllerClient) CreateVolume(ctx context.Context, in *CreateVolumeReq func (c *controllerClient) DeleteVolume(ctx context.Context, in *DeleteVolumeRequest, opts ...grpc.CallOption) (*DeleteVolumeResponse, error) { out := new(DeleteVolumeResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/DeleteVolume", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/DeleteVolume", in, out, opts...) if err != nil { return nil, err } @@ -4371,7 +4458,7 @@ func (c *controllerClient) DeleteVolume(ctx context.Context, in *DeleteVolumeReq func (c *controllerClient) ControllerPublishVolume(ctx context.Context, in *ControllerPublishVolumeRequest, opts ...grpc.CallOption) (*ControllerPublishVolumeResponse, error) { out := new(ControllerPublishVolumeResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/ControllerPublishVolume", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/ControllerPublishVolume", in, out, opts...) if err != nil { return nil, err } @@ -4380,7 +4467,7 @@ func (c *controllerClient) ControllerPublishVolume(ctx context.Context, in *Cont func (c *controllerClient) ControllerUnpublishVolume(ctx context.Context, in *ControllerUnpublishVolumeRequest, opts ...grpc.CallOption) (*ControllerUnpublishVolumeResponse, error) { out := new(ControllerUnpublishVolumeResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/ControllerUnpublishVolume", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/ControllerUnpublishVolume", in, out, opts...) if err != nil { return nil, err } @@ -4389,7 +4476,7 @@ func (c *controllerClient) ControllerUnpublishVolume(ctx context.Context, in *Co func (c *controllerClient) ValidateVolumeCapabilities(ctx context.Context, in *ValidateVolumeCapabilitiesRequest, opts ...grpc.CallOption) (*ValidateVolumeCapabilitiesResponse, error) { out := new(ValidateVolumeCapabilitiesResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/ValidateVolumeCapabilities", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/ValidateVolumeCapabilities", in, out, opts...) if err != nil { return nil, err } @@ -4398,7 +4485,7 @@ func (c *controllerClient) ValidateVolumeCapabilities(ctx context.Context, in *V func (c *controllerClient) ListVolumes(ctx context.Context, in *ListVolumesRequest, opts ...grpc.CallOption) (*ListVolumesResponse, error) { out := new(ListVolumesResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/ListVolumes", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/ListVolumes", in, out, opts...) if err != nil { return nil, err } @@ -4407,7 +4494,7 @@ func (c *controllerClient) ListVolumes(ctx context.Context, in *ListVolumesReque func (c *controllerClient) GetCapacity(ctx context.Context, in *GetCapacityRequest, opts ...grpc.CallOption) (*GetCapacityResponse, error) { out := new(GetCapacityResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/GetCapacity", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/GetCapacity", in, out, opts...) if err != nil { return nil, err } @@ -4416,7 +4503,7 @@ func (c *controllerClient) GetCapacity(ctx context.Context, in *GetCapacityReque func (c *controllerClient) ControllerGetCapabilities(ctx context.Context, in *ControllerGetCapabilitiesRequest, opts ...grpc.CallOption) (*ControllerGetCapabilitiesResponse, error) { out := new(ControllerGetCapabilitiesResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/ControllerGetCapabilities", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/ControllerGetCapabilities", in, out, opts...) if err != nil { return nil, err } @@ -4425,7 +4512,7 @@ func (c *controllerClient) ControllerGetCapabilities(ctx context.Context, in *Co func (c *controllerClient) CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*CreateSnapshotResponse, error) { out := new(CreateSnapshotResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/CreateSnapshot", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/CreateSnapshot", in, out, opts...) if err != nil { return nil, err } @@ -4434,7 +4521,7 @@ func (c *controllerClient) CreateSnapshot(ctx context.Context, in *CreateSnapsho func (c *controllerClient) DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*DeleteSnapshotResponse, error) { out := new(DeleteSnapshotResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/DeleteSnapshot", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/DeleteSnapshot", in, out, opts...) if err != nil { return nil, err } @@ -4443,15 +4530,14 @@ func (c *controllerClient) DeleteSnapshot(ctx context.Context, in *DeleteSnapsho func (c *controllerClient) ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ListSnapshotsResponse, error) { out := new(ListSnapshotsResponse) - err := grpc.Invoke(ctx, "/csi.v0.Controller/ListSnapshots", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Controller/ListSnapshots", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Controller service - +// ControllerServer is the server API for Controller service. type ControllerServer interface { CreateVolume(context.Context, *CreateVolumeRequest) (*CreateVolumeResponse, error) DeleteVolume(context.Context, *DeleteVolumeRequest) (*DeleteVolumeResponse, error) @@ -4480,7 +4566,7 @@ func _Controller_CreateVolume_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/CreateVolume", + FullMethod: "/csi.v1.Controller/CreateVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).CreateVolume(ctx, req.(*CreateVolumeRequest)) @@ -4498,7 +4584,7 @@ func _Controller_DeleteVolume_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/DeleteVolume", + FullMethod: "/csi.v1.Controller/DeleteVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).DeleteVolume(ctx, req.(*DeleteVolumeRequest)) @@ -4516,7 +4602,7 @@ func _Controller_ControllerPublishVolume_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/ControllerPublishVolume", + FullMethod: "/csi.v1.Controller/ControllerPublishVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ControllerPublishVolume(ctx, req.(*ControllerPublishVolumeRequest)) @@ -4534,7 +4620,7 @@ func _Controller_ControllerUnpublishVolume_Handler(srv interface{}, ctx context. } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/ControllerUnpublishVolume", + FullMethod: "/csi.v1.Controller/ControllerUnpublishVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ControllerUnpublishVolume(ctx, req.(*ControllerUnpublishVolumeRequest)) @@ -4552,7 +4638,7 @@ func _Controller_ValidateVolumeCapabilities_Handler(srv interface{}, ctx context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/ValidateVolumeCapabilities", + FullMethod: "/csi.v1.Controller/ValidateVolumeCapabilities", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ValidateVolumeCapabilities(ctx, req.(*ValidateVolumeCapabilitiesRequest)) @@ -4570,7 +4656,7 @@ func _Controller_ListVolumes_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/ListVolumes", + FullMethod: "/csi.v1.Controller/ListVolumes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ListVolumes(ctx, req.(*ListVolumesRequest)) @@ -4588,7 +4674,7 @@ func _Controller_GetCapacity_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/GetCapacity", + FullMethod: "/csi.v1.Controller/GetCapacity", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).GetCapacity(ctx, req.(*GetCapacityRequest)) @@ -4606,7 +4692,7 @@ func _Controller_ControllerGetCapabilities_Handler(srv interface{}, ctx context. } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/ControllerGetCapabilities", + FullMethod: "/csi.v1.Controller/ControllerGetCapabilities", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ControllerGetCapabilities(ctx, req.(*ControllerGetCapabilitiesRequest)) @@ -4624,7 +4710,7 @@ func _Controller_CreateSnapshot_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/CreateSnapshot", + FullMethod: "/csi.v1.Controller/CreateSnapshot", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).CreateSnapshot(ctx, req.(*CreateSnapshotRequest)) @@ -4642,7 +4728,7 @@ func _Controller_DeleteSnapshot_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/DeleteSnapshot", + FullMethod: "/csi.v1.Controller/DeleteSnapshot", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).DeleteSnapshot(ctx, req.(*DeleteSnapshotRequest)) @@ -4660,7 +4746,7 @@ func _Controller_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Controller/ListSnapshots", + FullMethod: "/csi.v1.Controller/ListSnapshots", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ControllerServer).ListSnapshots(ctx, req.(*ListSnapshotsRequest)) @@ -4669,7 +4755,7 @@ func _Controller_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec } var _Controller_serviceDesc = grpc.ServiceDesc{ - ServiceName: "csi.v0.Controller", + ServiceName: "csi.v1.Controller", HandlerType: (*ControllerServer)(nil), Methods: []grpc.MethodDesc{ { @@ -4721,22 +4807,16 @@ var _Controller_serviceDesc = grpc.ServiceDesc{ Metadata: "github.com/container-storage-interface/spec/csi.proto", } -// Client API for Node service - +// NodeClient is the client API for Node service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type NodeClient interface { NodeStageVolume(ctx context.Context, in *NodeStageVolumeRequest, opts ...grpc.CallOption) (*NodeStageVolumeResponse, error) NodeUnstageVolume(ctx context.Context, in *NodeUnstageVolumeRequest, opts ...grpc.CallOption) (*NodeUnstageVolumeResponse, error) NodePublishVolume(ctx context.Context, in *NodePublishVolumeRequest, opts ...grpc.CallOption) (*NodePublishVolumeResponse, error) NodeUnpublishVolume(ctx context.Context, in *NodeUnpublishVolumeRequest, opts ...grpc.CallOption) (*NodeUnpublishVolumeResponse, error) NodeGetVolumeStats(ctx context.Context, in *NodeGetVolumeStatsRequest, opts ...grpc.CallOption) (*NodeGetVolumeStatsResponse, error) - // NodeGetId is being deprecated in favor of NodeGetInfo and will be - // removed in CSI 1.0. Existing drivers, however, may depend on this - // RPC call and hence this RPC call MUST be implemented by the CSI - // plugin prior to v1.0. - NodeGetId(ctx context.Context, in *NodeGetIdRequest, opts ...grpc.CallOption) (*NodeGetIdResponse, error) NodeGetCapabilities(ctx context.Context, in *NodeGetCapabilitiesRequest, opts ...grpc.CallOption) (*NodeGetCapabilitiesResponse, error) - // Prior to CSI 1.0 - CSI plugins MUST implement both NodeGetId and - // NodeGetInfo RPC calls. NodeGetInfo(ctx context.Context, in *NodeGetInfoRequest, opts ...grpc.CallOption) (*NodeGetInfoResponse, error) } @@ -4750,7 +4830,7 @@ func NewNodeClient(cc *grpc.ClientConn) NodeClient { func (c *nodeClient) NodeStageVolume(ctx context.Context, in *NodeStageVolumeRequest, opts ...grpc.CallOption) (*NodeStageVolumeResponse, error) { out := new(NodeStageVolumeResponse) - err := grpc.Invoke(ctx, "/csi.v0.Node/NodeStageVolume", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Node/NodeStageVolume", in, out, opts...) if err != nil { return nil, err } @@ -4759,7 +4839,7 @@ func (c *nodeClient) NodeStageVolume(ctx context.Context, in *NodeStageVolumeReq func (c *nodeClient) NodeUnstageVolume(ctx context.Context, in *NodeUnstageVolumeRequest, opts ...grpc.CallOption) (*NodeUnstageVolumeResponse, error) { out := new(NodeUnstageVolumeResponse) - err := grpc.Invoke(ctx, "/csi.v0.Node/NodeUnstageVolume", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Node/NodeUnstageVolume", in, out, opts...) if err != nil { return nil, err } @@ -4768,7 +4848,7 @@ func (c *nodeClient) NodeUnstageVolume(ctx context.Context, in *NodeUnstageVolum func (c *nodeClient) NodePublishVolume(ctx context.Context, in *NodePublishVolumeRequest, opts ...grpc.CallOption) (*NodePublishVolumeResponse, error) { out := new(NodePublishVolumeResponse) - err := grpc.Invoke(ctx, "/csi.v0.Node/NodePublishVolume", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Node/NodePublishVolume", in, out, opts...) if err != nil { return nil, err } @@ -4777,7 +4857,7 @@ func (c *nodeClient) NodePublishVolume(ctx context.Context, in *NodePublishVolum func (c *nodeClient) NodeUnpublishVolume(ctx context.Context, in *NodeUnpublishVolumeRequest, opts ...grpc.CallOption) (*NodeUnpublishVolumeResponse, error) { out := new(NodeUnpublishVolumeResponse) - err := grpc.Invoke(ctx, "/csi.v0.Node/NodeUnpublishVolume", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Node/NodeUnpublishVolume", in, out, opts...) if err != nil { return nil, err } @@ -4786,17 +4866,7 @@ func (c *nodeClient) NodeUnpublishVolume(ctx context.Context, in *NodeUnpublishV func (c *nodeClient) NodeGetVolumeStats(ctx context.Context, in *NodeGetVolumeStatsRequest, opts ...grpc.CallOption) (*NodeGetVolumeStatsResponse, error) { out := new(NodeGetVolumeStatsResponse) - err := grpc.Invoke(ctx, "/csi.v0.Node/NodeGetVolumeStats", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Deprecated: Do not use. -func (c *nodeClient) NodeGetId(ctx context.Context, in *NodeGetIdRequest, opts ...grpc.CallOption) (*NodeGetIdResponse, error) { - out := new(NodeGetIdResponse) - err := grpc.Invoke(ctx, "/csi.v0.Node/NodeGetId", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Node/NodeGetVolumeStats", in, out, opts...) if err != nil { return nil, err } @@ -4805,7 +4875,7 @@ func (c *nodeClient) NodeGetId(ctx context.Context, in *NodeGetIdRequest, opts . func (c *nodeClient) NodeGetCapabilities(ctx context.Context, in *NodeGetCapabilitiesRequest, opts ...grpc.CallOption) (*NodeGetCapabilitiesResponse, error) { out := new(NodeGetCapabilitiesResponse) - err := grpc.Invoke(ctx, "/csi.v0.Node/NodeGetCapabilities", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Node/NodeGetCapabilities", in, out, opts...) if err != nil { return nil, err } @@ -4814,29 +4884,21 @@ func (c *nodeClient) NodeGetCapabilities(ctx context.Context, in *NodeGetCapabil func (c *nodeClient) NodeGetInfo(ctx context.Context, in *NodeGetInfoRequest, opts ...grpc.CallOption) (*NodeGetInfoResponse, error) { out := new(NodeGetInfoResponse) - err := grpc.Invoke(ctx, "/csi.v0.Node/NodeGetInfo", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/csi.v1.Node/NodeGetInfo", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Node service - +// NodeServer is the server API for Node service. type NodeServer interface { NodeStageVolume(context.Context, *NodeStageVolumeRequest) (*NodeStageVolumeResponse, error) NodeUnstageVolume(context.Context, *NodeUnstageVolumeRequest) (*NodeUnstageVolumeResponse, error) NodePublishVolume(context.Context, *NodePublishVolumeRequest) (*NodePublishVolumeResponse, error) NodeUnpublishVolume(context.Context, *NodeUnpublishVolumeRequest) (*NodeUnpublishVolumeResponse, error) NodeGetVolumeStats(context.Context, *NodeGetVolumeStatsRequest) (*NodeGetVolumeStatsResponse, error) - // NodeGetId is being deprecated in favor of NodeGetInfo and will be - // removed in CSI 1.0. Existing drivers, however, may depend on this - // RPC call and hence this RPC call MUST be implemented by the CSI - // plugin prior to v1.0. - NodeGetId(context.Context, *NodeGetIdRequest) (*NodeGetIdResponse, error) NodeGetCapabilities(context.Context, *NodeGetCapabilitiesRequest) (*NodeGetCapabilitiesResponse, error) - // Prior to CSI 1.0 - CSI plugins MUST implement both NodeGetId and - // NodeGetInfo RPC calls. NodeGetInfo(context.Context, *NodeGetInfoRequest) (*NodeGetInfoResponse, error) } @@ -4854,7 +4916,7 @@ func _Node_NodeStageVolume_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Node/NodeStageVolume", + FullMethod: "/csi.v1.Node/NodeStageVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NodeServer).NodeStageVolume(ctx, req.(*NodeStageVolumeRequest)) @@ -4872,7 +4934,7 @@ func _Node_NodeUnstageVolume_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Node/NodeUnstageVolume", + FullMethod: "/csi.v1.Node/NodeUnstageVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NodeServer).NodeUnstageVolume(ctx, req.(*NodeUnstageVolumeRequest)) @@ -4890,7 +4952,7 @@ func _Node_NodePublishVolume_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Node/NodePublishVolume", + FullMethod: "/csi.v1.Node/NodePublishVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NodeServer).NodePublishVolume(ctx, req.(*NodePublishVolumeRequest)) @@ -4908,7 +4970,7 @@ func _Node_NodeUnpublishVolume_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Node/NodeUnpublishVolume", + FullMethod: "/csi.v1.Node/NodeUnpublishVolume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NodeServer).NodeUnpublishVolume(ctx, req.(*NodeUnpublishVolumeRequest)) @@ -4926,7 +4988,7 @@ func _Node_NodeGetVolumeStats_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Node/NodeGetVolumeStats", + FullMethod: "/csi.v1.Node/NodeGetVolumeStats", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NodeServer).NodeGetVolumeStats(ctx, req.(*NodeGetVolumeStatsRequest)) @@ -4934,24 +4996,6 @@ func _Node_NodeGetVolumeStats_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Node_NodeGetId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeGetIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServer).NodeGetId(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/csi.v0.Node/NodeGetId", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServer).NodeGetId(ctx, req.(*NodeGetIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Node_NodeGetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(NodeGetCapabilitiesRequest) if err := dec(in); err != nil { @@ -4962,7 +5006,7 @@ func _Node_NodeGetCapabilities_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Node/NodeGetCapabilities", + FullMethod: "/csi.v1.Node/NodeGetCapabilities", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NodeServer).NodeGetCapabilities(ctx, req.(*NodeGetCapabilitiesRequest)) @@ -4980,7 +5024,7 @@ func _Node_NodeGetInfo_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/csi.v0.Node/NodeGetInfo", + FullMethod: "/csi.v1.Node/NodeGetInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NodeServer).NodeGetInfo(ctx, req.(*NodeGetInfoRequest)) @@ -4989,7 +5033,7 @@ func _Node_NodeGetInfo_Handler(srv interface{}, ctx context.Context, dec func(in } var _Node_serviceDesc = grpc.ServiceDesc{ - ServiceName: "csi.v0.Node", + ServiceName: "csi.v1.Node", HandlerType: (*NodeServer)(nil), Methods: []grpc.MethodDesc{ { @@ -5012,10 +5056,6 @@ var _Node_serviceDesc = grpc.ServiceDesc{ MethodName: "NodeGetVolumeStats", Handler: _Node_NodeGetVolumeStats_Handler, }, - { - MethodName: "NodeGetId", - Handler: _Node_NodeGetId_Handler, - }, { MethodName: "NodeGetCapabilities", Handler: _Node_NodeGetCapabilities_Handler, @@ -5030,205 +5070,201 @@ var _Node_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("github.com/container-storage-interface/spec/csi.proto", fileDescriptor_csi_d2a705310653d01b) -} - -var fileDescriptor_csi_d2a705310653d01b = []byte{ - // 3125 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3a, 0x4d, 0x6f, 0x23, 0xc7, - 0xb1, 0x1a, 0x7e, 0xe8, 0xa3, 0xb4, 0x92, 0xb9, 0xad, 0x2f, 0x6a, 0x24, 0xed, 0x6a, 0x67, 0xbd, - 0xf6, 0x7a, 0xdf, 0x2e, 0xe5, 0xa7, 0xf7, 0x6c, 0xf8, 0xd9, 0x6b, 0xbf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0xc5, 0xe3, 0x62, 0xa9, 0x52, 0x7f, 0x9c, 0xcb, 0x90, 0x9e, 0x93, 0xe7, 0x5d, 0xab, - 0x16, 0x8f, 0x6b, 0xfb, 0x47, 0xf5, 0x5c, 0x16, 0x21, 0x98, 0x0f, 0xd6, 0x87, 0xa0, 0x5a, 0x6e, - 0x32, 0x1a, 0x59, 0x7c, 0x9e, 0x86, 0x25, 0x36, 0x81, 0x61, 0x33, 0x8e, 0x30, 0xb6, 0xee, 0x42, - 0x8e, 0x36, 0x5f, 0x86, 0x78, 0x71, 0xcc, 0x53, 0xf8, 0x69, 0x78, 0x7d, 0x84, 0xa3, 0xc1, 0x54, - 0x6c, 0x34, 0xd8, 0x81, 0x95, 0x70, 0x72, 0xc6, 0xf8, 0x0a, 0x17, 0xb2, 0x30, 0x42, 0x13, 0xa4, - 0x0b, 0x50, 0xee, 0x02, 0x5e, 0x6a, 0xc8, 0x70, 0xe8, 0x50, 0x32, 0x03, 0x7c, 0x30, 0x58, 0xc8, - 0x80, 0x18, 0x56, 0xf7, 0x41, 0x4d, 0xd6, 0x61, 0xac, 0x12, 0xf0, 0x39, 0x43, 0xf9, 0x7d, 0x58, - 0x16, 0xb5, 0x67, 0x51, 0x75, 0xbf, 0x6f, 0xc4, 0x15, 0xe5, 0x96, 0x88, 0x36, 0xa2, 0xd0, 0x7e, - 0xad, 0xc0, 0x74, 0x08, 0x26, 0xf9, 0xd9, 0xb3, 0xbe, 0x8b, 0xb9, 0xa6, 0x7e, 0x86, 0x40, 0xe4, - 0x0d, 0xbd, 0xcc, 0x17, 0xd2, 0x52, 0x5f, 0xd8, 0x00, 0xa0, 0xc7, 0xd3, 0x34, 0x4c, 0x3f, 0x68, - 0x25, 0xd2, 0xfa, 0x0c, 0x83, 0x14, 0x49, 0xf3, 0x3b, 0xe9, 0xf9, 0xa6, 0xdf, 0x25, 0x6d, 0x03, - 0x51, 0x78, 0x59, 0x54, 0xb8, 0x16, 0x60, 0x75, 0x46, 0x45, 0x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0xde, 0xcb, 0x4f, 0xb2, 0x01, 0x44, 0x2f, 0x3f, - 0x49, 0x5b, 0x78, 0x6d, 0x62, 0xfb, 0x0f, 0x59, 0xc8, 0x04, 0x89, 0xb4, 0x0e, 0x2f, 0x09, 0x4d, - 0x0d, 0xba, 0x31, 0xb8, 0xf3, 0x53, 0x6f, 0x26, 0xe2, 0x23, 0x75, 0x9f, 0xd0, 0x6b, 0x9a, 0x6b, - 0x53, 0xd0, 0x66, 0x7c, 0x9d, 0xac, 0x55, 0x52, 0x6f, 0x0d, 0xa0, 0x10, 0x79, 0xf3, 0xb9, 0x60, - 0x73, 0x58, 0xbd, 0xcc, 0xf3, 0x4e, 0x8a, 0xff, 0x4f, 0xe8, 0xbd, 0x25, 0x46, 0xbe, 0xc6, 0xeb, - 0x25, 0x8d, 0xf9, 0xdb, 0x03, 0x69, 0x22, 0x09, 0x1f, 0x47, 0x17, 0x66, 0xac, 0x9e, 0x43, 0x9c, - 0x72, 0xd2, 0x32, 0x52, 0xd5, 0x06, 0x91, 0x44, 0xec, 0xcb, 0x30, 0x13, 0xd5, 0x47, 0x28, 0x2f, - 0x2c, 0x89, 0xca, 0x28, 0x75, 0x55, 0x82, 0x61, 0x3c, 0xd2, 0x3f, 0x4a, 0x29, 0xa1, 0x1d, 0xc4, - 0x10, 0x14, 0x75, 0x90, 0x05, 0xdf, 0xed, 0x81, 0x34, 0xf1, 0xa4, 0x11, 0xab, 0x10, 0x7a, 0x49, - 0xa3, 0xbf, 0x9a, 0xe8, 0x25, 0x0d, 0x49, 0x49, 0xa1, 0x4d, 0xec, 0x64, 0x9f, 0xa4, 0x1b, 0x9e, - 0x75, 0x36, 0x19, 0x7c, 0xe8, 0xfb, 0x3f, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x16, 0x0e, - 0x54, 0xe8, 0x2e, 0x00, 0x00, + proto.RegisterFile("github.com/container-storage-interface/spec/csi.proto", fileDescriptor_csi_3932febea60d5a27) +} + +var fileDescriptor_csi_3932febea60d5a27 = []byte{ + // 3070 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x1a, 0x4d, 0x6f, 0xe3, 0xc6, + 0xd5, 0xd4, 0x87, 0x3f, 0x9e, 0x6d, 0x45, 0x3b, 0xfe, 0x58, 0x2d, 0x6d, 0xef, 0x7a, 0xb9, 0xd9, + 0xc4, 0xd9, 0x64, 0xe5, 0xc6, 0xc9, 0x06, 0xcd, 0xee, 0xa6, 0x8d, 0x24, 0x2b, 0xb6, 0xb2, 0x5a, + 0xd9, 0xa1, 0x64, 0xa7, 0xbb, 0x6d, 0xc0, 0xd0, 0xd2, 0x58, 0x4b, 0x44, 0x22, 0x15, 0x72, 0xe4, + 0xae, 0x7b, 0x2b, 0x0a, 0xf4, 0xd2, 0x53, 0x4f, 0xed, 0xad, 0x40, 0x7a, 0x6a, 0xd1, 0xa0, 0xa7, + 0xa2, 0xc7, 0x02, 0xbd, 0x14, 0xe8, 0x1f, 0x68, 0x6f, 0xb9, 0x07, 0x2d, 0x10, 0xf4, 0xd0, 0x43, + 0x81, 0x02, 0x05, 0x39, 0x43, 0x8a, 0x43, 0x91, 0x94, 0xb4, 0xde, 0x20, 0x87, 0x9e, 0x24, 0xbe, + 0x79, 0x5f, 0xf3, 0xe6, 0xbd, 0x37, 0xef, 0x3d, 0x12, 0xee, 0xb4, 0x35, 0xf2, 0xa4, 0x7f, 0x92, + 0x6f, 0x1a, 0xdd, 0xed, 0xa6, 0xa1, 0x13, 0x55, 0xd3, 0xb1, 0x79, 0xdb, 0x22, 0x86, 0xa9, 0xb6, + 0xf1, 0x6d, 0x4d, 0x27, 0xd8, 0x3c, 0x55, 0x9b, 0x78, 0xdb, 0xea, 0xe1, 0xe6, 0x76, 0xd3, 0xd2, + 0xf2, 0x3d, 0xd3, 0x20, 0x06, 0x9a, 0xb6, 0xff, 0x9e, 0xbd, 0x2e, 0x6e, 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, 0xf3, 0xe3, 0x34, 0xa4, 0x9c, 0x44, 0xda, 0x80, 0x17, 0x02, 0x9d, 0x06, 0xba, + 0x1a, 0xdf, 0x7f, 0x89, 0xd7, 0x22, 0xd7, 0x3d, 0x75, 0x1f, 0xc3, 0xa5, 0xa1, 0xde, 0x01, 0x6d, + 0xfa, 0xe9, 0xc2, 0xfa, 0x17, 0xf1, 0x7a, 0x0c, 0x46, 0x90, 0x37, 0x9f, 0x0b, 0x36, 0x47, 0x15, + 0xb7, 0x3c, 0xef, 0xa8, 0xf8, 0xff, 0x98, 0xde, 0x5b, 0xc1, 0xc8, 0x97, 0x78, 0xbd, 0x42, 0x63, + 0xfe, 0x46, 0x2c, 0x8e, 0x27, 0xe1, 0x23, 0xef, 0xc2, 0xf4, 0x55, 0x63, 0x88, 0x53, 0x2e, 0xb4, + 0x08, 0x14, 0xa5, 0x38, 0x94, 0xe0, 0x06, 0x82, 0xb1, 0x13, 0x24, 0x0e, 0x8b, 0x9a, 0x1b, 0xb1, + 0x38, 0xfe, 0x68, 0xf7, 0x5d, 0xed, 0x83, 0x68, 0x1f, 0x2e, 0x03, 0x06, 0xd1, 0x1e, 0x52, 0x0b, + 0x48, 0x53, 0x77, 0xdf, 0x01, 0x68, 0x5a, 0x9a, 0x42, 0xfb, 0x16, 0xb4, 0x31, 0x34, 0xe8, 0x7b, + 0x4f, 0xc3, 0x9d, 0xd6, 0x41, 0x8f, 0x68, 0x86, 0x6e, 0xe5, 0x7e, 0x3d, 0xeb, 0x34, 0x4d, 0x73, + 0x4d, 0x4b, 0xa3, 0xed, 0x43, 0x31, 0xfd, 0x38, 0xd9, 0xb4, 0xb4, 0x93, 0x69, 0x07, 0xff, 0x8d, + 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x47, 0x5d, 0xbf, 0x76, 0x3a, 0x30, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE index 1b1b1921..0f646931 100644 --- a/vendor/github.com/golang/protobuf/LICENSE +++ b/vendor/github.com/golang/protobuf/LICENSE @@ -1,7 +1,4 @@ -Go support for Protocol Buffers - Google's data interchange format - Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff --git a/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/golang/protobuf/proto/encode.go index c27d35f8..3abfed2c 100644 --- a/vendor/github.com/golang/protobuf/proto/encode.go +++ b/vendor/github.com/golang/protobuf/proto/encode.go @@ -37,27 +37,9 @@ package proto import ( "errors" - "fmt" "reflect" ) -// RequiredNotSetError is the error returned if Marshal is called with -// a protocol buffer struct whose required fields have not -// all been initialized. It is also the error returned if Unmarshal is -// called with an encoded protocol buffer that does not include all the -// required fields. -// -// When printed, RequiredNotSetError reports the first unset required field in a -// message. If the field cannot be precisely determined, it is reported as -// "{Unknown}". -type RequiredNotSetError struct { - field string -} - -func (e *RequiredNotSetError) Error() string { - return fmt.Sprintf("proto: required field %q not set", e.field) -} - var ( // errRepeatedHasNil is the error returned if Marshal is called with // a struct with a repeated field containing a nil element. diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go index 0e2191b8..75565cc6 100644 --- a/vendor/github.com/golang/protobuf/proto/lib.go +++ b/vendor/github.com/golang/protobuf/proto/lib.go @@ -265,7 +265,6 @@ package proto import ( "encoding/json" - "errors" "fmt" "log" "reflect" @@ -274,7 +273,66 @@ import ( "sync" ) -var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string") +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. +type RequiredNotSetError struct{ field string } + +func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } + return fmt.Sprintf("proto: required field %q not set", e.field) +} +func (e *RequiredNotSetError) RequiredNotSet() bool { + return true +} + +type invalidUTF8Error struct{ field string } + +func (e *invalidUTF8Error) Error() string { + if e.field == "" { + return "proto: invalid UTF-8 detected" + } + return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field) +} +func (e *invalidUTF8Error) InvalidUTF8() bool { + return true +} + +// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8. +// This error should not be exposed to the external API as such errors should +// be recreated with the field information. +var errInvalidUTF8 = &invalidUTF8Error{} + +// isNonFatal reports whether the error is either a RequiredNotSet error +// or a InvalidUTF8 error. +func isNonFatal(err error) bool { + if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() { + return true + } + if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() { + return true + } + return false +} + +type nonFatal struct{ E error } + +// Merge merges err into nf and reports whether it was successful. +// Otherwise it returns false for any fatal non-nil errors. +func (nf *nonFatal) Merge(err error) (ok bool) { + if err == nil { + return true // not an error + } + if !isNonFatal(err) { + return false // fatal error + } + if nf.E == nil { + nf.E = err // store first instance of non-fatal error + } + return true +} // Message is implemented by generated protocol buffer messages. type Message interface { diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go index f710adab..50b99b83 100644 --- a/vendor/github.com/golang/protobuf/proto/properties.go +++ b/vendor/github.com/golang/protobuf/proto/properties.go @@ -139,7 +139,7 @@ type Properties struct { Repeated bool Packed bool // relevant for repeated primitives only Enum string // set for enum types only - proto3 bool // whether this is known to be a proto3 field; set for []byte only + proto3 bool // whether this is known to be a proto3 field oneof bool // whether this is a oneof field Default string // default value @@ -148,9 +148,9 @@ type Properties struct { stype reflect.Type // set for struct types only sprop *StructProperties // set for struct types only - mtype reflect.Type // set for map types only - mkeyprop *Properties // set for map types only - mvalprop *Properties // set for map types only + mtype reflect.Type // set for map types only + MapKeyProp *Properties // set for map types only + MapValProp *Properties // set for map types only } // String formats the properties in the protobuf struct field tag style. @@ -275,16 +275,16 @@ func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, loc case reflect.Map: p.mtype = t1 - p.mkeyprop = &Properties{} - p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) - p.mvalprop = &Properties{} + p.MapKeyProp = &Properties{} + p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.MapValProp = &Properties{} vtype := p.mtype.Elem() if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { // The value type is not a message (*T) or bytes ([]byte), // so we need encoders for the pointer to this type. vtype = reflect.PtrTo(vtype) } - p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) } if p.stype != nil { diff --git a/vendor/github.com/golang/protobuf/proto/table_marshal.go b/vendor/github.com/golang/protobuf/proto/table_marshal.go index 0f212b30..b1679449 100644 --- a/vendor/github.com/golang/protobuf/proto/table_marshal.go +++ b/vendor/github.com/golang/protobuf/proto/table_marshal.go @@ -231,7 +231,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte return b, err } - var err, errreq error + var err, errLater error // The old marshaler encodes extensions at beginning. if u.extensions.IsValid() { e := ptr.offset(u.extensions).toExtensions() @@ -252,11 +252,13 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte } } for _, f := range u.fields { - if f.required && errreq == nil { + if f.required { if ptr.offset(f.field).getPointer().isNil() { // Required field is not set. // We record the error but keep going, to give a complete marshaling. - errreq = &RequiredNotSetError{f.name} + if errLater == nil { + errLater = &RequiredNotSetError{f.name} + } continue } } @@ -269,14 +271,21 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte if err1, ok := err.(*RequiredNotSetError); ok { // Required field in submessage is not set. // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = &RequiredNotSetError{f.name + "." + err1.field} + if errLater == nil { + errLater = &RequiredNotSetError{f.name + "." + err1.field} } continue } if err == errRepeatedHasNil { err = errors.New("proto: repeated field " + f.name + " has nil element") } + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } return b, err } } @@ -284,7 +293,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte s := *ptr.offset(u.unrecognized).toBytes() b = append(b, s...) } - return b, errreq + return b, errLater } // computeMarshalInfo initializes the marshal info. @@ -530,6 +539,7 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma packed := false proto3 := false + validateUTF8 := true for i := 2; i < len(tags); i++ { if tags[i] == "packed" { packed = true @@ -538,6 +548,7 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma proto3 = true } } + validateUTF8 = validateUTF8 && proto3 switch t.Kind() { case reflect.Bool: @@ -735,6 +746,18 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma } return sizeFloat64Value, appendFloat64Value case reflect.String: + if validateUTF8 { + if pointer { + return sizeStringPtr, appendUTF8StringPtr + } + if slice { + return sizeStringSlice, appendUTF8StringSlice + } + if nozero { + return sizeStringValueNoZero, appendUTF8StringValueNoZero + } + return sizeStringValue, appendUTF8StringValue + } if pointer { return sizeStringPtr, appendStringPtr } @@ -1983,52 +2006,105 @@ func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byt return b, nil } func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + if v == "" { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toStringSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} +func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool v := *ptr.toString() if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } -func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { +func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool v := *ptr.toString() if v == "" { return b, nil } if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } -func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { +func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool p := *ptr.toStringPtr() if p == nil { return b, nil } v := *p if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } -func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { +func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool s := *ptr.toStringSlice() for _, v := range s { if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) } + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { @@ -2107,7 +2183,8 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2115,22 +2192,14 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { b = appendVarint(b, wiretag) // start group b, err = u.marshal(b, v, deterministic) b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2174,7 +2243,8 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2184,22 +2254,14 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { b = appendVarint(b, uint64(siz)) b, err = u.marshal(b, v, deterministic) - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2223,6 +2285,25 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { // value. // Key cannot be pointer-typed. valIsPtr := valType.Kind() == reflect.Ptr + + // If value is a message with nested maps, calling + // valSizer in marshal may be quadratic. We should use + // cached version in marshal (but not in size). + // If value is not message type, we don't have size cache, + // but it cannot be nested either. Just use valSizer. + valCachedSizer := valSizer + if valIsPtr && valType.Elem().Kind() == reflect.Struct { + u := getMarshalInfo(valType.Elem()) + valCachedSizer = func(ptr pointer, tagsize int) int { + // Same as message sizer, but use cache. + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.cachedsize(p) + return siz + SizeVarint(uint64(siz)) + tagsize + } + } return func(ptr pointer, tagsize int) int { m := ptr.asPointerTo(t).Elem() // the map n := 0 @@ -2243,24 +2324,26 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { if len(keys) > 1 && deterministic { sort.Sort(mapKeys(keys)) } + + var nerr nonFatal for _, k := range keys { ki := k.Interface() vi := m.MapIndex(k).Interface() kaddr := toAddrPointer(&ki, false) // pointer to key vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value b = appendVarint(b, tag) - siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) b = appendVarint(b, uint64(siz)) b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b, err = valMarshaler(b, vaddr, valWireTag, deterministic) - if err != nil && err != ErrNil { // allow nil value in map + if err != ErrNil && !nerr.Merge(err) { // allow nil value in map return b, err } } - return b, nil + return b, nerr.E } } @@ -2333,6 +2416,7 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2352,11 +2436,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2383,11 +2467,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // message set format is: @@ -2444,6 +2528,7 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2470,12 +2555,12 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b = append(b, 1<<3|WireEndGroup) } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2509,11 +2594,11 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) b = append(b, 1<<3|WireEndGroup) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // sizeV1Extensions computes the size of encoded data for a V1-API extension field. @@ -2556,6 +2641,7 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ sort.Ints(keys) var err error + var nerr nonFatal for _, k := range keys { e := m[int32(k)] if e.value == nil || e.desc == nil { @@ -2572,11 +2658,11 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // newMarshaler is the interface representing objects that can marshal themselves. diff --git a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go index 55f0340a..ebf1caa5 100644 --- a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go +++ b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go @@ -97,6 +97,8 @@ type unmarshalFieldInfo struct { // if a required field, contains a single set bit at this field's index in the required field list. reqMask uint64 + + name string // name of the field, for error reporting } var ( @@ -136,8 +138,8 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { if u.isMessageSet { return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions()) } - var reqMask uint64 // bitmask of required fields we've seen. - var rnse *RequiredNotSetError // an instance of a RequiredNotSetError returned by a submessage. + var reqMask uint64 // bitmask of required fields we've seen. + var errLater error for len(b) > 0 { // Read tag and wire type. // Special case 1 and 2 byte varints. @@ -176,11 +178,20 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { if r, ok := err.(*RequiredNotSetError); ok { // Remember this error, but keep parsing. We need to produce // a full parse even if a required field is missing. - rnse = r + if errLater == nil { + errLater = r + } reqMask |= f.reqMask continue } if err != errInternalBadWireType { + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } return err } // Fragments with bad wire type are treated as unknown fields. @@ -239,20 +250,16 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { emap[int32(tag)] = e } } - if rnse != nil { - // A required field of a submessage/group is missing. Return that error. - return rnse - } - if reqMask != u.reqMask { + if reqMask != u.reqMask && errLater == nil { // A required field of this message is missing. for _, n := range u.reqFields { if reqMask&1 == 0 { - return &RequiredNotSetError{n} + errLater = &RequiredNotSetError{n} } reqMask >>= 1 } } - return nil + return errLater } // computeUnmarshalInfo fills in u with information for use @@ -351,7 +358,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { } // Store the info in the correct slot in the message. - u.setTag(tag, toField(&f), unmarshal, reqMask) + u.setTag(tag, toField(&f), unmarshal, reqMask, name) } // Find any types associated with oneof fields. @@ -366,10 +373,17 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { f := typ.Field(0) // oneof implementers have one field baseUnmarshal := fieldUnmarshaler(&f) - tagstr := strings.Split(f.Tag.Get("protobuf"), ",")[1] - tag, err := strconv.Atoi(tagstr) + tags := strings.Split(f.Tag.Get("protobuf"), ",") + fieldNum, err := strconv.Atoi(tags[1]) if err != nil { - panic("protobuf tag field not an integer: " + tagstr) + panic("protobuf tag field not an integer: " + tags[1]) + } + var name string + for _, tag := range tags { + if strings.HasPrefix(tag, "name=") { + name = strings.TrimPrefix(tag, "name=") + break + } } // Find the oneof field that this struct implements. @@ -380,7 +394,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { // That lets us know where this struct should be stored // when we encounter it during unmarshaling. unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) - u.setTag(tag, of.field, unmarshal, 0) + u.setTag(fieldNum, of.field, unmarshal, 0, name) } } } @@ -401,7 +415,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { // [0 0] is [tag=0/wiretype=varint varint-encoded-0]. u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) { return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w) - }, 0) + }, 0, "") // Set mask for required field check. u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here? for len(u.dense) <= tag { @@ -442,11 +457,17 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { tagArray := strings.Split(tags, ",") encoding := tagArray[0] name := "unknown" + proto3 := false + validateUTF8 := true for _, tag := range tagArray[3:] { if strings.HasPrefix(tag, "name=") { name = tag[5:] } + if tag == "proto3" { + proto3 = true + } } + validateUTF8 = validateUTF8 && proto3 // Figure out packaging (pointer, slice, or both) slice := false @@ -594,6 +615,15 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { } return unmarshalBytesValue case reflect.String: + if validateUTF8 { + if pointer { + return unmarshalUTF8StringPtr + } + if slice { + return unmarshalUTF8StringSlice + } + return unmarshalUTF8StringValue + } if pointer { return unmarshalStringPtr } @@ -1448,9 +1478,6 @@ func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } *f.toString() = v return b[x:], nil } @@ -1468,9 +1495,6 @@ func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } *f.toStringPtr() = &v return b[x:], nil } @@ -1488,11 +1512,69 @@ func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + return b[x:], nil +} + +func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + return b[x:], errInvalidUTF8 } + return b[x:], nil +} + +func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) s := f.toStringSlice() *s = append(*s, v) + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } return b[x:], nil } @@ -1674,6 +1756,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Maps will be somewhat slow. Oh well. // Read key and value from data. + var nerr nonFatal k := reflect.New(kt) v := reflect.New(vt) for len(b) > 0 { @@ -1694,7 +1777,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { err = errInternalBadWireType // skip unknown tag } - if err == nil { + if nerr.Merge(err) { continue } if err != errInternalBadWireType { @@ -1717,7 +1800,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Insert into map. m.SetMapIndex(k.Elem(), v.Elem()) - return r, nil + return r, nerr.E } } @@ -1743,15 +1826,16 @@ func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshal // Unmarshal data into holder. // We unmarshal into the first field of the holder object. var err error + var nerr nonFatal b, err = unmarshal(b, valToPointer(v).offset(field0), w) - if err != nil { + if !nerr.Merge(err) { return nil, err } // Write pointer to holder into target field. f.asPointerTo(ityp).Elem().Set(v) - return b, nil + return b, nerr.E } } diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go index 2205fdaa..1aaee725 100644 --- a/vendor/github.com/golang/protobuf/proto/text.go +++ b/vendor/github.com/golang/protobuf/proto/text.go @@ -353,7 +353,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, key, props.mkeyprop); err != nil { + if err := tm.writeAny(w, key, props.MapKeyProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -370,7 +370,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, val, props.mvalprop); err != nil { + if err := tm.writeAny(w, val, props.MapValProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go index 0685bae3..bb55a3af 100644 --- a/vendor/github.com/golang/protobuf/proto/text_parser.go +++ b/vendor/github.com/golang/protobuf/proto/text_parser.go @@ -630,17 +630,17 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { if err := p.consumeToken(":"); err != nil { return err } - if err := p.readAny(key, props.mkeyprop); err != nil { + if err := p.readAny(key, props.MapKeyProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { return err } case "value": - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil { return err } - if err := p.readAny(val, props.mvalprop); err != nil { + if err := p.readAny(val, props.MapValProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { diff --git a/vendor/github.com/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go index b2af97f4..70276e8f 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any.go +++ b/vendor/github.com/golang/protobuf/ptypes/any.go @@ -130,10 +130,12 @@ func UnmarshalAny(any *any.Any, pb proto.Message) error { // Is returns true if any value contains a given message type. func Is(any *any.Any, pb proto.Message) bool { - aname, err := AnyMessageName(any) - if err != nil { + // The following is equivalent to AnyMessageName(any) == proto.MessageName(pb), + // but it avoids scanning TypeUrl for the slash. + if any == nil { return false } - - return aname == proto.MessageName(pb) + name := proto.MessageName(pb) + prefix := len(any.TypeUrl) - len(name) + return prefix >= 1 && any.TypeUrl[prefix-1] == '/' && any.TypeUrl[prefix:] == name } diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go index f67edc7d..e3c56d3f 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go @@ -121,7 +121,7 @@ type Any struct { // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. // - TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"` + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // Must be a valid serialized protocol buffer of the above specified type. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go index 4d75473b..a7beb2c4 100644 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go @@ -82,14 +82,14 @@ type Duration struct { // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // Signed fractions of a second at nanosecond resolution of the span // of time. Durations less than one second are represented with a 0 // `seconds` field and a positive or negative `nanos` field. For durations // of one second or more, a non-zero value for the `nanos` field must be // of the same sign as the `seconds` field. Must be from -999,999,999 // to +999,999,999 inclusive. - Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go index e9c22228..8e76ae97 100644 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go @@ -100,12 +100,12 @@ type Timestamp struct { // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. - Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // Non-negative fractions of a second at nanosecond resolution. Negative // second values with fractions must still have non-negative nanos values // that count forward in time. Must be from 0 to 999,999,999 // inclusive. - Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go index d1fc4d0b..0f0fa837 100644 --- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go @@ -23,7 +23,7 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // The JSON representation for `DoubleValue` is JSON number. type DoubleValue struct { // The double value. - Value float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -66,7 +66,7 @@ func (m *DoubleValue) GetValue() float64 { // The JSON representation for `FloatValue` is JSON number. type FloatValue struct { // The float value. - Value float32 `protobuf:"fixed32,1,opt,name=value" json:"value,omitempty"` + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -109,7 +109,7 @@ func (m *FloatValue) GetValue() float32 { // The JSON representation for `Int64Value` is JSON string. type Int64Value struct { // The int64 value. - Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -152,7 +152,7 @@ func (m *Int64Value) GetValue() int64 { // The JSON representation for `UInt64Value` is JSON string. type UInt64Value struct { // The uint64 value. - Value uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -195,7 +195,7 @@ func (m *UInt64Value) GetValue() uint64 { // The JSON representation for `Int32Value` is JSON number. type Int32Value struct { // The int32 value. - Value int32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -238,7 +238,7 @@ func (m *Int32Value) GetValue() int32 { // The JSON representation for `UInt32Value` is JSON number. type UInt32Value struct { // The uint32 value. - Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -281,7 +281,7 @@ func (m *UInt32Value) GetValue() uint32 { // The JSON representation for `BoolValue` is JSON `true` and `false`. type BoolValue struct { // The bool value. - Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -324,7 +324,7 @@ func (m *BoolValue) GetValue() bool { // The JSON representation for `StringValue` is JSON string. type StringValue struct { // The string value. - Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"`