Skip to content

Commit fc6175f

Browse files
refactor: consolidate OADP toolset from 90 to 8 tools
Per PR review feedback, refactor OADP tools to use action parameter pattern (like kubevirt) instead of individual tools per operation. Changes: - Consolidate 90 individual tools into 8 action-based tools: - oadp_backup (list, get, create, delete, logs) - oadp_restore (list, get, create, delete, logs) - oadp_schedule (list, get, create, delete, pause, unpause) - oadp_storage_location (list, get for BSL and VSL) - oadp_dpa (list, get) - oadp_repository (list, get) - oadp_data_mover (list, get for uploads/downloads) - oadp_data_protection_test (list, get, create, delete) - Add 8 eval tasks for OADP toolset testing - Update documentation to reflect new tool structure - Fix eval scripts to use explicit Velero API groups (backup.velero.io, restore.velero.io, schedule.velero.io) to avoid conflicts with OpenShift built-in resources All 8/8 evals pass with 24/24 assertions.
1 parent 3e2eb0c commit fc6175f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1567
-5120
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ python/build/
3030
python/dist/
3131
python/kubernetes_mcp_server.egg-info/
3232
!python/kubernetes-mcp-server
33+
.notes/

README.md

Lines changed: 62 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -454,182 +454,71 @@ In case multi-cluster support is enabled (default) and you have access to multip
454454

455455
<details>
456456

457-
<summary>oadp (90 tools)</summary>
457+
<summary>oadp (8 tools)</summary>
458458

459-
**Backup Tools:**
459+
The OADP toolset provides 8 consolidated tools with action-based parameters covering all core OADP/Velero functionality:
460460

461-
- **oadp_backup_list** - List all Velero backups in the specified namespace
461+
- **oadp_backup** - Manage Velero/OADP backups: list, get, create, delete, or retrieve logs
462+
- `action` (`string`) **(required)** - Action: 'list', 'get', 'create', 'delete', 'logs'
462463
- `namespace` (`string`) - Namespace containing backups (default: openshift-adp)
463-
464-
- **oadp_backup_get** - Get detailed information about a specific Velero backup
465-
- `namespace` (`string`) - Namespace of the backup (default: openshift-adp)
466-
- `name` (`string`) **(required)** - Name of the backup
467-
468-
- **oadp_backup_create** - Create a new Velero backup
469-
- `namespace` (`string`) - Namespace where backup will be created (default: openshift-adp)
470-
- `name` (`string`) **(required)** - Name of the backup
471-
- `includedNamespaces` (`array`) - Namespaces to include
472-
- `storageLocation` (`string`) - BackupStorageLocation name
473-
- `ttl` (`string`) - Time to live (e.g., '720h')
474-
475-
- **oadp_backup_delete** - Delete a Velero backup
476-
- `namespace` (`string`) - Namespace of the backup (default: openshift-adp)
477-
- `name` (`string`) **(required)** - Name of the backup
478-
479-
- **oadp_backup_logs** - Get logs and status for a backup
480-
- `namespace` (`string`) - Namespace of the backup (default: openshift-adp)
481-
- `name` (`string`) **(required)** - Name of the backup
482-
483-
**Restore Tools:**
484-
485-
- **oadp_restore_list** - List all Velero restores
486-
- **oadp_restore_get** - Get restore details
487-
- **oadp_restore_create** - Create a restore from backup
488-
- **oadp_restore_delete** - Delete a restore record
489-
- **oadp_restore_logs** - Get restore logs/status
490-
491-
**Schedule Tools:**
492-
493-
- **oadp_schedule_list** - List backup schedules
494-
- **oadp_schedule_get** - Get schedule details
495-
- **oadp_schedule_create** - Create a backup schedule
496-
- **oadp_schedule_update** - Update schedule configuration
497-
- **oadp_schedule_delete** - Delete a schedule
498-
- **oadp_schedule_pause** - Pause/unpause a schedule
499-
500-
**BackupStorageLocation Tools:**
501-
502-
- **oadp_backup_storage_location_list** - List BSLs
503-
- **oadp_backup_storage_location_get** - Get BSL details
504-
- **oadp_backup_storage_location_create** - Create a BSL
505-
- **oadp_backup_storage_location_update** - Update BSL configuration
506-
- **oadp_backup_storage_location_delete** - Delete a BSL
507-
508-
**VolumeSnapshotLocation Tools:**
509-
510-
- **oadp_volume_snapshot_location_list** - List VSLs
511-
- **oadp_volume_snapshot_location_get** - Get VSL details
512-
- **oadp_volume_snapshot_location_create** - Create a VSL
513-
- **oadp_volume_snapshot_location_update** - Update VSL configuration
514-
- **oadp_volume_snapshot_location_delete** - Delete a VSL
515-
516-
**DataProtectionApplication Tools:**
517-
518-
- **oadp_dpa_list** - List DPA instances
519-
- **oadp_dpa_get** - Get DPA configuration/status
520-
- **oadp_dpa_create** - Create a DPA
521-
- **oadp_dpa_update** - Update DPA configuration
522-
- **oadp_dpa_delete** - Delete a DPA
523-
524-
**BackupRepository Tools:**
525-
526-
- **oadp_backup_repository_list** - List backup repositories
527-
- **oadp_backup_repository_get** - Get repository details
528-
- **oadp_backup_repository_delete** - Delete a repository
529-
530-
**DeleteBackupRequest Tools:**
531-
532-
- **oadp_delete_backup_request_list** - List delete requests
533-
- **oadp_delete_backup_request_get** - Get delete request status
534-
535-
**DownloadRequest Tools:**
536-
537-
- **oadp_download_request_list** - List download requests
538-
- **oadp_download_request_get** - Get download request details
539-
- **oadp_download_request_create** - Create a download request
540-
- **oadp_download_request_delete** - Delete a download request
541-
542-
**PodVolumeBackup Tools:**
543-
544-
- **oadp_pod_volume_backup_list** - List pod volume backups
545-
- **oadp_pod_volume_backup_get** - Get pod volume backup details
546-
547-
**PodVolumeRestore Tools:**
548-
549-
- **oadp_pod_volume_restore_list** - List pod volume restores
550-
- **oadp_pod_volume_restore_get** - Get pod volume restore details
551-
552-
**ServerStatusRequest Tools:**
553-
554-
- **oadp_server_status_request_list** - List server status requests
555-
- **oadp_server_status_request_get** - Get server status
556-
- **oadp_server_status_request_create** - Create server status request
557-
- **oadp_server_status_request_delete** - Delete server status request
558-
559-
**DataUpload Tools (v2alpha1):**
560-
561-
- **oadp_data_upload_list** - List data uploads
562-
- **oadp_data_upload_get** - Get data upload details
563-
- **oadp_data_upload_cancel** - Cancel a data upload
564-
565-
**DataDownload Tools (v2alpha1):**
566-
567-
- **oadp_data_download_list** - List data downloads
568-
- **oadp_data_download_get** - Get data download details
569-
- **oadp_data_download_cancel** - Cancel a data download
570-
571-
**CloudStorage Tools:**
572-
573-
- **oadp_cloud_storage_list** - List cloud storage configurations
574-
- **oadp_cloud_storage_get** - Get cloud storage details
575-
- **oadp_cloud_storage_create** - Create cloud storage configuration
576-
- **oadp_cloud_storage_delete** - Delete cloud storage
577-
578-
**DataProtectionTest Tools:**
579-
580-
- **oadp_data_protection_test_list** - List data protection tests
581-
- **oadp_data_protection_test_get** - Get test details
582-
- **oadp_data_protection_test_create** - Create a data protection test
583-
- **oadp_data_protection_test_delete** - Delete a test
584-
585-
**NonAdminBackup Tools:**
586-
587-
- **oadp_non_admin_backup_list** - List non-admin backups
588-
- **oadp_non_admin_backup_get** - Get non-admin backup details
589-
- **oadp_non_admin_backup_create** - Create a non-admin backup
590-
- **oadp_non_admin_backup_delete** - Delete a non-admin backup
591-
592-
**NonAdminRestore Tools:**
593-
594-
- **oadp_non_admin_restore_list** - List non-admin restores
595-
- **oadp_non_admin_restore_get** - Get non-admin restore details
596-
- **oadp_non_admin_restore_create** - Create a non-admin restore
597-
- **oadp_non_admin_restore_delete** - Delete a non-admin restore
598-
599-
**NonAdminBackupStorageLocation Tools:**
600-
601-
- **oadp_non_admin_bsl_list** - List non-admin BSLs
602-
- **oadp_non_admin_bsl_get** - Get non-admin BSL details
603-
- **oadp_non_admin_bsl_create** - Create a non-admin BSL
604-
- **oadp_non_admin_bsl_update** - Update a non-admin BSL
605-
- **oadp_non_admin_bsl_delete** - Delete a non-admin BSL
606-
607-
**NonAdminBackupStorageLocationRequest Tools:**
608-
609-
- **oadp_non_admin_bsl_request_list** - List BSL requests
610-
- **oadp_non_admin_bsl_request_get** - Get BSL request details
611-
- **oadp_non_admin_bsl_request_approve** - Approve/reject a BSL request
612-
613-
**NonAdminDownloadRequest Tools:**
614-
615-
- **oadp_non_admin_download_request_list** - List non-admin download requests
616-
- **oadp_non_admin_download_request_get** - Get download request details
617-
- **oadp_non_admin_download_request_create** - Create a download request
618-
- **oadp_non_admin_download_request_delete** - Delete a download request
619-
620-
**VirtualMachineBackupsDiscovery Tools:**
621-
622-
- **oadp_vm_backup_discovery_list** - List VM backup discoveries
623-
- **oadp_vm_backup_discovery_get** - Get VM backup discovery details
624-
- **oadp_vm_backup_discovery_create** - Create VM backup discovery
625-
- **oadp_vm_backup_discovery_delete** - Delete VM backup discovery
626-
627-
**VirtualMachineFileRestore Tools:**
628-
629-
- **oadp_vm_file_restore_list** - List VM file restores
630-
- **oadp_vm_file_restore_get** - Get VM file restore details
631-
- **oadp_vm_file_restore_create** - Create VM file restore
632-
- **oadp_vm_file_restore_delete** - Delete VM file restore
464+
- `name` (`string`) - Name of the backup (required for get, create, delete, logs)
465+
- `includedNamespaces` (`array`) - Namespaces to include in backup (for create)
466+
- `excludedNamespaces` (`array`) - Namespaces to exclude (for create)
467+
- `storageLocation` (`string`) - BackupStorageLocation name (for create)
468+
- `ttl` (`string`) - Backup TTL duration e.g., '720h' (for create)
469+
470+
- **oadp_restore** - Manage Velero/OADP restore operations: list, get, create, delete, or retrieve logs
471+
- `action` (`string`) **(required)** - Action: 'list', 'get', 'create', 'delete', 'logs'
472+
- `namespace` (`string`) - Namespace containing restores (default: openshift-adp)
473+
- `name` (`string`) - Name of the restore (required for get, create, delete, logs)
474+
- `backupName` (`string`) - Name of the backup to restore from (required for create)
475+
- `includedNamespaces` (`array`) - Namespaces to restore (for create)
476+
- `namespaceMapping` (`object`) - Map source namespaces to target namespaces (for create)
477+
478+
- **oadp_schedule** - Manage Velero/OADP backup schedules: list, get, create, update, delete, or pause/unpause
479+
- `action` (`string`) **(required)** - Action: 'list', 'get', 'create', 'update', 'delete', 'pause'
480+
- `namespace` (`string`) - Namespace containing schedules (default: openshift-adp)
481+
- `name` (`string`) - Name of the schedule (required for get, create, update, delete, pause)
482+
- `schedule` (`string`) - Cron expression e.g., '0 1 * * *' (for create/update)
483+
- `includedNamespaces` (`array`) - Namespaces to include in scheduled backups (for create)
484+
- `ttl` (`string`) - Backup TTL duration (for create/update)
485+
- `paused` (`boolean`) - Set to true to pause, false to unpause (for pause action)
486+
487+
- **oadp_dpa** - Manage OADP DataProtectionApplication resources: list, get, create, update, or delete
488+
- `action` (`string`) **(required)** - Action: 'list', 'get', 'create', 'update', 'delete'
489+
- `namespace` (`string`) - Namespace containing DPAs (default: openshift-adp)
490+
- `name` (`string`) - Name of the DPA (required for get, create, update, delete)
491+
- `backupLocationProvider` (`string`) - Provider for backup storage e.g., aws, azure, gcp (for create)
492+
- `backupLocationBucket` (`string`) - Bucket name for backup storage (for create)
493+
- `enableNodeAgent` (`boolean`) - Enable NodeAgent for file-system backups (for create/update)
494+
495+
- **oadp_storage_location** - Manage Velero storage locations (BackupStorageLocation and VolumeSnapshotLocation)
496+
- `action` (`string`) **(required)** - Action: 'list', 'get', 'create', 'update', 'delete'
497+
- `type` (`string`) **(required)** - Storage location type: 'bsl' or 'vsl'
498+
- `namespace` (`string`) - Namespace containing storage locations (default: openshift-adp)
499+
- `name` (`string`) - Name of the storage location (required for get, create, update, delete)
500+
- `provider` (`string`) - Storage provider e.g., aws, azure, gcp (for create)
501+
- `bucket` (`string`) - Bucket name for object storage (for BSL create)
502+
- `region` (`string`) - Region for the storage (for create/update)
503+
504+
- **oadp_data_mover** - Manage Velero data mover resources (DataUpload and DataDownload for CSI snapshots)
505+
- `action` (`string`) **(required)** - Action: 'list', 'get', 'cancel'
506+
- `type` (`string`) **(required)** - Resource type: 'upload' or 'download'
507+
- `namespace` (`string`) - Namespace containing resources (default: openshift-adp)
508+
- `name` (`string`) - Name of the resource (required for get, cancel)
509+
- `labelSelector` (`string`) - Label selector to filter resources (for list)
510+
511+
- **oadp_repository** - Manage Velero BackupRepository resources (connections to backup storage)
512+
- `action` (`string`) **(required)** - Action: 'list', 'get', 'delete'
513+
- `namespace` (`string`) - Namespace containing repositories (default: openshift-adp)
514+
- `name` (`string`) - Name of the repository (required for get, delete)
515+
516+
- **oadp_data_protection_test** - Manage OADP DataProtectionTest resources for validating storage connectivity
517+
- `action` (`string`) **(required)** - Action: 'list', 'get', 'create', 'delete'
518+
- `namespace` (`string`) - Namespace containing resources (default: openshift-adp)
519+
- `name` (`string`) - Name of the test (required for get, create, delete)
520+
- `backupLocationName` (`string`) - Name of the BackupStorageLocation to test (for create)
521+
- `uploadTestFileSize` (`string`) - Size of test file for upload speed test e.g., '100MB' (for create)
633522

634523
</details>
635524

0 commit comments

Comments
 (0)