juju: github.com/juju/juju/apiserver/facades/controller/caasunitprovisioner Index | Files

package caasunitprovisioner

import "github.com/juju/juju/apiserver/facades/controller/caasunitprovisioner"

Index

Package Files

provisioner.go state.go

type Application Uses

type Application interface {
    GetScale() int
    SetScale(int, int64, bool) error
    WatchScale() state.NotifyWatcher
    ApplicationConfig() (application.ConfigAttributes, error)
    AllUnits() (units []Unit, err error)
    AddOperation(state.UnitUpdateProperties) *state.AddUnitOperation
    UpdateUnits(*state.UpdateUnitsOperation) error
    UpdateCloudService(providerId string, addresses []network.SpaceAddress) error
    StorageConstraints() (map[string]state.StorageConstraints, error)
    DeviceConstraints() (map[string]state.DeviceConstraints, error)
    Life() state.Life
    Name() string
    Tag() names.Tag
    Constraints() (constraints.Value, error)
    GetPlacement() string
    SetOperatorStatus(sInfo status.StatusInfo) error
    SetStatus(statusInfo status.StatusInfo) error
    Charm() (Charm, bool, error)
}

Application provides the subset of application state required by the CAAS unit provisioner facade.

type CAASUnitProvisionerState Uses

type CAASUnitProvisionerState interface {
    network.SpaceLookup

    ControllerConfig() (controller.Config, error)
    Application(string) (Application, error)
    FindEntity(names.Tag) (state.Entity, error)
    Model() (Model, error)
    WatchApplications() state.StringsWatcher
    ResolveConstraints(cons constraints.Value) (constraints.Value, error)
}

CAASUnitProvisionerState provides the subset of global state required by the CAAS unit provisioner facade.

type Charm Uses

type Charm interface {
    Meta() *charm.Meta
}

type DeviceBackend Uses

type DeviceBackend interface {
    DeviceConstraints(id string) (map[string]state.DeviceConstraints, error)
}

DeviceBackend provides the subset of backend Device functionality required by the CAAS unit provisioner facade.

type Facade Uses

type Facade struct {
    *common.LifeGetter
    // contains filtered or unexported fields
}

func NewFacade Uses

func NewFacade(
    resources facade.Resources,
    authorizer facade.Authorizer,
    st CAASUnitProvisionerState,
    sb StorageBackend,
    db DeviceBackend,
    storagePoolManager poolmanager.PoolManager,
    registry storage.ProviderRegistry,
    clock clock.Clock,
) (*Facade, error)

NewFacade returns a new CAAS unit provisioner Facade facade.

func NewStateFacade Uses

func NewStateFacade(ctx facade.Context) (*Facade, error)

NewStateFacade provides the signature required for facade registration.

func (*Facade) ApplicationsConfig Uses

func (f *Facade) ApplicationsConfig(args params.Entities) (params.ApplicationGetConfigResults, error)

ApplicationsConfig returns the config for the specified applications.

func (*Facade) ApplicationsScale Uses

func (f *Facade) ApplicationsScale(args params.Entities) (params.IntResults, error)

ApplicationsScale returns the scaling info for specified applications in this model.

func (*Facade) ProvisioningInfo Uses

func (f *Facade) ProvisioningInfo(args params.Entities) (params.KubernetesProvisioningInfoResults, error)

ProvisioningInfo returns the provisioning info for specified applications in this model.

func (*Facade) SetOperatorStatus Uses

func (a *Facade) SetOperatorStatus(args params.SetStatus) (params.ErrorResults, error)

SetOperatorStatus updates the operator status for each given application.

func (*Facade) UpdateApplicationsService Uses

func (a *Facade) UpdateApplicationsService(args params.UpdateApplicationServiceArgs) (params.ErrorResults, error)

UpdateApplicationsService updates the Juju data model to reflect the given service details of the specified application.

func (*Facade) UpdateApplicationsUnits Uses

func (a *Facade) UpdateApplicationsUnits(args params.UpdateApplicationUnitArgs) (params.ErrorResults, error)

UpdateApplicationsUnits updates the Juju data model to reflect the given units of the specified application.

func (*Facade) WatchApplications Uses

func (f *Facade) WatchApplications() (params.StringsWatchResult, error)

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

func (*Facade) WatchApplicationsScale Uses

func (f *Facade) WatchApplicationsScale(args params.Entities) (params.NotifyWatchResults, error)

WatchApplicationsScale starts a NotifyWatcher to watch changes to the applications' scale.

func (*Facade) WatchPodSpec Uses

func (f *Facade) WatchPodSpec(args params.Entities) (params.NotifyWatchResults, error)

WatchPodSpec starts a NotifyWatcher to watch changes to the pod spec for specified units in this model.

type Model Uses

type Model interface {
    ModelConfig() (*config.Config, error)
    PodSpec(tag names.ApplicationTag) (string, error)
    WatchPodSpec(tag names.ApplicationTag) (state.NotifyWatcher, error)
    Containers(providerIds ...string) ([]state.CloudContainer, error)
}

Model provides the subset of CAAS model state required by the CAAS unit provisioner facade.

type StorageBackend Uses

type StorageBackend interface {
    StorageInstance(names.StorageTag) (state.StorageInstance, error)
    Filesystem(names.FilesystemTag) (state.Filesystem, error)
    StorageInstanceFilesystem(names.StorageTag) (state.Filesystem, error)
    UnitStorageAttachments(unit names.UnitTag) ([]state.StorageAttachment, error)
    SetFilesystemInfo(names.FilesystemTag, state.FilesystemInfo) error
    SetFilesystemAttachmentInfo(names.Tag, names.FilesystemTag, state.FilesystemAttachmentInfo) error
    Volume(tag names.VolumeTag) (state.Volume, error)
    StorageInstanceVolume(tag names.StorageTag) (state.Volume, error)
    SetVolumeInfo(names.VolumeTag, state.VolumeInfo) error
    SetVolumeAttachmentInfo(names.Tag, names.VolumeTag, state.VolumeAttachmentInfo) error

    // These are for cleanup up orphaned filesystems when pods are recreated.
    // TODO(caas) - record unit id on the filesystem so we can query by unit
    AllFilesystems() ([]state.Filesystem, error)
    DestroyStorageInstance(tag names.StorageTag, destroyAttachments bool, force bool, maxWait time.Duration) (err error)
    DestroyFilesystem(tag names.FilesystemTag) (err error)
}

StorageBackend provides the subset of backend storage functionality required by the CAAS unit provisioner facade.

type Unit Uses

type Unit interface {
    Name() string
    Life() state.Life
    UnitTag() names.UnitTag
    ContainerInfo() (state.CloudContainer, error)
    AgentStatus() (status.StatusInfo, error)
    UpdateOperation(props state.UnitUpdateProperties) *state.UpdateUnitOperation
    DestroyOperation() *state.DestroyUnitOperation
}

Package caasunitprovisioner imports 28 packages (graph) and is imported by 3 packages. Updated 2019-10-15. Refresh now. Tools for package owners.