juju: github.com/juju/juju/apiserver/facades/client/application Index | Files | Directories

package application

import "github.com/juju/juju/apiserver/facades/client/application"

Package application contains api calls for functionality related to deploying and managing applications and their related charms.

Index

Package Files

application.go backend.go charmstore.go deploy.go get.go trust.go

Constants

const TrustConfigOptionName = "trust"

TrustConfigOptionName is the option name used to set trust level in application configuration.

Variables

var (
    // ErrInvalidAgentVersions is a sentinal error for when we can no longer
    // upgrade juju using 2.5.x agents with 2.6 or greater controllers.
    ErrInvalidAgentVersions = errors.Errorf(
        "Unable to upgrade LXDProfile charms with the current model version. " +
            "Please run juju upgrade-juju to upgrade the current model to match your controller.")
)
var NewCharmStoreRepo = newCharmStoreFromClient

NewCharmStoreRepo instantiates a new charm store repository. It is exported for testing purposes.

func AddCharmWithAuthorization Uses

func AddCharmWithAuthorization(st State, args params.AddCharmWithAuthorization) error

AddCharmWithAuthorization adds the given charm URL (which must include revision) to the environment, if it does not exist yet. Local charms are not supported, only charm store URLs. See also AddLocalCharm().

The authorization macaroon, args.CharmStoreMacaroon, may be omitted, in which case this call is equivalent to AddCharm.

func AddCharmWithAuthorizationAndRepo Uses

func AddCharmWithAuthorizationAndRepo(st State, args params.AddCharmWithAuthorization, repoFn func() (charmrepo.Interface, error)) error

AddCharmWithAuthorizationAndRepo adds the given charm URL (which must include revision) to the environment, if it does not exist yet. Local charms are not supported, only charm store URLs. See also AddLocalCharm(). Additionally a Repo (See charmrepo.Interface) function factory can be provided to help with overriding the source of downloading charms. The main benefit of this indirection is to help with testing (mocking)

The authorization macaroon, args.CharmStoreMacaroon, may be omitted, in which case this call is equivalent to AddCharm.

func AddTrustSchemaAndDefaults Uses

func AddTrustSchemaAndDefaults(schema environschema.Fields, defaults schema.Defaults) (environschema.Fields, schema.Defaults, error)

AddTrustSchemaAndDefaults adds trust schema fields and defaults to an existing set of schema fields and defaults.

func CharmToStateCharm Uses

func CharmToStateCharm(ch Charm) *state.Charm

CharmToStateCharm converts a Charm into a state.Charm. This is a hack that is required until the State interface methods we deal with stop accepting state.Charms, and start accepting charm.Charm and charm.URL.

func ResolveCharms Uses

func ResolveCharms(st State, args params.ResolveCharms) (params.ResolveCharmResults, error)

ResolveCharm resolves the best available charm URLs with series, for charm locations without a series specified.

func StoreCharmArchive Uses

func StoreCharmArchive(st State, archive CharmArchive) error

StoreCharmArchive stores a charm archive in environment storage.

type APIBase Uses

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

APIBase implements the shared application interface and is the concrete implementation of the api end point.

API provides the Application API facade for version 5.

func NewAPIBase Uses

func NewAPIBase(
    backend Backend,
    storageAccess storageInterface,
    authorizer facade.Authorizer,
    blockChecker BlockChecker,
    model Model,
    stateCharm func(Charm) *state.Charm,
    deployApplication func(ApplicationDeployer, DeployApplicationParams) (Application, error),
    storagePoolManager poolmanager.PoolManager,
    registry storage.ProviderRegistry,
    resources facade.Resources,
    caasBroker caasBrokerInterface,
) (*APIBase, error)

NewAPIBase returns a new application API facade.

func (*APIBase) AddRelation Uses

func (api *APIBase) AddRelation(args params.AddRelation) (_ params.AddRelationResults, err error)

AddRelation adds a relation between the specified endpoints and returns the relation info.

func (*APIBase) AddUnits Uses

func (api *APIBase) AddUnits(args params.AddApplicationUnits) (params.AddApplicationUnitsResults, error)

AddUnits adds a given number of units to an application.

func (*APIBase) ApplicationsInfo Uses

func (api *APIBase) ApplicationsInfo(in params.Entities) (params.ApplicationInfoResults, error)

ApplicationsInfo returns applications information.

func (*APIBase) CharmConfig Uses

func (api *APIBase) CharmConfig(args params.ApplicationGetArgs) (params.ApplicationGetConfigResults, error)

CharmConfig returns charm config for the input list of applications and model generations.

func (*APIBase) CharmRelations Uses

func (api *APIBase) CharmRelations(p params.ApplicationCharmRelations) (params.ApplicationCharmRelationsResults, error)

CharmRelations implements the server side of Application.CharmRelations.

func (*APIBase) Consume Uses

func (api *APIBase) Consume(args params.ConsumeApplicationArgs) (params.ErrorResults, error)

Consume adds remote applications to the model without creating any relations.

func (*APIBase) Deploy Uses

func (api *APIBase) Deploy(args params.ApplicationsDeploy) (params.ErrorResults, error)

Deploy fetches the charms from the charm store and deploys them using the specified placement directives.

func (*APIBase) Destroy Uses

func (api *APIBase) Destroy(in params.ApplicationDestroy) error

Destroy destroys a given application, local or remote.

NOTE(axw) this exists only for backwards compatibility, for API facade versions 1-3; clients should prefer its successor, DestroyApplication, below. Until all consumers have been updated, or we bump a major version, we can't drop this.

TODO(axw) 2017-03-16 #1673323 Drop this in Juju 3.0.

func (*APIBase) DestroyApplication Uses

func (api *APIBase) DestroyApplication(args params.DestroyApplicationsParams) (params.DestroyApplicationResults, error)

DestroyApplication removes a given set of applications.

func (*APIBase) DestroyConsumedApplications Uses

func (api *APIBase) DestroyConsumedApplications(args params.DestroyConsumedApplicationsParams) (params.ErrorResults, error)

DestroyConsumedApplications removes a given set of consumed (remote) applications.

func (*APIBase) DestroyRelation Uses

func (api *APIBase) DestroyRelation(args params.DestroyRelation) (err error)

DestroyRelation removes the relation between the specified endpoints or an id.

func (*APIBase) DestroyUnit Uses

func (api *APIBase) DestroyUnit(args params.DestroyUnitsParams) (params.DestroyUnitResults, error)

DestroyUnit removes a given set of application units.

func (*APIBase) DestroyUnits Uses

func (api *APIBase) DestroyUnits(args params.DestroyApplicationUnits) error

DestroyUnits removes a given set of application units.

NOTE(axw) this exists only for backwards compatibility, for API facade versions 1-3; clients should prefer its successor, DestroyUnit, below. Until all consumers have been updated, or we bump a major version, we can't drop this.

TODO(axw) 2017-03-16 #1673323 Drop this in Juju 3.0.

func (*APIBase) Expose Uses

func (api *APIBase) Expose(args params.ApplicationExpose) error

Expose changes the juju-managed firewall to expose any ports that were also explicitly marked by units as open.

func (*APIBase) Get Uses

func (api *APIBase) Get(args params.ApplicationGet) (params.ApplicationGetResults, error)

Get returns the charm configuration for an application.

func (*APIBase) GetCharmURL Uses

func (api *APIBase) GetCharmURL(args params.ApplicationGet) (params.StringResult, error)

GetCharmURL returns the charm URL the given application is running at present.

func (*APIBase) GetConfig Uses

func (api *APIBase) GetConfig(args params.Entities) (params.ApplicationGetConfigResults, error)

GetConfig returns the charm config for each of the input applications.

func (*APIBase) GetConstraints Uses

func (api *APIBase) GetConstraints(args params.Entities) (params.ApplicationGetConstraintsResults, error)

GetConstraints returns the constraints for a given application.

func (*APIBase) ResolveUnitErrors Uses

func (api *APIBase) ResolveUnitErrors(p params.UnitsResolved) (params.ErrorResults, error)

ResolveUnitErrors marks errors on the specified units as resolved.

func (*APIBase) ScaleApplications Uses

func (api *APIBase) ScaleApplications(args params.ScaleApplicationsParams) (params.ScaleApplicationResults, error)

ScaleApplications scales the specified application to the requested number of units.

func (*APIBase) Set Uses

func (api *APIBase) Set(p params.ApplicationSet) error

Set implements the server side of Application.Set. It does not unset values that are set to an empty string. Unset should be used for that.

func (*APIBase) SetApplicationsConfig Uses

func (api *APIBase) SetApplicationsConfig(args params.ApplicationConfigSetArgs) (params.ErrorResults, error)

SetApplicationsConfig implements the server side of Application.SetApplicationsConfig. It does not unset values that are set to an empty string. Unset should be used for that.

func (*APIBase) SetCharm Uses

func (api *APIBase) SetCharm(args params.ApplicationSetCharm) error

SetCharm sets the charm for a given for the application.

func (*APIBase) SetConstraints Uses

func (api *APIBase) SetConstraints(args params.SetConstraints) error

SetConstraints sets the constraints for a given application.

func (*APIBase) SetMetricCredentials Uses

func (api *APIBase) SetMetricCredentials(args params.ApplicationMetricCredentials) (params.ErrorResults, error)

SetMetricCredentials sets credentials on the application.

func (*APIBase) SetRelationsSuspended Uses

func (api *APIBase) SetRelationsSuspended(args params.RelationSuspendedArgs) (params.ErrorResults, error)

SetRelationsSuspended sets the suspended status of the specified relations.

func (*APIBase) Unexpose Uses

func (api *APIBase) Unexpose(args params.ApplicationUnexpose) error

Unexpose changes the juju-managed firewall to unexpose any ports that were also explicitly marked by units as open.

func (*APIBase) Unset Uses

func (api *APIBase) Unset(p params.ApplicationUnset) error

Unset implements the server side of Client.Unset.

func (*APIBase) UnsetApplicationsConfig Uses

func (api *APIBase) UnsetApplicationsConfig(args params.ApplicationConfigUnsetArgs) (params.ErrorResults, error)

UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig.

func (*APIBase) Update Uses

func (api *APIBase) Update(args params.ApplicationUpdate) error

Update updates the application attributes, including charm URL, minimum number of units, charm config and constraints. All parameters in params.ApplicationUpdate except the application name are optional.

func (*APIBase) UpdateApplicationSeries Uses

func (api *APIBase) UpdateApplicationSeries(args params.UpdateSeriesArgs) (params.ErrorResults, error)

UpdateApplicationSeries updates the application series. Series for subordinates updated too.

type APIv10 Uses

type APIv10 struct {
    *APIv11
}

APIv10 provides the Application API facade for version 10. It adds --force and --max-wait parameters to remove-saas.

func NewFacadeV10 Uses

func NewFacadeV10(ctx facade.Context) (*APIv10, error)

type APIv11 Uses

type APIv11 struct {
    *APIBase
}

APIv11 provides the Application API facade for version 11. The Get call also returns the current endpoint bindings while the SetCharm call access a map of operator-defined bindings.

func NewFacadeV11 Uses

func NewFacadeV11(ctx facade.Context) (*APIv11, error)

type APIv4 Uses

type APIv4 struct {
    *APIv5
}

APIv4 provides the Application API facade for versions 1-4.

func NewFacadeV4 Uses

func NewFacadeV4(ctx facade.Context) (*APIv4, error)

NewFacadeV4 provides the signature required for facade registration for versions 1-4.

func (*APIv4) DestroyApplication Uses

func (api *APIv4) DestroyApplication(args params.Entities) (params.DestroyApplicationResults, error)

DestroyApplication removes a given set of applications.

NOTE(axw) this provides backwards compatibility for facade version 4.

func (*APIv4) DestroyUnit Uses

func (api *APIv4) DestroyUnit(args params.Entities) (params.DestroyUnitResults, error)

DestroyUnit removes a given set of application units.

NOTE(axw) this provides backwards compatibility for facade version 4.

func (*APIv4) Get Uses

func (api *APIv4) Get(args params.ApplicationGet) (params.ApplicationGetResults, error)

Get returns the charm configuration for an application. This used the confusing "default" boolean to mean the value was set from the charm defaults. Needs to be kept for backwards compatibility.

func (*APIv4) GetConfig Uses

func (u *APIv4) GetConfig(_, _ struct{})

GetConfig isn't on the V4 API.

func (*APIv4) GetConstraints Uses

func (api *APIv4) GetConstraints(args params.GetApplicationConstraints) (params.GetConstraintsResults, error)

GetConstraints returns the v4 implementation of GetConstraints.

func (*APIv4) UpdateApplicationSeries Uses

func (u *APIv4) UpdateApplicationSeries(_, _ struct{})

UpdateApplicationSeries isn't on the V4 API.

type APIv5 Uses

type APIv5 struct {
    *APIv6
}

APIv5 provides the Application API facade for version 5.

func NewFacadeV5 Uses

func NewFacadeV5(ctx facade.Context) (*APIv5, error)

NewFacadeV5 provides the signature required for facade registration for version 5.

func (*APIv5) AddUnits Uses

func (api *APIv5) AddUnits(args params.AddApplicationUnitsV5) (params.AddApplicationUnitsResults, error)

AddUnits adds a given number of units to an application.

func (*APIv5) CharmConfig Uses

func (u *APIv5) CharmConfig(_, _ struct{})

CharmConfig isn't on the v5 API.

func (*APIv5) Deploy Uses

func (api *APIv5) Deploy(args params.ApplicationsDeployV5) (params.ErrorResults, error)

Deploy fetches the charms from the charm store and deploys them using the specified placement directives. V5 deploy did not support policy, so pass through an empty string.

func (*APIv5) Get Uses

func (api *APIv5) Get(args params.ApplicationGet) (params.ApplicationGetResults, error)

Get returns the charm configuration for an application. It zeros out any application config as that was not supported in v5.

func (*APIv5) ResolveUnitErrors Uses

func (u *APIv5) ResolveUnitErrors(_, _ struct{})

ResolveUnitErrors isn't on the v5 API.

func (*APIv5) SetApplicationsConfig Uses

func (u *APIv5) SetApplicationsConfig(_, _ struct{})

SetApplicationsConfig isn't on the v5 API.

func (*APIv5) UnsetApplicationsConfig Uses

func (u *APIv5) UnsetApplicationsConfig(_, _ struct{})

UnsetApplicationsConfig isn't on the v5 API.

type APIv6 Uses

type APIv6 struct {
    *APIv7
}

APIv6 provides the Application API facade for version 6.

func NewFacadeV6 Uses

func NewFacadeV6(ctx facade.Context) (*APIv6, error)

NewFacadeV6 provides the signature required for facade registration for version 6.

func (*APIv6) Deploy Uses

func (api *APIv6) Deploy(args params.ApplicationsDeployV6) (params.ErrorResults, error)

Deploy fetches the charms from the charm store and deploys them using the specified placement directives. V6 deploy did not support devices, so pass through an empty map.

type APIv7 Uses

type APIv7 struct {
    *APIv8
}

APIv7 provides the Application API facade for version 7.

func NewFacadeV7 Uses

func NewFacadeV7(ctx facade.Context) (*APIv7, error)

NewFacadeV7 provides the signature required for facade registration for version 7.

func (*APIv7) ScaleApplications Uses

func (u *APIv7) ScaleApplications(_, _ struct{})

ScaleApplications isn't on the V7 API.

type APIv8 Uses

type APIv8 struct {
    *APIv9
}

APIv8 provides the Application API facade for version 8.

func NewFacadeV8 Uses

func NewFacadeV8(ctx facade.Context) (*APIv8, error)

NewFacadeV8 provides the signature required for facade registration for version 8.

func (*APIv8) ApplicationInfo Uses

func (u *APIv8) ApplicationInfo(_, _ struct{})

ApplicationInfo isn't on the v8 API.

func (*APIv8) CharmConfig Uses

func (api *APIv8) CharmConfig(args params.Entities) (params.ApplicationGetConfigResults, error)

CharmConfig is a shim to GetConfig on APIv5. It returns only charm config. Version 8 and below accept params.Entities, where later versions must accept a model generation

type APIv9 Uses

type APIv9 struct {
    *APIv10
}

APIv9 provides the Application API facade for version 9.

func NewFacadeV9 Uses

func NewFacadeV9(ctx facade.Context) (*APIv9, error)

type AgentTools Uses

type AgentTools interface {
    AgentTools() (*tools.Tools, error)
}

AgentTools is a point of use agent tools requester.

type AgentVersioner Uses

type AgentVersioner interface {
    AgentVersion() (version.Number, error)
}

AgentVersioner is a point of use agent version object.

type Application Uses

type Application interface {
    AddUnit(state.AddUnitParams) (Unit, error)
    AllUnits() ([]Unit, error)
    ApplicationConfig() (application.ConfigAttributes, error)
    Charm() (Charm, bool, error)
    CharmURL() (*charm.URL, bool)
    Channel() csparams.Channel
    ClearExposed() error
    CharmConfig(string) (charm.Settings, error)
    Constraints() (constraints.Value, error)
    Destroy() error
    DestroyOperation() *state.DestroyApplicationOperation
    EndpointBindings() (map[string]string, error)
    Endpoints() ([]state.Endpoint, error)
    IsExposed() bool
    IsPrincipal() bool
    IsRemote() bool
    Series() string
    SetCharm(state.SetCharmConfig) error
    SetConstraints(constraints.Value) error
    SetExposed() error
    SetMetricCredentials([]byte) error
    SetMinUnits(int) error
    UpdateApplicationSeries(string, bool) error
    UpdateCharmConfig(string, charm.Settings) error
    UpdateApplicationConfig(application.ConfigAttributes, []string, environschema.Fields, schema.Defaults) error
    SetScale(int, int64, bool) error
    ChangeScale(int) (int, error)
    AgentTools() (*tools.Tools, error)
}

Application defines a subset of the functionality provided by the state.Application type, as required by the application facade. For details on the methods, see the methods on state.Application with the same names.

func DeployApplication Uses

func DeployApplication(st ApplicationDeployer, args DeployApplicationParams) (Application, error)

DeployApplication takes a charm and various parameters and deploys it.

func NewStateApplication Uses

func NewStateApplication(st *state.State, app *state.Application) Application

NewStateApplication converts a state.Application into an Application.

type ApplicationDeployer Uses

type ApplicationDeployer interface {
    AddApplication(state.AddApplicationArgs) (Application, error)
}

type Backend Uses

type Backend interface {
    AllModelUUIDs() ([]string, error)
    Application(string) (Application, error)
    ApplyOperation(state.ModelOperation) error
    AddApplication(state.AddApplicationArgs) (Application, error)
    RemoteApplication(string) (RemoteApplication, error)
    AddRemoteApplication(state.AddRemoteApplicationParams) (RemoteApplication, error)
    AddRelation(...state.Endpoint) (Relation, error)
    Charm(*charm.URL) (Charm, error)
    EndpointsRelation(...state.Endpoint) (Relation, error)
    Relation(int) (Relation, error)
    InferEndpoints(...string) ([]state.Endpoint, error)
    Machine(string) (Machine, error)
    Unit(string) (Unit, error)
    UnitsInError() ([]Unit, error)
    SaveController(info crossmodel.ControllerInfo, modelUUID string) (ExternalController, error)
    ControllerTag() names.ControllerTag
    Resources() (Resources, error)
    OfferConnectionForRelation(string) (OfferConnection, error)
    SaveEgressNetworks(relationKey string, cidrs []string) (state.RelationNetworks, error)
    Branch(string) (Generation, error)
}

Backend defines the state functionality required by the application facade. For details on the methods, see the methods on state.State with the same names.

type BlockChecker Uses

type BlockChecker interface {
    ChangeAllowed() error
    RemoveAllowed() error
}

BlockChecker defines the block-checking functionality required by the application facade. This is implemented by apiserver/common.BlockChecker.

type Charm Uses

type Charm interface {
    charm.Charm
}

Charm defines a subset of the functionality provided by the state.Charm type, as required by the application facade. For details on the methods, see the methods on state.Charm with the same names.

type CharmArchive Uses

type CharmArchive struct {
    // ID is the charm URL for which we're storing the archive.
    ID  *charm.URL

    // Charm is the metadata about the charm for the archive.
    Charm charm.Charm

    // Data contains the bytes of the archive.
    Data io.Reader

    // Size is the number of bytes in Data.
    Size int64

    // SHA256 is the hash of the bytes in Data.
    SHA256 string

    // Macaroon is the authorization macaroon for accessing the charmstore.
    Macaroon macaroon.Slice

    // Charm Version contains semantic version of charm, typically the output of git describe.
    CharmVersion string
}

CharmArchive is the data that needs to be stored for a charm archive in state.

type CharmState Uses

type CharmState interface {
    UpdateUploadedCharm(info state.CharmInfo) (*state.Charm, error)
    PrepareStoreCharmUpload(curl *charm.URL) (StateCharm, error)
}

CharmState represents directives for accessing charm methods

type ControllerState Uses

type ControllerState interface {
    ControllerConfig() (controller.Config, error)
}

ControllerState represents information defined for accessing controller configuration

type DeployApplicationParams Uses

type DeployApplicationParams struct {
    ApplicationName   string
    Series            string
    Charm             *state.Charm
    Channel           csparams.Channel
    ApplicationConfig *application.Config
    CharmConfig       charm.Settings
    Constraints       constraints.Value
    NumUnits          int
    // Placement is a list of placement directives which may be used
    // instead of a machine spec.
    Placement        []*instance.Placement
    Storage          map[string]storage.Constraints
    Devices          map[string]devices.Constraints
    AttachStorage    []names.StorageTag
    EndpointBindings map[string]string
    // Resources is a map of resource name to IDs of pending resources.
    Resources map[string]string
}

DeployApplicationParams contains the arguments required to deploy the referenced charm.

type ExternalController Uses

type ExternalController state.ExternalController

type Generation Uses

type Generation interface {
    AssignApplication(string) error
}

type Machine Uses

type Machine interface {
    IsLockedForSeriesUpgrade() (bool, error)
    IsParentLockedForSeriesUpgrade() (bool, error)
}

Machine defines a subset of the functionality provided by the state.Machine type, as required by the application facade. For details on the methods, see the methods on state.Machine with the same names.

type Model Uses

type Model interface {
    ModelTag() names.ModelTag
    Name() string
    Owner() names.UserTag
    Tag() names.Tag
    Type() state.ModelType
    ModelConfig() (*config.Config, error)
    AgentVersion() (version.Number, error)
}

Model defines a subset of the functionality provided by the state.Model type, as required by the application facade. For details on the methods, see the methods on state.Model with the same names.

type ModelState Uses

type ModelState interface {
    Model() (StateModel, error)
    ModelUUID() string
}

ModelState represents methods for accessing model definitions

type OfferConnection Uses

type OfferConnection interface{}

type Relation Uses

type Relation interface {
    status.StatusSetter
    Tag() names.Tag
    Destroy() error
    DestroyWithForce(bool, time.Duration) ([]error, error)
    Endpoint(string) (state.Endpoint, error)
    SetSuspended(bool, string) error
    Suspended() bool
    SuspendedReason() string
}

Relation defines a subset of the functionality provided by the state.Relation type, as required by the application facade. For details on the methods, see the methods on state.Relation with the same names.

type RemoteApplication Uses

type RemoteApplication interface {
    Name() string
    SourceModel() names.ModelTag
    Endpoints() ([]state.Endpoint, error)
    AddEndpoints(eps []charm.Relation) error
    Bindings() map[string]string
    Spaces() []state.RemoteSpace
    Destroy() error
    DestroyOperation(force bool) *state.DestroyRemoteApplicationOperation
}

type Resources Uses

type Resources interface {
    RemovePendingAppResources(string, map[string]string) error
}

Resources defines a subset of the functionality provided by the state.Resources type, as required by the application facade. See the state.Resources type for details on the methods.

type Space Uses

type Space interface {
    Name() string
    ProviderId() network.Id
}

type State Uses

type State interface {
    CharmState
    ModelState
    ControllerState
    state.MongoSessioner
}

State represents the access patterns for the charm store methods.

func NewStateShim Uses

func NewStateShim(st *state.State) State

type StateCharm Uses

type StateCharm interface {
    IsUploaded() bool
}

StateCharm represents a Charm from the state package

type StateModel Uses

type StateModel interface {
    ModelConfig() (*config.Config, error)
}

StateModel represents a Model from the state package

type Subnet Uses

type Subnet interface {
    CIDR() string
    VLANTag() int
    ProviderId() network.Id
    ProviderNetworkId() network.Id
}

type Unit Uses

type Unit interface {
    Name() string
    Tag() names.Tag
    UnitTag() names.UnitTag
    Destroy() error
    DestroyOperation() *state.DestroyUnitOperation
    IsPrincipal() bool
    Life() state.Life
    Resolve(retryHooks bool) error
    AgentTools() (*tools.Tools, error)

    AssignedMachineId() (string, error)
    AssignWithPolicy(state.AssignmentPolicy) error
    AssignWithPlacement(*instance.Placement) error
}

Unit defines a subset of the functionality provided by the state.Unit type, as required by the application facade. For details on the methods, see the methods on state.Unit with the same names.

type UnitAdder Uses

type UnitAdder interface {
    AddUnit(state.AddUnitParams) (Unit, error)
}

Directories

PathSynopsis
mocksPackage mocks is a generated GoMock package.

Package application imports 51 packages (graph) and is imported by 12 packages. Updated 2019-10-15. Refresh now. Tools for package owners.