Merge lp:~axwalk/juju-core/lp1317267-manual-addmachine1dot18 into lp:~go-bot/juju-core/trunk

Proposed by Andrew Wilkins
Status: Merged
Approved by: Andrew Wilkins
Approved revision: no longer in the source branch.
Merged at revision: 2708
Proposed branch: lp:~axwalk/juju-core/lp1317267-manual-addmachine1dot18
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 15 lines (+4/-1)
1 file modified
environs/manual/provisioner.go (+4/-1)
To merge this branch: bzr merge lp:~axwalk/juju-core/lp1317267-manual-addmachine1dot18
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+218746@code.launchpad.net

Commit message

environs/manual: use old AddMAchines API

Manual provisioning was implicitly changed
to use the new AddMachinesV2 client API,
with no backwards compatibility failover.
I've changed it to explicitly use the old
API, since we do not require anything of
the new one.

Fixes lp:1317267

https://codereview.appspot.com/95150043/

Description of the change

environs/manual: use old AddMAchines API

Manual provisioning was implicitly changed
to use the new AddMachinesV2 client API,
with no backwards compatibility failover.
I've changed it to explicitly use the old
API, since we do not require anything of
the new one.

Fixes lp:1317267

https://codereview.appspot.com/95150043/

To post a comment you must log in.
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Reviewers: mp+218746_code.launchpad.net,

Message:
Please take a look.

Description:
environs/manual: use old AddMAchines API

Manual provisioning was implicitly changed
to use the new AddMachinesV2 client API,
with no backwards compatibility failover.
I've changed it to explicitly use the old
API, since we do not require anything of
the new one.

Fixes lp:1317267

https://code.launchpad.net/~axwalk/juju-core/lp1317267-manual-addmachine1dot18/+merge/218746

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/95150043/

Affected files (+3, -1 lines):
   A [revision details]
   M environs/manual/provisioner.go

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-20140508054219-e6ylw5luw58d6zhx
+New revision: <email address hidden>

Index: environs/manual/provisioner.go
=== modified file 'environs/manual/provisioner.go'
--- environs/manual/provisioner.go 2014-04-07 10:05:04 +0000
+++ environs/manual/provisioner.go 2014-05-08 06:55:15 +0000
@@ -130,7 +130,7 @@

  func recordMachineInState(
   client *api.Client, machineParams params.AddMachineParams) (machineId
string, err error) {
- results, err :=
client.AddMachines([]params.AddMachineParams{machineParams})
+ results, err :=
client.AddMachines1dot18([]params.AddMachineParams{machineParams})
   if err != nil {
    return "", err
   }

Revision history for this message
Martin Packman (gz) wrote :

LGTM. A comment here saying only the 1.18 api is needed wouldn't hurt.

https://codereview.appspot.com/95150043/

Revision history for this message
Martin Packman (gz) wrote :

LGTM. A comment here saying only the 1.18 api is needed wouldn't hurt.

https://codereview.appspot.com/95150043/

Revision history for this message
Andrew Wilkins (axwalk) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'environs/manual/provisioner.go'
2--- environs/manual/provisioner.go 2014-04-07 10:05:04 +0000
3+++ environs/manual/provisioner.go 2014-05-08 10:07:07 +0000
4@@ -130,7 +130,10 @@
5
6 func recordMachineInState(
7 client *api.Client, machineParams params.AddMachineParams) (machineId string, err error) {
8- results, err := client.AddMachines([]params.AddMachineParams{machineParams})
9+ // Note: we explicitly use AddMachines1dot18 rather than AddMachines to preserve
10+ // backwards compatibility; we do not require any of the new features of AddMachines
11+ // here.
12+ results, err := client.AddMachines1dot18([]params.AddMachineParams{machineParams})
13 if err != nil {
14 return "", err
15 }

Subscribers

People subscribed via source and target branches

to status/vote changes: