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

Issue 92140043: Init EnvCommandBase.EnvName from envs.yaml

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

Description

Init EnvCommandBase.EnvName from envs.yaml This change brings 1.18 in line with trunk, where EnvCommandBase.EnvName is initialised to the default environment if current-environment does not exist and neither "-e" nor $JUJU_ENV have been specified. The primary change is in moving environcommand.go to cmd/envcmd, and adding an Init method that reads from environments.yaml as a last resort. All commands that embed EnvCommandBase are updated to call this method, and various tests are updated as a result. Fixes lp:1316869 https://code.launchpad.net/~axwalk/juju-core/lp1316869-envcmd-from-yaml-1.18/+merge/218745 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : Init EnvCommandBase.EnvName from envs.yaml #

Total comments: 14

Patch Set 3 : Init EnvCommandBase.EnvName from envs.yaml #

Unified diffs Side-by-side diffs Delta from patch set Stats (+356 lines, -94 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/envcmd/environmentcommand.go View 1 3 chunks +26 lines, -2 lines 0 comments Download
M cmd/envcmd/environmentcommand_test.go View 1 2 chunks +76 lines, -18 lines 0 comments Download
A cmd/envcmd/export_test.go View 1 chunk +9 lines, -0 lines 0 comments Download
D cmd/export_test.go View 1 chunk +0 lines, -9 lines 0 comments Download
M cmd/juju/addmachine.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/addrelation.go View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/addunit.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/authorizedkeys_add.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/authorizedkeys_delete.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/authorizedkeys_import.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/authorizedkeys_list.go View 1 3 chunks +9 lines, -1 line 0 comments Download
M cmd/juju/bootstrap.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/bootstrap_test.go View 5 chunks +17 lines, -9 lines 0 comments Download
M cmd/juju/cmd_test.go View 2 chunks +2 lines, -1 line 0 comments Download
M cmd/juju/constraints.go View 1 5 chunks +9 lines, -2 lines 0 comments Download
M cmd/juju/debuglog_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/deploy.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/destroymachine.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/destroyrelation.go View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/destroyservice.go View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/destroyunit.go View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/endpoint.go View 1 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/environment.go View 1 2 7 chunks +14 lines, -4 lines 0 comments Download
M cmd/juju/expose.go View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/get.go View 1 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/plugin.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/publish.go View 1 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/publish_test.go View 1 chunk +3 lines, -5 lines 0 comments Download
M cmd/juju/resolved.go View 1 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/retryprovisioning.go View 1 2 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/run.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/set.go View 1 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/ssh.go View 1 2 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/status.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/switch.go View 3 chunks +3 lines, -2 lines 0 comments Download
M cmd/juju/switch_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/juju/synctools.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/unexpose.go View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/unset.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/upgradecharm.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/juju/upgradejuju.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/plugins/juju-metadata/imagemetadata.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M cmd/plugins/juju-metadata/imagemetadata_test.go View 2 chunks +6 lines, -1 line 0 comments Download
M cmd/plugins/juju-metadata/toolsmetadata.go View 1 3 chunks +9 lines, -1 line 0 comments Download
M cmd/plugins/juju-metadata/validateimagemetadata.go View 1 4 chunks +6 lines, -2 lines 0 comments Download
M cmd/plugins/juju-metadata/validateimagemetadata_test.go View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/plugins/juju-metadata/validatetoolsmetadata.go View 1 4 chunks +6 lines, -2 lines 0 comments Download
M cmd/plugins/juju-restore/restore.go View 1 3 chunks +5 lines, -1 line 0 comments Download
M testing/environ.go View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 7
axw
Please take a look.
10 years ago (2014-05-08 06:46:30 UTC) #1
fwereade
one important comment, will go over the rest in a bit. https://codereview.appspot.com/92140043/diff/1/cmd/envcmd/environmentcommand.go File cmd/envcmd/environmentcommand.go (right): ...
10 years ago (2014-05-08 07:47:56 UTC) #2
axw
Please take a look. https://codereview.appspot.com/92140043/diff/1/cmd/envcmd/environmentcommand.go File cmd/envcmd/environmentcommand.go (right): https://codereview.appspot.com/92140043/diff/1/cmd/envcmd/environmentcommand.go#newcode73 cmd/envcmd/environmentcommand.go:73: c.EnvName = envs.Default On 2014/05/08 ...
10 years ago (2014-05-08 09:35:19 UTC) #3
fwereade
I'm happy with the EnsureEnvName implementation, but it STM that we've missed several places where ...
10 years ago (2014-05-08 11:34:11 UTC) #4
axw
On 2014/05/08 11:34:11, fwereade wrote: > I'm happy with the EnsureEnvName implementation, but it STM ...
10 years ago (2014-05-09 03:02:56 UTC) #5
axw
Please take a look. https://codereview.appspot.com/92140043/diff/20001/cmd/envcmd/environmentcommand.go File cmd/envcmd/environmentcommand.go (right): https://codereview.appspot.com/92140043/diff/20001/cmd/envcmd/environmentcommand.go#newcode90 cmd/envcmd/environmentcommand.go:90: defaultEnv := getDefaultEnvironment() On 2014/05/08 ...
10 years ago (2014-05-09 03:12:31 UTC) #6
wallyworld
10 years ago (2014-05-09 03:28:59 UTC) #7
LGTM but I agree with William - there's a better approach we can use for trunk.
Sign in to reply to this message.

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