cephfs: add set/Remove subvolume snapshot metadata utility functions

Add utility functions to set/Remove
snapshot-name/snapshot-namespace/snapshotcontent-name metadata on
subvolume snapshots.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever
2022-06-07 13:25:30 +05:30
committed by mergify[bot]
parent 76ddf8e306
commit 8c0dd482fa
2 changed files with 79 additions and 0 deletions

View File

@ -51,6 +51,12 @@ type SnapshotClient interface {
UnprotectSnapshot(ctx context.Context) error
// CloneSnapshot clones the snapshot of the subvolume.
CloneSnapshot(ctx context.Context, cloneVolOptions *SubVolume) error
// SetAllSnapshotMetadata set all the metadata from arg parameters on
// subvolume snapshot.
SetAllSnapshotMetadata(parameters map[string]string) error
// UnsetAllSnapshotMetadata unset all the metadata from arg keys on
// subvolume snapshot.
UnsetAllSnapshotMetadata(keys []string) error
}
// snapshotClient is the implementation of SnapshotClient interface.