mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: add unset volume/snapshot metadata utility functions
Added GetVolumeMetadataKeys() GetSnaoshotMetadataKeys() unsetVolumeMetadata() and unsetSnapshotMetadata() functions. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
1fd5277b3c
commit
bac33262ae
@ -69,6 +69,15 @@ func GetVolumeMetadata(parameters map[string]string) map[string]string {
|
||||
return newParam
|
||||
}
|
||||
|
||||
// GetVolumeMetadataKeys return volume metadata keys.
|
||||
func GetVolumeMetadataKeys() []string {
|
||||
return []string{
|
||||
pvcNameKey,
|
||||
pvcNamespaceKey,
|
||||
pvNameKey,
|
||||
}
|
||||
}
|
||||
|
||||
// PrepareVolumeMetadata return PV/PVC/PVCNamespace metadata based on inputs.
|
||||
func PrepareVolumeMetadata(pvcName, pvcNamespace, pvName string) map[string]string {
|
||||
newParam := map[string]string{}
|
||||
@ -100,3 +109,12 @@ func GetSnapshotMetadata(parameters map[string]string) map[string]string {
|
||||
|
||||
return newParam
|
||||
}
|
||||
|
||||
// GetSnapshotMetadataKeys return snapshot metadata keys.
|
||||
func GetSnapshotMetadataKeys() []string {
|
||||
return []string{
|
||||
volSnapNameKey,
|
||||
volSnapNamespaceKey,
|
||||
volSnapContentNameKey,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user