~rogpeppe/juju-core/438-local-instance-Addresses

« back to all changes in this revision

Viewing changes to state/interface.go

[r=fwereade],[bug=1234035] Fix upgrade 1.14 -> 1.15

This adds a Tools() API call to provisioner API,
similarly to the upgrader API. Common code factored
out into apiserver/common/tools.go.

SetAgentTools() renamed to SetAgentVersion() in
machine and unit state types. Also renamed a few
types in params to be shorter or better reflect
what are they about. Added DEPRECATE(v1.18) tags
to bits of the API that need cleanup.

Live tested on EC2 - after copying the tools from
/tools/releases/ to /tools/ the upgrade proceeds
and finishes successfully.

https://codereview.appspot.com/14231044/

R=fwereade, jameinel

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
import (
7
7
        "launchpad.net/juju-core/state/api/params"
8
8
        "launchpad.net/juju-core/tools"
 
9
        "launchpad.net/juju-core/version"
9
10
)
10
11
 
11
12
// EntityFinder is implemented by *State. See State.FindEntity
55
56
// that have associated agent tools.
56
57
type AgentTooler interface {
57
58
        AgentTools() (*tools.Tools, error)
58
 
        SetAgentTools(*tools.Tools) error
 
59
        SetAgentVersion(version.Binary) error
59
60
}
60
61
 
61
62
// EnsureDeader with an EnsureDead method.