Package com.morpheusdata.core.providers
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 Summary
Modifier and TypeMethodDescriptioncreateBucket
(StorageBucket storageBucket, Map opts) Create theStorageBucket
resources on the external provider system.deleteBucket
(StorageBucket storageBucket, Map opts) Delete theStorageBucket
resources on the external provider system.Provides a list of supported storage provider types.updateBucket
(StorageBucket storageBucket, Map opts) Called during update of an existingStorageBucket
.validateBucket
(StorageBucket storageBucket, Map opts) Validates the submitted information when saving a bucket.
-
Method Details
-
validateBucket
Validates the submitted information when saving a bucket. This is invoked before bothcreateBucket(com.morpheusdata.model.StorageBucket, java.util.Map)
andupdateBucket(com.morpheusdata.model.StorageBucket, java.util.Map)
.- Parameters:
storageBucket
- Storage Bucket informationopts
- 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 oferrors['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
Create theStorageBucket
resources on the external provider system.- Parameters:
storageBucket
- the fully configured and validated bucket to be createdopts
- 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
Called during update of an existingStorageBucket
. This allows for any custom operations that need to be performed outside of the standard operations.- Parameters:
storageBucket
- the storage bucket to be updatedopts
- additional options- Returns:
- A response is returned depending on if the operation was a success or not.
-
deleteBucket
Delete theStorageBucket
resources on the external provider system.- Parameters:
storageBucket
- the storage bucket detailsopts
- 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
-