Code review comment for lp:~thumper/juju-core/maybe-add-cloud-archive-func

Revision history for this message
Tim Penhey (thumper) wrote :

Reviewers: mp+209798_code.launchpad.net,

Message:
Please take a look.

Description:
Make MaybeAddCoudArchiveCloudTools a simple func

Simple change that will be used further down the pipe.
Will be called by the code that makes the lxc template
image, but there will be no machine config object.

https://code.launchpad.net/~thumper/juju-core/maybe-add-cloud-archive-func/+merge/209798

Requires:
https://code.launchpad.net/~thumper/juju-core/move-to-juju-loggo/+merge/209530

(do not edit description out of merge proposal)

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

Affected files (+5, -3 lines):
   A [revision details]
   M environs/cloudinit/cloudinit.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: <email address hidden>
+New revision: <email address hidden>

Index: environs/cloudinit/cloudinit.go
=== modified file 'environs/cloudinit/cloudinit.go'
--- environs/cloudinit/cloudinit.go 2014-02-27 05:24:43 +0000
+++ environs/cloudinit/cloudinit.go 2014-03-06 21:55:44 +0000
@@ -326,7 +326,8 @@
   // for series that need it. This gives us up-to-date LXC,
   // MongoDB, and other infrastructure.
   if !cfg.DisablePackageCommands {
- cfg.MaybeAddCloudArchiveCloudTools(c)
+ series := cfg.Tools.Version.Series
+ MaybeAddCloudArchiveCloudTools(c, series)
   }

   if cfg.StateServer {
@@ -573,8 +574,7 @@

  // MaybeAddCloudArchiveCloudTools adds the cloud-archive cloud-tools
  // pocket to apt sources, if the series requires it.
-func (cfg *MachineConfig) MaybeAddCloudArchiveCloudTools(c
*cloudinit.Config) {
- series := cfg.Tools.Version.Series
+func MaybeAddCloudArchiveCloudTools(c *cloudinit.Config, series string) {
   if series != "precise" {
    // Currently only precise; presumably we'll
    // need to add each LTS in here as they're

« Back to merge proposal