Interface StorageProvider

All Superinterfaces:
PluginProvider

public interface StorageProvider extends 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 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 a StorageServerType to be added to the morpheus environment as the type for this StorageServer. The StorageServerType also defines the OptionTypes for configuration of a new server and its volume types.
      Returns:
      StorageServerType
    • verifyStorageServer

      ServiceResponse verifyStorageServer(StorageServer storageServer, Map opts)
      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 a ServiceResponse 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 Provider
      opts - 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

      ServiceResponse initializeStorageServer(StorageServer storageServer, Map opts)
      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

      ServiceResponse refreshStorageServer(StorageServer storageServer, Map opts)
      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'