Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4824)

Issue 14502059: Improve the image metadata generation command (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by wallyworld
Modified:
10 years, 6 months ago
Reviewers:
axw, mp+190517
Visibility:
Public.

Description

Improve the image metadata generation command juju metadata generate-image was originally written as a developer tool to aid simplestreams development. It now is useful for setting up private clouds so has been given a facelift to make it more user friendly. The key feature is it will now use the current environment to pick up most of what it needs, and the user just has to supply the image id and architecture (if something different to amd64 is required). https://code.launchpad.net/~wallyworld/juju-core/improve-image-metadata-command/+merge/190517 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : Improve the image metadata generation command #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -148 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/plugins/juju-metadata/imagemetadata.go View 1 3 chunks +99 lines, -25 lines 0 comments Download
M cmd/plugins/juju-metadata/imagemetadata_test.go View 1 5 chunks +127 lines, -66 lines 0 comments Download
M cmd/plugins/juju-metadata/validateimagemetadata_test.go View 1 10 chunks +22 lines, -18 lines 0 comments Download
M environs/imagemetadata/generate.go View 3 chunks +9 lines, -25 lines 0 comments Download
M environs/imagemetadata/validation_test.go View 1 4 chunks +5 lines, -14 lines 0 comments Download

Messages

Total messages: 4
wallyworld
Please take a look.
10 years, 6 months ago (2013-10-11 01:26:14 UTC) #1
axw
https://codereview.appspot.com/14502059/diff/1/cmd/plugins/juju-metadata/imagemetadata.go File cmd/plugins/juju-metadata/imagemetadata.go (right): https://codereview.appspot.com/14502059/diff/1/cmd/plugins/juju-metadata/imagemetadata.go#newcode72 cmd/plugins/juju-metadata/imagemetadata.go:72: return fmt.Errorf("environment %q cannot provide region and endpoint", environ.Name()) ...
10 years, 6 months ago (2013-10-15 07:08:33 UTC) #2
wallyworld
Please take a look. https://codereview.appspot.com/14502059/diff/1/cmd/plugins/juju-metadata/imagemetadata.go File cmd/plugins/juju-metadata/imagemetadata.go (right): https://codereview.appspot.com/14502059/diff/1/cmd/plugins/juju-metadata/imagemetadata.go#newcode72 cmd/plugins/juju-metadata/imagemetadata.go:72: return fmt.Errorf("environment %q cannot provide ...
10 years, 6 months ago (2013-10-16 02:57:49 UTC) #3
axw
10 years, 6 months ago (2013-10-16 03:13:39 UTC) #4
On 2013/10/16 02:57:49, wallyworld wrote:
> Please take a look.
> 
>
https://codereview.appspot.com/14502059/diff/1/cmd/plugins/juju-metadata/imag...
> File cmd/plugins/juju-metadata/imagemetadata.go (right):
> 
>
https://codereview.appspot.com/14502059/diff/1/cmd/plugins/juju-metadata/imag...
> cmd/plugins/juju-metadata/imagemetadata.go:72: return fmt.Errorf("environment
%q
> cannot provide region and endpoint", environ.Name())
> On 2013/10/15 07:08:34, axw wrote:
> > What if the user has specified -s, -r, and -e on the command line? Is this
> > really an error then?
> > 
> 
> Hmmm. I thought yes when I wrote this. But I changed it so that it works more
as
> expected.
> 
> > Just a thought: perhaps ImageMetadataCommand could implement HasRegion. If
> > environ doesn't implement HasRegion, fall back to ImageMetadataCommand.
> 
> See my changes - I think it's ok as is.
> 
>
https://codereview.appspot.com/14502059/diff/1/cmd/plugins/juju-metadata/imag...
> File cmd/plugins/juju-metadata/imagemetadata_test.go (right):
> 
>
https://codereview.appspot.com/14502059/diff/1/cmd/plugins/juju-metadata/imag...
> cmd/plugins/juju-metadata/imagemetadata_test.go:20: "path/filepath"
> On 2013/10/15 07:08:34, axw wrote:
> > Move me please
> 
> Done.
> 
>
https://codereview.appspot.com/14502059/diff/1/cmd/plugins/juju-metadata/imag...
> cmd/plugins/juju-metadata/imagemetadata_test.go:42: restore :=
> testbase.PatchEnvironment("AWS_ACCESS_KEY_ID", "access")
> On 2013/10/15 07:08:34, axw wrote:
> > You can just use s.PatchEnvironment here, which wraps
> testbase.PatchEnvironment
> > & AddCleanup.
> 
> Done.

Thanks, LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b