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

Issue 6249075: first step towards a deploy command

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years ago by fwereade
Modified:
9 years ago
Reviewers:
mp+108375
Visibility:
Public.

Description

first step towards a deploy command (all this does is parse *most* args; but IMO it's a chunk of useful functionality nonetheless) https://code.launchpad.net/~fwereade/juju/go-deploy-cmd-parsing/+merge/108375 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : first step towards a deploy command #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -20 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/cmd_test.go View 1 4 chunks +93 lines, -20 lines 0 comments Download
A cmd/juju/deploy.go View 1 1 chunk +79 lines, -0 lines 0 comments Download

Messages

Total messages: 3
fwereade
Please take a look.
9 years ago (2012-06-01 16:15:17 UTC) #1
niemeyer
LGTM. A few suggestions, but feel free to submit: https://codereview.appspot.com/6249075/diff/1/cmd/juju/cmd_test.go File cmd/juju/cmd_test.go (right): https://codereview.appspot.com/6249075/diff/1/cmd/juju/cmd_test.go#newcode193 cmd/juju/cmd_test.go:193: ...
9 years ago (2012-06-05 21:12:52 UTC) #2
fwereade
9 years ago (2012-06-06 09:54:28 UTC) #3
*** Submitted:

first step towards a deploy command

(all this does is parse *most* args; but IMO it's a chunk of useful
functionality nonetheless)

R=niemeyer
CC=
https://codereview.appspot.com/6249075

https://codereview.appspot.com/6249075/diff/1/cmd/juju/cmd_test.go
File cmd/juju/cmd_test.go (right):

https://codereview.appspot.com/6249075/diff/1/cmd/juju/cmd_test.go#newcode193
cmd/juju/cmd_test.go:193: os.Setenv("JUJU_REPOSITORY", "/path/to/repo")
On 2012/06/05 21:12:52, niemeyer wrote:
> The test should preserve the environment as it found before the test started.
> E.g.:
> 
>     defer os.Setenv("JUJU_REPOSITORY", os.Getenv("JUJU_REPOSITORY"))
> 
> The list of tests below look very appropriate for a table of tests as well.
> Something along the lines of:
> 
> var deployTests = []struct{
>     args []string
>     cmd  *DeployCommand
> }{
>         {
>             {"charm-name", "service-name"},
>             &DeployCommand{
>                     ...
>             },
>         }, {
>             ...
>         },
> }
> 
>         
>           

Done.

https://codereview.appspot.com/6249075/diff/1/cmd/juju/deploy.go
File cmd/juju/deploy.go (right):

https://codereview.appspot.com/6249075/diff/1/cmd/juju/deploy.go#newcode22
cmd/juju/deploy.go:22: "deploy", "<charm-name> [<service-name>]", "deploy a new
service", "",
On 2012/06/05 21:12:52, niemeyer wrote:
> We can avoid the dashes in these cases. <charm name> and <service name> read
> quite nicely.
> 
> Also, can you please document the fact that <service name> defaults to <charm
> name> if not provided?

Done.
Sign in to reply to this message.

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