storage

package
v0.0.0-...-7139314 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 21 Imported by: 1

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

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,
	storageMetadata storageMetadataFunc,
	authorizer facade.Authorizer,
	callContext context.ProviderCallContext,
) *StorageAPI

func (*StorageAPI) AddToUnit

AddToUnit validates and creates additional storage instances for units. A "CHANGE" block can block this operation.

func (*StorageAPI) Attach

Attach attaches existing storage instances to units. A "CHANGE" block can block this operation.

func (*StorageAPI) CreatePool

CreatePool creates a new pool with specified parameters.

func (*StorageAPI) DetachStorage

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

Import imports existing storage into the model. A "CHANGE" block can block this operation.

func (*StorageAPI) ListFilesystems

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

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(filters params.StorageFilters) (params.StorageDetailsListResults, error)

ListStorageDetails returns storage matching a filter.

func (*StorageAPI) ListVolumes

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

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

RemovePool deletes the named pool

func (*StorageAPI) StorageDetails

func (a *StorageAPI) 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.

func (*StorageAPI) UpdatePool

UpdatePool deletes the named pool

type Unit

type Unit interface {
	AssignedMachineId() (string, error)
}

Jump to

Keyboard shortcuts

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