provisioner

package
v0.0.0-...-65247a5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2014 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Machine

type Machine struct {
	// contains filtered or unexported fields
}

Machine represents a juju machine as seen by the provisioner worker.

func (*Machine) Constraints

func (m *Machine) Constraints() (constraints.Value, error)

Constraints returns the exact constraints that should apply when provisioning an instance for the machine.

func (*Machine) EnsureDead

func (m *Machine) EnsureDead() error

EnsureDead sets the machine lifecycle to Dead if it is Alive or Dying. It does nothing otherwise.

func (*Machine) Id

func (m *Machine) Id() string

Id returns the machine id.

func (*Machine) InstanceId

func (m *Machine) InstanceId() (instance.Id, error)

InstanceId returns the provider specific instance id for the machine or an CodeNotProvisioned error, if not set.

func (*Machine) Life

func (m *Machine) Life() params.Life

Life returns the machine's lifecycle value.

func (*Machine) Refresh

func (m *Machine) Refresh() error

Refresh updates the cached local copy of the machine's data.

func (*Machine) Remove

func (m *Machine) Remove() error

Remove removes the machine from state. It will fail if the machine is not Dead.

func (*Machine) Series

func (m *Machine) Series() (string, error)

Series returns the operating system series running on the machine.

NOTE: Unlike state.Machine.Series(), this method returns an error as well, because it needs to do an API call.

func (*Machine) SetPassword

func (m *Machine) SetPassword(password string) error

SetPassword sets the machine's password.

func (*Machine) SetProvisioned

func (m *Machine) SetProvisioned(id instance.Id, nonce string, characteristics *instance.HardwareCharacteristics) error

SetProvisioned sets the provider specific machine id, nonce and also metadata for this machine. Once set, the instance id cannot be changed.

func (*Machine) SetStatus

func (m *Machine) SetStatus(status params.Status, info string) error

SetStatus sets the status of the machine.

func (*Machine) SetSupportedContainers

func (m *Machine) SetSupportedContainers(containerTypes ...instance.ContainerType) error

SetSupportedContainers updates the list of containers supported by this machine.

func (*Machine) Status

func (m *Machine) Status() (params.Status, string, error)

Status returns the status of the machine.

func (*Machine) String

func (m *Machine) String() string

String returns the machine as a string.

func (*Machine) SupportsNoContainers

func (m *Machine) SupportsNoContainers() error

SupportsNoContainers records the fact that this machine doesn't support any containers.

func (*Machine) Tag

func (m *Machine) Tag() string

Tag returns the machine's tag.

func (*Machine) WatchAllContainers

func (m *Machine) WatchAllContainers() (watcher.StringsWatcher, error)

WatchAllContainers returns a StringsWatcher that notifies of changes to the lifecycles of all containers on the machine.

func (*Machine) WatchContainers

func (m *Machine) WatchContainers(ctype instance.ContainerType) (watcher.StringsWatcher, error)

WatchContainers returns a StringsWatcher that notifies of changes to the lifecycles of containers of the specified type on the machine.

type State

type State struct {
	*common.EnvironWatcher
	// contains filtered or unexported fields
}

State provides access to the Machiner API facade.

func NewState

func NewState(caller base.Caller) *State

NewState creates a new client-side Machiner facade.

func (*State) APIAddresses

func (st *State) APIAddresses() ([]string, error)

APIAddresses returns the list of addresses used to connect to the API.

func (*State) CACert

func (st *State) CACert() ([]byte, error)

CACert returns the certificate used to validate the state connection.

func (*State) ContainerConfig

func (st *State) ContainerConfig() (result params.ContainerConfig, err error)

ContainerConfig returns information from the environment config that are needed for container cloud-init.

func (*State) Machine

func (st *State) Machine(tag string) (*Machine, error)

Machine provides access to methods of a state.Machine through the facade.

func (*State) StateAddresses

func (st *State) StateAddresses() ([]string, error)

StateAddresses returns the list of addresses used to connect to the state.

func (*State) Tools

func (st *State) Tools(tag string) (*tools.Tools, error)

Tools returns the agent tools for the given entity.

func (*State) WatchEnvironMachines

func (st *State) WatchEnvironMachines() (watcher.StringsWatcher, error)

WatchEnvironMachines returns a StringsWatcher that notifies of changes to the lifecycles of the machines (but not containers) in the current environment.

Jump to

Keyboard shortcuts

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