Documentation
¶
Overview ¶
Package storage provides an API server facade for managing storage entities.
Index ¶
- func Register(registry facade.FacadeRegistry)
- type StorageAPI
- func (a *StorageAPI) AddToUnit(ctx context.Context, args params.StoragesAddParams) (params.AddStorageResults, error)
- func (a *StorageAPI) Attach(ctx context.Context, args params.StorageAttachmentIds) (params.ErrorResults, error)
- func (a *StorageAPI) CreatePool(ctx context.Context, p params.StoragePoolArgs) (params.ErrorResults, error)
- func (a *StorageAPI) DetachStorage(ctx context.Context, args params.StorageDetachmentParams) (params.ErrorResults, error)
- func (a *StorageAPI) Import(ctx context.Context, args params.BulkImportStorageParams) (params.ImportStorageResults, error)
- func (a *StorageAPI) ListFilesystems(ctx context.Context, filters params.FilesystemFilters) (params.FilesystemDetailsListResults, error)
- func (a *StorageAPI) ListPools(ctx context.Context, filters params.StoragePoolFilters) (params.StoragePoolsResults, error)
- func (a *StorageAPI) ListStorageDetails(ctx context.Context, filters params.StorageFilters) (params.StorageDetailsListResults, error)
- func (a *StorageAPI) ListVolumes(ctx context.Context, filters params.VolumeFilters) (params.VolumeDetailsListResults, error)
- func (a *StorageAPI) Remove(ctx context.Context, args params.RemoveStorage) (params.ErrorResults, error)
- func (a *StorageAPI) RemovePool(ctx context.Context, p params.StoragePoolDeleteArgs) (params.ErrorResults, error)
- func (a *StorageAPI) StorageDetails(ctx context.Context, entities params.Entities) (params.StorageDetailsResults, error)
- func (a *StorageAPI) UpdatePool(ctx context.Context, p params.StoragePoolArgs) (params.ErrorResults, error)
- type StorageService
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type StorageAPI ¶
type StorageAPI struct {
// contains filtered or unexported fields
}
StorageAPI implements the latest version (v6) of the Storage API.
func NewStorageAPI ¶
func NewStorageAPI( backend backend, modelType state.ModelType, storageAccess storageAccess, blockDeviceGetter blockDeviceGetter, storageService StorageService, storageRegistryGetter storageRegistryGetter, authorizer facade.Authorizer, credentialInvalidatorGetter envcontext.ModelCredentialInvalidatorGetter, blockCommandService common.BlockCommandService, ) *StorageAPI
func (*StorageAPI) AddToUnit ¶
func (a *StorageAPI) AddToUnit(ctx context.Context, args params.StoragesAddParams) (params.AddStorageResults, error)
AddToUnit validates and creates additional storage instances for units. A "CHANGE" block can block this operation.
func (*StorageAPI) Attach ¶
func (a *StorageAPI) Attach(ctx context.Context, args params.StorageAttachmentIds) (params.ErrorResults, error)
Attach attaches existing storage instances to units. A "CHANGE" block can block this operation.
func (*StorageAPI) CreatePool ¶
func (a *StorageAPI) CreatePool(ctx context.Context, p params.StoragePoolArgs) (params.ErrorResults, error)
CreatePool creates a new pool with specified parameters.
func (*StorageAPI) DetachStorage ¶
func (a *StorageAPI) DetachStorage(ctx context.Context, args params.StorageDetachmentParams) (params.ErrorResults, error)
DetachStorage sets the specified storage attachments to Dying, unless they are already Dying or Dead. Any associated, persistent storage will remain alive. This call can be forced.
func (*StorageAPI) Import ¶
func (a *StorageAPI) Import(ctx context.Context, args params.BulkImportStorageParams) (params.ImportStorageResults, error)
Import imports existing storage into the model. A "CHANGE" block can block this operation.
func (*StorageAPI) ListFilesystems ¶
func (a *StorageAPI) ListFilesystems(ctx context.Context, 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 (*StorageAPI) ListPools ¶
func (a *StorageAPI) ListPools( ctx context.Context, 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 (*StorageAPI) ListStorageDetails ¶
func (a *StorageAPI) ListStorageDetails(ctx context.Context, filters params.StorageFilters) (params.StorageDetailsListResults, error)
ListStorageDetails returns storage matching a filter.
func (*StorageAPI) ListVolumes ¶
func (a *StorageAPI) ListVolumes(ctx context.Context, 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 (*StorageAPI) Remove ¶
func (a *StorageAPI) Remove(ctx context.Context, args params.RemoveStorage) (params.ErrorResults, error)
Remove sets the specified storage entities to Dying, unless they are already Dying or Dead, such that the storage will eventually be removed from the model. If the arguments specify that the storage should be destroyed, then the associated cloud storage will be destroyed first; otherwise it will only be released from Juju's control.
func (*StorageAPI) RemovePool ¶
func (a *StorageAPI) RemovePool(ctx context.Context, p params.StoragePoolDeleteArgs) (params.ErrorResults, error)
RemovePool deletes the named pool
func (*StorageAPI) StorageDetails ¶
func (a *StorageAPI) StorageDetails(ctx context.Context, 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.
func (*StorageAPI) UpdatePool ¶
func (a *StorageAPI) UpdatePool(ctx context.Context, p params.StoragePoolArgs) (params.ErrorResults, error)
UpdatePool deletes the named pool
type StorageService ¶
type StorageService interface {
CreateStoragePool(ctx context.Context, name string, providerType storage.ProviderType, attrs storageservice.PoolAttrs) error
DeleteStoragePool(ctx context.Context, name string) error
ReplaceStoragePool(ctx context.Context, name string, providerType storage.ProviderType, attrs storageservice.PoolAttrs) error
ListStoragePools(ctx context.Context, filter domainstorage.Names, providers domainstorage.Providers) ([]*storage.Config, error)
GetStoragePoolByName(ctx context.Context, name string) (*storage.Config, error)
}
StorageService defines apis on the storage service.