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

« back to all changes in this revision

Viewing changes to state/apiserver/provisioner/provisioner.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:
24
24
        *common.PasswordChanger
25
25
        *common.LifeGetter
26
26
        *common.Addresser
 
27
        *common.ToolsGetter
27
28
 
28
29
        st          *state.State
29
30
        resources   *common.Resources
72
73
                PasswordChanger: common.NewPasswordChanger(st, getAuthFunc),
73
74
                LifeGetter:      common.NewLifeGetter(st, getAuthFunc),
74
75
                Addresser:       common.NewAddresser(st),
 
76
                ToolsGetter:     common.NewToolsGetter(st, getAuthFunc),
75
77
                st:              st,
76
78
                resources:       resources,
77
79
                authorizer:      authorizer,