Documentation ¶
Index ¶
- func NewStateBackends(st *state.State) (Backend, StorageBackend, error)
- func Register(registry facade.FacadeRegistry)
- type Backend
- type BlockDeviceService
- type ControllerConfigService
- type MachineService
- type ModelConfigService
- type StorageBackend
- type StoragePoolGetter
- type StorageProvisionerAPIv4
- func (s *StorageProvisionerAPIv4) AttachmentLife(ctx context.Context, args params.MachineStorageIds) (params.LifeResults, error)
- func (s *StorageProvisionerAPIv4) CreateVolumeAttachmentPlans(ctx context.Context, args params.VolumeAttachmentPlans) (params.ErrorResults, error)
- func (s *StorageProvisionerAPIv4) FilesystemAttachmentParams(ctx context.Context, args params.MachineStorageIds) (params.FilesystemAttachmentParamsResults, error)
- func (s *StorageProvisionerAPIv4) FilesystemAttachments(ctx context.Context, args params.MachineStorageIds) (params.FilesystemAttachmentResults, error)
- func (s *StorageProvisionerAPIv4) FilesystemParams(ctx context.Context, args params.Entities) (params.FilesystemParamsResults, error)
- func (s *StorageProvisionerAPIv4) Filesystems(ctx context.Context, args params.Entities) (params.FilesystemResults, error)
- func (s *StorageProvisionerAPIv4) Remove(ctx context.Context, args params.Entities) (params.ErrorResults, error)
- func (s *StorageProvisionerAPIv4) RemoveAttachment(ctx context.Context, args params.MachineStorageIds) (params.ErrorResults, error)
- func (s *StorageProvisionerAPIv4) RemoveFilesystemParams(ctx context.Context, args params.Entities) (params.RemoveFilesystemParamsResults, error)
- func (s *StorageProvisionerAPIv4) RemoveVolumeAttachmentPlan(ctx context.Context, args params.MachineStorageIds) (params.ErrorResults, error)
- func (s *StorageProvisionerAPIv4) RemoveVolumeParams(ctx context.Context, args params.Entities) (params.RemoveVolumeParamsResults, error)
- func (s *StorageProvisionerAPIv4) SetFilesystemAttachmentInfo(ctx context.Context, args params.FilesystemAttachments) (params.ErrorResults, error)
- func (s *StorageProvisionerAPIv4) SetFilesystemInfo(ctx context.Context, args params.Filesystems) (params.ErrorResults, error)
- func (s *StorageProvisionerAPIv4) SetVolumeAttachmentInfo(ctx context.Context, args params.VolumeAttachments) (params.ErrorResults, error)
- func (s *StorageProvisionerAPIv4) SetVolumeAttachmentPlanBlockInfo(ctx context.Context, args params.VolumeAttachmentPlans) (params.ErrorResults, error)
- func (s *StorageProvisionerAPIv4) SetVolumeInfo(args params.Volumes) (params.ErrorResults, error)
- func (s *StorageProvisionerAPIv4) VolumeAttachmentParams(ctx context.Context, args params.MachineStorageIds) (params.VolumeAttachmentParamsResults, error)
- func (s *StorageProvisionerAPIv4) VolumeAttachmentPlans(ctx context.Context, args params.MachineStorageIds) (params.VolumeAttachmentPlanResults, error)
- func (s *StorageProvisionerAPIv4) VolumeAttachments(ctx context.Context, args params.MachineStorageIds) (params.VolumeAttachmentResults, error)
- func (s *StorageProvisionerAPIv4) VolumeBlockDevices(ctx context.Context, args params.MachineStorageIds) (params.BlockDeviceResults, error)
- func (s *StorageProvisionerAPIv4) VolumeParams(ctx context.Context, args params.Entities) (params.VolumeParamsResults, error)
- func (s *StorageProvisionerAPIv4) Volumes(ctx context.Context, args params.Entities) (params.VolumeResults, error)
- func (s *StorageProvisionerAPIv4) WatchApplications(ctx context.Context) (params.StringsWatchResult, error)
- func (s *StorageProvisionerAPIv4) WatchBlockDevices(ctx context.Context, args params.Entities) (params.NotifyWatchResults, error)
- func (s *StorageProvisionerAPIv4) WatchFilesystemAttachments(ctx context.Context, args params.Entities) (params.MachineStorageIdsWatchResults, error)
- func (s *StorageProvisionerAPIv4) WatchFilesystems(ctx context.Context, args params.Entities) (params.StringsWatchResults, error)
- func (s *StorageProvisionerAPIv4) WatchMachines(ctx context.Context, args params.Entities) (params.NotifyWatchResults, error)
- func (s *StorageProvisionerAPIv4) WatchVolumeAttachmentPlans(ctx context.Context, args params.Entities) (params.MachineStorageIdsWatchResults, error)
- func (s *StorageProvisionerAPIv4) WatchVolumeAttachments(ctx context.Context, args params.Entities) (params.MachineStorageIdsWatchResults, error)
- func (s *StorageProvisionerAPIv4) WatchVolumes(ctx context.Context, args params.Entities) (params.StringsWatchResults, error)
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 WatchMachine(names.MachineTag) (state.NotifyWatcher, error) WatchApplications() state.StringsWatcher }
type BlockDeviceService ¶
type BlockDeviceService interface { // BlockDevices returns the block devices for a specified machine. BlockDevices(ctx context.Context, machineId string) ([]blockdevice.BlockDevice, error) // WatchBlockDevices returns a new NotifyWatcher watching for // changes to block devices associated with the specified machine. WatchBlockDevices(ctx context.Context, machineId string) (watcher.NotifyWatcher, error) }
BlockDeviceService instances can fetch and watch block devices on a machine.
type ControllerConfigService ¶
type ControllerConfigService interface { // ControllerConfig returns the config values for the controller. ControllerConfig(context.Context) (controller.Config, error) }
ControllerConfigService provides access to the controller configuration.
type MachineService ¶
type MachineService interface { // EnsureDeadMachine sets the provided machine's life status to Dead. // No error is returned if the provided machine doesn't exist, just nothing // gets updated. EnsureDeadMachine(ctx context.Context, machineName machine.Name) error // GetMachineUUID returns the UUID of a machine identified by its name. GetMachineUUID(ctx context.Context, name machine.Name) (string, error) // InstanceID returns the cloud specific instance id for this machine. InstanceID(ctx context.Context, mUUID string) (instance.Id, error) // InstanceIDAndName returns the cloud specific instance ID and display name for // this machine. InstanceIDAndName(ctx context.Context, machineUUID string) (instance.Id, string, error) // HardwareCharacteristics returns the hardware characteristics of the // specified machine. HardwareCharacteristics(ctx context.Context, machineUUID string) (*instance.HardwareCharacteristics, error) }
MachineService defines the methods that the facade assumes from the Machine service.
type ModelConfigService ¶
type ModelConfigService interface { // ModelConfig returns the current config for the model. ModelConfig(context.Context) (*config.Config, error) }
ModelConfigService is the interface that the provisioner facade uses to get the model config.
type StorageBackend ¶
type StorageBackend interface { 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 StoragePoolGetter ¶
type StoragePoolGetter interface { // GetStoragePoolByName returns the storage pool with the specified name. GetStoragePoolByName(ctx context.Context, name string) (*storage.Config, error) }
StoragePoolGetter instances get a storage pool by name.
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( ctx context.Context, watcherRegistry facade.WatcherRegistry, st Backend, sb StorageBackend, blockDeviceService BlockDeviceService, modelConfigService ModelConfigService, machineService MachineService, resources facade.Resources, authorizer facade.Authorizer, registry storage.ProviderRegistry, storagePoolGetter StoragePoolGetter, logger logger.Logger, modelUUID model.UUID, controllerUUID string, ) (*StorageProvisionerAPIv4, error)
NewStorageProvisionerAPIv4 creates a new server-side StorageProvisioner v3 facade.
func (*StorageProvisionerAPIv4) AttachmentLife ¶
func (s *StorageProvisionerAPIv4) AttachmentLife(ctx context.Context, args params.MachineStorageIds) (params.LifeResults, error)
AttachmentLife returns the lifecycle state of each specified machine storage attachment.
func (*StorageProvisionerAPIv4) CreateVolumeAttachmentPlans ¶
func (s *StorageProvisionerAPIv4) CreateVolumeAttachmentPlans(ctx context.Context, args params.VolumeAttachmentPlans) (params.ErrorResults, error)
func (*StorageProvisionerAPIv4) FilesystemAttachmentParams ¶
func (s *StorageProvisionerAPIv4) FilesystemAttachmentParams( ctx context.Context, args params.MachineStorageIds, ) (params.FilesystemAttachmentParamsResults, error)
FilesystemAttachmentParams returns the parameters for creating the filesystem attachments with the specified IDs.
func (*StorageProvisionerAPIv4) FilesystemAttachments ¶
func (s *StorageProvisionerAPIv4) FilesystemAttachments(ctx context.Context, args params.MachineStorageIds) (params.FilesystemAttachmentResults, error)
FilesystemAttachments returns details of filesystem attachments with the specified IDs.
func (*StorageProvisionerAPIv4) FilesystemParams ¶
func (s *StorageProvisionerAPIv4) FilesystemParams(ctx context.Context, args params.Entities) (params.FilesystemParamsResults, error)
FilesystemParams returns the parameters for creating the filesystems with the specified tags.
func (*StorageProvisionerAPIv4) Filesystems ¶
func (s *StorageProvisionerAPIv4) Filesystems(ctx context.Context, args params.Entities) (params.FilesystemResults, error)
Filesystems returns details of filesystems with the specified tags.
func (*StorageProvisionerAPIv4) Remove ¶
func (s *StorageProvisionerAPIv4) Remove(ctx context.Context, args params.Entities) (params.ErrorResults, error)
Remove removes volumes and filesystems from state.
func (*StorageProvisionerAPIv4) RemoveAttachment ¶
func (s *StorageProvisionerAPIv4) RemoveAttachment(ctx context.Context, args params.MachineStorageIds) (params.ErrorResults, error)
RemoveAttachment removes the specified machine storage attachments from state.
func (*StorageProvisionerAPIv4) RemoveFilesystemParams ¶
func (s *StorageProvisionerAPIv4) RemoveFilesystemParams(ctx context.Context, args params.Entities) (params.RemoveFilesystemParamsResults, error)
RemoveFilesystemParams returns the parameters for destroying or releasing the filesystems with the specified tags.
func (*StorageProvisionerAPIv4) RemoveVolumeAttachmentPlan ¶
func (s *StorageProvisionerAPIv4) RemoveVolumeAttachmentPlan(ctx context.Context, args params.MachineStorageIds) (params.ErrorResults, error)
func (*StorageProvisionerAPIv4) RemoveVolumeParams ¶
func (s *StorageProvisionerAPIv4) RemoveVolumeParams(ctx context.Context, args params.Entities) (params.RemoveVolumeParamsResults, error)
RemoveVolumeParams returns the parameters for destroying or releasing the volumes with the specified tags.
func (*StorageProvisionerAPIv4) SetFilesystemAttachmentInfo ¶
func (s *StorageProvisionerAPIv4) SetFilesystemAttachmentInfo( ctx context.Context, args params.FilesystemAttachments, ) (params.ErrorResults, error)
SetFilesystemAttachmentInfo records the details of newly provisioned filesystem attachments.
func (*StorageProvisionerAPIv4) SetFilesystemInfo ¶
func (s *StorageProvisionerAPIv4) SetFilesystemInfo(ctx context.Context, args params.Filesystems) (params.ErrorResults, error)
SetFilesystemInfo records the details of newly provisioned filesystems.
func (*StorageProvisionerAPIv4) SetVolumeAttachmentInfo ¶
func (s *StorageProvisionerAPIv4) SetVolumeAttachmentInfo( ctx context.Context, args params.VolumeAttachments, ) (params.ErrorResults, error)
SetVolumeAttachmentInfo records the details of newly provisioned volume attachments.
func (*StorageProvisionerAPIv4) SetVolumeAttachmentPlanBlockInfo ¶
func (s *StorageProvisionerAPIv4) SetVolumeAttachmentPlanBlockInfo(ctx context.Context, 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 ¶
func (s *StorageProvisionerAPIv4) VolumeAttachmentParams( ctx context.Context, args params.MachineStorageIds, ) (params.VolumeAttachmentParamsResults, error)
VolumeAttachmentParams returns the parameters for creating the volume attachments with the specified IDs.
func (*StorageProvisionerAPIv4) VolumeAttachmentPlans ¶
func (s *StorageProvisionerAPIv4) VolumeAttachmentPlans(ctx context.Context, args params.MachineStorageIds) (params.VolumeAttachmentPlanResults, error)
VolumeAttachmentPlans returns details of volume attachment plans with the specified IDs.
func (*StorageProvisionerAPIv4) VolumeAttachments ¶
func (s *StorageProvisionerAPIv4) VolumeAttachments(ctx context.Context, args params.MachineStorageIds) (params.VolumeAttachmentResults, error)
VolumeAttachments returns details of volume attachments with the specified IDs.
func (*StorageProvisionerAPIv4) VolumeBlockDevices ¶
func (s *StorageProvisionerAPIv4) VolumeBlockDevices(ctx context.Context, args params.MachineStorageIds) (params.BlockDeviceResults, error)
VolumeBlockDevices returns details of the block devices corresponding to the volume attachments with the specified IDs.
func (*StorageProvisionerAPIv4) VolumeParams ¶
func (s *StorageProvisionerAPIv4) VolumeParams(ctx context.Context, args params.Entities) (params.VolumeParamsResults, error)
VolumeParams returns the parameters for creating or destroying the volumes with the specified tags.
func (*StorageProvisionerAPIv4) Volumes ¶
func (s *StorageProvisionerAPIv4) Volumes(ctx context.Context, args params.Entities) (params.VolumeResults, error)
Volumes returns details of volumes with the specified tags.
func (*StorageProvisionerAPIv4) WatchApplications ¶
func (s *StorageProvisionerAPIv4) WatchApplications(ctx context.Context) (params.StringsWatchResult, error)
WatchApplications starts a StringsWatcher to watch CAAS applications deployed to this model.
func (*StorageProvisionerAPIv4) WatchBlockDevices ¶
func (s *StorageProvisionerAPIv4) WatchBlockDevices(ctx context.Context, args params.Entities) (params.NotifyWatchResults, error)
WatchBlockDevices watches for changes to the specified machines' block devices.
func (*StorageProvisionerAPIv4) WatchFilesystemAttachments ¶
func (s *StorageProvisionerAPIv4) WatchFilesystemAttachments(ctx context.Context, 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 ¶
func (s *StorageProvisionerAPIv4) WatchFilesystems(ctx context.Context, args params.Entities) (params.StringsWatchResults, error)
WatchFilesystems watches for changes to filesystems scoped to the entity with the tag passed to NewState.
func (*StorageProvisionerAPIv4) WatchMachines ¶
func (s *StorageProvisionerAPIv4) WatchMachines(ctx context.Context, args params.Entities) (params.NotifyWatchResults, error)
WatchMachines watches for changes to the specified machines.
func (*StorageProvisionerAPIv4) WatchVolumeAttachmentPlans ¶
func (s *StorageProvisionerAPIv4) WatchVolumeAttachmentPlans(ctx context.Context, 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 ¶
func (s *StorageProvisionerAPIv4) WatchVolumeAttachments(ctx context.Context, args params.Entities) (params.MachineStorageIdsWatchResults, error)
WatchVolumeAttachments watches for changes to volume attachments scoped to the entity with the tag passed to NewState.
func (*StorageProvisionerAPIv4) WatchVolumes ¶
func (s *StorageProvisionerAPIv4) WatchVolumes(ctx context.Context, args params.Entities) (params.StringsWatchResults, error)
WatchVolumes watches for changes to volumes scoped to the entity with the tag passed to NewState.