Package org.openstack4j.api.manila
Interface SharesService
-
- All Superinterfaces:
RestService
- All Known Implementing Classes:
SharesServiceImpl
public interface SharesService extends RestService
Shares Service for Manila Shared File Systems.- Author:
- Daniel Gonzalez Nothnagel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Sharecreate(ShareCreate shareCreate)Creates a share.ActionResponsedelete(String shareId)Deletes a share.ActionResponsedelete(String shareId, String consistencyGroupId)Deletes a share.ActionResponseextend(String shareId, int newSize)Increases the size of a share.ActionResponseforceDelete(String shareId)Administrators only.Shareget(String shareId)Shows details for a share.MetadatagetMetadata(String shareId)Shows the metadata for a share.AccessgrantAccess(String shareId, AccessOptions options)Grants access to a share.List<? extends Share>list()Lists all shares.List<? extends Access>listAccess(String shareId)List access rules for a share.List<? extends Share>listDetails()Lists all shares, with details.ActionResponseresetState(String shareId, Share.Status status)Administrators only.ActionResponserevokeAccess(String shareId, String accessId)Revokes access from a share.MetadatasetMetadata(String shareId, Metadata metadata)Sets the metadata on a share.ShareCreateBuildershareCreateBuilder()ActionResponseshrink(String shareId, int newSize)Shrinks the size of a share.ActionResponseunsetMetadata(String shareId, String metadataKey)Unsets the metadata on a share.Shareupdate(String shareId, ShareUpdateOptions shareUpdateOptions)Updates a share.MetadataupdateMetadata(String shareId, Metadata metadata)Updates the metadata for a share.
-
-
-
Method Detail
-
create
Share create(ShareCreate shareCreate)
Creates a share.- Parameters:
shareCreate- the share to create- Returns:
- the created share
-
listDetails
List<? extends Share> listDetails()
Lists all shares, with details.- Returns:
- list of all shares with details
-
get
Share get(String shareId)
Shows details for a share.- Parameters:
shareId- the share ID- Returns:
- the share or null if not found
-
update
Share update(String shareId, ShareUpdateOptions shareUpdateOptions)
Updates a share.- Parameters:
shareId- the share IDshareUpdateOptions- the options to update on the share- Returns:
- the updated share
-
delete
ActionResponse delete(String shareId)
Deletes a share.- Parameters:
shareId- the share ID- Returns:
- the action response
-
delete
ActionResponse delete(String shareId, String consistencyGroupId)
Deletes a share.- Parameters:
shareId- the share IDconsistencyGroupId- the UUID of the consistency group where the share was created- Returns:
- the action response
-
getMetadata
Metadata getMetadata(String shareId)
Shows the metadata for a share.- Parameters:
shareId- the share ID- Returns:
- the shares metadata
-
updateMetadata
Metadata updateMetadata(String shareId, Metadata metadata)
Updates the metadata for a share.- Parameters:
shareId- the share IDmetadata- the metadata to update- Returns:
- the updated metadata
-
setMetadata
Metadata setMetadata(String shareId, Metadata metadata)
Sets the metadata on a share.- Parameters:
shareId- the share IDmetadata- the metadata to set- Returns:
- the updated metadata
-
unsetMetadata
ActionResponse unsetMetadata(String shareId, String metadataKey)
Unsets the metadata on a share.- Parameters:
shareId- the share IDmetadataKey- the metadata key to unset- Returns:
- the action response
-
grantAccess
Access grantAccess(String shareId, AccessOptions options)
Grants access to a share.- Parameters:
shareId- the share IDoptions- the options of the granted access- Returns:
- the granted access
-
revokeAccess
ActionResponse revokeAccess(String shareId, String accessId)
Revokes access from a share.- Parameters:
shareId- the share IDaccessId- the access ID to revoke- Returns:
- the action response
-
listAccess
List<? extends Access> listAccess(String shareId)
List access rules for a share.- Parameters:
shareId- the share ID- Returns:
- a list fo all access rules for the given share
-
resetState
ActionResponse resetState(String shareId, Share.Status status)
Administrators only. Explicitly updates the state of a share.- Parameters:
shareId- the share IDstatus- the status to set- Returns:
- the action response
-
forceDelete
ActionResponse forceDelete(String shareId)
Administrators only. Force-deletes a share in any state.- Parameters:
shareId- the share ID- Returns:
- the action response
-
extend
ActionResponse extend(String shareId, int newSize)
Increases the size of a share.- Parameters:
shareId- the share IDnewSize- new size of the share, in GBs- Returns:
- the action response
-
shrink
ActionResponse shrink(String shareId, int newSize)
Shrinks the size of a share.- Parameters:
shareId- the share IDnewSize- the new size of the share, in GBs- Returns:
- the action response
-
shareCreateBuilder
ShareCreateBuilder shareCreateBuilder()
- Returns:
- a builder to create a share
-
-