storage

package
v0.0.0-...-a0d7459 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package storage provides an API server facade for managing storage entities.

Index

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

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

func (a *API) Destroy(args params.Entities) (params.ErrorResults, error)

Destroy sets the specified storage entities to Dying, unless they are already Dying or Dead.

func (*API) Detach

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

func (api *API) StorageDetails(entities params.Entities) (params.StorageDetailsResults, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL