provisioner

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorRetryWaitDelay = 1 * time.Minute

ErrorRetryWaitDelay is the poll time currently used to trigger the watcher.

Functions

This section is empty.

Types

type Machine

type Machine interface {
	containerizer.Container
	InstanceId() (instance.Id, error)
	IsManual() (bool, error)
	MachineTag() names.MachineTag
	Units() ([]containerizer.Unit, error)
}

Machine is an indirection for use in container provisioning.

type ProfileBackend

type ProfileBackend interface {
	Charm(curl *charm.URL) (ProfileCharm, error)
}

type ProfileCharm

type ProfileCharm interface {
	LXDProfile() *charm.LXDProfile
	Meta() *charm.Meta
	Revision() int
}

type ProfileMachine

type ProfileMachine interface {
	UpgradeCharmProfileApplication() (string, error)
	UpgradeCharmProfileCharmURL() (string, error)
	CharmProfiles() ([]string, error)
	ModelName() string
	Id() string
}

type ProvisionerAPI

ProvisionerAPI provides access to the Provisioner API facade.

func NewProvisionerAPI

func NewProvisionerAPI(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*ProvisionerAPI, error)

NewProvisionerAPI creates a new server-side ProvisionerAPI facade.

func (*ProvisionerAPI) AvailabilityZone

func (p *ProvisionerAPI) AvailabilityZone(args params.Entities) (params.StringResults, error)

AvailabilityZone returns a provider-specific availability zone for each given machine entity

func (*ProvisionerAPI) CACert

func (a *ProvisionerAPI) CACert() (params.BytesResult, error)

CACert returns the certificate used to validate the state connection.

func (*ProvisionerAPI) CharmProfileChangeInfo

func (p *ProvisionerAPI) CharmProfileChangeInfo(machines params.Entities) (params.ProfileChangeResults, error)

CharmProfileChangeInfo retrieves the info necessary to change a charm profile used by a machine.

func (*ProvisionerAPI) Constraints

func (p *ProvisionerAPI) Constraints(args params.Entities) (params.ConstraintsResults, error)

Constraints returns the constraints for each given machine entity.

func (*ProvisionerAPI) ContainerConfig

func (p *ProvisionerAPI) ContainerConfig() (params.ContainerConfig, error)

ContainerConfig returns information from the model config that is needed for container cloud-init.

func (*ProvisionerAPI) ContainerManagerConfig

ContainerManagerConfig returns information from the model config that is needed for configuring the container manager.

func (*ProvisionerAPI) DistributionGroup

func (p *ProvisionerAPI) DistributionGroup(args params.Entities) (params.DistributionGroupResults, error)

DistributionGroup returns, for each given machine entity, a slice of instance.Ids that belong to the same distribution group as that machine. This information may be used to distribute instances for high availability.

func (*ProvisionerAPI) DistributionGroupByMachineId

func (p *ProvisionerAPI) DistributionGroupByMachineId(args params.Entities) (params.StringsResults, error)

DistributionGroupByMachineId returns, for each given machine entity, a slice of machine.Ids that belong to the same distribution group as that machine. This information may be used to distribute instances for high availability.

func (*ProvisionerAPI) GetContainerInterfaceInfo

func (p *ProvisionerAPI) GetContainerInterfaceInfo(args params.Entities) (
	params.MachineNetworkConfigResults,
	error,
)

GetContainerInterfaceInfo returns information to configure networking for a container. It accepts container tags as arguments.

func (*ProvisionerAPI) GetContainerProfileInfo

func (p *ProvisionerAPI) GetContainerProfileInfo(args params.Entities) (params.ContainerProfileResults, error)

GetContainerProfileInfo returns information to configure a lxd profile(s) for a container based on the charms deployed to the container. It accepts container tags as arguments. Unlike machineLXDProfileNames which has the environ write the lxd profiles and returns the names of profiles already written.

func (*ProvisionerAPI) HostChangesForContainers

func (p *ProvisionerAPI) HostChangesForContainers(args params.Entities) (params.HostNetworkChangeResults, error)

HostChangesForContainers returns the set of changes that need to be done to the host machine to prepare it for the containers to be created. Pass in a list of the containers that you want the changes for.

func (*ProvisionerAPI) InstanceStatus

func (p *ProvisionerAPI) InstanceStatus(args params.Entities) (params.StatusResults, error)

InstanceStatus returns the instance status for each given entity. Only machine tags are accepted.

func (*ProvisionerAPI) KeepInstance

func (p *ProvisionerAPI) KeepInstance(args params.Entities) (params.BoolResults, error)

KeepInstance returns the keep-instance value for each given machine entity.

func (*ProvisionerAPI) MachinesWithTransientErrors

func (p *ProvisionerAPI) MachinesWithTransientErrors() (params.StatusResults, error)

MachinesWithTransientErrors returns status data for machines with provisioning errors which are transient.

func (*ProvisionerAPI) MarkMachinesForRemoval

func (p *ProvisionerAPI) MarkMachinesForRemoval(machines params.Entities) (params.ErrorResults, error)

MarkMachinesForRemoval indicates that the specified machines are ready to have any provider-level resources cleaned up and then be removed.

func (*ProvisionerAPI) PrepareContainerInterfaceInfo

func (p *ProvisionerAPI) PrepareContainerInterfaceInfo(args params.Entities) (
	params.MachineNetworkConfigResults,
	error,
)

PrepareContainerInterfaceInfo allocates an address and returns information to configure networking for a container. It accepts container tags as arguments.

func (*ProvisionerAPI) ProvisioningInfo

func (p *ProvisionerAPI) ProvisioningInfo(args params.Entities) (params.ProvisioningInfoResults, error)

ProvisioningInfo returns the provisioning information for each given machine entity.

func (*ProvisionerAPI) ReleaseContainerAddresses

func (p *ProvisionerAPI) ReleaseContainerAddresses(args params.Entities) (params.ErrorResults, error)

ReleaseContainerAddresses finds addresses allocated to a container and marks them as Dead, to be released and removed. It accepts container tags as arguments.

func (*ProvisionerAPI) RemoveUpgradeCharmProfileData

func (p *ProvisionerAPI) RemoveUpgradeCharmProfileData(args params.Entities) (params.ErrorResults, error)

RemoveUpgradeCharmProfileData completely removes the instance charm profile data for a machine, even if the machine is dead.

func (*ProvisionerAPI) Series

Series returns the deployed series for each given machine entity.

func (*ProvisionerAPI) SetCharmProfiles

func (p *ProvisionerAPI) SetCharmProfiles(args params.SetProfileArgs) (params.ErrorResults, error)

SetCharmProfiles records the given slice of charm profile names.

func (*ProvisionerAPI) SetHostMachineNetworkConfig

func (p *ProvisionerAPI) SetHostMachineNetworkConfig(args params.SetMachineNetworkConfig) error

func (*ProvisionerAPI) SetInstanceInfo

func (p *ProvisionerAPI) SetInstanceInfo(args params.InstancesInfo) (params.ErrorResults, error)

SetInstanceInfo sets the provider specific machine id, nonce, metadata and network info for each given machine. Once set, the instance id cannot be changed.

func (*ProvisionerAPI) SetInstanceStatus

func (p *ProvisionerAPI) SetInstanceStatus(args params.SetStatus) (params.ErrorResults, error)

SetInstanceStatus updates the instance status for each given entity. Only machine tags are accepted.

func (*ProvisionerAPI) SetSupportedContainers

func (p *ProvisionerAPI) SetSupportedContainers(args params.MachineContainersParams) (params.ErrorResults, error)

SetSupportedContainers updates the list of containers supported by the machines passed in args.

func (*ProvisionerAPI) SetUpgradeCharmProfileComplete

func (p *ProvisionerAPI) SetUpgradeCharmProfileComplete(args params.SetProfileUpgradeCompleteArgs) (params.ErrorResults, error)

SetUpgradeCharmProfileComplete recorded that the result of updating the machine's charm profile(s)

func (*ProvisionerAPI) WatchAllContainers

func (p *ProvisionerAPI) WatchAllContainers(args params.WatchContainers) (params.StringsWatchResults, error)

WatchAllContainers starts a StringsWatcher to watch all containers deployed to any machine passed in args.

func (*ProvisionerAPI) WatchContainers

WatchContainers starts a StringsWatcher to watch containers deployed to any machine passed in args.

func (*ProvisionerAPI) WatchContainersCharmProfiles

func (p *ProvisionerAPI) WatchContainersCharmProfiles(args params.WatchContainers) (params.StringsWatchResults, error)

WatchContainersCharmProfiles starts a StringsWatcher to notifies when the provisioner should update the charm profiles used by a container on the given machine.

func (*ProvisionerAPI) WatchMachineErrorRetry

func (p *ProvisionerAPI) WatchMachineErrorRetry() (params.NotifyWatchResult, error)

WatchMachineErrorRetry returns a NotifyWatcher that notifies when the provisioner should retry provisioning machines with transient errors.

func (*ProvisionerAPI) WatchModelMachinesCharmProfiles

func (p *ProvisionerAPI) WatchModelMachinesCharmProfiles() (params.StringsWatchResult, error)

WatchModelMachinesCharmProfiles returns a StringsWatcher that notifies when the provisioner should update the charm profiles used by a machine.

type ProvisionerAPIV4

type ProvisionerAPIV4 struct {
	*ProvisionerAPIV5
}

ProvisionerAPIV4 provides v4 (and v3 for some reason) of the provisioner facade.

func NewProvisionerAPIV4

func NewProvisionerAPIV4(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*ProvisionerAPIV4, error)

NewProvisionerAPIV4 creates a new server-side version 4 Provisioner API facade.

func (*ProvisionerAPIV4) DistributionGroupByMachineId

func (p *ProvisionerAPIV4) DistributionGroupByMachineId(_, _ struct{})

DistributionGroupByMachineId isn't on the v4 API.

type ProvisionerAPIV5

type ProvisionerAPIV5 struct {
	*ProvisionerAPIV6
}

ProvisionerAPIV5 provides v5 of the provisioner facade.

func NewProvisionerAPIV5

func NewProvisionerAPIV5(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*ProvisionerAPIV5, error)

NewProvisionerAPIV5 creates a new server-side Provisioner API facade.

func (*ProvisionerAPIV5) ContainerConfig

func (p *ProvisionerAPIV5) ContainerConfig() (params.ContainerConfigV5, error)

ContainerConfig returns information from the model config that is needed for container cloud-init.

type ProvisionerAPIV6

type ProvisionerAPIV6 struct {
	*ProvisionerAPIV7
}

ProvisionerAPIV6 provides v6 of the provisioner facade.

func NewProvisionerAPIV6

func NewProvisionerAPIV6(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*ProvisionerAPIV6, error)

NewProvisionerAPIV6 creates a new server-side Provisioner API facade.

type ProvisionerAPIV7

type ProvisionerAPIV7 struct {
	*ProvisionerAPI
}

ProvisionerAPIV7 provides v7 of the provisioner facade.

func NewProvisionerAPIV7

func NewProvisionerAPIV7(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*ProvisionerAPIV7, error)

NewProvisionerAPIV7 creates a new server-side Provisioner API facade.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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