Some of these classes are used by other Abiquo components, so only the methods useful for developing a backup plugin will be exposed.
com.abiquo.backup.plugin
BackupScheduling
Typed generic: C extends IConnection
Method signature | Description |
---|
public void applySchedule(C connection, VirtualMachineBackupRestoreInfo vmIdentifier, BackupSchedule newSchedule) throws BackupPluginException | Applies the supplied backup schedule to the given VM |
public void applySchedule(C connection, VirtualMachineBackupRestoreInfo vmIdentifier, BackupSchedule oldSchedule, BackupSchedule newSchedule) throws BackupPluginException | Applies the supplied backup schedule to the given VM |
public void removeSchedule(C connection, VirtualMachineBackupRestoreInfo vmIdentifier) throws BackupPluginException | Removes the current backup schedule from the given VM |
public RestoreResult executeRestore(C connection, VirtualMachineBackupRestoreInfo vmIdentifier, String backupId) throws BackupPluginException | Executes a restore of a finished backup for the given VM |
public BackupResult executeBackup(C connection, VirtualMachineBackupRestoreInfo vmIdentifier, OnDemandBackupOptions onDemandOptions) throws BackupPluginException | Executes on demand backup for the given VM |
public List<BackupResult> listResults(C connection, ZonedDateTime lastDateChecked, Set<String> inProgressResultProviderIds) throws BackupPluginException | Returns all the finished backups of a given VM or all of them |
public List<String> getExpiredResults(C connection, List<String> providerIds) throws BackupPluginException | Check if the given backup still exists or has expired |
com.abiquo.backup.plugin.annotation
Elements | Default value |
---|
public FieldConstraint endpoint() | FieldConstraint.NO_APPLICABLE |
public FieldConstraint credentials() | FieldConstraint.NO_APPLICABLE |
com.abiquo.backup.plugin.exception
BackupPluginException
Constructor |
---|
public BackupPluginException(BackupPluginError pluginError) |
public BackupPluginException(BackupPluginError pluginError, String message) |
public BackupPluginException(BackupPluginError pluginError, String message, Throwable t) |
public BackupPluginException(Throwable t) |
Method signature | Description |
---|
public BackupPluginError getPluginError() | Returns the backup plugin error type that caused the exception |
BackupPluginError
Value | Code | Default message |
---|
UNHANDLED | BPE-0 | Unhandled error |
CONFIGURATION | BPE-1 | Configuration error |
SCHEDULE | BPE-2 | Cannot apply the new schedule configuration |
CONNECT | BPE-3 | Connection error |
PLUGIN_GENERIC | BPE-4 | Generic plugin error |
PLUGIN_TASK | BPE-5 | Task error |
BACKUP | BPE-6 | Backup error |
RESTORE | BPE-7 | Restore error |
NOT_IMPLEMENTED | BPE-8 | Not implemented |
Method signature | Description |
---|
public String getCode() | Returns the code of the error |
public String getDefaultMessage() | Returns the default message of the error |
public String concatToDefaultMessage(String... args) | Concatenates the given array of strings to the error message and returns the result |
com.abiquo.backup.model
BackupResult
Method signature | Required | Description |
---|
public void setProviderId(String providerId) | Yes | Saves the identifier of the backup result in the backup system |
public void setName(String name) | Yes | Saves the name of the backup result in the backup system |
public void setSizeInMB(Long size) | Yes | Saves the size in megabytes used by the backup result in the backup system |
public void setCreateDateToParse(ZonedDateTime date) | Yes | Saves the date when a backup result has been created in the backup system |
public void setExpirationDateToParse(ZonedDateTime date) | No | Saves the date when a backup result will expire if it does |
public void setStatus(Status satus) | Yes | Saves the status of the backup |
public void setType(String type) | Yes | Saves the type of the backup. Free text string. |
public void setStorage(String storage) | No | Saves the name of the physical storage where the backup is saved |
public void setReplica(boolean isReplica) | No | Saves if this backup result is a replica from another one or not |
public void setVmIdentifier(VirtualMachineIdentifier vmIdentifier) | Yes | Saves the identification of the VM that the backup result belongs to |
public void setResores(List<RestoreResult> restores) | No | Saves the restore results resulting from the current backup result |
BackupResult.RestoreResult
Method signature | Required | Description |
---|
public void setProviderId(String providerId) | No | Saves the identifier of the restore result in the backup system |
public void setName(String name) | Yes | Saves the name of the restore result in the backup system |
public void setSizeInMB(Long size) | Yes | Saves the size of the restored backup |
public void setDateToParse(ZonedDateTime date) | Yes | Saves the date when the restore of the backup has been requested |
public void setStatus(Status status) | Yes | Saves the status of the restore result |
public void setType(String type) | Yes | Saves the type of the restore. Free text string |
BackupResult.Status
Values |
---|
IN_PROGRESS |
DONE |
FAILED |
BackupSchedule
Method signature | Description |
---|
public List<BackupPolicy> getBackupPolicies() | Returns the list of the backup policies assigned to the VM |
BackupSchedule.BackupPolicy
Method signature | Description |
---|
public String getCode() | Returns the code of the policy |
public List<BackupConfiguration> getBackupConfigurations() | Returns a list of the backup configurations from this backup policy |
BackupSchedule.BackupConfiguration
Method signature | Description |
---|
public Type getType() | Returns the type of the configuration |
public Subtype getSubtype() | Returns the sub-type of the configuration |
public String getValue() | Returns the value that represents the configuration. This value changes, depending on the sub-type of the configuration, for example: - HOURLY: "5"
- DAILY: "23:30:45 +02:00"
- REPLICATION: "true"
|
public List<DayOfWeek> getDays() | Returns a list of days when the configuration sub-type is WEEKLY_PLANNED |
public List<String> getDisks() | Returns a list of paths or UUIDs representing the disks of the VMs that this configuration should apply to |
BackupSchedule.Type
Value |
---|
COMPLETE |
SNAPSHOT |
FILESYSTEM |
OPTIONS |
BackupSchedule.Subtype
Value |
---|
DEFINED_HOUR |
HOURLY |
DAILY |
WEEKLY_PLANNED |
MONTHLY |
REPLICATION |
OnDemandBackupOptions
Method signature | Description |
---|
public Boolean isReplication() | Returns true if the backup should be run with replication, else returns false. |
VirtualMachineBackupRestoreInfo
Method signature | Description |
---|
public String getHypervisorIp() | Returns the IP of the hypervisor where the VM is deployed or must be restored |
public String getDatacenterName() | Returns the name of the datacenter (saved in Abiquo database) where the VM is deployed or must be restored |
public String getName() | Returns the name of the VM |
public List<DiskAndDatastore> getDiskAndDatastores() | Returns a list of the disks of the VM |
VirtualMachineBackupRestoreInfo.DiskAndDatastore
Method signature | Description |
---|
public String getDiskUUID() | The UUID of the disk |
public String getDatastoreUUID() | The datastore uuid where the disk is placed or must be restored |
public String getDatastoreName() | The datastore name where the disk is placed or must be restored |
public Integer getBus() | The bus number where the disk is connected |
public Integer getUnit() | The unit number where the disk is connected |
public String getControllerType() | The controller type where the disk is connected, can be "scsi" or "ide" |
com.abiquo.commons.model
ConnectionData
Method signature | Description |
---|
public String getUser() | Returns the user to perform the connection |
public String getPassword() | Returns the password to perform the connection |
public String getEndpoint() | Returns the endpoint where the plugin should connect to the API of the backup system |
public Map<String, String> getContextProperties() | Returns a set of additional properties from that connection that implements WithContextProperties interface |
public boolean hasContextProperties() | Returns true if the context properties map is not empty |
VirtualMachineIdentifier
Method signature | Description |
---|
public String getName() | Returns the name of the VM |
public void setName(String name) | Saves the name of the VM |
com.abiquo.commons.model.enumerator
ConstraintKey
Value | Description | Default |
---|
HOT_RECONFIGURE_BACKUP_POLICIES | Defines if it is possible to change the backup configuration of a running VM | True |
RESTORE_VM_IN_POWER_ON | Defines if it is possible to restore a VM when it is in a powered on state | True |
RESTORE_VM_WHEN_NOT_ALLOCATED | Defines if it is possible to restore a VM when it is not deployed | True |
DATACENTER_NAME_REQUIRED | Defines if the datacenter name is required by the plugin configuration, so it cannot be modified in Abiquo | False |
com.abiquo.commons.plugin
IConnection
Method signature | Description |
---|
public void connect(ConnectionData connectionData) throws ComputeException | Should perform the connection |
public void disconnect() throws ComputeException | Should perform the disconnection |
com.abiquo.commons.plugin.annotation
Element | Description |
---|
public String[] type() | The plugin type to identify it by Abiquo |
public String version() | The plugin version |
public String[] supportedVersions() | The plugin technology system versions that can be managed by the plugin |
public String[] friendlyName() | The user-friendly name of the plugin |
com.abiquo.commons.plugin.enumerator
FieldConstraint
Values | Description |
---|
MANDATORY | The field must be present |
OPTIONAL | The field is optionally present |
NO_APPLICABLE | The field is not considered |
com.abiquo.commons.plugin.exception
ComputeException
Constructor signature |
---|
public ComputeException(String message, Throwable cause) |
public ComputeException(String message) |