Skip to content

Commit abb9103

Browse files
fix: address PR review comments for OADP toolset
- Remove unused pkg/oadp/ files (nonadmin, vmrestore, cloudstorage, downloadrequest, podvolume, serverstatus, deletebackuprequest) - Rename 'logs' action to 'status' for backup/restore tools (returns status info, not actual logs) - Use api.OptionalString helper instead of manual param parsing - Fix parseLabelSelector to return error on non-equality selectors - Update comment: 8 tools instead of 10 - Update tests to expect 'status' action
1 parent fc6175f commit abb9103

26 files changed

+68
-1722
lines changed

pkg/oadp/backup.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ func GetBackupPhase(backup *unstructured.Unstructured) (string, bool, error) {
5656
return unstructured.NestedString(backup.Object, "status", "phase")
5757
}
5858

59-
// GetBackupLogs retrieves backup logs
60-
// Note: In a real implementation, this would create a DownloadRequest and fetch logs from object storage
61-
// For now, we return the backup's status information as a simplified version
62-
func GetBackupLogs(ctx context.Context, client dynamic.Interface, namespace, name string) (string, error) {
59+
// GetBackupStatus retrieves detailed backup status information including phase, errors, warnings, and timestamps
60+
func GetBackupStatus(ctx context.Context, client dynamic.Interface, namespace, name string) (string, error) {
6361
backup, err := GetBackup(ctx, client, namespace, name)
6462
if err != nil {
6563
return "", fmt.Errorf("failed to get backup: %w", err)

pkg/oadp/cloudstorage.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

pkg/oadp/cloudstorage_test.go

Lines changed: 0 additions & 137 deletions
This file was deleted.

pkg/oadp/deletebackuprequest.go

Lines changed: 0 additions & 19 deletions
This file was deleted.

pkg/oadp/deletebackuprequest_test.go

Lines changed: 0 additions & 82 deletions
This file was deleted.

pkg/oadp/downloadrequest.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)