Merge pull request #338 from red-hat-storage/sync_us--devel

Syncing latest changes from upstream devel for ceph-csi
This commit is contained in:
openshift-merge-bot[bot] 2024-07-12 13:32:42 +00:00 committed by GitHub
commit 748ffd433c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 2241 additions and 141 deletions

2
go.mod
View File

@ -9,7 +9,7 @@ require (
github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000 github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000
github.com/ceph/go-ceph v0.28.0 github.com/ceph/go-ceph v0.28.0
github.com/container-storage-interface/spec v1.10.0 github.com/container-storage-interface/spec v1.10.0
github.com/csi-addons/spec v0.2.1-0.20240619103729-12c61f25a2a5 github.com/csi-addons/spec v0.2.1-0.20240627093359-0dd74d521e67
github.com/gemalto/kmip-go v0.0.10 github.com/gemalto/kmip-go v0.0.10
github.com/golang/protobuf v1.5.4 github.com/golang/protobuf v1.5.4
github.com/google/fscrypt v0.3.6-0.20240502174735-068b9f8f5dec github.com/google/fscrypt v0.3.6-0.20240502174735-068b9f8f5dec

4
go.sum
View File

@ -911,8 +911,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/csi-addons/spec v0.2.1-0.20240619103729-12c61f25a2a5 h1:/pXa+X+YKDPRI2JG8WEnxGKk6PcVZRhcLqdPks+bQa8= github.com/csi-addons/spec v0.2.1-0.20240627093359-0dd74d521e67 h1:UAcAhE1pTkWaFBS0kvhHUcUsoEv5fsieD0tl8psQMCs=
github.com/csi-addons/spec v0.2.1-0.20240619103729-12c61f25a2a5/go.mod h1:Mwq4iLiUV4s+K1bszcWU6aMsR5KPsbIYzzszJ6+56vI= github.com/csi-addons/spec v0.2.1-0.20240627093359-0dd74d521e67/go.mod h1:Mwq4iLiUV4s+K1bszcWU6aMsR5KPsbIYzzszJ6+56vI=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=

View File

@ -23,6 +23,8 @@ import (
"os" "os"
"path" "path"
"strings" "strings"
"syscall"
"time"
cerrors "github.com/ceph/ceph-csi/internal/cephfs/errors" cerrors "github.com/ceph/ceph-csi/internal/cephfs/errors"
"github.com/ceph/ceph-csi/internal/cephfs/mounter" "github.com/ceph/ceph-csi/internal/cephfs/mounter"
@ -127,15 +129,72 @@ func maybeUnlockFileEncryption(
stagingTargetPath string, stagingTargetPath string,
volID fsutil.VolumeID, volID fsutil.VolumeID,
) error { ) error {
if volOptions.IsEncrypted() { if !volOptions.IsEncrypted() {
log.DebugLog(ctx, "cephfs: unlocking fscrypt on volume %q path %s", volID, stagingTargetPath) return nil
}
return fscrypt.Unlock(ctx, volOptions.Encryption, stagingTargetPath, string(volID)) // Define Mutex Lock variables
lockName := string(volID) + "-mutexLock"
lockDesc := "Lock for " + string(volID)
lockDuration := 150 * time.Second
// Generate a consistent lock cookie for the client using hostname and process ID
lockCookie := generateLockCookie()
var flags byte = 0
log.DebugLog(ctx, "Creating lock for the following volume ID %s", volID)
ioctx, err := volOptions.GetConnection().GetIoctx(volOptions.MetadataPool)
if err != nil {
log.ErrorLog(ctx, "Failed to create ioctx: %s", err)
return err
}
defer ioctx.Destroy()
res, err := ioctx.LockExclusive(volOptions.VolID, lockName, lockCookie, lockDesc, lockDuration, &flags)
if res != 0 {
switch res {
case -int(syscall.EBUSY):
return fmt.Errorf("Lock is already held by another client and cookie pair for %v volume", volID)
case -int(syscall.EEXIST):
return fmt.Errorf("Lock is already held by the same client and cookie pair for %v volume", volID)
default:
return fmt.Errorf("Failed to lock volume ID %v: %w", volID, err)
}
}
log.DebugLog(ctx, "Lock successfully created for volume ID %s", volID)
log.DebugLog(ctx, "cephfs: unlocking fscrypt on volume %q path %s", volID, stagingTargetPath)
err = fscrypt.Unlock(ctx, volOptions.Encryption, stagingTargetPath, string(volID))
if err != nil {
return err
}
ret, err := ioctx.Unlock(string(volID), lockName, lockCookie)
switch ret {
case 0:
log.DebugLog(ctx, "Lock %s successfully released ", lockName)
case -int(syscall.ENOENT):
log.DebugLog(ctx, "Lock is not held by the specified %s, %s pair", lockCookie, lockName)
default:
log.ErrorLog(ctx, "Failed to release following lock, this will lead to orphan lock %s: %v",
lockName, err)
} }
return nil return nil
} }
// generateLockCookie generates a consistent lock cookie for the client.
func generateLockCookie() string {
hostname, err := os.Hostname()
if err != nil {
hostname = "unknown-host"
}
pid := os.Getpid()
return fmt.Sprintf("%s-%d", hostname, pid)
}
// maybeInitializeFileEncryption initializes KMS and node specifics, if volContext enables encryption. // maybeInitializeFileEncryption initializes KMS and node specifics, if volContext enables encryption.
func maybeInitializeFileEncryption( func maybeInitializeFileEncryption(
ctx context.Context, ctx context.Context,

View File

@ -96,6 +96,24 @@ func (is *IdentityServer) GetCapabilities(
Type: identity.Capability_VolumeReplication_VOLUME_REPLICATION, Type: identity.Capability_VolumeReplication_VOLUME_REPLICATION,
}, },
}, },
}, &identity.Capability{
Type: &identity.Capability_VolumeGroup_{
VolumeGroup: &identity.Capability_VolumeGroup{
Type: identity.Capability_VolumeGroup_VOLUME_GROUP,
},
},
}, &identity.Capability{
Type: &identity.Capability_VolumeGroup_{
VolumeGroup: &identity.Capability_VolumeGroup{
Type: identity.Capability_VolumeGroup_DO_NOT_ALLOW_VG_TO_DELETE_VOLUMES,
},
},
}, &identity.Capability{
Type: &identity.Capability_VolumeGroup_{
VolumeGroup: &identity.Capability_VolumeGroup{
Type: identity.Capability_VolumeGroup_LIMIT_VOLUME_TO_ONE_VOLUME_GROUP,
},
},
}) })
} }

View File

@ -0,0 +1,204 @@
/*
Copyright 2024 The Ceph-CSI 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 rbd
import (
"context"
"fmt"
"github.com/ceph/ceph-csi/internal/rbd"
"github.com/ceph/ceph-csi/internal/rbd/types"
"github.com/ceph/ceph-csi/internal/util/log"
"github.com/csi-addons/spec/lib/go/volumegroup"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
// VolumeGroupServer struct of rbd CSI driver with supported methods of
// VolumeGroup controller server spec.
type VolumeGroupServer struct {
// added UnimplementedControllerServer as a member of ControllerServer.
// if volumegroup spec add more RPC services in the proto file, then we
// don't need to add all RPC methods leading to forward compatibility.
*volumegroup.UnimplementedControllerServer
}
// NewVolumeGroupServer creates a new VolumeGroupServer which handles the
// VolumeGroup Service requests from the CSI-Addons specification.
func NewVolumeGroupServer() *VolumeGroupServer {
return &VolumeGroupServer{}
}
func (vs *VolumeGroupServer) RegisterService(server grpc.ServiceRegistrar) {
volumegroup.RegisterControllerServer(server, vs)
}
// CreateVolumeGroup RPC call to create a volume group.
//
// From the spec:
// This RPC will be called by the CO to create a new volume group on behalf of
// a user. This operation MUST be idempotent. If a volume group corresponding
// to the specified volume group name already exists, is compatible with the
// specified parameters in the CreateVolumeGroupRequest, the Plugin MUST reply
// 0 OK with the corresponding CreateVolumeGroupResponse. CSI Plugins MAY
// create the following types of volume groups:
//
// Create a new empty volume group or a group with specific volumes. Note that
// N volumes with some backend label Y could be considered to be in "group Y"
// which might not be a physical group on the storage backend. In this case, an
// empty group can still be created by the CO to hold volumes. After the empty
// group is created, create a new volume. CO may call
// ModifyVolumeGroupMembership to add new volumes to the group.
//
// Implementation steps:
// 1. resolve all volumes given in the volume_ids list (can be empty)
// 2. create the Volume Group
// 3. add all volumes to the Volume Group
//
// Idempotency should be handled by the rbd.Manager, keeping this function and
// the potential error handling as simple as possible.
func (vs *VolumeGroupServer) CreateVolumeGroup(
ctx context.Context,
req *volumegroup.CreateVolumeGroupRequest,
) (*volumegroup.CreateVolumeGroupResponse, error) {
mgr := rbd.NewManager(req.GetParameters(), req.GetSecrets())
defer mgr.Destroy(ctx)
// resolve all volumes
volumes := make([]types.Volume, len(req.GetVolumeIds()))
for i, id := range req.GetVolumeIds() {
vol, err := mgr.GetVolumeByID(ctx, id)
if err != nil {
return nil, status.Errorf(
codes.InvalidArgument,
"failed to find required volume %q for volume group %q: %s",
id,
req.GetName(),
err.Error())
}
//nolint:gocritic // need to call .Destroy() for all volumes
defer vol.Destroy(ctx)
volumes[i] = vol
}
log.DebugLog(ctx, fmt.Sprintf("all %d Volumes for VolumeGroup %q have been found", len(volumes), req.GetName()))
// create a RBDVolumeGroup
vg, err := mgr.CreateVolumeGroup(ctx, req.GetName())
if err != nil {
return nil, status.Errorf(
codes.Internal,
"failed to create volume group %q: %s",
req.GetName(),
err.Error())
}
log.DebugLog(ctx, fmt.Sprintf("VolumeGroup %q had been created", req.GetName()))
// add each rbd-image to the RBDVolumeGroup
for _, vol := range volumes {
err = vg.AddVolume(ctx, vol)
if err != nil {
return nil, status.Errorf(
codes.Internal,
"failed to add volume %q to volume group %q: %s",
vol,
req.GetName(),
err.Error())
}
}
log.DebugLog(ctx, fmt.Sprintf("all %d Volumes have been added to for VolumeGroup %q", len(volumes), req.GetName()))
return &volumegroup.CreateVolumeGroupResponse{
VolumeGroup: vg.ToCSI(ctx),
}, nil
}
// DeleteVolumeGroup RPC call to delete a volume group.
//
// From the spec:
// This RPC will be called by the CO to delete a volume group on behalf of a
// user. This operation MUST be idempotent.
//
// If a volume group corresponding to the specified volume_group_id does not
// exist or the artifacts associated with the volume group do not exist
// anymore, the Plugin MUST reply 0 OK.
//
// A volume cannot be deleted individually when it is part of the group. It has
// to be removed from the group first. Delete a volume group will delete all
// volumes in the group.
//
// Note:
// The undocumented DO_NOT_ALLOW_VG_TO_DELETE_VOLUMES capability is set. There
// is no need to delete each volume that may be part of the volume group. If
// the volume group is not empty, a FAILED_PRECONDITION error will be returned.
func (vs *VolumeGroupServer) DeleteVolumeGroup(
ctx context.Context,
req *volumegroup.DeleteVolumeGroupRequest,
) (*volumegroup.DeleteVolumeGroupResponse, error) {
mgr := rbd.NewManager(nil, req.GetSecrets())
defer mgr.Destroy(ctx)
// resolve the volume group
vg, err := mgr.GetVolumeGroupByID(ctx, req.GetVolumeGroupId())
if err != nil {
return nil, status.Errorf(
codes.NotFound,
"could not find volume group %q: %s",
req.GetVolumeGroupId(),
err.Error())
}
defer vg.Destroy(ctx)
log.DebugLog(ctx, fmt.Sprintf("VolumeGroup %q has been found", req.GetVolumeGroupId()))
// verify that the volume group is empty
volumes, err := vg.ListVolumes(ctx)
if err != nil {
return nil, status.Errorf(
codes.NotFound,
"could not list volumes for voluem group %q: %s",
req.GetVolumeGroupId(),
err.Error())
}
log.DebugLog(ctx, fmt.Sprintf("VolumeGroup %q contains %d volumes", req.GetVolumeGroupId(), len(volumes)))
if len(volumes) != 0 {
return nil, status.Errorf(
codes.FailedPrecondition,
"rejecting to delete non-empty volume group %q",
req.GetVolumeGroupId())
}
// delete the volume group
err = mgr.DeleteVolumeGroup(ctx, vg)
if err != nil {
return nil, status.Errorf(codes.Internal,
"failed to delete volume group %q: %s",
req.GetVolumeGroupId(),
err.Error())
}
log.DebugLog(ctx, fmt.Sprintf("VolumeGroup %q has been deleted", req.GetVolumeGroupId()))
return &volumegroup.DeleteVolumeGroupResponse{}, nil
}

View File

@ -239,34 +239,48 @@ func (cs *ControllerServer) parseVolCreateRequest(
return rbdVol, nil return rbdVol, nil
} }
func buildCreateVolumeResponse(req *csi.CreateVolumeRequest, rbdVol *rbdVolume) *csi.CreateVolumeResponse { func (rbdVol *rbdVolume) ToCSI(ctx context.Context) *csi.Volume {
volumeContext := util.GetVolumeContext(req.GetParameters()) vol := &csi.Volume{
volumeContext["pool"] = rbdVol.Pool VolumeId: rbdVol.VolID,
volumeContext["journalPool"] = rbdVol.JournalPool CapacityBytes: rbdVol.VolSize,
volumeContext["imageName"] = rbdVol.RbdImageName VolumeContext: map[string]string{
"pool": rbdVol.Pool,
"journalPool": rbdVol.JournalPool,
"imageName": rbdVol.RbdImageName,
},
}
if rbdVol.RadosNamespace != "" { if rbdVol.RadosNamespace != "" {
volumeContext["radosNamespace"] = rbdVol.RadosNamespace vol.VolumeContext["radosNamespace"] = rbdVol.RadosNamespace
} }
if rbdVol.DataPool != "" { if rbdVol.DataPool != "" {
volumeContext["dataPool"] = rbdVol.DataPool vol.VolumeContext["dataPool"] = rbdVol.DataPool
}
volume := &csi.Volume{
VolumeId: rbdVol.VolID,
CapacityBytes: rbdVol.VolSize,
VolumeContext: volumeContext,
ContentSource: req.GetVolumeContentSource(),
} }
if rbdVol.Topology != nil { if rbdVol.Topology != nil {
volume.AccessibleTopology = []*csi.Topology{ vol.AccessibleTopology = []*csi.Topology{
{ {
Segments: rbdVol.Topology, Segments: rbdVol.Topology,
}, },
} }
} }
return vol
}
func buildCreateVolumeResponse(
ctx context.Context,
req *csi.CreateVolumeRequest,
rbdVol *rbdVolume,
) *csi.CreateVolumeResponse {
volume := rbdVol.ToCSI(ctx)
volume.ContentSource = req.GetVolumeContentSource()
for param, value := range util.GetVolumeContext(req.GetParameters()) {
volume.VolumeContext[param] = value
}
return &csi.CreateVolumeResponse{Volume: volume} return &csi.CreateVolumeResponse{Volume: volume}
} }
@ -410,7 +424,7 @@ func (cs *ControllerServer) CreateVolume(
return nil, status.Error(codes.Internal, err.Error()) return nil, status.Error(codes.Internal, err.Error())
} }
return buildCreateVolumeResponse(req, rbdVol), nil return buildCreateVolumeResponse(ctx, req, rbdVol), nil
} }
// flattenParentImage is to be called before proceeding with creating volume, // flattenParentImage is to be called before proceeding with creating volume,
@ -545,7 +559,7 @@ func (cs *ControllerServer) repairExistingVolume(ctx context.Context, req *csi.C
return nil, err return nil, err
} }
return buildCreateVolumeResponse(req, rbdVol), nil return buildCreateVolumeResponse(ctx, req, rbdVol), nil
} }
// check snapshots on the rbd image, as we have limit from krbd that an image // check snapshots on the rbd image, as we have limit from krbd that an image

View File

@ -221,6 +221,9 @@ func (r *Driver) setupCSIAddonsServer(conf *util.Config) error {
rcs := casrbd.NewReplicationServer(NewControllerServer(r.cd)) rcs := casrbd.NewReplicationServer(NewControllerServer(r.cd))
r.cas.RegisterService(rcs) r.cas.RegisterService(rcs)
vgcs := casrbd.NewVolumeGroupServer()
r.cas.RegisterService(vgcs)
} }
if conf.IsNodeServer { if conf.IsNodeServer {

89
internal/rbd/manager.go Normal file
View File

@ -0,0 +1,89 @@
/*
Copyright 2024 The Ceph-CSI 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 rbd
import (
"context"
"errors"
"github.com/ceph/ceph-csi/internal/rbd/types"
"github.com/ceph/ceph-csi/internal/util"
)
var _ types.Manager = &rbdManager{}
type rbdManager struct {
parameters map[string]string
secrets map[string]string
creds *util.Credentials
}
// NewManager returns a new manager for handling Volume and Volume Group
// operations, combining the requests for RBD and the journalling in RADOS.
func NewManager(parameters, secrets map[string]string) types.Manager {
return &rbdManager{
parameters: parameters,
secrets: secrets,
}
}
func (mgr *rbdManager) Destroy(ctx context.Context) {
if mgr.creds != nil {
mgr.creds.DeleteCredentials()
mgr.creds = nil
}
}
// connect sets up credentials and connects to the journal.
func (mgr *rbdManager) connect() error {
if mgr.creds == nil {
creds, err := util.NewUserCredentials(mgr.secrets)
if err != nil {
return err
}
mgr.creds = creds
}
return nil
}
func (mgr *rbdManager) GetVolumeByID(ctx context.Context, id string) (types.Volume, error) {
if err := mgr.connect(); err != nil {
return nil, err
}
volume, err := GenVolFromVolID(ctx, id, mgr.creds, mgr.secrets)
if err != nil {
return nil, err
}
return volume, nil
}
func (mgr *rbdManager) GetVolumeGroupByID(ctx context.Context, id string) (types.VolumeGroup, error) {
return nil, errors.New("rbdManager.GetVolumeGroupByID() is not implemented yet")
}
func (mgr *rbdManager) CreateVolumeGroup(ctx context.Context, name string) (types.VolumeGroup, error) {
return nil, errors.New("rbdManager.CreateVolumeGroup() is not implemented yet")
}
func (mgr *rbdManager) DeleteVolumeGroup(ctx context.Context, vg types.VolumeGroup) error {
return errors.New("rbdManager.CreateVolumeGroup() is not implemented yet")
}

View File

@ -28,7 +28,7 @@ import (
"strings" "strings"
"time" "time"
types "github.com/ceph/ceph-csi/internal/rbd_types" "github.com/ceph/ceph-csi/internal/rbd/types"
"github.com/ceph/ceph-csi/internal/util" "github.com/ceph/ceph-csi/internal/util"
"github.com/ceph/ceph-csi/internal/util/log" "github.com/ceph/ceph-csi/internal/util/log"

View File

@ -0,0 +1,48 @@
/*
Copyright 2024 The Ceph-CSI 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 types
import (
"context"
"github.com/csi-addons/spec/lib/go/volumegroup"
)
// VolumeGroup contains a number of volumes, and can be used to create a
// VolumeGroupSnapshot.
type VolumeGroup interface {
// Destroy frees the resources used by the VolumeGroup.
Destroy(ctx context.Context)
// GetID returns the CSI-Addons VolumeGroupId of the VolumeGroup.
GetID(ctx context.Context) (string, error)
// ToCSI creates a CSI-Addons type for the VolumeGroup.
ToCSI(ctx context.Context) *volumegroup.VolumeGroup
// Delete removes the VolumeGroup from the backend storage.
Delete(ctx context.Context) error
// AddVolume adds the Volume to the VolumeGroup.
AddVolume(ctx context.Context, volume Volume) error
// RemoveVolume removes the Volume from the VolumeGroup.
RemoveVolume(ctx context.Context, volume Volume) error
// ListVolumes returns a slice with all Volumes in the VolumeGroup.
ListVolumes(ctx context.Context) ([]Volume, error)
}

View File

@ -0,0 +1,44 @@
/*
Copyright 2024 The Ceph-CSI 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 types
import (
"context"
)
// Manager provides a way for other packages to get Volumes and VolumeGroups.
// It handles the operations on the backend, and makes sure the journal
// reflects the expected state.
type Manager interface {
// Destroy frees all resources that the Manager allocated.
Destroy(ctx context.Context)
// GetVolumeByID uses the CSI VolumeId to resolve the returned Volume.
GetVolumeByID(ctx context.Context, id string) (Volume, error)
// GetVolumeGroupByID uses the CSI-Addons VolumeGroupId to resolve the
// returned VolumeGroup.
GetVolumeGroupByID(ctx context.Context, id string) (VolumeGroup, error)
// CreateVolumeGroup allocates a new VolumeGroup in the backend storage
// and records details about it in the journal.
CreateVolumeGroup(ctx context.Context, name string) (VolumeGroup, error)
// DeleteVolumeGroup removes VolumeGroup from the backend storage and
// any details from the journal.
DeleteVolumeGroup(ctx context.Context, vg VolumeGroup) error
}

View File

@ -14,17 +14,24 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package rbd_types package types
import ( import (
"context" "context"
"github.com/container-storage-interface/spec/lib/go/csi"
) )
type Volume interface { type Volume interface {
// Destroy frees the resources used by the Volume. // Destroy frees the resources used by the Volume.
Destroy(ctx context.Context) Destroy(ctx context.Context)
// Delete removes the volume from the storage backend.
Delete(ctx context.Context) error Delete(ctx context.Context) error
// GetID returns the CSI VolumeID for the volume.
GetID(ctx context.Context) (string, error) GetID(ctx context.Context) (string, error)
// ToCSI creates a CSI protocol formatted struct of the volume.
ToCSI(ctx context.Context) *csi.Volume
} }

View File

@ -345,6 +345,61 @@ func (Capability_VolumeGroup_Type) EnumDescriptor() ([]byte, []int) {
return file_identity_identity_proto_rawDescGZIP(), []int{4, 4, 0} return file_identity_identity_proto_rawDescGZIP(), []int{4, 4, 0}
} }
// Type describes a CSI Encryption Service that CSI driver can support.
type Capability_EncryptionKeyRotation_Type int32
const (
// UNKNOWN indicates that the CSI driver does not support the
// EncryptionKeyRotation operation in the current mode.
// The CSI-Addons CO plugin will most likely ignore this node
// for the EncryptionKeyRotation operation.
Capability_EncryptionKeyRotation_UNKNOWN Capability_EncryptionKeyRotation_Type = 0
// ENCRYPTIONKEYROTATION indicates that the CSI driver provides
// RPCs for an EncryptionKeyRotation operation.
// The presence of this capability determines whether the CSI-Addons CO
// plugin can invoke RPCs for rotating the encryption key.
Capability_EncryptionKeyRotation_ENCRYPTIONKEYROTATION Capability_EncryptionKeyRotation_Type = 1
)
// Enum value maps for Capability_EncryptionKeyRotation_Type.
var (
Capability_EncryptionKeyRotation_Type_name = map[int32]string{
0: "UNKNOWN",
1: "ENCRYPTIONKEYROTATION",
}
Capability_EncryptionKeyRotation_Type_value = map[string]int32{
"UNKNOWN": 0,
"ENCRYPTIONKEYROTATION": 1,
}
)
func (x Capability_EncryptionKeyRotation_Type) Enum() *Capability_EncryptionKeyRotation_Type {
p := new(Capability_EncryptionKeyRotation_Type)
*p = x
return p
}
func (x Capability_EncryptionKeyRotation_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Capability_EncryptionKeyRotation_Type) Descriptor() protoreflect.EnumDescriptor {
return file_identity_identity_proto_enumTypes[5].Descriptor()
}
func (Capability_EncryptionKeyRotation_Type) Type() protoreflect.EnumType {
return &file_identity_identity_proto_enumTypes[5]
}
func (x Capability_EncryptionKeyRotation_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Capability_EncryptionKeyRotation_Type.Descriptor instead.
func (Capability_EncryptionKeyRotation_Type) EnumDescriptor() ([]byte, []int) {
return file_identity_identity_proto_rawDescGZIP(), []int{4, 5, 0}
}
// GetIdentityRequest is sent by the CSI-Addons CO plugin to obtain the // GetIdentityRequest is sent by the CSI-Addons CO plugin to obtain the
// drivername, version and optional details from the CSI-driver. // drivername, version and optional details from the CSI-driver.
type GetIdentityRequest struct { type GetIdentityRequest struct {
@ -561,6 +616,7 @@ type Capability struct {
// *Capability_NetworkFence_ // *Capability_NetworkFence_
// *Capability_VolumeReplication_ // *Capability_VolumeReplication_
// *Capability_VolumeGroup_ // *Capability_VolumeGroup_
// *Capability_EncryptionKeyRotation_
Type isCapability_Type `protobuf_oneof:"type"` Type isCapability_Type `protobuf_oneof:"type"`
} }
@ -638,6 +694,13 @@ func (x *Capability) GetVolumeGroup() *Capability_VolumeGroup {
return nil return nil
} }
func (x *Capability) GetEncryptionKeyRotation() *Capability_EncryptionKeyRotation {
if x, ok := x.GetType().(*Capability_EncryptionKeyRotation_); ok {
return x.EncryptionKeyRotation
}
return nil
}
type isCapability_Type interface { type isCapability_Type interface {
isCapability_Type() isCapability_Type()
} }
@ -667,6 +730,11 @@ type Capability_VolumeGroup_ struct {
VolumeGroup *Capability_VolumeGroup `protobuf:"bytes,5,opt,name=volume_group,json=volumeGroup,proto3,oneof"` VolumeGroup *Capability_VolumeGroup `protobuf:"bytes,5,opt,name=volume_group,json=volumeGroup,proto3,oneof"`
} }
type Capability_EncryptionKeyRotation_ struct {
// EncryptionKeyRotation operation capabilities.
EncryptionKeyRotation *Capability_EncryptionKeyRotation `protobuf:"bytes,6,opt,name=encryption_key_rotation,json=encryptionKeyRotation,proto3,oneof"`
}
func (*Capability_Service_) isCapability_Type() {} func (*Capability_Service_) isCapability_Type() {}
func (*Capability_ReclaimSpace_) isCapability_Type() {} func (*Capability_ReclaimSpace_) isCapability_Type() {}
@ -677,6 +745,8 @@ func (*Capability_VolumeReplication_) isCapability_Type() {}
func (*Capability_VolumeGroup_) isCapability_Type() {} func (*Capability_VolumeGroup_) isCapability_Type() {}
func (*Capability_EncryptionKeyRotation_) isCapability_Type() {}
// ProbeRequest is sent to the CSI-driver to confirm that it can respond to // ProbeRequest is sent to the CSI-driver to confirm that it can respond to
// requests from the CSI-Addons CO plugin. // requests from the CSI-Addons CO plugin.
type ProbeRequest struct { type ProbeRequest struct {
@ -1034,6 +1104,56 @@ func (x *Capability_VolumeGroup) GetType() Capability_VolumeGroup_Type {
return Capability_VolumeGroup_UNKNOWN return Capability_VolumeGroup_UNKNOWN
} }
// EncryptionKeyRotation contains the features of the EncryptionKeyRotation
// operation that the CSI driver supports.
type Capability_EncryptionKeyRotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// type contains the Type of CSI Service that the CSI driver supports.
Type Capability_EncryptionKeyRotation_Type `protobuf:"varint,1,opt,name=type,proto3,enum=identity.Capability_EncryptionKeyRotation_Type" json:"type,omitempty"`
}
func (x *Capability_EncryptionKeyRotation) Reset() {
*x = Capability_EncryptionKeyRotation{}
if protoimpl.UnsafeEnabled {
mi := &file_identity_identity_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Capability_EncryptionKeyRotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Capability_EncryptionKeyRotation) ProtoMessage() {}
func (x *Capability_EncryptionKeyRotation) ProtoReflect() protoreflect.Message {
mi := &file_identity_identity_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Capability_EncryptionKeyRotation.ProtoReflect.Descriptor instead.
func (*Capability_EncryptionKeyRotation) Descriptor() ([]byte, []int) {
return file_identity_identity_proto_rawDescGZIP(), []int{4, 5}
}
func (x *Capability_EncryptionKeyRotation) GetType() Capability_EncryptionKeyRotation_Type {
if x != nil {
return x.Type
}
return Capability_EncryptionKeyRotation_UNKNOWN
}
var File_identity_identity_proto protoreflect.FileDescriptor var File_identity_identity_proto protoreflect.FileDescriptor
var file_identity_identity_proto_rawDesc = []byte{ var file_identity_identity_proto_rawDesc = []byte{
@ -1063,7 +1183,7 @@ var file_identity_identity_proto_rawDesc = []byte{
0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65,
0x73, 0x22, 0xfc, 0x08, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x73, 0x22, 0xf1, 0x0a, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48,
@ -1086,77 +1206,92 @@ var file_identity_identity_proto_rawDesc = []byte{
0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e,
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x69, 0x74, 0x79, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48,
0x00, 0x52, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x7f, 0x00, 0x52, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64,
0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x0a, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x53, 0x65, 0x2a, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x22, 0x3d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x65,
0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61,
0x4c, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x7f, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x0c, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x02, 0x1a, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e,
0x78, 0x0a, 0x0c, 0x52, 0x65, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b,
0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x43,
0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x4c, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43,
0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56,
0x49, 0x43, 0x45, 0x10, 0x02, 0x1a, 0x78, 0x0a, 0x0c, 0x52, 0x65, 0x63, 0x6c, 0x61, 0x69, 0x6d,
0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43,
0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x63, 0x6c, 0x61, 0x69,
0x6d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b,
0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e,
0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x02, 0x1a,
0x72, 0x0a, 0x0c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x65, 0x6e, 0x63, 0x65, 0x12,
0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e,
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x69, 0x74, 0x79, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x65, 0x6e, 0x63, 0x65,
0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x54, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x26, 0x0a, 0x04, 0x54,
0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00,
0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x46, 0x45, 0x4e, 0x43,
0x06, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x02, 0x1a, 0x72, 0x0a, 0x0c, 0x4e, 0x65, 0x74, 0x45, 0x10, 0x01, 0x1a, 0x81, 0x01, 0x0a, 0x11, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65,
0x77, 0x6f, 0x72, 0x6b, 0x46, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x4e, 0x65, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x56, 0x6f,
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x26, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x54, 0x79,
0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x45, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12,
0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x46, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x1a, 0x81, 0x01, 0x16, 0x0a, 0x12, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43,
0x0a, 0x11, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x1a, 0x84, 0x02, 0x0a, 0x0b, 0x56, 0x6f, 0x6c, 0x75,
0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x0e, 0x32, 0x2b, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x56, 0x6f, 0x6c, 0x75,
0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x74, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x70, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x4f, 0x4c, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x56, 0x4f, 0x4c, 0x55,
0x55, 0x4d, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x24, 0x0a, 0x20, 0x4c, 0x49,
0x01, 0x1a, 0x84, 0x02, 0x0a, 0x0b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x4d, 0x49, 0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x4f, 0x4e,
0x70, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x02,
0x25, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x4f, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57,
0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x5f, 0x56, 0x47, 0x5f, 0x54, 0x4f, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x56, 0x4f,
0x70, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x4c, 0x55, 0x4d, 0x45, 0x53, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x4f, 0x44, 0x49, 0x46,
0x59, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x04,
0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x47,
0x52, 0x4f, 0x55, 0x50, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x56,
0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x53, 0x10, 0x06, 0x1a, 0x8c,
0x01, 0x0a, 0x15, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79,
0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
0x79, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x45, 0x6e, 0x63,
0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2e, 0x0a,
0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e,
0x55, 0x50, 0x10, 0x01, 0x12, 0x24, 0x0a, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x56, 0x4f, 0x4b, 0x45, 0x59, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x42, 0x06, 0x0a,
0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x4f, 0x4e, 0x45, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65,
0x4d, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x4f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x41, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65,
0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x56, 0x47, 0x5f, 0x54, 0x4f, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18,
0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x53, 0x10, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x03, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75,
0x4d, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x65, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x32, 0xee, 0x01, 0x0a, 0x08, 0x49, 0x64, 0x65,
0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x05, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x4c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e,
0x12, 0x16, 0x0a, 0x12, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e,
0x47, 0x52, 0x4f, 0x55, 0x50, 0x53, 0x10, 0x06, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x47, 0x65,
0x22, 0x41, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x72, 0x65, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65,
0x61, 0x64, 0x79, 0x32, 0xee, 0x01, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74,
0x12, 0x4c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x69, 0x74, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
0x1c, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a,
0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x16, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17,
0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52,
0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x3b, 0x69,
0x73, 0x12, 0x20, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x47,
0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62,
0x65, 0x12, 0x16, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f,
0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x3b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -1171,54 +1306,58 @@ func file_identity_identity_proto_rawDescGZIP() []byte {
return file_identity_identity_proto_rawDescData return file_identity_identity_proto_rawDescData
} }
var file_identity_identity_proto_enumTypes = make([]protoimpl.EnumInfo, 5) var file_identity_identity_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
var file_identity_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_identity_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_identity_identity_proto_goTypes = []interface{}{ var file_identity_identity_proto_goTypes = []interface{}{
(Capability_Service_Type)(0), // 0: identity.Capability.Service.Type (Capability_Service_Type)(0), // 0: identity.Capability.Service.Type
(Capability_ReclaimSpace_Type)(0), // 1: identity.Capability.ReclaimSpace.Type (Capability_ReclaimSpace_Type)(0), // 1: identity.Capability.ReclaimSpace.Type
(Capability_NetworkFence_Type)(0), // 2: identity.Capability.NetworkFence.Type (Capability_NetworkFence_Type)(0), // 2: identity.Capability.NetworkFence.Type
(Capability_VolumeReplication_Type)(0), // 3: identity.Capability.VolumeReplication.Type (Capability_VolumeReplication_Type)(0), // 3: identity.Capability.VolumeReplication.Type
(Capability_VolumeGroup_Type)(0), // 4: identity.Capability.VolumeGroup.Type (Capability_VolumeGroup_Type)(0), // 4: identity.Capability.VolumeGroup.Type
(*GetIdentityRequest)(nil), // 5: identity.GetIdentityRequest (Capability_EncryptionKeyRotation_Type)(0), // 5: identity.Capability.EncryptionKeyRotation.Type
(*GetIdentityResponse)(nil), // 6: identity.GetIdentityResponse (*GetIdentityRequest)(nil), // 6: identity.GetIdentityRequest
(*GetCapabilitiesRequest)(nil), // 7: identity.GetCapabilitiesRequest (*GetIdentityResponse)(nil), // 7: identity.GetIdentityResponse
(*GetCapabilitiesResponse)(nil), // 8: identity.GetCapabilitiesResponse (*GetCapabilitiesRequest)(nil), // 8: identity.GetCapabilitiesRequest
(*Capability)(nil), // 9: identity.Capability (*GetCapabilitiesResponse)(nil), // 9: identity.GetCapabilitiesResponse
(*ProbeRequest)(nil), // 10: identity.ProbeRequest (*Capability)(nil), // 10: identity.Capability
(*ProbeResponse)(nil), // 11: identity.ProbeResponse (*ProbeRequest)(nil), // 11: identity.ProbeRequest
nil, // 12: identity.GetIdentityResponse.ManifestEntry (*ProbeResponse)(nil), // 12: identity.ProbeResponse
(*Capability_Service)(nil), // 13: identity.Capability.Service nil, // 13: identity.GetIdentityResponse.ManifestEntry
(*Capability_ReclaimSpace)(nil), // 14: identity.Capability.ReclaimSpace (*Capability_Service)(nil), // 14: identity.Capability.Service
(*Capability_NetworkFence)(nil), // 15: identity.Capability.NetworkFence (*Capability_ReclaimSpace)(nil), // 15: identity.Capability.ReclaimSpace
(*Capability_VolumeReplication)(nil), // 16: identity.Capability.VolumeReplication (*Capability_NetworkFence)(nil), // 16: identity.Capability.NetworkFence
(*Capability_VolumeGroup)(nil), // 17: identity.Capability.VolumeGroup (*Capability_VolumeReplication)(nil), // 17: identity.Capability.VolumeReplication
(*wrapperspb.BoolValue)(nil), // 18: google.protobuf.BoolValue (*Capability_VolumeGroup)(nil), // 18: identity.Capability.VolumeGroup
(*Capability_EncryptionKeyRotation)(nil), // 19: identity.Capability.EncryptionKeyRotation
(*wrapperspb.BoolValue)(nil), // 20: google.protobuf.BoolValue
} }
var file_identity_identity_proto_depIdxs = []int32{ var file_identity_identity_proto_depIdxs = []int32{
12, // 0: identity.GetIdentityResponse.manifest:type_name -> identity.GetIdentityResponse.ManifestEntry 13, // 0: identity.GetIdentityResponse.manifest:type_name -> identity.GetIdentityResponse.ManifestEntry
9, // 1: identity.GetCapabilitiesResponse.capabilities:type_name -> identity.Capability 10, // 1: identity.GetCapabilitiesResponse.capabilities:type_name -> identity.Capability
13, // 2: identity.Capability.service:type_name -> identity.Capability.Service 14, // 2: identity.Capability.service:type_name -> identity.Capability.Service
14, // 3: identity.Capability.reclaim_space:type_name -> identity.Capability.ReclaimSpace 15, // 3: identity.Capability.reclaim_space:type_name -> identity.Capability.ReclaimSpace
15, // 4: identity.Capability.network_fence:type_name -> identity.Capability.NetworkFence 16, // 4: identity.Capability.network_fence:type_name -> identity.Capability.NetworkFence
16, // 5: identity.Capability.volume_replication:type_name -> identity.Capability.VolumeReplication 17, // 5: identity.Capability.volume_replication:type_name -> identity.Capability.VolumeReplication
17, // 6: identity.Capability.volume_group:type_name -> identity.Capability.VolumeGroup 18, // 6: identity.Capability.volume_group:type_name -> identity.Capability.VolumeGroup
18, // 7: identity.ProbeResponse.ready:type_name -> google.protobuf.BoolValue 19, // 7: identity.Capability.encryption_key_rotation:type_name -> identity.Capability.EncryptionKeyRotation
0, // 8: identity.Capability.Service.type:type_name -> identity.Capability.Service.Type 20, // 8: identity.ProbeResponse.ready:type_name -> google.protobuf.BoolValue
1, // 9: identity.Capability.ReclaimSpace.type:type_name -> identity.Capability.ReclaimSpace.Type 0, // 9: identity.Capability.Service.type:type_name -> identity.Capability.Service.Type
2, // 10: identity.Capability.NetworkFence.type:type_name -> identity.Capability.NetworkFence.Type 1, // 10: identity.Capability.ReclaimSpace.type:type_name -> identity.Capability.ReclaimSpace.Type
3, // 11: identity.Capability.VolumeReplication.type:type_name -> identity.Capability.VolumeReplication.Type 2, // 11: identity.Capability.NetworkFence.type:type_name -> identity.Capability.NetworkFence.Type
4, // 12: identity.Capability.VolumeGroup.type:type_name -> identity.Capability.VolumeGroup.Type 3, // 12: identity.Capability.VolumeReplication.type:type_name -> identity.Capability.VolumeReplication.Type
5, // 13: identity.Identity.GetIdentity:input_type -> identity.GetIdentityRequest 4, // 13: identity.Capability.VolumeGroup.type:type_name -> identity.Capability.VolumeGroup.Type
7, // 14: identity.Identity.GetCapabilities:input_type -> identity.GetCapabilitiesRequest 5, // 14: identity.Capability.EncryptionKeyRotation.type:type_name -> identity.Capability.EncryptionKeyRotation.Type
10, // 15: identity.Identity.Probe:input_type -> identity.ProbeRequest 6, // 15: identity.Identity.GetIdentity:input_type -> identity.GetIdentityRequest
6, // 16: identity.Identity.GetIdentity:output_type -> identity.GetIdentityResponse 8, // 16: identity.Identity.GetCapabilities:input_type -> identity.GetCapabilitiesRequest
8, // 17: identity.Identity.GetCapabilities:output_type -> identity.GetCapabilitiesResponse 11, // 17: identity.Identity.Probe:input_type -> identity.ProbeRequest
11, // 18: identity.Identity.Probe:output_type -> identity.ProbeResponse 7, // 18: identity.Identity.GetIdentity:output_type -> identity.GetIdentityResponse
16, // [16:19] is the sub-list for method output_type 9, // 19: identity.Identity.GetCapabilities:output_type -> identity.GetCapabilitiesResponse
13, // [13:16] is the sub-list for method input_type 12, // 20: identity.Identity.Probe:output_type -> identity.ProbeResponse
13, // [13:13] is the sub-list for extension type_name 18, // [18:21] is the sub-list for method output_type
13, // [13:13] is the sub-list for extension extendee 15, // [15:18] is the sub-list for method input_type
0, // [0:13] is the sub-list for field type_name 15, // [15:15] is the sub-list for extension type_name
15, // [15:15] is the sub-list for extension extendee
0, // [0:15] is the sub-list for field type_name
} }
func init() { file_identity_identity_proto_init() } func init() { file_identity_identity_proto_init() }
@ -1371,6 +1510,18 @@ func file_identity_identity_proto_init() {
return nil return nil
} }
} }
file_identity_identity_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Capability_EncryptionKeyRotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
file_identity_identity_proto_msgTypes[4].OneofWrappers = []interface{}{ file_identity_identity_proto_msgTypes[4].OneofWrappers = []interface{}{
(*Capability_Service_)(nil), (*Capability_Service_)(nil),
@ -1378,14 +1529,15 @@ func file_identity_identity_proto_init() {
(*Capability_NetworkFence_)(nil), (*Capability_NetworkFence_)(nil),
(*Capability_VolumeReplication_)(nil), (*Capability_VolumeReplication_)(nil),
(*Capability_VolumeGroup_)(nil), (*Capability_VolumeGroup_)(nil),
(*Capability_EncryptionKeyRotation_)(nil),
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_identity_identity_proto_rawDesc, RawDescriptor: file_identity_identity_proto_rawDesc,
NumEnums: 5, NumEnums: 6,
NumMessages: 13, NumMessages: 14,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },

File diff suppressed because it is too large Load Diff

View File

@ -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",
}

3
vendor/modules.txt vendored
View File

@ -236,12 +236,13 @@ github.com/coreos/go-semver/semver
## explicit; go 1.12 ## explicit; go 1.12
github.com/coreos/go-systemd/v22/daemon github.com/coreos/go-systemd/v22/daemon
github.com/coreos/go-systemd/v22/journal github.com/coreos/go-systemd/v22/journal
# github.com/csi-addons/spec v0.2.1-0.20240619103729-12c61f25a2a5 # github.com/csi-addons/spec v0.2.1-0.20240627093359-0dd74d521e67
## explicit ## explicit
github.com/csi-addons/spec/lib/go/fence github.com/csi-addons/spec/lib/go/fence
github.com/csi-addons/spec/lib/go/identity github.com/csi-addons/spec/lib/go/identity
github.com/csi-addons/spec/lib/go/reclaimspace github.com/csi-addons/spec/lib/go/reclaimspace
github.com/csi-addons/spec/lib/go/replication 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 # github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
## explicit ## explicit
github.com/davecgh/go-spew/spew github.com/davecgh/go-spew/spew