Package com.morpheusdata.core.backup
Interface BackupJobProvider
- All Known Implementing Classes:
DefaultBackupJobProvider
public interface BackupJobProvider
Provides a standard set of methods for Backup Job Providers. A
DefaultBackupJobProvider
is available
for integrations that do not have a concept of backup jobs, a grouping of backups, but would like to have the
feature function for the integration in Morpheus. The DefaultBackupJobProvider
pushes the job operations
back to Morpheus.- Since:
- 0.12.2
-
Method Summary
Modifier and TypeMethodDescriptionaddToBackupJob
(BackupJob backupJobModel, Map opts) Add a backup to an existing backup job in the external system.cloneBackupJob
(BackupJob sourceBackupJobModel, BackupJob backupJobModel, Map opts) Clone theBackupJob
on the external system.configureBackupJob
(BackupJob backupJobModel, Map config, Map opts) Apply provider specific configurations to aBackupJob
.createBackupJob
(BackupJob backupJobModel, Map opts) Create theBackupJob
on the external provider system.deleteBackupJob
(BackupJob backupJobModel, Map opts) Delete the backup job in the external system.executeBackupJob
(BackupJob backupJob, Map opts) Execute the backup job on the external system.validateBackupJob
(BackupJob backupJobModel, Map config, Map opts) Validate the configuration of theBackupJob
.
-
Method Details
-
configureBackupJob
Apply provider specific configurations to aBackupJob
. The standard configurations are handled by Morpheus.- Parameters:
backupJobModel
- the backup job to apply the configuration changes toconfig
- the configuration supplied by external inputs.opts
- optional parameters used for configuration.- Returns:
- a
ServiceResponse
object. A ServiceResponse with a false success will indicate a failed configuration and will halt the backup creation process.
-
validateBackupJob
Validate the configuration of theBackupJob
. Morpheus will validate the backup based on the supplied option type configurations such as required fields. Use this to either override the validation results supplied by the default validation or to create additional validations beyond the capabilities of option type validation.- Parameters:
backupJobModel
- the backup job to validateconfig
- the original configuration supplied by external inputs.opts
- optional parameters used for- Returns:
- a
ServiceResponse
object. The errors field of the ServiceResponse is used to send validation results back to the interface in the format oferrors['fieldName'] = 'validation message'
. The msg property can be used to send generic validation text that is not related to a specific field on the model. A ServiceResponse with any items in the errors list or a success value of 'false' will halt the backup job creation process.
-
createBackupJob
Create theBackupJob
on the external provider system.- Parameters:
backupJobModel
- the fully configured and validated backup jobopts
- additional options used during backup job creation- Returns:
- a
ServiceResponse
object. A ServiceResponse with a success value of 'false' will indicate the creation on the external system failed and will halt any further processing in Morpheus.
-
cloneBackupJob
Clone theBackupJob
on the external system.- Parameters:
sourceBackupJobModel
- the source backup job for cloningbackupJobModel
- the backup job that will be associated to the cloned backup job. The externalId of the backup job should be set with the ID of the cloned job result.opts
- additional options used during backup job clone- Returns:
- a
ServiceResponse
object. A ServiceResponse with a success value of 'false' will indicate the clone on the external system failed and will halt any further processing in Morpheus.
-
addToBackupJob
Add a backup to an existing backup job in the external system.- Parameters:
backupJobModel
- the backup job receiving the additional backupopts
- additional options- Returns:
- a
ServiceResponse
object. A ServiceResponse with a success value of 'false' will indicate the operation on the external system failed and will halt any further processing in Morpheus.
-
deleteBackupJob
Delete the backup job in the external system.- Parameters:
backupJobModel
- the backup job to be removedopts
- additional options- Returns:
- a
ServiceResponse
object. A ServiceResponse with a success value of 'false' will indicate the operation on the external system failed and will halt any further processing in Morpheus.
-
executeBackupJob
Execute the backup job on the external system.- Parameters:
backupJob
- the backup job to be executedopts
- additional options- Returns:
- a
ServiceResponse
object. A ServiceResponse with a success value of 'false' will indicate the operation on the external system failed and will halt any further processing in Morpheus.
-