Merge lp://staging/~axwalk/juju-core/composeuserdata-customise-cloudinit into lp://staging/~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: 2475
Proposed branch: lp://staging/~axwalk/juju-core/composeuserdata-customise-cloudinit
Merge into: lp://staging/~go-bot/juju-core/trunk
Diff against target: 291 lines (+52/-70)
11 files modified
environs/cloudinit.go (+18/-17)
environs/cloudinit_test.go (+5/-2)
provider/azure/customdata.go (+1/-1)
provider/azure/customdata_test.go (+1/-1)
provider/ec2/ec2.go (+1/-1)
provider/maas/environ.go (+16/-12)
provider/maas/environ_test.go (+6/-6)
provider/maas/export_test.go (+3/-3)
provider/openstack/provider.go (+1/-1)
utils/apt.go (+0/-10)
utils/apt_test.go (+0/-16)
To merge this branch: bzr merge lp://staging/~axwalk/juju-core/composeuserdata-customise-cloudinit
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+212092@code.staging.launchpad.net

Commit message

Update ComposeUserData to take cloudinit.Config

... and update provider/maas to use the apt
options instead of crafting apt-get commands.

Fixes lp:1295058

https://codereview.appspot.com/78640044/

Description of the change

Update ComposeUserData to take cloudinit.Config

... and update provider/maas to use the apt
options instead of crafting apt-get commands.

Fixes lp:1295058

https://codereview.appspot.com/78640044/

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

Reviewers: mp+212092_code.launchpad.net,

Message:
Please take a look.

Description:
Update ComposeUserData to take cloudinit.Config

... and update provider/maas to use the apt
options instead of crafting apt-get commands.

Fixes lp:1295058

https://code.launchpad.net/~axwalk/juju-core/composeuserdata-customise-cloudinit/+merge/212092

(do not edit description out of merge proposal)

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

Affected files (+54, -70 lines):
   A [revision details]
   M environs/cloudinit.go
   M environs/cloudinit_test.go
   M provider/azure/customdata.go
   M provider/azure/customdata_test.go
   M provider/ec2/ec2.go
   M provider/maas/environ.go
   M provider/maas/environ_test.go
   M provider/maas/export_test.go
   M provider/openstack/provider.go
   M utils/apt.go
   M utils/apt_test.go

Revision history for this message
Wayne Witzel III (wwitzel3) wrote :

LGTM (assuming it has been run)

https://codereview.appspot.com/78640044/

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

On 2014/03/21 10:39:06, wwitzel3 wrote:
> LGTM (assuming it has been run)

Thanks. I haven't yet, but will before landing.

https://codereview.appspot.com/78640044/

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

On 2014/03/21 10:54:47, axw wrote:
> On 2014/03/21 10:39:06, wwitzel3 wrote:
> > LGTM (assuming it has been run)

> Thanks. I haven't yet, but will before landing.

Took a while, but I set up MAAS on KVM and verified this change works.

https://codereview.appspot.com/78640044/

Revision history for this message
Andrew Wilkins (axwalk) wrote :
Revision history for this message
Wayne Witzel III (wwitzel3) wrote :

LGTM

Just a random question about interfaces/duplication.

https://codereview.appspot.com/78640044/diff/20001/provider/openstack/provider.go
File provider/openstack/provider.go (right):

https://codereview.appspot.com/78640044/diff/20001/provider/openstack/provider.go#newcode527
provider/openstack/provider.go:527: func (e *environ)
SupportedArchitectures() ([]string, error) {
This seems identical to the code that is in the ec2 provider. Is that
just a product of using interfaces and there is no way around this
duplication? Will different providers do this differently maybe? ELI5

https://codereview.appspot.com/78640044/

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

BTW, if you go to the "unified diff" link the SupportedArchitecture
changes won't show up. They only show up in "delta from previous".

https://codereview.appspot.com/78640044/diff/20001/provider/openstack/provider.go
File provider/openstack/provider.go (right):

https://codereview.appspot.com/78640044/diff/20001/provider/openstack/provider.go#newcode527
provider/openstack/provider.go:527: func (e *environ)
SupportedArchitectures() ([]string, error) {
On 2014/03/26 11:15:29, wwitzel3 wrote:
> This seems identical to the code that is in the ec2 provider. Is that
just a
> product of using interfaces and there is no way around this
duplication? Will
> different providers do this differently maybe? ELI5

This change is just from merging trunk. I didn't implement it - this is
something wallyworld did recently.

Different providers do implement SupportedArchitectures differently. For
example the manual provider is a bit different (although possibly wrong;
I've emailed Ian to ask).

Having said that, it does look like there's a lot of duplication here
that could be factored out. I can't see any reason why it couldn't be
done, though wallyworld may well have a good explanation.

https://codereview.appspot.com/78640044/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: