Documentation ¶
Overview ¶
Package storage provides an API server facade for managing storage entities.
Index ¶
- type API
- func (a *API) AddToUnit(args params.StoragesAddParams) (params.ErrorResults, error)
- func (a *API) Attach(args params.StorageAttachmentIds) (params.ErrorResults, error)
- func (a *API) CreatePool(p params.StoragePool) error
- func (a *API) Destroy(args params.Entities) (params.ErrorResults, error)
- func (a *API) Detach(args params.StorageAttachmentIds) (params.ErrorResults, error)
- func (a *API) ListFilesystems(filters params.FilesystemFilters) (params.FilesystemDetailsListResults, error)
- func (a *API) ListPools(filters params.StoragePoolFilters) (params.StoragePoolsResults, error)
- func (api *API) ListStorageDetails(filters params.StorageFilters) (params.StorageDetailsListResults, error)
- func (a *API) ListVolumes(filters params.VolumeFilters) (params.VolumeDetailsListResults, error)
- func (api *API) StorageDetails(entities params.Entities) (params.StorageDetailsResults, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API implements the storage interface and is the concrete implementation of the api end point.
func NewAPI ¶
func NewAPI( st storageAccess, registry storage.ProviderRegistry, pm poolmanager.PoolManager, resources facade.Resources, authorizer facade.Authorizer, ) (*API, error)
NewAPI returns a new storage API facade.
func (*API) AddToUnit ¶
func (a *API) AddToUnit(args params.StoragesAddParams) (params.ErrorResults, error)
AddToUnit validates and creates additional storage instances for units. This method handles bulk add operations and a failure on one individual storage instance does not block remaining instances from being processed. A "CHANGE" block can block this operation.
func (*API) Attach ¶
func (a *API) Attach(args params.StorageAttachmentIds) (params.ErrorResults, error)
Attach attaches existing storage instances to units. A "CHANGE" block can block this operation.
func (*API) CreatePool ¶
func (a *API) CreatePool(p params.StoragePool) error
CreatePool creates a new pool with specified parameters.
func (*API) Destroy ¶
Destroy sets the specified storage entities to Dying, unless they are already Dying or Dead.
func (*API) Detach ¶
func (a *API) Detach(args params.StorageAttachmentIds) (params.ErrorResults, error)
Detach sets the specified storage attachments to Dying, unless they are already Dying or Dead. Any associated, persistent storage will remain alive.
func (*API) ListFilesystems ¶
func (a *API) ListFilesystems(filters params.FilesystemFilters) (params.FilesystemDetailsListResults, error)
ListFilesystems returns a list of filesystems in the environment matching the provided filter. Each result describes a filesystem in detail, including the filesystem's attachments.
func (*API) ListPools ¶
func (a *API) ListPools( filters params.StoragePoolFilters, ) (params.StoragePoolsResults, error)
ListPools returns a list of pools. If filter is provided, returned list only contains pools that match the filter. Pools can be filtered on names and provider types. If both names and types are provided as filter, pools that match either are returned. This method lists union of pools and environment provider types. If no filter is provided, all pools are returned.
func (*API) ListStorageDetails ¶
func (api *API) ListStorageDetails(filters params.StorageFilters) (params.StorageDetailsListResults, error)
ListStorageDetails returns storage matching a filter.
func (*API) ListVolumes ¶
func (a *API) ListVolumes(filters params.VolumeFilters) (params.VolumeDetailsListResults, error)
ListVolumes lists volumes with the given filters. Each filter produces an independent list of volumes, or an error if the filter is invalid or the volumes could not be listed.
func (*API) StorageDetails ¶
StorageDetails retrieves and returns detailed information about desired storage identified by supplied tags. If specified storage cannot be retrieved, individual error is returned instead of storage information.