Rename CSI variables to be more descriptive

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
Nolan Brubaker
2020-04-20 13:49:18 -04:00
parent b567859655
commit eefd12b3e4
3 changed files with 19 additions and 19 deletions
+6 -6
View File
@@ -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 {
+1 -1
View File
@@ -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))
}