Hello,
I am trying to create a BackupProvider plugin.
I was able to successfully register the plugin and updated my vCenter cloud provider to use my registered plugin as the “BackupProvider”.
Next, I am trying to create a new Instance from “Provisioning > Instances > Add” menu.
On the “Automation” tab “Backups” sections are the options I am trying to override the default options.
The options I am trying to override are:
- Backup Type
- Backup Job Type
- Backup Schedule
Currently, I was able to override the options for “Backup Type” dropdown but I am not able to override the options for “Backup Job Type”
Here is the code that I am trying:
Backup Type:
@Override
Collection<OptionType> getBackupOptionTypes() {
Collection<OptionType> optionTypes = new ArrayList()
log.info("********* Inside getBackupOptionTypes() function in TestBackupProvider class *******")
optionTypes << new OptionType(
code:'backup-provider', inputType:OptionType.InputType.SELECT, name:'backup.backupType', optionSource:'getTestBackupTypeOptions',
category:'backup.backupType', fieldName:'backup.backupType', fieldCode: 'backupType', fieldLabel:'Backup Type', fieldContext:'backup.config',
required:true, enabled:true, editable:true, global:false, placeHolder:null, helpBlock:'', defaultValue:null, custom:false,
displayOrder:0, fieldClass:null
)
return optionTypes;
}
Backup Job Type:
@Override
Collection<OptionType> getBackupJobOptionTypes() {
Collection<OptionType> optionTypes = new ArrayList()
log.info("********* Inside getBackupJobOptionTypes() function in TestBackupProvider class *******")
optionTypes << new OptionType(
code:'backup-job-action', inputType:OptionType.InputType.SELECT, name:'backup.jobAction', optionSource:'getTestBackupJobTypeOptions',
category:'backup.jobAction', fieldName:'backup.jobAction', fieldCode: 'backupJobAction', fieldLabel:'Backup Job Type', fieldContext:'backup.config',
required:false, enabled:true, editable:true, global:false, placeHolder:null, helpBlock:'', defaultValue:null, custom:false,
displayOrder:1, fieldClass:null, dependsOn: 'backup.config.backup.backupType'
)
return optionTypes;
}
DOM Image for Backup Type and Backup Job Type:
Am I doing anything wrong here?