From 83a51e13c97e65d866daf49371791782c8696cd7 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Mon, 19 Jun 2023 18:08:34 +0800 Subject: [PATCH] Add AreAdditionalItemsReady method for RIA v2. Signed-off-by: Xun Jiang --- internal/restore/pvc_action.go | 4 ++++ internal/restore/volumesnapshot_action.go | 4 ++++ internal/restore/volumesnapshotclass_action.go | 4 ++++ internal/restore/volumesnapshotcontent_action.go | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/internal/restore/pvc_action.go b/internal/restore/pvc_action.go index 3d92912c..a8a7c44a 100644 --- a/internal/restore/pvc_action.go +++ b/internal/restore/pvc_action.go @@ -197,6 +197,10 @@ func (p *PVCRestoreItemAction) Cancel(operationID string, restore *velerov1api.R return nil } +func (p *PVCRestoreItemAction) AreAdditionalItemsReady(additionalItems []velero.ResourceIdentifier, restore *velerov1api.Restore) (bool, error) { + return true, nil +} + func getDataUploadResult(ctx context.Context, restore *velerov1api.Restore, pvc *corev1api.PersistentVolumeClaim, kubeClient kubernetes.Interface) (*velerov2alpha1.DataUploadResult, error) { cmList, err := kubeClient.CoreV1().ConfigMaps(restore.Namespace).List(ctx, metav1.ListOptions{ diff --git a/internal/restore/volumesnapshot_action.go b/internal/restore/volumesnapshot_action.go index 4f710f91..3c0adedc 100644 --- a/internal/restore/volumesnapshot_action.go +++ b/internal/restore/volumesnapshot_action.go @@ -170,3 +170,7 @@ func (p *VolumeSnapshotRestoreItemAction) Progress(operationID string, restore * func (p *VolumeSnapshotRestoreItemAction) Cancel(operationID string, restore *velerov1api.Restore) error { return nil } + +func (p *VolumeSnapshotRestoreItemAction) AreAdditionalItemsReady(additionalItems []velero.ResourceIdentifier, restore *velerov1api.Restore) (bool, error) { + return true, nil +} diff --git a/internal/restore/volumesnapshotclass_action.go b/internal/restore/volumesnapshotclass_action.go index cfc43b67..37a270e9 100644 --- a/internal/restore/volumesnapshotclass_action.go +++ b/internal/restore/volumesnapshotclass_action.go @@ -91,3 +91,7 @@ func (p *VolumeSnapshotClassRestoreItemAction) Progress(operationID string, rest func (p *VolumeSnapshotClassRestoreItemAction) Cancel(operationID string, restore *velerov1api.Restore) error { return nil } + +func (p *VolumeSnapshotClassRestoreItemAction) AreAdditionalItemsReady(additionalItems []velero.ResourceIdentifier, restore *velerov1api.Restore) (bool, error) { + return true, nil +} diff --git a/internal/restore/volumesnapshotcontent_action.go b/internal/restore/volumesnapshotcontent_action.go index a57d68f7..16453316 100644 --- a/internal/restore/volumesnapshotcontent_action.go +++ b/internal/restore/volumesnapshotcontent_action.go @@ -92,3 +92,7 @@ func (p *VolumeSnapshotContentRestoreItemAction) Progress(operationID string, re func (p *VolumeSnapshotContentRestoreItemAction) Cancel(operationID string, restore *velerov1api.Restore) error { return nil } + +func (p *VolumeSnapshotContentRestoreItemAction) AreAdditionalItemsReady(additionalItems []velero.ResourceIdentifier, restore *velerov1api.Restore) (bool, error) { + return true, nil +}