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 Detail

      • create

        Share create​(ShareCreate shareCreate)
        Creates a share.
        Parameters:
        shareCreate - the share to create
        Returns:
        the created share
      • list

        List<? extends Share> list()
        Lists all shares.
        Returns:
        list of all shares
      • 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 ID
        shareUpdateOptions - 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 ID
        consistencyGroupId - 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 ID
        metadata - 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 ID
        metadata - 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 ID
        metadataKey - 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 ID
        options - 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 ID
        accessId - 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 ID
        status - 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 ID
        newSize - 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 ID
        newSize - the new size of the share, in GBs
        Returns:
        the action response
      • shareCreateBuilder

        ShareCreateBuilder shareCreateBuilder()
        Returns:
        a builder to create a share