storageprovisioner

package
v0.0.0-...-ea3e8b0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStateBackends

func NewStateBackends(st *state.State) (Backend, StorageBackend, error)

NewStateBackends creates a Backend from the given *state.State.

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

Types

type Backend

type Backend interface {
	state.EntityFinder
	state.ModelAccessor

	ControllerConfig() (controller.Config, error)
	MachineInstanceId(names.MachineTag) (instance.Id, error)
	ModelTag() names.ModelTag
	WatchMachine(names.MachineTag) (state.NotifyWatcher, error)
	WatchApplications() state.StringsWatcher
}

type StorageBackend

type StorageBackend interface {
	BlockDevices(names.MachineTag) ([]state.BlockDeviceInfo, error)

	WatchBlockDevices(names.MachineTag) state.NotifyWatcher
	WatchModelFilesystems() state.StringsWatcher
	WatchModelFilesystemAttachments() state.StringsWatcher
	WatchMachineFilesystems(names.MachineTag) state.StringsWatcher
	WatchUnitFilesystems(tag names.ApplicationTag) state.StringsWatcher
	WatchMachineFilesystemAttachments(names.MachineTag) state.StringsWatcher
	WatchUnitFilesystemAttachments(tag names.ApplicationTag) state.StringsWatcher
	WatchModelVolumes() state.StringsWatcher
	WatchModelVolumeAttachments() state.StringsWatcher
	WatchMachineVolumes(names.MachineTag) state.StringsWatcher
	WatchMachineVolumeAttachments(names.MachineTag) state.StringsWatcher
	WatchUnitVolumeAttachments(tag names.ApplicationTag) state.StringsWatcher
	WatchVolumeAttachment(names.Tag, names.VolumeTag) state.NotifyWatcher
	WatchMachineAttachmentsPlans(names.MachineTag) state.StringsWatcher

	StorageInstance(names.StorageTag) (state.StorageInstance, error)
	AllStorageInstances() ([]state.StorageInstance, error)
	StorageInstanceVolume(names.StorageTag) (state.Volume, error)
	StorageInstanceFilesystem(names.StorageTag) (state.Filesystem, error)
	ReleaseStorageInstance(names.StorageTag, bool, bool, time.Duration) error
	DetachStorage(names.StorageTag, names.UnitTag, bool, time.Duration) error

	Filesystem(names.FilesystemTag) (state.Filesystem, error)
	FilesystemAttachment(names.Tag, names.FilesystemTag) (state.FilesystemAttachment, error)

	Volume(names.VolumeTag) (state.Volume, error)
	VolumeAttachment(names.Tag, names.VolumeTag) (state.VolumeAttachment, error)
	VolumeAttachments(names.VolumeTag) ([]state.VolumeAttachment, error)
	VolumeAttachmentPlan(names.Tag, names.VolumeTag) (state.VolumeAttachmentPlan, error)
	VolumeAttachmentPlans(volume names.VolumeTag) ([]state.VolumeAttachmentPlan, error)

	RemoveFilesystem(names.FilesystemTag) error
	RemoveFilesystemAttachment(names.Tag, names.FilesystemTag, bool) error
	RemoveVolume(names.VolumeTag) error
	RemoveVolumeAttachment(names.Tag, names.VolumeTag, bool) error
	DetachFilesystem(names.Tag, names.FilesystemTag) error
	DestroyFilesystem(names.FilesystemTag, bool) error
	DetachVolume(names.Tag, names.VolumeTag, bool) error
	DestroyVolume(names.VolumeTag, bool) error

	SetFilesystemInfo(names.FilesystemTag, state.FilesystemInfo) error
	SetFilesystemAttachmentInfo(names.Tag, names.FilesystemTag, state.FilesystemAttachmentInfo) error
	SetVolumeInfo(names.VolumeTag, state.VolumeInfo) error
	SetVolumeAttachmentInfo(names.Tag, names.VolumeTag, state.VolumeAttachmentInfo) error

	CreateVolumeAttachmentPlan(names.Tag, names.VolumeTag, state.VolumeAttachmentPlanInfo) error
	RemoveVolumeAttachmentPlan(names.Tag, names.VolumeTag, bool) error
	SetVolumeAttachmentPlanBlockInfo(machineTag names.Tag, volumeTag names.VolumeTag, info state.BlockDeviceInfo) error
}

type StorageProvisionerAPIv4

type StorageProvisionerAPIv4 struct {
	*common.LifeGetter
	*common.DeadEnsurer
	*common.InstanceIdGetter
	*common.StatusSetter
	// contains filtered or unexported fields
}

StorageProvisionerAPIv4 provides the StorageProvisioner API v4 facade.

func NewStorageProvisionerAPIv4

func NewStorageProvisionerAPIv4(
	st Backend,
	sb StorageBackend,
	resources facade.Resources,
	authorizer facade.Authorizer,
	registry storage.ProviderRegistry,
	poolManager poolmanager.PoolManager,
) (*StorageProvisionerAPIv4, error)

NewStorageProvisionerAPIv4 creates a new server-side StorageProvisioner v3 facade.

func (*StorageProvisionerAPIv4) AttachmentLife

AttachmentLife returns the lifecycle state of each specified machine storage attachment.

func (*StorageProvisionerAPIv4) CreateVolumeAttachmentPlans

func (s *StorageProvisionerAPIv4) CreateVolumeAttachmentPlans(args params.VolumeAttachmentPlans) (params.ErrorResults, error)

func (*StorageProvisionerAPIv4) FilesystemAttachmentParams

FilesystemAttachmentParams returns the parameters for creating the filesystem attachments with the specified IDs.

func (*StorageProvisionerAPIv4) FilesystemAttachments

FilesystemAttachments returns details of filesystem attachments with the specified IDs.

func (*StorageProvisionerAPIv4) FilesystemParams

FilesystemParams returns the parameters for creating the filesystems with the specified tags.

func (*StorageProvisionerAPIv4) Filesystems

Filesystems returns details of filesystems with the specified tags.

func (*StorageProvisionerAPIv4) Remove

Remove removes volumes and filesystems from state.

func (*StorageProvisionerAPIv4) RemoveAttachment

RemoveAttachment removes the specified machine storage attachments from state.

func (*StorageProvisionerAPIv4) RemoveFilesystemParams

RemoveFilesystemParams returns the parameters for destroying or releasing the filesystems with the specified tags.

func (*StorageProvisionerAPIv4) RemoveVolumeAttachmentPlan

func (s *StorageProvisionerAPIv4) RemoveVolumeAttachmentPlan(args params.MachineStorageIds) (params.ErrorResults, error)

func (*StorageProvisionerAPIv4) RemoveVolumeParams

RemoveVolumeParams returns the parameters for destroying or releasing the volumes with the specified tags.

func (*StorageProvisionerAPIv4) SetFilesystemAttachmentInfo

func (s *StorageProvisionerAPIv4) SetFilesystemAttachmentInfo(
	args params.FilesystemAttachments,
) (params.ErrorResults, error)

SetFilesystemAttachmentInfo records the details of newly provisioned filesystem attachments.

func (*StorageProvisionerAPIv4) SetFilesystemInfo

func (s *StorageProvisionerAPIv4) SetFilesystemInfo(args params.Filesystems) (params.ErrorResults, error)

SetFilesystemInfo records the details of newly provisioned filesystems.

func (*StorageProvisionerAPIv4) SetVolumeAttachmentInfo

func (s *StorageProvisionerAPIv4) SetVolumeAttachmentInfo(
	args params.VolumeAttachments,
) (params.ErrorResults, error)

SetVolumeAttachmentInfo records the details of newly provisioned volume attachments.

func (*StorageProvisionerAPIv4) SetVolumeAttachmentPlanBlockInfo

func (s *StorageProvisionerAPIv4) SetVolumeAttachmentPlanBlockInfo(args params.VolumeAttachmentPlans) (params.ErrorResults, error)

func (*StorageProvisionerAPIv4) SetVolumeInfo

func (s *StorageProvisionerAPIv4) SetVolumeInfo(args params.Volumes) (params.ErrorResults, error)

SetVolumeInfo records the details of newly provisioned volumes.

func (*StorageProvisionerAPIv4) VolumeAttachmentParams

VolumeAttachmentParams returns the parameters for creating the volume attachments with the specified IDs.

func (*StorageProvisionerAPIv4) VolumeAttachmentPlans

VolumeAttachmentPlans returns details of volume attachment plans with the specified IDs.

func (*StorageProvisionerAPIv4) VolumeAttachments

VolumeAttachments returns details of volume attachments with the specified IDs.

func (*StorageProvisionerAPIv4) VolumeBlockDevices

VolumeBlockDevices returns details of the block devices corresponding to the volume attachments with the specified IDs.

func (*StorageProvisionerAPIv4) VolumeParams

VolumeParams returns the parameters for creating or destroying the volumes with the specified tags.

func (*StorageProvisionerAPIv4) Volumes

Volumes returns details of volumes with the specified tags.

func (*StorageProvisionerAPIv4) WatchApplications

func (s *StorageProvisionerAPIv4) WatchApplications() (params.StringsWatchResult, error)

WatchApplications starts a StringsWatcher to watch CAAS applications deployed to this model.

func (*StorageProvisionerAPIv4) WatchBlockDevices

func (s *StorageProvisionerAPIv4) WatchBlockDevices(args params.Entities) (params.NotifyWatchResults, error)

WatchBlockDevices watches for changes to the specified machines' block devices.

func (*StorageProvisionerAPIv4) WatchFilesystemAttachments

func (s *StorageProvisionerAPIv4) WatchFilesystemAttachments(args params.Entities) (params.MachineStorageIdsWatchResults, error)

WatchFilesystemAttachments watches for changes to filesystem attachments scoped to the entity with the tag passed to NewState.

func (*StorageProvisionerAPIv4) WatchFilesystems

WatchFilesystems watches for changes to filesystems scoped to the entity with the tag passed to NewState.

func (*StorageProvisionerAPIv4) WatchMachines

WatchMachines watches for changes to the specified machines.

func (*StorageProvisionerAPIv4) WatchVolumeAttachmentPlans

func (s *StorageProvisionerAPIv4) WatchVolumeAttachmentPlans(args params.Entities) (params.MachineStorageIdsWatchResults, error)

WatchVolumeAttachmentPlans watches for changes to volume attachments for a machine for the purpose of allowing that machine to run any initialization needed, for that volume to actually appear as a block device (ie: iSCSI)

func (*StorageProvisionerAPIv4) WatchVolumeAttachments

WatchVolumeAttachments watches for changes to volume attachments scoped to the entity with the tag passed to NewState.

func (*StorageProvisionerAPIv4) WatchVolumes

WatchVolumes watches for changes to volumes scoped to the entity with the tag passed to NewState.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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