Interface StorageProviderBuckets


public interface StorageProviderBuckets
This Provider interface is used in combination with StorageProvider to define a StorageServerType that can create and delete object storage buckets.
Since:
0.15.1
See Also:
  • Method Details

    • validateBucket

      ServiceResponse validateBucket(StorageBucket storageBucket, Map opts)
      Validates the submitted information when saving a bucket. This is invoked before both createBucket(com.morpheusdata.model.StorageBucket, java.util.Map) and updateBucket(com.morpheusdata.model.StorageBucket, java.util.Map).
      Parameters:
      storageBucket - Storage Bucket information
      opts - additional options
      Returns:
      a ServiceResponse object. The errors field of the ServiceResponse is used to send validation results back to the interface in the format of errors['fieldName'] = 'validation message' . The msg property can be used to send generic validation text that is not related to a specific field on the model. A ServiceResponse with a success value of 'false' will halt the create/update process.
    • createBucket

      ServiceResponse createBucket(StorageBucket storageBucket, Map opts)
      Create the StorageBucket resources on the external provider system.
      Parameters:
      storageBucket - the fully configured and validated bucket to be created
      opts - additional options
      Returns:
      a ServiceResponse object. A ServiceResponse with a success value of 'false' will indicate the creation on the external system failed and will halt any further bucket creation processes in morpheus.
    • updateBucket

      ServiceResponse updateBucket(StorageBucket storageBucket, Map opts)
      Called during update of an existing StorageBucket. This allows for any custom operations that need to be performed outside of the standard operations.
      Parameters:
      storageBucket - the storage bucket to be updated
      opts - additional options
      Returns:
      A response is returned depending on if the operation was a success or not.
    • deleteBucket

      ServiceResponse deleteBucket(StorageBucket storageBucket, Map opts)
      Delete the StorageBucket resources on the external provider system.
      Parameters:
      storageBucket - the storage bucket details
      opts - additional options
      Returns:
      a ServiceResponse indicating the results of the deletion on the external provider system. A ServiceResponse object with a success value of 'false' will halt the deletion process and the local refernce will be retained.
    • getStorageBucketProviderTypes

      Collection<String> getStorageBucketProviderTypes()
      Provides a list of supported storage provider types. The available storage provider types are: ['alibaba','azure','cifs','google',local','nfs','openstack','s3']
      Returns:
      Collection of provide type codes