Class SharesServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.internal.MicroVersionedOpenStackService
-
- org.openstack4j.openstack.manila.internal.BaseShareServices
-
- org.openstack4j.openstack.manila.internal.SharesServiceImpl
-
- All Implemented Interfaces:
SharesService,RestService
public class SharesServiceImpl extends BaseShareServices implements SharesService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
BaseOpenStackService.Invocation<R>
-
-
Constructor Summary
Constructors Constructor Description SharesServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete 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.-
Methods inherited from class org.openstack4j.openstack.manila.internal.BaseShareServices
getApiVersionHeader
-
Methods inherited from class org.openstack4j.openstack.internal.MicroVersionedOpenStackService
delete, deleteWithResponse, get, head, patch, post, put, request
-
Methods inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
getProvider, getServiceVersion, getWithResponse, getXOpenstackRequestId, patchWithResponse, postWithResponse, putWithResponse, toList, uri
-
-
-
-
Method Detail
-
create
public Share create(ShareCreate shareCreate)
Creates a share.- Specified by:
createin interfaceSharesService- Parameters:
shareCreate- the share to create- Returns:
- the created share
-
list
public List<? extends Share> list()
Lists all shares.- Specified by:
listin interfaceSharesService- Returns:
- list of all shares
-
listDetails
public List<? extends Share> listDetails()
Lists all shares, with details.- Specified by:
listDetailsin interfaceSharesService- Returns:
- list of all shares with details
-
get
public Share get(String shareId)
Shows details for a share.- Specified by:
getin interfaceSharesService- Parameters:
shareId- the share ID- Returns:
- the share or null if not found
-
update
public Share update(String shareId, ShareUpdateOptions shareUpdateOptions)
Updates a share.- Specified by:
updatein interfaceSharesService- Parameters:
shareId- the share IDshareUpdateOptions- the options to update on the share- Returns:
- the updated share
-
delete
public ActionResponse delete(String shareId)
Deletes a share.- Specified by:
deletein interfaceSharesService- Parameters:
shareId- the share ID- Returns:
- the action response
-
delete
public ActionResponse delete(String shareId, String consistencyGroupId)
Description copied from interface:SharesServiceDeletes a share.- Specified by:
deletein interfaceSharesService- Parameters:
shareId- the share IDconsistencyGroupId- the UUID of the consistency group where the share was created- Returns:
- the action response
-
getMetadata
public Metadata getMetadata(String shareId)
Shows the metadata for a share.- Specified by:
getMetadatain interfaceSharesService- Parameters:
shareId- the share ID- Returns:
- the shares metadata
-
updateMetadata
public Metadata updateMetadata(String shareId, Metadata metadata)
Updates the metadata for a share.- Specified by:
updateMetadatain interfaceSharesService- Parameters:
shareId- the share IDmetadata- the metadata to update- Returns:
- the updated metadata
-
setMetadata
public Metadata setMetadata(String shareId, Metadata metadata)
Sets the metadata on a share.- Specified by:
setMetadatain interfaceSharesService- Parameters:
shareId- the share IDmetadata- the metadata to set- Returns:
- the updated metadata
-
unsetMetadata
public ActionResponse unsetMetadata(String shareId, String metadataKey)
Unsets the metadata on a share.- Specified by:
unsetMetadatain interfaceSharesService- Parameters:
shareId- the share IDmetadataKey- the metadata key to unset- Returns:
- the action response
-
grantAccess
public Access grantAccess(String shareId, AccessOptions options)
Grants access to a share.- Specified by:
grantAccessin interfaceSharesService- Parameters:
shareId- the share IDoptions- the options of the granted access- Returns:
- the granted access
-
revokeAccess
public ActionResponse revokeAccess(String shareId, String accessId)
Revokes access from a share.- Specified by:
revokeAccessin interfaceSharesService- Parameters:
shareId- the share IDaccessId- the access ID to revoke- Returns:
- the action response
-
listAccess
public List<? extends Access> listAccess(String shareId)
List access rules for a share.- Specified by:
listAccessin interfaceSharesService- Parameters:
shareId- the share ID- Returns:
- a list fo all access rules for the given share
-
resetState
public ActionResponse resetState(String shareId, Share.Status status)
Administrators only. Explicitly updates the state of a share.- Specified by:
resetStatein interfaceSharesService- Parameters:
shareId- the share IDstatus- the status to set- Returns:
- the action response
-
forceDelete
public ActionResponse forceDelete(String shareId)
Administrators only. Force-deletes a share in any state.- Specified by:
forceDeletein interfaceSharesService- Parameters:
shareId- the share ID- Returns:
- the action response
-
extend
public ActionResponse extend(String shareId, int newSize)
Increases the size of a share.- Specified by:
extendin interfaceSharesService- Parameters:
shareId- the share IDnewSize- new size of the share, in GBs- Returns:
- the action response
-
shrink
public ActionResponse shrink(String shareId, int newSize)
Shrinks the size of a share.- Specified by:
shrinkin interfaceSharesService- Parameters:
shareId- the share IDnewSize- the new size of the share, in GBs- Returns:
- the action response
-
shareCreateBuilder
public ShareCreateBuilder shareCreateBuilder()
- Specified by:
shareCreateBuilderin interfaceSharesService- Returns:
- a builder to create a share
-
-