mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 22:44:21 +00:00
Rename CSI variables to be more descriptive
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
@@ -43,7 +43,7 @@ type BackupInfo struct {
|
||||
VolumeSnapshots,
|
||||
BackupResourceList,
|
||||
CSIVolumeSnapshots,
|
||||
VolumeSnapshotContents io.Reader
|
||||
CSIVolumeSnapshotContents io.Reader
|
||||
}
|
||||
|
||||
// BackupStore defines operations for creating, retrieving, and deleting
|
||||
@@ -221,11 +221,11 @@ func (s *objectBackupStore) PutBackup(info BackupInfo) error {
|
||||
// Since the logic for all of these files is the exact same except for the name and the contents,
|
||||
// use a map literal to iterate through them and write them to the bucket.
|
||||
var backupObjs = map[string]io.Reader{
|
||||
s.layout.getPodVolumeBackupsKey(info.Name): info.PodVolumeBackups,
|
||||
s.layout.getBackupVolumeSnapshotsKey(info.Name): info.VolumeSnapshots,
|
||||
s.layout.getBackupResourceListKey(info.Name): info.BackupResourceList,
|
||||
s.layout.getCSIVolumeSnapshotKey(info.Name): info.CSIVolumeSnapshots,
|
||||
s.layout.getVolumeSnapshotContentsKey(info.Name): info.VolumeSnapshotContents,
|
||||
s.layout.getPodVolumeBackupsKey(info.Name): info.PodVolumeBackups,
|
||||
s.layout.getBackupVolumeSnapshotsKey(info.Name): info.VolumeSnapshots,
|
||||
s.layout.getBackupResourceListKey(info.Name): info.BackupResourceList,
|
||||
s.layout.getCSIVolumeSnapshotKey(info.Name): info.CSIVolumeSnapshots,
|
||||
s.layout.getCSIVolumeSnapshotContentsKey(info.Name): info.CSIVolumeSnapshotContents,
|
||||
}
|
||||
|
||||
for key, reader := range backupObjs {
|
||||
|
||||
@@ -104,6 +104,6 @@ func (l *ObjectStoreLayout) getCSIVolumeSnapshotKey(backup string) string {
|
||||
return path.Join(l.subdirs["backups"], backup, fmt.Sprintf("%s-csi-volumesnapshots.json.gz", backup))
|
||||
}
|
||||
|
||||
func (l *ObjectStoreLayout) getVolumeSnapshotContentsKey(backup string) string {
|
||||
func (l *ObjectStoreLayout) getCSIVolumeSnapshotContentsKey(backup string) string {
|
||||
return path.Join(l.subdirs["backups"], backup, fmt.Sprintf("%s-csi-volumesnapshotcontents.json.gz", backup))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user