mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-22 07:06:08 +00:00
Use VolumeInfo to help restore the PV.
Add VolumeInfo for left PVs during backup. Signed-off-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
@@ -314,6 +314,29 @@ func (_m *BackupStore) GetRestoreItemOperations(name string) ([]*itemoperation.R
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetRestoreItemOperations provides a mock function with given fields: name
|
||||
func (_m *BackupStore) GetBackupVolumeInfos(name string) (*volume.VolumeInfos, error) {
|
||||
ret := _m.Called(name)
|
||||
|
||||
var r0 *volume.VolumeInfos
|
||||
if rf, ok := ret.Get(0).(func(string) *volume.VolumeInfos); ok {
|
||||
r0 = rf(name)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*volume.VolumeInfos)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(name)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// IsValid provides a mock function with given fields:
|
||||
func (_m *BackupStore) IsValid() error {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -73,6 +73,7 @@ type BackupStore interface {
|
||||
GetCSIVolumeSnapshots(name string) ([]*snapshotv1api.VolumeSnapshot, error)
|
||||
GetCSIVolumeSnapshotContents(name string) ([]*snapshotv1api.VolumeSnapshotContent, error)
|
||||
GetCSIVolumeSnapshotClasses(name string) ([]*snapshotv1api.VolumeSnapshotClass, error)
|
||||
GetBackupVolumeInfos(name string) (*volume.VolumeInfos, error)
|
||||
|
||||
// BackupExists checks if the backup metadata file exists in object storage.
|
||||
BackupExists(bucket, backupName string) (bool, error)
|
||||
|
||||
Reference in New Issue
Block a user