Abiquo 5.2

Skip to end of metadata
Go to start of metadata

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 signatureDescription

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

BackupConnectionMetadata

ElementsDefault 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 signatureDescription
public BackupPluginError getPluginError()Returns the backup plugin error type that caused the exception

BackupPluginError

ValueCodeDefault message
UNHANDLEDBPE-0Unhandled error
CONFIGURATIONBPE-1Configuration error
SCHEDULEBPE-2Cannot apply the new schedule configuration
CONNECTBPE-3Connection error
PLUGIN_GENERICBPE-4Generic plugin error
PLUGIN_TASKBPE-5Task error
BACKUPBPE-6Backup error
RESTOREBPE-7Restore error
NOT_IMPLEMENTEDBPE-8Not implemented
Method signatureDescription
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 signatureRequiredDescription
public void setProviderId(String providerId)YesSaves the identifier of the backup result in the backup system
public void setName(String name)YesSaves the name of the backup result in the backup system
public void setSizeInMB(Long size)YesSaves the size in megabytes used by the backup result in the backup system
public void setCreateDateToParse(ZonedDateTime date)YesSaves the date when a backup result has been created in the backup system
public void setExpirationDateToParse(ZonedDateTime date)NoSaves the date when a backup result will expire if it does
public void setStatus(Status satus)YesSaves the status of the backup
public void setType(String type)YesSaves the type of the backup. Free text string.
public void setStorage(String storage)NoSaves the name of the physical storage where the backup is saved
public void setReplica(boolean isReplica)NoSaves if this backup result is a replica from another one or not
public void setVmIdentifier(VirtualMachineIdentifier vmIdentifier)YesSaves the identification of the VM that the backup result belongs to
public void setResores(List<RestoreResult> restores)NoSaves the restore results resulting from the current backup result

BackupResult.RestoreResult

Method signatureRequiredDescription
public void setProviderId(String providerId)NoSaves the identifier of the restore result in the backup system
public void setName(String name)YesSaves the name of the restore result in the backup system
public void setSizeInMB(Long size)YesSaves the size of the restored backup
public void setDateToParse(ZonedDateTime date)YesSaves the date when the restore of the backup has been requested
public void setStatus(Status status)YesSaves the status of the restore result
public void setType(String type)YesSaves the type of the restore. Free text string

BackupResult.Status

Values
IN_PROGRESS
DONE
FAILED

BackupSchedule

Method signatureDescription
public List<BackupPolicy> getBackupPolicies()Returns the list of the backup policies assigned to the VM

BackupSchedule.BackupPolicy

Method signatureDescription
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 signatureDescription
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 signatureDescription
public Boolean isReplication()Returns true if the backup should be run with replication, else returns false.

VirtualMachineBackupRestoreInfo

Method signatureDescription
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 signatureDescription
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 signatureDescription
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 signatureDescription
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

ValueDescriptionDefault
HOT_RECONFIGURE_BACKUP_POLICIESDefines if it is possible to change the backup configuration of a running VMTrue
RESTORE_VM_IN_POWER_ONDefines if it is possible to restore a VM when it is in a powered on stateTrue
RESTORE_VM_WHEN_NOT_ALLOCATEDDefines if it is possible to restore a VM when it is not deployedTrue
DATACENTER_NAME_REQUIREDDefines if the datacenter name is required by the plugin configuration, so it cannot be modified in AbiquoFalse

com.abiquo.commons.plugin

IConnection

Method signatureDescription
public void connect(ConnectionData connectionData) throws ComputeExceptionShould perform the connection
public void disconnect() throws ComputeExceptionShould perform the disconnection

com.abiquo.commons.plugin.annotation

PluginMetadata

ElementDescription
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

ValuesDescription
MANDATORYThe field must be present
OPTIONALThe field is optionally present
NO_APPLICABLEThe field is not considered

com.abiquo.commons.plugin.exception

ComputeException

Constructor signature
public ComputeException(String message, Throwable cause)
public ComputeException(String message)
  • No labels