Documentation
¶
Index ¶
- type AddCharmChange
- type AddCharmParams
- type AddMachineChange
- type AddMachineOptions
- type AddMachineParams
- type AddRelationChange
- type AddRelationParams
- type AddServiceChange
- type AddServiceParams
- type AddUnitChange
- type AddUnitParams
- type Change
- type EntityType
- type ExposeChange
- type ExposeParams
- type SetAnnotationsChange
- type SetAnnotationsParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCharmChange ¶
type AddCharmChange struct {
// Params holds parameters for adding a charm.
Params AddCharmParams
// contains filtered or unexported fields
}
AddCharmChange holds a change for adding a charm to the environment.
func (*AddCharmChange) GUIArgs ¶
func (ch *AddCharmChange) GUIArgs() []interface{}
GUIArgs implements Change.GUIArgs.
type AddCharmParams ¶
type AddCharmParams struct {
// Charm holds the URL of the charm to be added.
Charm string
// Series holds the series of the charm to be added
// if the charm default is not sufficient.
Series string
}
AddCharmParams holds parameters for adding a charm to the environment.
type AddMachineChange ¶
type AddMachineChange struct {
// Params holds parameters for adding a machine.
Params AddMachineParams
// contains filtered or unexported fields
}
AddMachineChange holds a change for adding a machine or container.
func (*AddMachineChange) GUIArgs ¶
func (ch *AddMachineChange) GUIArgs() []interface{}
GUIArgs implements Change.GUIArgs.
type AddMachineOptions ¶
type AddMachineOptions struct {
// Series holds the machine OS series.
Series string `json:"series,omitempty"`
// Constraints holds the machine constraints.
Constraints string `json:"constraints,omitempty"`
// ContainerType holds the machine container type (like "lxc" or "kvm").
ContainerType string `json:"containerType,omitempty"`
// ParentId holds the id of the parent machine.
ParentId string `json:"parentId,omitempty"`
}
AddMachineOptions holds GUI options for adding a machine or container.
type AddMachineParams ¶
type AddMachineParams struct {
// Series holds the optional machine OS series.
Series string
// Constraints holds the optional machine constraints.
Constraints string
// ContainerType optionally holds the type of the container (for instance
// ""lxc" or kvm"). It is not specified for top level machines.
ContainerType string
// ParentId optionally holds a placeholder pointing to another machine
// change or to a unit change. This value is only specified in the case
// this machine is a container, in which case also ContainerType is set.
ParentId string
}
AddMachineParams holds parameters for adding a machine or container.
type AddRelationChange ¶
type AddRelationChange struct {
// Params holds parameters for adding a relation.
Params AddRelationParams
// contains filtered or unexported fields
}
AddRelationChange holds a change for adding a relation between two services.
func (*AddRelationChange) GUIArgs ¶
func (ch *AddRelationChange) GUIArgs() []interface{}
GUIArgs implements Change.GUIArgs.
type AddRelationParams ¶
type AddRelationParams struct {
// Endpoint1 and Endpoint2 hold relation endpoints in the
// "service:interface" form, where the service is always a placeholder
// pointing to a service change, and the interface is optional. Examples
// are "$deploy-42:web" or just "$deploy-42".
Endpoint1 string
Endpoint2 string
}
AddRelationParams holds parameters for adding a relation between two services.
type AddServiceChange ¶
type AddServiceChange struct {
// Params holds parameters for adding a service.
Params AddServiceParams
// contains filtered or unexported fields
}
AddServiceChange holds a change for deploying a Juju service.
func (*AddServiceChange) GUIArgs ¶
func (ch *AddServiceChange) GUIArgs() []interface{}
GUIArgs implements Change.GUIArgs.
type AddServiceParams ¶
type AddServiceParams struct {
// Charm holds the URL of the charm to be used to deploy this service.
Charm string
// Service holds the service name.
Service string
// Options holds service options.
Options map[string]interface{}
// Constraints holds the optional service constraints.
Constraints string
// Storage holds the optional storage constraints.
Storage map[string]string
// EndpointBindings holds the optional endpoint bindings
EndpointBindings map[string]string
// Resources identifies the revision to use for each resource
// of the service's charm.
Resources map[string]int
}
AddServiceParams holds parameters for deploying a Juju service.
type AddUnitChange ¶
type AddUnitChange struct {
// Params holds parameters for adding a unit.
Params AddUnitParams
// contains filtered or unexported fields
}
AddUnitChange holds a change for adding a service unit.
func (*AddUnitChange) GUIArgs ¶
func (ch *AddUnitChange) GUIArgs() []interface{}
GUIArgs implements Change.GUIArgs.
type AddUnitParams ¶
type AddUnitParams struct {
// Service holds the service placeholder name for which a unit is added.
Service string
// To holds the optional location where to add the unit, as a placeholder
// pointing to another unit change or to a machine change.
To string
}
AddUnitParams holds parameters for adding a service unit.
type Change ¶
type Change interface {
// Id returns the unique identifier for this change.
Id() string
// Requires returns the ids of all the changes that must
// be applied before this one.
Requires() []string
// Method returns the action to be performed to apply this change.
Method() string
// GUIArgs returns positional arguments to pass to the method, suitable for
// being JSON-serialized and sent to the Juju GUI.
GUIArgs() []interface{}
// contains filtered or unexported methods
}
Change holds a single change required to deploy a bundle.
func FromData ¶
func FromData(data *charm.BundleData) []Change
FromData generates and returns the list of changes required to deploy the given bundle data. The changes are sorted by requirements, so that they can be applied in order. The bundle data is assumed to be already verified.
type EntityType ¶
type EntityType string
EntityType holds entity types ("service" or "machine").
const ( ServiceType EntityType = "service" MachineType EntityType = "machine" )
type ExposeChange ¶
type ExposeChange struct {
// Params holds parameters for exposing a service.
Params ExposeParams
// contains filtered or unexported fields
}
ExposeChange holds a change for exposing a service.
func (*ExposeChange) GUIArgs ¶
func (ch *ExposeChange) GUIArgs() []interface{}
GUIArgs implements Change.GUIArgs.
type ExposeParams ¶
type ExposeParams struct {
// Service holds the placeholder name of the service that must be exposed.
Service string
}
ExposeParams holds parameters for exposing a service.
type SetAnnotationsChange ¶
type SetAnnotationsChange struct {
// Params holds parameters for setting annotations.
Params SetAnnotationsParams
// contains filtered or unexported fields
}
SetAnnotationsChange holds a change for setting service and machine annotations.
func (*SetAnnotationsChange) GUIArgs ¶
func (ch *SetAnnotationsChange) GUIArgs() []interface{}
GUIArgs implements Change.GUIArgs.
func (*SetAnnotationsChange) Id ¶
func (ch *SetAnnotationsChange) Id() string
Id implements Change.Id.
type SetAnnotationsParams ¶
type SetAnnotationsParams struct {
// Id is the placeholder for the service or machine change corresponding to
// the entity to be annotated.
Id string
// EntityType holds the type of the entity, "service" or "machine".
EntityType EntityType
// Annotations holds the annotations as key/value pairs.
Annotations map[string]string
}
SetAnnotationsParams holds parameters for setting annotations.