Documentation ¶
Index ¶
- Constants
- Variables
- type ProvisionerAPI
- func (p *ProvisionerAPI) Constraints(args params.Entities) (params.ConstraintsResults, error)
- func (p *ProvisionerAPI) ContainerConfig() (params.ContainerConfig, error)
- func (p *ProvisionerAPI) ContainerManagerConfig(args params.ContainerManagerConfigParams) (params.ContainerManagerConfig, error)
- func (p *ProvisionerAPI) DistributionGroup(args params.Entities) (params.DistributionGroupResults, error)
- func (p *ProvisionerAPI) GetContainerInterfaceInfo(args params.Entities) (params.MachineNetworkConfigResults, error)
- func (p *ProvisionerAPI) MachinesWithTransientErrors() (params.StatusResults, error)
- func (p *ProvisionerAPI) PrepareContainerInterfaceInfo(args params.Entities) (params.MachineNetworkConfigResults, error)
- func (p *ProvisionerAPI) ProvisioningInfo(args params.Entities) (params.ProvisioningInfoResults, error)
- func (p *ProvisionerAPI) ReleaseContainerAddresses(args params.Entities) (params.ErrorResults, error)
- func (p *ProvisionerAPI) RequestedNetworks(args params.Entities) (params.RequestedNetworksResults, error)
- func (p *ProvisionerAPI) Series(args params.Entities) (params.StringResults, error)
- func (p *ProvisionerAPI) SetInstanceInfo(args params.InstancesInfo) (params.ErrorResults, error)
- func (p *ProvisionerAPI) SetProvisioned(args params.SetProvisioned) (params.ErrorResults, error)
- func (p *ProvisionerAPI) SetSupportedContainers(args params.MachineContainersParams) (params.ErrorResults, error)
- func (p *ProvisionerAPI) WatchAllContainers(args params.WatchContainers) (params.StringsWatchResults, error)
- func (p *ProvisionerAPI) WatchContainers(args params.WatchContainers) (params.StringsWatchResults, error)
- func (p *ProvisionerAPI) WatchMachineErrorRetry() (params.NotifyWatchResult, error)
Constants ¶
const MACAddressTemplate = "00:16:3e:%02x:%02x:%02x"
MACAddressTemplate is used to generate a unique MAC address for a container. Every '%x' is replaced by a random hexadecimal digit, while the rest is kept as-is.
Variables ¶
var ErrorRetryWaitDelay = 1 * time.Minute
ErrorRetryWaitDelay is the poll time currently used to trigger the watcher.
Functions ¶
This section is empty.
Types ¶
type ProvisionerAPI ¶
type ProvisionerAPI struct { *common.Remover *common.StatusSetter *common.StatusGetter *common.DeadEnsurer *common.PasswordChanger *common.LifeGetter *common.StateAddresser *common.APIAddresser *common.EnvironWatcher *common.EnvironMachinesWatcher *common.InstanceIdGetter *common.ToolsFinder *common.ToolsGetter // contains filtered or unexported fields }
ProvisionerAPI provides access to the Provisioner API facade.
func NewProvisionerAPI ¶
func NewProvisionerAPI(st *state.State, resources *common.Resources, authorizer common.Authorizer) (*ProvisionerAPI, error)
NewProvisionerAPI creates a new server-side ProvisionerAPI facade.
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 environment config that is needed for container cloud-init.
func (*ProvisionerAPI) ContainerManagerConfig ¶
func (p *ProvisionerAPI) ContainerManagerConfig(args params.ContainerManagerConfigParams) (params.ContainerManagerConfig, error)
ContainerManagerConfig returns information from the environment 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) 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. If the address allocation feature flag is not enabled, it returns a NotSupported error.
func (*ProvisionerAPI) MachinesWithTransientErrors ¶
func (p *ProvisionerAPI) MachinesWithTransientErrors() (params.StatusResults, error)
MachinesWithTransientErrors returns status data for machines with provisioning errors which are transient.
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. If the address allocation feature flag is not enabled, it returns a NotSupported error.
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. If address allocation feature flag is not enabled, it will return a NotSupported error.
func (*ProvisionerAPI) RequestedNetworks ¶
func (p *ProvisionerAPI) RequestedNetworks(args params.Entities) (params.RequestedNetworksResults, error)
RequestedNetworks returns the requested networks for each given machine entity. Each entry in both lists is returned with its provider specific id.
func (*ProvisionerAPI) Series ¶
func (p *ProvisionerAPI) Series(args params.Entities) (params.StringResults, error)
Series returns the deployed series for each given machine entity.
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) SetProvisioned ¶
func (p *ProvisionerAPI) SetProvisioned(args params.SetProvisioned) (params.ErrorResults, error)
SetProvisioned sets the provider specific instance id, nonce and metadata for each given machine. Once set, the instance id cannot be changed.
TODO(dimitern) This is not used anymore (as of 1.19.0) and is retained only for backwards-compatibility. It should be removed as deprecated. SetInstanceInfo is used instead.
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) 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 ¶
func (p *ProvisionerAPI) WatchContainers(args params.WatchContainers) (params.StringsWatchResults, error)
WatchContainers starts a StringsWatcher to watch containers deployed to any machine passed in args.
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.