From 54f64dc33c2e8e41547200e316f66e7f501dc0ba Mon Sep 17 00:00:00 2001 From: Nikhil-Ladha Date: Mon, 8 Jul 2024 17:39:18 +0530 Subject: [PATCH] internal: add sidecar service and client setup for volume group added sidecar service and client setup code for volume group feature Signed-off-by: Nikhil-Ladha --- internal/client/fake/volumegroup-client.go | 51 + internal/client/volumegroup-client.go | 120 ++ internal/client/volumegroup-client_test.go | 125 ++ internal/sidecar/service/volumegroup.go | 234 ++++ sidecar/main.go | 1 + .../spec/lib/go/volumegroup/volumegroup.pb.go | 1215 +++++++++++++++++ .../lib/go/volumegroup/volumegroup_grpc.pb.go | 269 ++++ vendor/modules.txt | 1 + 8 files changed, 2016 insertions(+) create mode 100644 internal/client/fake/volumegroup-client.go create mode 100644 internal/client/volumegroup-client.go create mode 100644 internal/client/volumegroup-client_test.go create mode 100644 internal/sidecar/service/volumegroup.go create mode 100644 vendor/github.com/csi-addons/spec/lib/go/volumegroup/volumegroup.pb.go create mode 100644 vendor/github.com/csi-addons/spec/lib/go/volumegroup/volumegroup_grpc.pb.go diff --git a/internal/client/fake/volumegroup-client.go b/internal/client/fake/volumegroup-client.go new file mode 100644 index 000000000..ccfe80220 --- /dev/null +++ b/internal/client/fake/volumegroup-client.go @@ -0,0 +1,51 @@ +/* +Copyright 2024 The Kubernetes-CSI-Addons Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import "github.com/csi-addons/kubernetes-csi-addons/internal/proto" + +// VolumeGroupClient to fake grouping operations. +type VolumeGroupClient struct { + // CreateVolumeGroupMock mocks CreateVolumeGroup RPC call. + CreateVolumeGroupMock func(volumeGroupName string, volumeIDs []string) (*proto.CreateVolumeGroupResponse, error) + // ModifyVolumeGroupMembershipMock mock ModifyVolumeGroupMembership RPC call. + ModifyVolumeGroupMembershipMock func(volumeGroupID string, volumeIDs []string) (*proto.ModifyVolumeGroupMembershipResponse, error) + // DeleteVolumeGroupMock mocks DeleteVolumeGroup RPC call. + DeleteVolumeGroupMock func(volumeGroupID string) (*proto.DeleteVolumeGroupResponse, error) + // ControllerGetVolumeGroupMock mocks ControllerGetVolumeGroup RPC call. + ControllerGetVolumeGroupMock func(volumeGroupID string) (*proto.ControllerGetVolumeGroupResponse, error) +} + +// CreateVolumeGroup calls CreateVolumeGroupMock mock function. +func (vg *VolumeGroupClient) CreateVolumeGroup(volumeGroupName string, volumeIDs []string) (*proto.CreateVolumeGroupResponse, error) { + return vg.CreateVolumeGroupMock(volumeGroupName, volumeIDs) +} + +// ModifyVolumeGroupMembership calls ModifyVolumeGroupMembership mock function. +func (vg *VolumeGroupClient) ModifyVolumeGroupMembership(volumeGroupID string, volumeIDs []string) (*proto.ModifyVolumeGroupMembershipResponse, error) { + return vg.ModifyVolumeGroupMembershipMock(volumeGroupID, volumeIDs) +} + +// DeleteVolumeGroup calls DeleteVolumeGroup mock function. +func (vg *VolumeGroupClient) DeleteVolumeGroup(volumeGroupID string) (*proto.DeleteVolumeGroupResponse, error) { + return vg.DeleteVolumeGroupMock(volumeGroupID) +} + +// ControllerGetVolumeGroup calls ControllerGetVolumeGroup mock function. +func (vg *VolumeGroupClient) ControllerGetVolumeGroup(volumeGroupID string) (*proto.ControllerGetVolumeGroupResponse, error) { + return vg.ControllerGetVolumeGroupMock(volumeGroupID) +} diff --git a/internal/client/volumegroup-client.go b/internal/client/volumegroup-client.go new file mode 100644 index 000000000..e7abe7798 --- /dev/null +++ b/internal/client/volumegroup-client.go @@ -0,0 +1,120 @@ +/* +Copyright 2024 The Kubernetes-CSI-Addons Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "context" + "time" + + "github.com/csi-addons/kubernetes-csi-addons/internal/proto" + + "google.golang.org/grpc" +) + +type volumeGroupClient struct { + client proto.VolumeGroupControllerClient + timeout time.Duration +} + +// VolumeGroup holds the methods required for volume grouping. +type VolumeGroup interface { + // CreateVolumeGroup RPC call to create a volume group. + CreateVolumeGroup(volumeGroupName string, volumeIDs []string, secretName, secretNamespace string, parameters map[string]string) (*proto.CreateVolumeGroupResponse, error) + // ModifyVolumeGroupMembership RPC call to modify the volume group. + ModifyVolumeGroupMembership(volumeGroupID string, volumeIDs []string, secretName, secretNamespace string) (*proto.ModifyVolumeGroupMembershipResponse, error) + // DeleteVolumeGroup RPC call to delete the volume group. + DeleteVolumeGroup(volumeGroupID string, secretName, secretNamespace string) (*proto.DeleteVolumeGroupResponse, error) + // ControllerGetVolumeGroup RPC call to fetch the volume group. + ControllerGetVolumeGroup(volumeGroupID string, secretName, secretNamespace string) (*proto.ControllerGetVolumeGroupResponse, error) + // ListVolumeGroups RPC call to list the volume groups + ListVolumeGroups(maxEntries int32, startingToken, secretName, secretNamespace string) (*proto.ListVolumeGroupsResponse, error) +} + +// NewReplicationClient returns VolumeGroup interface which has the RPC +// calls for grouping. +func NewVolumeGroupClient(cc *grpc.ClientConn, timeout time.Duration) VolumeGroup { + return &volumeGroupClient{client: proto.NewVolumeGroupControllerClient(cc), timeout: timeout} +} + +func (vg *volumeGroupClient) CreateVolumeGroup(volumeGroupName string, volumeIDs []string, secretName, secretNamespace string, + parameters map[string]string) (*proto.CreateVolumeGroupResponse, error) { + req := &proto.CreateVolumeGroupRequest{ + Name: volumeGroupName, + VolumeIds: volumeIDs, + Parameters: parameters, + SecretName: secretName, + SecretNamespace: secretNamespace, + } + + createCtx, cancel := context.WithTimeout(context.Background(), vg.timeout) + defer cancel() + return vg.client.CreateVolumeGroup(createCtx, req) +} + +func (vg *volumeGroupClient) ModifyVolumeGroupMembership(volumeGroupID string, volumeIDs []string, + secretName, secretNamespace string) (*proto.ModifyVolumeGroupMembershipResponse, error) { + req := &proto.ModifyVolumeGroupMembershipRequest{ + VolumeGroupId: volumeGroupID, + VolumeIds: volumeIDs, + SecretName: secretName, + SecretNamespace: secretNamespace, + } + + createCtx, cancel := context.WithTimeout(context.Background(), vg.timeout) + defer cancel() + return vg.client.ModifyVolumeGroupMembership(createCtx, req) +} + +func (vg *volumeGroupClient) DeleteVolumeGroup(volumeGroupID string, + secretName, secretNamespace string) (*proto.DeleteVolumeGroupResponse, error) { + req := &proto.DeleteVolumeGroupRequest{ + VolumeGroupId: volumeGroupID, + SecretName: secretName, + SecretNamespace: secretNamespace, + } + + createCtx, cancel := context.WithTimeout(context.Background(), vg.timeout) + defer cancel() + return vg.client.DeleteVolumeGroup(createCtx, req) +} + +func (vg *volumeGroupClient) ListVolumeGroups(maxEntries int32, startingToken string, + secretName, secretNamespace string) (*proto.ListVolumeGroupsResponse, error) { + req := &proto.ListVolumeGroupsRequest{ + MaxEntries: maxEntries, + StartingToken: startingToken, + SecretName: secretName, + SecretNamespace: secretNamespace, + } + + createCtx, cancel := context.WithTimeout(context.Background(), vg.timeout) + defer cancel() + return vg.client.ListVolumeGroups(createCtx, req) +} + +func (vg *volumeGroupClient) ControllerGetVolumeGroup(volumeGroupID string, + secretName, secretNamespace string) (*proto.ControllerGetVolumeGroupResponse, error) { + req := &proto.ControllerGetVolumeGroupRequest{ + VolumeGroupId: volumeGroupID, + SecretName: secretName, + SecretNamespace: secretNamespace, + } + + createCtx, cancel := context.WithTimeout(context.Background(), vg.timeout) + defer cancel() + return vg.client.ControllerGetVolumeGroup(createCtx, req) +} diff --git a/internal/client/volumegroup-client_test.go b/internal/client/volumegroup-client_test.go new file mode 100644 index 000000000..66659f3fa --- /dev/null +++ b/internal/client/volumegroup-client_test.go @@ -0,0 +1,125 @@ +/* +Copyright 2024 The Kubernetes-CSI-Addons Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package client + +import ( + "errors" + "testing" + + "github.com/csi-addons/kubernetes-csi-addons/internal/client/fake" + "github.com/csi-addons/kubernetes-csi-addons/internal/proto" + + "github.com/stretchr/testify/assert" +) + +func TestCreateVolumeGroup(t *testing.T) { + t.Parallel() + mockedCreateVolumeGroup := &fake.VolumeGroupClient{ + CreateVolumeGroupMock: func(volumeGroupName string, volumeIDs []string) (*proto.CreateVolumeGroupResponse, error) { + return &proto.CreateVolumeGroupResponse{}, nil + }, + } + client := mockedCreateVolumeGroup + resp, err := client.CreateVolumeGroup("", nil) + assert.Equal(t, &proto.CreateVolumeGroupResponse{}, resp) + assert.Nil(t, err) + + // return error + mockedCreateVolumeGroup = &fake.VolumeGroupClient{ + CreateVolumeGroupMock: func(volumeGroupName string, volumeIDs []string) (*proto.CreateVolumeGroupResponse, error) { + return nil, errors.New("failed to create volume group") + }, + } + client = mockedCreateVolumeGroup + resp, err = client.CreateVolumeGroup("", nil) + assert.Nil(t, resp) + assert.NotNil(t, err) +} + +func TestDeleteVolumeGroup(t *testing.T) { + t.Parallel() + mockedDeleteVolumeGroup := &fake.VolumeGroupClient{ + DeleteVolumeGroupMock: func(volumeGroupID string) (*proto.DeleteVolumeGroupResponse, error) { + return &proto.DeleteVolumeGroupResponse{}, nil + }, + } + client := mockedDeleteVolumeGroup + resp, err := client.DeleteVolumeGroup("") + assert.Equal(t, &proto.DeleteVolumeGroupResponse{}, resp) + assert.Nil(t, err) + + // return error + mockedDeleteVolumeGroup = &fake.VolumeGroupClient{ + DeleteVolumeGroupMock: func(volumeGroupID string) (*proto.DeleteVolumeGroupResponse, error) { + return nil, errors.New("failed to delete volume group") + }, + } + client = mockedDeleteVolumeGroup + resp, err = client.DeleteVolumeGroup("") + assert.Nil(t, resp) + assert.NotNil(t, err) +} + +func TestModifyVolumeGroupMembership(t *testing.T) { + t.Parallel() + // return success response + mockedModifyVolumeGroup := &fake.VolumeGroupClient{ + ModifyVolumeGroupMembershipMock: func(volumeGroupID string, volumeIDs []string) (*proto.ModifyVolumeGroupMembershipResponse, error) { + return &proto.ModifyVolumeGroupMembershipResponse{}, nil + }, + } + client := mockedModifyVolumeGroup + resp, err := client.ModifyVolumeGroupMembership("", nil) + assert.Equal(t, &proto.ModifyVolumeGroupMembershipResponse{}, resp) + assert.Nil(t, err) + + // return error + mockedModifyVolumeGroup = &fake.VolumeGroupClient{ + ModifyVolumeGroupMembershipMock: func(volumeGroupID string, volumeIDs []string) (*proto.ModifyVolumeGroupMembershipResponse, error) { + return nil, errors.New("failed to modify volume group") + }, + } + client = mockedModifyVolumeGroup + resp, err = client.ModifyVolumeGroupMembership("", nil) + assert.Nil(t, resp) + assert.NotNil(t, err) +} + +func TestControllerGetVolumeGroup(t *testing.T) { + t.Parallel() + // return success response + mockedGetVolumeGroup := &fake.VolumeGroupClient{ + ControllerGetVolumeGroupMock: func(volumeGroupID string) (*proto.ControllerGetVolumeGroupResponse, error) { + return &proto.ControllerGetVolumeGroupResponse{}, nil + }, + } + client := mockedGetVolumeGroup + resp, err := client.ControllerGetVolumeGroup("") + assert.Equal(t, &proto.ControllerGetVolumeGroupResponse{}, resp) + assert.Nil(t, err) + + // return error + mockedGetVolumeGroup = &fake.VolumeGroupClient{ + ControllerGetVolumeGroupMock: func(volumeGroupID string) (*proto.ControllerGetVolumeGroupResponse, error) { + return nil, errors.New("failed to get volume group") + }, + } + client = mockedGetVolumeGroup + resp, err = client.ControllerGetVolumeGroup("") + assert.Nil(t, resp) + assert.NotNil(t, err) +} diff --git a/internal/sidecar/service/volumegroup.go b/internal/sidecar/service/volumegroup.go new file mode 100644 index 000000000..da2a827fd --- /dev/null +++ b/internal/sidecar/service/volumegroup.go @@ -0,0 +1,234 @@ +/* +Copyright 2024 The Kubernetes-CSI-Addons Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package service + +import ( + "context" + + kube "github.com/csi-addons/kubernetes-csi-addons/internal/kubernetes" + "github.com/csi-addons/kubernetes-csi-addons/internal/proto" + csiVolumeGroup "github.com/csi-addons/spec/lib/go/volumegroup" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" +) + +// VolumeGroupServer struct of sidecar with supported methods of proto +// volumegroup server spec and also containing volumegroup +// controller client to csi driver. +type VolumeGroupServer struct { + proto.UnimplementedVolumeGroupControllerServer + controllerClient csiVolumeGroup.ControllerClient + kubeClient *kubernetes.Clientset +} + +// NewVolumeGroupServer creates a new VolumeGroupServer which handles the proto.VolumeGroup +// Service requests. +func NewVolumeGroupServer(c *grpc.ClientConn, kc *kubernetes.Clientset) *VolumeGroupServer { + return &VolumeGroupServer{ + controllerClient: csiVolumeGroup.NewControllerClient(c), + kubeClient: kc, + } +} + +// RegisterService registers service with the server. +func (vg *VolumeGroupServer) RegisterService(server grpc.ServiceRegistrar) { + proto.RegisterVolumeGroupControllerServer(server, vg) +} + +// CreateVolumeGroup calls CSI-Addons CreateVolumeGroup service. +func (vg *VolumeGroupServer) CreateVolumeGroup( + ctx context.Context, + req *proto.CreateVolumeGroupRequest) (*proto.CreateVolumeGroupResponse, error) { + // Get the secrets from the k8s cluster + data, err := kube.GetSecret(ctx, vg.kubeClient, req.GetSecretName(), req.GetSecretNamespace()) + if err != nil { + klog.Errorf("Failed to get secret %s in namespace %s: %v", req.GetSecretName(), req.GetSecretNamespace(), err) + return nil, status.Error(codes.Internal, err.Error()) + } + // Get the VolumeGroup name and volumeIds from the request + vgReq := &csiVolumeGroup.CreateVolumeGroupRequest{ + Name: req.GetName(), + VolumeIds: req.GetVolumeIds(), + Parameters: req.GetParameters(), + Secrets: data, + } + + vgResp, err := vg.controllerClient.CreateVolumeGroup(ctx, vgReq) + if err != nil { + klog.Errorf("Failed to create volume group: %v", err) + return nil, err + } + + volIds := []string{} + for _, vol := range vgResp.VolumeGroup.GetVolumes() { + volIds = append(volIds, vol.VolumeId) + } + + return &proto.CreateVolumeGroupResponse{ + VolumeGroup: &proto.VolumeGroup{ + VolumeGroupId: vgResp.VolumeGroup.GetVolumeGroupId(), + VolumeGroupContext: vgResp.VolumeGroup.GetVolumeGroupContext(), + VolumeIds: volIds, + }, + }, nil +} + +// ModifyVolumeGroupMembership calls CSI-Addons ModifyVolumeGroupMembership service. +func (vg *VolumeGroupServer) ModifyVolumeGroupMembership( + ctx context.Context, + req *proto.ModifyVolumeGroupMembershipRequest) (*proto.ModifyVolumeGroupMembershipResponse, error) { + // Get the secrets from the k8s cluster + data, err := kube.GetSecret(ctx, vg.kubeClient, req.GetSecretName(), req.GetSecretNamespace()) + if err != nil { + klog.Errorf("Failed to get secret %s in namespace %s: %v", req.GetSecretName(), req.GetSecretNamespace(), err) + return nil, status.Error(codes.Internal, err.Error()) + } + // Get the volumeGroup Id and volumeIds from the request + vgReq := &csiVolumeGroup.ModifyVolumeGroupMembershipRequest{ + VolumeGroupId: req.GetVolumeGroupId(), + VolumeIds: req.GetVolumeIds(), + Secrets: data, + Parameters: req.GetParameters(), + } + + vgResp, err := vg.controllerClient.ModifyVolumeGroupMembership(ctx, vgReq) + if err != nil { + klog.Errorf("Failed to modify volume group: %v", err) + return nil, err + } + + volIds := []string{} + for _, vol := range vgResp.VolumeGroup.GetVolumes() { + volIds = append(volIds, vol.VolumeId) + } + + return &proto.ModifyVolumeGroupMembershipResponse{ + VolumeGroup: &proto.VolumeGroup{ + VolumeGroupId: vgResp.VolumeGroup.GetVolumeGroupId(), + VolumeGroupContext: vgResp.VolumeGroup.GetVolumeGroupContext(), + VolumeIds: volIds, + }, + }, nil +} + +// DeleteVolumeGroup calls CSI-Addons DeleteVolumeGroup service. +func (vg *VolumeGroupServer) DeleteVolumeGroup( + ctx context.Context, + req *proto.DeleteVolumeGroupRequest) (*proto.DeleteVolumeGroupResponse, error) { + // Get the secrets from the k8s cluster + data, err := kube.GetSecret(ctx, vg.kubeClient, req.GetSecretName(), req.GetSecretNamespace()) + if err != nil { + klog.Errorf("Failed to get secret %s in namespace %s: %v", req.GetSecretName(), req.GetSecretNamespace(), err) + return nil, status.Error(codes.Internal, err.Error()) + } + // Get the volumeGroup Id from the request + vgReq := &csiVolumeGroup.DeleteVolumeGroupRequest{ + VolumeGroupId: req.GetVolumeGroupId(), + Secrets: data, + } + + _, err = vg.controllerClient.DeleteVolumeGroup(ctx, vgReq) + if err != nil { + klog.Errorf("Failed to delete volume group: %v", err) + return nil, err + } + + return &proto.DeleteVolumeGroupResponse{}, nil +} + +// ControllerGetVolumeGroup calls CSI-Addons ControllerGetVolumeGroup service. +func (vg *VolumeGroupServer) ControllerGetVolumeGroup( + ctx context.Context, + req *proto.ControllerGetVolumeGroupRequest) (*proto.ControllerGetVolumeGroupResponse, error) { + // Get the secrets from the k8s cluster + data, err := kube.GetSecret(ctx, vg.kubeClient, req.GetSecretName(), req.GetSecretNamespace()) + if err != nil { + klog.Errorf("Failed to get secret %s in namespace %s: %v", req.GetSecretName(), req.GetSecretNamespace(), err) + return nil, status.Error(codes.Internal, err.Error()) + } + // Get the volumeGroup Id from the request + vgReq := &csiVolumeGroup.ControllerGetVolumeGroupRequest{ + VolumeGroupId: req.GetVolumeGroupId(), + Secrets: data, + } + + vgResp, err := vg.controllerClient.ControllerGetVolumeGroup(ctx, vgReq) + if err != nil { + klog.Errorf("Failed to get volume group: %v", err) + return nil, err + } + + volIds := []string{} + for _, vol := range vgResp.VolumeGroup.GetVolumes() { + volIds = append(volIds, vol.VolumeId) + } + + return &proto.ControllerGetVolumeGroupResponse{ + VolumeGroup: &proto.VolumeGroup{ + VolumeGroupId: vgResp.VolumeGroup.GetVolumeGroupId(), + VolumeGroupContext: vgResp.VolumeGroup.GetVolumeGroupContext(), + VolumeIds: volIds, + }, + }, nil +} + +// ListVolumeGroups calls CSI-Addons ListVolumeGroups service. +func (vg *VolumeGroupServer) ListVolumeGroups( + ctx context.Context, + req *proto.ListVolumeGroupsRequest) (*proto.ListVolumeGroupsResponse, error) { + // Get the secrets from the k8s cluster + data, err := kube.GetSecret(ctx, vg.kubeClient, req.GetSecretName(), req.GetSecretNamespace()) + if err != nil { + klog.Errorf("Failed to get secret %s in namespace %s: %v", req.GetSecretName(), req.GetSecretNamespace(), err) + return nil, status.Error(codes.Internal, err.Error()) + } + + vgReq := &csiVolumeGroup.ListVolumeGroupsRequest{ + MaxEntries: req.MaxEntries, + StartingToken: req.StartingToken, + Secrets: data, + } + + vgResp, err := vg.controllerClient.ListVolumeGroups(ctx, vgReq) + if err != nil { + klog.Errorf("Failed to list volume groups: %v", err) + return nil, err + } + + volEntries := []*proto.ListVolumeGroupsResponse_Entry{} + for _, ent := range vgResp.Entries { + volIds := []string{} + for _, vol := range ent.VolumeGroup.GetVolumes() { + volIds = append(volIds, vol.VolumeId) + } + volEntries = append(volEntries, &proto.ListVolumeGroupsResponse_Entry{ + VolumeGroup: &proto.VolumeGroup{ + VolumeGroupId: ent.VolumeGroup.GetVolumeGroupId(), + VolumeGroupContext: ent.VolumeGroup.GetVolumeGroupContext(), + VolumeIds: volIds, + }, + }) + } + + return &proto.ListVolumeGroupsResponse{ + Entries: volEntries, + NextToken: vgResp.GetNextToken(), + }, nil +} diff --git a/sidecar/main.go b/sidecar/main.go index a230844e8..e2e6d410d 100644 --- a/sidecar/main.go +++ b/sidecar/main.go @@ -115,6 +115,7 @@ func main() { sidecarServer.RegisterService(service.NewNetworkFenceServer(csiClient.GetGRPCClient(), kubeClient)) sidecarServer.RegisterService(service.NewReplicationServer(csiClient.GetGRPCClient(), kubeClient)) sidecarServer.RegisterService(service.NewEncryptionKeyRotationServer(csiClient.GetGRPCClient(), kubeClient)) + sidecarServer.RegisterService(service.NewVolumeGroupServer(csiClient.GetGRPCClient(), kubeClient)) isController, err := csiClient.HasControllerService() if err != nil { diff --git a/vendor/github.com/csi-addons/spec/lib/go/volumegroup/volumegroup.pb.go b/vendor/github.com/csi-addons/spec/lib/go/volumegroup/volumegroup.pb.go new file mode 100644 index 000000000..aa216a107 --- /dev/null +++ b/vendor/github.com/csi-addons/spec/lib/go/volumegroup/volumegroup.pb.go @@ -0,0 +1,1215 @@ +// Code generated by make; DO NOT EDIT. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.20.2 +// source: volumegroup/volumegroup.proto + +package volumegroup + +import ( + csi "github.com/container-storage-interface/spec/lib/go/csi" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// CreateVolumeGroupRequest holds the required information to +// create a volume group +type CreateVolumeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // suggested name for volume group (required for idempotency) + // This field is REQUIRED. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // params passed to the plugin to create the volume group. + // This field is OPTIONAL. + 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"` + // Secrets required by plugin to complete volume group creation + // request. + // This field is OPTIONAL. Refer to the `Secrets Requirements` + // section on how to use this field. + 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"` + // Specify volume_ids that will be added to the volume group. + // This field is OPTIONAL. + VolumeIds []string `protobuf:"bytes,4,rep,name=volume_ids,json=volumeIds,proto3" json:"volume_ids,omitempty"` +} + +func (x *CreateVolumeGroupRequest) Reset() { + *x = CreateVolumeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateVolumeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateVolumeGroupRequest) ProtoMessage() {} + +func (x *CreateVolumeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateVolumeGroupRequest.ProtoReflect.Descriptor instead. +func (*CreateVolumeGroupRequest) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateVolumeGroupRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateVolumeGroupRequest) GetParameters() map[string]string { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *CreateVolumeGroupRequest) GetSecrets() map[string]string { + if x != nil { + return x.Secrets + } + return nil +} + +func (x *CreateVolumeGroupRequest) GetVolumeIds() []string { + if x != nil { + return x.VolumeIds + } + return nil +} + +// CreateVolumeGroupResponse holds the information to send when +// volumeGroup is successfully created. +type CreateVolumeGroupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Contains all attributes of the newly created volume group. + // This field is REQUIRED. + VolumeGroup *VolumeGroup `protobuf:"bytes,1,opt,name=volume_group,json=volumeGroup,proto3" json:"volume_group,omitempty"` +} + +func (x *CreateVolumeGroupResponse) Reset() { + *x = CreateVolumeGroupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateVolumeGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateVolumeGroupResponse) ProtoMessage() {} + +func (x *CreateVolumeGroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateVolumeGroupResponse.ProtoReflect.Descriptor instead. +func (*CreateVolumeGroupResponse) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateVolumeGroupResponse) GetVolumeGroup() *VolumeGroup { + if x != nil { + return x.VolumeGroup + } + return nil +} + +// Information about a specific volumeGroup. +type VolumeGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The identifier for this volume group, generated by the plugin. + // This field is REQUIRED. + VolumeGroupId string `protobuf:"bytes,1,opt,name=volume_group_id,json=volumeGroupId,proto3" json:"volume_group_id,omitempty"` + // Opaque static properties of the volume group. + // This field is OPTIONAL. + VolumeGroupContext map[string]string `protobuf:"bytes,2,rep,name=volume_group_context,json=volumeGroupContext,proto3" json:"volume_group_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Underlying volumes in this group. The same definition in CSI + // Volume. + // This field is OPTIONAL. + // To support the creation of an empty group, this list can be empty. + // However, this field is not empty in the following cases: + // - Response from ListVolumeGroups or ControllerGetVolumeGroup if the + // VolumeGroup is not empty. + // - Response from ModifyVolumeGroupMembership if the + // VolumeGroup is not empty after modification. + Volumes []*csi.Volume `protobuf:"bytes,3,rep,name=volumes,proto3" json:"volumes,omitempty"` +} + +func (x *VolumeGroup) Reset() { + *x = VolumeGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VolumeGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeGroup) ProtoMessage() {} + +func (x *VolumeGroup) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VolumeGroup.ProtoReflect.Descriptor instead. +func (*VolumeGroup) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{2} +} + +func (x *VolumeGroup) GetVolumeGroupId() string { + if x != nil { + return x.VolumeGroupId + } + return "" +} + +func (x *VolumeGroup) GetVolumeGroupContext() map[string]string { + if x != nil { + return x.VolumeGroupContext + } + return nil +} + +func (x *VolumeGroup) GetVolumes() []*csi.Volume { + if x != nil { + return x.Volumes + } + return nil +} + +// DeleteVolumeGroupRequest holds the required information to +// delete a volume group +type DeleteVolumeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the volume group to be deleted. + // This field is REQUIRED. + VolumeGroupId string `protobuf:"bytes,1,opt,name=volume_group_id,json=volumeGroupId,proto3" json:"volume_group_id,omitempty"` + // Secrets required by plugin to complete volume group + // deletion request. + // This field is OPTIONAL. Refer to the `Secrets Requirements` + // section on how to use this field. + 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"` +} + +func (x *DeleteVolumeGroupRequest) Reset() { + *x = DeleteVolumeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteVolumeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVolumeGroupRequest) ProtoMessage() {} + +func (x *DeleteVolumeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVolumeGroupRequest.ProtoReflect.Descriptor instead. +func (*DeleteVolumeGroupRequest) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteVolumeGroupRequest) GetVolumeGroupId() string { + if x != nil { + return x.VolumeGroupId + } + return "" +} + +func (x *DeleteVolumeGroupRequest) GetSecrets() map[string]string { + if x != nil { + return x.Secrets + } + return nil +} + +// DeleteVolumeGroupResponse holds the information to send when +// volumeGroup is successfully deleted. +type DeleteVolumeGroupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteVolumeGroupResponse) Reset() { + *x = DeleteVolumeGroupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteVolumeGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVolumeGroupResponse) ProtoMessage() {} + +func (x *DeleteVolumeGroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVolumeGroupResponse.ProtoReflect.Descriptor instead. +func (*DeleteVolumeGroupResponse) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{4} +} + +// ModifyVolumeGroupMembershipRequest holds the required +// information to modify a volume group +type ModifyVolumeGroupMembershipRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the volume group to be modified. + // This field is REQUIRED. + VolumeGroupId string `protobuf:"bytes,1,opt,name=volume_group_id,json=volumeGroupId,proto3" json:"volume_group_id,omitempty"` + // Specify volume_ids that will be in the modified volume group. + // This list will be compared with the volume_ids in the existing + // group. + // New ones will be added and missing ones will be removed. + // If no volume_ids are provided, all existing volumes will + // be removed from the group. + // This field is OPTIONAL. + VolumeIds []string `protobuf:"bytes,2,rep,name=volume_ids,json=volumeIds,proto3" json:"volume_ids,omitempty"` + // Secrets required by plugin to complete volume group + // modification request. + // This field is OPTIONAL. Refer to the `Secrets Requirements` + // section on how to use this field. + 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"` + // parameters passed to the plugin to modify the volume group + // or to modify the volumes in the group. + // 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"` +} + +func (x *ModifyVolumeGroupMembershipRequest) Reset() { + *x = ModifyVolumeGroupMembershipRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModifyVolumeGroupMembershipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyVolumeGroupMembershipRequest) ProtoMessage() {} + +func (x *ModifyVolumeGroupMembershipRequest) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyVolumeGroupMembershipRequest.ProtoReflect.Descriptor instead. +func (*ModifyVolumeGroupMembershipRequest) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{5} +} + +func (x *ModifyVolumeGroupMembershipRequest) GetVolumeGroupId() string { + if x != nil { + return x.VolumeGroupId + } + return "" +} + +func (x *ModifyVolumeGroupMembershipRequest) GetVolumeIds() []string { + if x != nil { + return x.VolumeIds + } + return nil +} + +func (x *ModifyVolumeGroupMembershipRequest) GetSecrets() map[string]string { + if x != nil { + return x.Secrets + } + return nil +} + +func (x *ModifyVolumeGroupMembershipRequest) GetParameters() map[string]string { + if x != nil { + return x.Parameters + } + return nil +} + +// ModifyVolumeGroupMembershipResponse holds the information to +// send when volumeGroup is successfully modified. +type ModifyVolumeGroupMembershipResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Contains all attributes of the modified volume group. + // This field is REQUIRED. + VolumeGroup *VolumeGroup `protobuf:"bytes,1,opt,name=volume_group,json=volumeGroup,proto3" json:"volume_group,omitempty"` +} + +func (x *ModifyVolumeGroupMembershipResponse) Reset() { + *x = ModifyVolumeGroupMembershipResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModifyVolumeGroupMembershipResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyVolumeGroupMembershipResponse) ProtoMessage() {} + +func (x *ModifyVolumeGroupMembershipResponse) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyVolumeGroupMembershipResponse.ProtoReflect.Descriptor instead. +func (*ModifyVolumeGroupMembershipResponse) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{6} +} + +func (x *ModifyVolumeGroupMembershipResponse) GetVolumeGroup() *VolumeGroup { + if x != nil { + return x.VolumeGroup + } + return nil +} + +// ControllerGetVolumeGroupRequest holds the required +// information to get information on volume group +type ControllerGetVolumeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the volume group to fetch current volume group + // information for. + // This field is REQUIRED. + VolumeGroupId string `protobuf:"bytes,1,opt,name=volume_group_id,json=volumeGroupId,proto3" json:"volume_group_id,omitempty"` + // Secrets required by plugin to complete ControllerGetVolumeGroup + // request. + // This field is OPTIONAL. Refer to the `Secrets Requirements` + // section on how to use this field. + 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"` +} + +func (x *ControllerGetVolumeGroupRequest) Reset() { + *x = ControllerGetVolumeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControllerGetVolumeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControllerGetVolumeGroupRequest) ProtoMessage() {} + +func (x *ControllerGetVolumeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControllerGetVolumeGroupRequest.ProtoReflect.Descriptor instead. +func (*ControllerGetVolumeGroupRequest) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{7} +} + +func (x *ControllerGetVolumeGroupRequest) GetVolumeGroupId() string { + if x != nil { + return x.VolumeGroupId + } + return "" +} + +func (x *ControllerGetVolumeGroupRequest) GetSecrets() map[string]string { + if x != nil { + return x.Secrets + } + return nil +} + +// ControllerGetVolumeGroupResponse holds the information to +// send when volumeGroup information was successfully gathered. +type ControllerGetVolumeGroupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field is REQUIRED + VolumeGroup *VolumeGroup `protobuf:"bytes,1,opt,name=volume_group,json=volumeGroup,proto3" json:"volume_group,omitempty"` +} + +func (x *ControllerGetVolumeGroupResponse) Reset() { + *x = ControllerGetVolumeGroupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControllerGetVolumeGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControllerGetVolumeGroupResponse) ProtoMessage() {} + +func (x *ControllerGetVolumeGroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControllerGetVolumeGroupResponse.ProtoReflect.Descriptor instead. +func (*ControllerGetVolumeGroupResponse) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{8} +} + +func (x *ControllerGetVolumeGroupResponse) GetVolumeGroup() *VolumeGroup { + if x != nil { + return x.VolumeGroup + } + return nil +} + +// ListVolumeGroupsRequest holds the required +// information to get information on list of volume groups. +type ListVolumeGroupsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If specified (non-zero value), the Plugin MUST NOT return more + // entries than this number in the response. If the actual number of + // entries is more than this number, the Plugin MUST set `next_token` + // in the response which can be used to get the next page of entries + // in the subsequent `ListVolumeGroups` call. This field is OPTIONAL. + // If 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,proto3" json:"max_entries,omitempty"` + // A token to specify where to start paginating. Set this field to + // `next_token` returned by a previous `ListVolumeGroups` 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,proto3" json:"starting_token,omitempty"` + // Secrets required by plugin to complete ListVolumeGroup request. + // This field is OPTIONAL. Refer to the `Secrets Requirements` + // section on how to use this field. + 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"` +} + +func (x *ListVolumeGroupsRequest) Reset() { + *x = ListVolumeGroupsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVolumeGroupsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVolumeGroupsRequest) ProtoMessage() {} + +func (x *ListVolumeGroupsRequest) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVolumeGroupsRequest.ProtoReflect.Descriptor instead. +func (*ListVolumeGroupsRequest) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{9} +} + +func (x *ListVolumeGroupsRequest) GetMaxEntries() int32 { + if x != nil { + return x.MaxEntries + } + return 0 +} + +func (x *ListVolumeGroupsRequest) GetStartingToken() string { + if x != nil { + return x.StartingToken + } + return "" +} + +func (x *ListVolumeGroupsRequest) GetSecrets() map[string]string { + if x != nil { + return x.Secrets + } + return nil +} + +// ListVolumeGroupsResponse holds the information to +// send when list of volumeGroups information was successfully gathered. +type ListVolumeGroupsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents each volume group entry + Entries []*ListVolumeGroupsResponse_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` + // This token allows you to get the next page of entries for + // `ListVolumeGroups` 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 `ListVolumeGroups` 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,proto3" json:"next_token,omitempty"` +} + +func (x *ListVolumeGroupsResponse) Reset() { + *x = ListVolumeGroupsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVolumeGroupsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVolumeGroupsResponse) ProtoMessage() {} + +func (x *ListVolumeGroupsResponse) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVolumeGroupsResponse.ProtoReflect.Descriptor instead. +func (*ListVolumeGroupsResponse) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{10} +} + +func (x *ListVolumeGroupsResponse) GetEntries() []*ListVolumeGroupsResponse_Entry { + if x != nil { + return x.Entries + } + return nil +} + +func (x *ListVolumeGroupsResponse) GetNextToken() string { + if x != nil { + return x.NextToken + } + return "" +} + +// Represents each volume group. +type ListVolumeGroupsResponse_Entry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field is REQUIRED + VolumeGroup *VolumeGroup `protobuf:"bytes,1,opt,name=volume_group,json=volumeGroup,proto3" json:"volume_group,omitempty"` +} + +func (x *ListVolumeGroupsResponse_Entry) Reset() { + *x = ListVolumeGroupsResponse_Entry{} + if protoimpl.UnsafeEnabled { + mi := &file_volumegroup_volumegroup_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVolumeGroupsResponse_Entry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVolumeGroupsResponse_Entry) ProtoMessage() {} + +func (x *ListVolumeGroupsResponse_Entry) ProtoReflect() protoreflect.Message { + mi := &file_volumegroup_volumegroup_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVolumeGroupsResponse_Entry.ProtoReflect.Descriptor instead. +func (*ListVolumeGroupsResponse_Entry) Descriptor() ([]byte, []int) { + return file_volumegroup_volumegroup_proto_rawDescGZIP(), []int{10, 0} +} + +func (x *ListVolumeGroupsResponse_Entry) GetVolumeGroup() *VolumeGroup { + if x != nil { + return x.VolumeGroup + } + return nil +} + +var File_volumegroup_volumegroup_proto protoreflect.FileDescriptor + +var file_volumegroup_volumegroup_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x40, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x2d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x6c, 0x69, 0x62, 0x2f, 0x67, 0x6f, + 0x2f, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, + 0x02, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x55, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0x98, 0x42, 0x01, + 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3b, 0x0a, 0x0c, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x8a, 0x02, + 0x0a, 0x0b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x26, 0x0a, + 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x62, 0x0a, 0x14, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x73, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x1a, 0x45, 0x0a, 0x17, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd1, 0x01, 0x0a, 0x18, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, + 0x51, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0x98, 0x42, 0x01, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1b, + 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa4, 0x03, 0x0a, 0x22, + 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x73, 0x12, 0x5b, 0x0a, 0x07, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0x98, 0x42, 0x01, 0x52, 0x07, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x5f, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x62, 0x0a, 0x23, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xdf, 0x01, 0x0a, 0x1f, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x12, 0x58, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x47, 0x65, 0x74, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, + 0x98, 0x42, 0x01, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5f, 0x0a, 0x20, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0c, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xef, 0x01, 0x0a, 0x17, 0x4c, 0x69, + 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x50, 0x0a, + 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x42, 0x03, 0x98, 0x42, 0x01, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x1a, + 0x3a, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x18, + 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, + 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x44, + 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0c, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x32, 0xbb, 0x04, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x12, 0x64, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x26, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x1b, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x2f, 0x2e, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, + 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x2c, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x47, 0x65, 0x74, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2d, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_volumegroup_volumegroup_proto_rawDescOnce sync.Once + file_volumegroup_volumegroup_proto_rawDescData = file_volumegroup_volumegroup_proto_rawDesc +) + +func file_volumegroup_volumegroup_proto_rawDescGZIP() []byte { + file_volumegroup_volumegroup_proto_rawDescOnce.Do(func() { + file_volumegroup_volumegroup_proto_rawDescData = protoimpl.X.CompressGZIP(file_volumegroup_volumegroup_proto_rawDescData) + }) + return file_volumegroup_volumegroup_proto_rawDescData +} + +var file_volumegroup_volumegroup_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_volumegroup_volumegroup_proto_goTypes = []interface{}{ + (*CreateVolumeGroupRequest)(nil), // 0: volumegroup.CreateVolumeGroupRequest + (*CreateVolumeGroupResponse)(nil), // 1: volumegroup.CreateVolumeGroupResponse + (*VolumeGroup)(nil), // 2: volumegroup.VolumeGroup + (*DeleteVolumeGroupRequest)(nil), // 3: volumegroup.DeleteVolumeGroupRequest + (*DeleteVolumeGroupResponse)(nil), // 4: volumegroup.DeleteVolumeGroupResponse + (*ModifyVolumeGroupMembershipRequest)(nil), // 5: volumegroup.ModifyVolumeGroupMembershipRequest + (*ModifyVolumeGroupMembershipResponse)(nil), // 6: volumegroup.ModifyVolumeGroupMembershipResponse + (*ControllerGetVolumeGroupRequest)(nil), // 7: volumegroup.ControllerGetVolumeGroupRequest + (*ControllerGetVolumeGroupResponse)(nil), // 8: volumegroup.ControllerGetVolumeGroupResponse + (*ListVolumeGroupsRequest)(nil), // 9: volumegroup.ListVolumeGroupsRequest + (*ListVolumeGroupsResponse)(nil), // 10: volumegroup.ListVolumeGroupsResponse + nil, // 11: volumegroup.CreateVolumeGroupRequest.ParametersEntry + nil, // 12: volumegroup.CreateVolumeGroupRequest.SecretsEntry + nil, // 13: volumegroup.VolumeGroup.VolumeGroupContextEntry + nil, // 14: volumegroup.DeleteVolumeGroupRequest.SecretsEntry + nil, // 15: volumegroup.ModifyVolumeGroupMembershipRequest.SecretsEntry + nil, // 16: volumegroup.ModifyVolumeGroupMembershipRequest.ParametersEntry + nil, // 17: volumegroup.ControllerGetVolumeGroupRequest.SecretsEntry + nil, // 18: volumegroup.ListVolumeGroupsRequest.SecretsEntry + (*ListVolumeGroupsResponse_Entry)(nil), // 19: volumegroup.ListVolumeGroupsResponse.Entry + (*csi.Volume)(nil), // 20: csi.v1.Volume +} +var file_volumegroup_volumegroup_proto_depIdxs = []int32{ + 11, // 0: volumegroup.CreateVolumeGroupRequest.parameters:type_name -> volumegroup.CreateVolumeGroupRequest.ParametersEntry + 12, // 1: volumegroup.CreateVolumeGroupRequest.secrets:type_name -> volumegroup.CreateVolumeGroupRequest.SecretsEntry + 2, // 2: volumegroup.CreateVolumeGroupResponse.volume_group:type_name -> volumegroup.VolumeGroup + 13, // 3: volumegroup.VolumeGroup.volume_group_context:type_name -> volumegroup.VolumeGroup.VolumeGroupContextEntry + 20, // 4: volumegroup.VolumeGroup.volumes:type_name -> csi.v1.Volume + 14, // 5: volumegroup.DeleteVolumeGroupRequest.secrets:type_name -> volumegroup.DeleteVolumeGroupRequest.SecretsEntry + 15, // 6: volumegroup.ModifyVolumeGroupMembershipRequest.secrets:type_name -> volumegroup.ModifyVolumeGroupMembershipRequest.SecretsEntry + 16, // 7: volumegroup.ModifyVolumeGroupMembershipRequest.parameters:type_name -> volumegroup.ModifyVolumeGroupMembershipRequest.ParametersEntry + 2, // 8: volumegroup.ModifyVolumeGroupMembershipResponse.volume_group:type_name -> volumegroup.VolumeGroup + 17, // 9: volumegroup.ControllerGetVolumeGroupRequest.secrets:type_name -> volumegroup.ControllerGetVolumeGroupRequest.SecretsEntry + 2, // 10: volumegroup.ControllerGetVolumeGroupResponse.volume_group:type_name -> volumegroup.VolumeGroup + 18, // 11: volumegroup.ListVolumeGroupsRequest.secrets:type_name -> volumegroup.ListVolumeGroupsRequest.SecretsEntry + 19, // 12: volumegroup.ListVolumeGroupsResponse.entries:type_name -> volumegroup.ListVolumeGroupsResponse.Entry + 2, // 13: volumegroup.ListVolumeGroupsResponse.Entry.volume_group:type_name -> volumegroup.VolumeGroup + 0, // 14: volumegroup.Controller.CreateVolumeGroup:input_type -> volumegroup.CreateVolumeGroupRequest + 5, // 15: volumegroup.Controller.ModifyVolumeGroupMembership:input_type -> volumegroup.ModifyVolumeGroupMembershipRequest + 3, // 16: volumegroup.Controller.DeleteVolumeGroup:input_type -> volumegroup.DeleteVolumeGroupRequest + 9, // 17: volumegroup.Controller.ListVolumeGroups:input_type -> volumegroup.ListVolumeGroupsRequest + 7, // 18: volumegroup.Controller.ControllerGetVolumeGroup:input_type -> volumegroup.ControllerGetVolumeGroupRequest + 1, // 19: volumegroup.Controller.CreateVolumeGroup:output_type -> volumegroup.CreateVolumeGroupResponse + 6, // 20: volumegroup.Controller.ModifyVolumeGroupMembership:output_type -> volumegroup.ModifyVolumeGroupMembershipResponse + 4, // 21: volumegroup.Controller.DeleteVolumeGroup:output_type -> volumegroup.DeleteVolumeGroupResponse + 10, // 22: volumegroup.Controller.ListVolumeGroups:output_type -> volumegroup.ListVolumeGroupsResponse + 8, // 23: volumegroup.Controller.ControllerGetVolumeGroup:output_type -> volumegroup.ControllerGetVolumeGroupResponse + 19, // [19:24] is the sub-list for method output_type + 14, // [14:19] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_volumegroup_volumegroup_proto_init() } +func file_volumegroup_volumegroup_proto_init() { + if File_volumegroup_volumegroup_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_volumegroup_volumegroup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateVolumeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateVolumeGroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteVolumeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteVolumeGroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyVolumeGroupMembershipRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyVolumeGroupMembershipResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControllerGetVolumeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControllerGetVolumeGroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVolumeGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVolumeGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_volumegroup_volumegroup_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVolumeGroupsResponse_Entry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_volumegroup_volumegroup_proto_rawDesc, + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_volumegroup_volumegroup_proto_goTypes, + DependencyIndexes: file_volumegroup_volumegroup_proto_depIdxs, + MessageInfos: file_volumegroup_volumegroup_proto_msgTypes, + }.Build() + File_volumegroup_volumegroup_proto = out.File + file_volumegroup_volumegroup_proto_rawDesc = nil + file_volumegroup_volumegroup_proto_goTypes = nil + file_volumegroup_volumegroup_proto_depIdxs = nil +} diff --git a/vendor/github.com/csi-addons/spec/lib/go/volumegroup/volumegroup_grpc.pb.go b/vendor/github.com/csi-addons/spec/lib/go/volumegroup/volumegroup_grpc.pb.go new file mode 100644 index 000000000..d41b597f9 --- /dev/null +++ b/vendor/github.com/csi-addons/spec/lib/go/volumegroup/volumegroup_grpc.pb.go @@ -0,0 +1,269 @@ +// Code generated by make; DO NOT EDIT. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.20.2 +// source: volumegroup/volumegroup.proto + +package volumegroup + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Controller_CreateVolumeGroup_FullMethodName = "/volumegroup.Controller/CreateVolumeGroup" + Controller_ModifyVolumeGroupMembership_FullMethodName = "/volumegroup.Controller/ModifyVolumeGroupMembership" + Controller_DeleteVolumeGroup_FullMethodName = "/volumegroup.Controller/DeleteVolumeGroup" + Controller_ListVolumeGroups_FullMethodName = "/volumegroup.Controller/ListVolumeGroups" + Controller_ControllerGetVolumeGroup_FullMethodName = "/volumegroup.Controller/ControllerGetVolumeGroup" +) + +// ControllerClient is the client API for Controller service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ControllerClient interface { + // CreateVolumeGroup RPC call to create a volume group. + CreateVolumeGroup(ctx context.Context, in *CreateVolumeGroupRequest, opts ...grpc.CallOption) (*CreateVolumeGroupResponse, error) + // ModifyVolumeGroupMembership RPC call to modify a volume group. + ModifyVolumeGroupMembership(ctx context.Context, in *ModifyVolumeGroupMembershipRequest, opts ...grpc.CallOption) (*ModifyVolumeGroupMembershipResponse, error) + // DeleteVolumeGroup RPC call to delete a volume group. + DeleteVolumeGroup(ctx context.Context, in *DeleteVolumeGroupRequest, opts ...grpc.CallOption) (*DeleteVolumeGroupResponse, error) + // ListVolumeGroups RPC call to list volume groups. + ListVolumeGroups(ctx context.Context, in *ListVolumeGroupsRequest, opts ...grpc.CallOption) (*ListVolumeGroupsResponse, error) + // CreateVolumeGroup RPC call to get a volume group. + ControllerGetVolumeGroup(ctx context.Context, in *ControllerGetVolumeGroupRequest, opts ...grpc.CallOption) (*ControllerGetVolumeGroupResponse, error) +} + +type controllerClient struct { + cc grpc.ClientConnInterface +} + +func NewControllerClient(cc grpc.ClientConnInterface) ControllerClient { + return &controllerClient{cc} +} + +func (c *controllerClient) CreateVolumeGroup(ctx context.Context, in *CreateVolumeGroupRequest, opts ...grpc.CallOption) (*CreateVolumeGroupResponse, error) { + out := new(CreateVolumeGroupResponse) + err := c.cc.Invoke(ctx, Controller_CreateVolumeGroup_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerClient) ModifyVolumeGroupMembership(ctx context.Context, in *ModifyVolumeGroupMembershipRequest, opts ...grpc.CallOption) (*ModifyVolumeGroupMembershipResponse, error) { + out := new(ModifyVolumeGroupMembershipResponse) + err := c.cc.Invoke(ctx, Controller_ModifyVolumeGroupMembership_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerClient) DeleteVolumeGroup(ctx context.Context, in *DeleteVolumeGroupRequest, opts ...grpc.CallOption) (*DeleteVolumeGroupResponse, error) { + out := new(DeleteVolumeGroupResponse) + err := c.cc.Invoke(ctx, Controller_DeleteVolumeGroup_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerClient) ListVolumeGroups(ctx context.Context, in *ListVolumeGroupsRequest, opts ...grpc.CallOption) (*ListVolumeGroupsResponse, error) { + out := new(ListVolumeGroupsResponse) + err := c.cc.Invoke(ctx, Controller_ListVolumeGroups_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerClient) ControllerGetVolumeGroup(ctx context.Context, in *ControllerGetVolumeGroupRequest, opts ...grpc.CallOption) (*ControllerGetVolumeGroupResponse, error) { + out := new(ControllerGetVolumeGroupResponse) + err := c.cc.Invoke(ctx, Controller_ControllerGetVolumeGroup_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ControllerServer is the server API for Controller service. +// All implementations must embed UnimplementedControllerServer +// for forward compatibility +type ControllerServer interface { + // CreateVolumeGroup RPC call to create a volume group. + CreateVolumeGroup(context.Context, *CreateVolumeGroupRequest) (*CreateVolumeGroupResponse, error) + // ModifyVolumeGroupMembership RPC call to modify a volume group. + ModifyVolumeGroupMembership(context.Context, *ModifyVolumeGroupMembershipRequest) (*ModifyVolumeGroupMembershipResponse, error) + // DeleteVolumeGroup RPC call to delete a volume group. + DeleteVolumeGroup(context.Context, *DeleteVolumeGroupRequest) (*DeleteVolumeGroupResponse, error) + // ListVolumeGroups RPC call to list volume groups. + ListVolumeGroups(context.Context, *ListVolumeGroupsRequest) (*ListVolumeGroupsResponse, error) + // CreateVolumeGroup RPC call to get a volume group. + ControllerGetVolumeGroup(context.Context, *ControllerGetVolumeGroupRequest) (*ControllerGetVolumeGroupResponse, error) + mustEmbedUnimplementedControllerServer() +} + +// UnimplementedControllerServer must be embedded to have forward compatible implementations. +type UnimplementedControllerServer struct { +} + +func (UnimplementedControllerServer) CreateVolumeGroup(context.Context, *CreateVolumeGroupRequest) (*CreateVolumeGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateVolumeGroup not implemented") +} +func (UnimplementedControllerServer) ModifyVolumeGroupMembership(context.Context, *ModifyVolumeGroupMembershipRequest) (*ModifyVolumeGroupMembershipResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModifyVolumeGroupMembership not implemented") +} +func (UnimplementedControllerServer) DeleteVolumeGroup(context.Context, *DeleteVolumeGroupRequest) (*DeleteVolumeGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteVolumeGroup not implemented") +} +func (UnimplementedControllerServer) ListVolumeGroups(context.Context, *ListVolumeGroupsRequest) (*ListVolumeGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListVolumeGroups not implemented") +} +func (UnimplementedControllerServer) ControllerGetVolumeGroup(context.Context, *ControllerGetVolumeGroupRequest) (*ControllerGetVolumeGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ControllerGetVolumeGroup not implemented") +} +func (UnimplementedControllerServer) mustEmbedUnimplementedControllerServer() {} + +// UnsafeControllerServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ControllerServer will +// result in compilation errors. +type UnsafeControllerServer interface { + mustEmbedUnimplementedControllerServer() +} + +func RegisterControllerServer(s grpc.ServiceRegistrar, srv ControllerServer) { + s.RegisterService(&Controller_ServiceDesc, srv) +} + +func _Controller_CreateVolumeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateVolumeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServer).CreateVolumeGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Controller_CreateVolumeGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServer).CreateVolumeGroup(ctx, req.(*CreateVolumeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Controller_ModifyVolumeGroupMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ModifyVolumeGroupMembershipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServer).ModifyVolumeGroupMembership(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Controller_ModifyVolumeGroupMembership_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServer).ModifyVolumeGroupMembership(ctx, req.(*ModifyVolumeGroupMembershipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Controller_DeleteVolumeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteVolumeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServer).DeleteVolumeGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Controller_DeleteVolumeGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServer).DeleteVolumeGroup(ctx, req.(*DeleteVolumeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Controller_ListVolumeGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListVolumeGroupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServer).ListVolumeGroups(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Controller_ListVolumeGroups_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServer).ListVolumeGroups(ctx, req.(*ListVolumeGroupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Controller_ControllerGetVolumeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ControllerGetVolumeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServer).ControllerGetVolumeGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Controller_ControllerGetVolumeGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServer).ControllerGetVolumeGroup(ctx, req.(*ControllerGetVolumeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Controller_ServiceDesc is the grpc.ServiceDesc for Controller service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Controller_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "volumegroup.Controller", + HandlerType: (*ControllerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateVolumeGroup", + Handler: _Controller_CreateVolumeGroup_Handler, + }, + { + MethodName: "ModifyVolumeGroupMembership", + Handler: _Controller_ModifyVolumeGroupMembership_Handler, + }, + { + MethodName: "DeleteVolumeGroup", + Handler: _Controller_DeleteVolumeGroup_Handler, + }, + { + MethodName: "ListVolumeGroups", + Handler: _Controller_ListVolumeGroups_Handler, + }, + { + MethodName: "ControllerGetVolumeGroup", + Handler: _Controller_ControllerGetVolumeGroup_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "volumegroup/volumegroup.proto", +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 0aa8f96f6..137bf5fb3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -17,6 +17,7 @@ github.com/csi-addons/spec/lib/go/fence github.com/csi-addons/spec/lib/go/identity github.com/csi-addons/spec/lib/go/reclaimspace github.com/csi-addons/spec/lib/go/replication +github.com/csi-addons/spec/lib/go/volumegroup # github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc ## explicit github.com/davecgh/go-spew/spew