mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-04-11 18:13:00 +00:00
cleanup: move Destroy() method to journalledObject interface
VolumeGroup interface has more than 10 methods and it causes
golangci-lint to fail. Moving the `Destroy()` method to a base
interface journalledObject.
Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit add4b36900
)
# Conflicts:
# internal/rbd/types/volume.go
This commit is contained in:
parent
4442465fcf
commit
67f966dff7
@ -37,15 +37,15 @@ type journalledObject interface {
|
||||
|
||||
// GetClusterID returns the ID of the cluster of the object.
|
||||
GetClusterID(ctx context.Context) (string, error)
|
||||
|
||||
// Destroy frees the resources used by the object.
|
||||
Destroy(ctx context.Context)
|
||||
}
|
||||
|
||||
// VolumeGroup contains a number of volumes.
|
||||
type VolumeGroup interface {
|
||||
journalledObject
|
||||
|
||||
// Destroy frees the resources used by the VolumeGroup.
|
||||
Destroy(ctx context.Context)
|
||||
|
||||
// GetIOContext returns the IOContext for performing librbd operations
|
||||
// on the VolumeGroup. This is used by the rbdVolume struct when it
|
||||
// needs to add/remove itself from the VolumeGroup.
|
||||
|
@ -28,9 +28,6 @@ import (
|
||||
type Snapshot interface {
|
||||
journalledObject
|
||||
|
||||
// Destroy frees the resources used by the Snapshot.
|
||||
Destroy(ctx context.Context)
|
||||
|
||||
// Delete removes the snapshot from the storage backend.
|
||||
Delete(ctx context.Context) error
|
||||
|
||||
|
@ -28,8 +28,13 @@ import (
|
||||
//nolint:interfacebloat // more than 10 methods are needed for the interface
|
||||
type Volume interface {
|
||||
journalledObject
|
||||
<<<<<<< HEAD
|
||||
// Destroy frees the resources used by the Volume.
|
||||
Destroy(ctx context.Context)
|
||||
=======
|
||||
snapshottableVolume
|
||||
csiAddonsVolume
|
||||
>>>>>>> add4b369 (cleanup: move Destroy() method to journalledObject interface)
|
||||
|
||||
// Delete removes the volume from the storage backend.
|
||||
Delete(ctx context.Context) error
|
||||
|
@ -29,9 +29,6 @@ import (
|
||||
type VolumeGroupSnapshot interface {
|
||||
journalledObject
|
||||
|
||||
// Destroy frees the resources used by the VolumeGroupSnapshot.
|
||||
Destroy(ctx context.Context)
|
||||
|
||||
// Delete removes the VolumeGroupSnapshot from the storage backend.
|
||||
Delete(ctx context.Context) error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user