Package com.morpheusdata.core.providers
Interface StorageProvider
- All Superinterfaces:
PluginProvider
Represents a
StorageServerType
implementation for creating buckets, volumes and file shares.
Depending on the capabilities of the referenced storage server one can add implementations for the additional
interfaces such as StorageProviderFileShares
or StorageProviderBuckets
or StorageProviderVolumes
.- Since:
- 0.15.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the description of the provider typegetIcon()
Returns the Storage Server Integration logo for display when a user needs to view or add this integrationProvide aStorageServerType
to be added to the morpheus environment as the type for thisStorageServer
.initializeStorageServer
(StorageServer storageServer, Map opts) Called on the first save / update of a storage server integration.refreshStorageServer
(StorageServer storageServer, Map opts) Refresh the provider with the associated data in the external system.verifyStorageServer
(StorageServer storageServer, Map opts) Validation Method used to validate all inputs applied to the integration of a Storage Provider upon save.Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin
-
Method Details
-
getDescription
String getDescription()Returns the description of the provider type- Returns:
- String
-
getIcon
Icon getIcon()Returns the Storage Server Integration logo for display when a user needs to view or add this integration- Returns:
- Icon representation of assets stored in the src/assets of the project.
-
getStorageServerType
StorageServerType getStorageServerType()Provide aStorageServerType
to be added to the morpheus environment as the type for thisStorageServer
. The StorageServerType also defines the OptionTypes for configuration of a new server and its volume types.- Returns:
- StorageServerType
-
verifyStorageServer
Validation Method used to validate all inputs applied to the integration of a Storage Provider upon save. If an input fails validation or authentication information cannot be verified, Error messages should be returned via aServiceResponse
object where the key on the error is the field name and the value is the error message. If the error is a generic authentication error or unknown error, a standard message can also be sent back in the response.- Parameters:
storageServer
- The Storage Server object contains all the saved information regarding configuration of the Storage Provideropts
- an optional map of parameters that could be sent. This may not currently be used and can be assumed blank- Returns:
- A response is returned depending on if the inputs are valid or not.
-
initializeStorageServer
Called on the first save / update of a storage server integration. Used to do any initialization of a new integration Often times this calls the periodic refresh method directly.- Parameters:
storageServer
- The Storage Server object contains all the saved information regarding configuration of the Storage Provider.opts
- an optional map of parameters that could be sent. This may not currently be used and can be assumed blank- Returns:
- a ServiceResponse containing the success state of the initialization phase
-
refreshStorageServer
Refresh the provider with the associated data in the external system.- Parameters:
storageServer
- The Storage Server object contains all the saved information regarding configuration of the Storage Provider.opts
- an optional map of parameters that could be sent. This may not currently be used and can be assumed blank- Returns:
- a
ServiceResponse
object. A ServiceResponse with a success value of 'false' will indicate the refresh process has failed and will change the storage server status to 'error'
-