Documentation

Index

Constants

View Source
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

    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 ProvisionerAPI

        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

                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

                                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

                                          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.