Merge lp:~michael.nelson/juju-core/1208505-status-env into lp:~go-bot/juju-core/trunk
Proposed by
Michael Nelson
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Andrew Wilkins | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1609 | ||||
Proposed branch: | lp:~michael.nelson/juju-core/1208505-status-env | ||||
Merge into: | lp:~go-bot/juju-core/trunk | ||||
Diff against target: |
173 lines (+26/-6) 2 files modified
cmd/juju/status.go (+6/-4) cmd/juju/status_test.go (+20/-2) |
||||
To merge this branch: | bzr merge lp:~michael.nelson/juju-core/1208505-status-env | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+178766@code.launchpad.net |
Commit message
Add 'environment' key to juju status.
Adds an 'environment' key to the output of juju status, as per bug 1208505.
https:/
R=axwalk, dimitern
Description of the change
Add 'environment' key to juju status.
Adds an 'environment' key to the output of juju status, as per bug 1208505.
To post a comment you must log in.
Reviewers: mp+178766_ code.launchpad. net,
Message:
Please take a look.
Description:
Add 'environment' key to juju status.
Adds an 'environment' key to the output of juju status, as per bug
1208505.
At first I was planning to only include the key iff the -e flag had not
been specified, but seems saner to just always include it.
Hopefully there aren't external packages/tests dependent on the result
having
only machines/services keys - that's the only danger I can think of?
https:/ /code.launchpad .net/~michael. nelson/ juju-core/ 1208505- status- env/+merge/ 178766
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/12535043/
Affected files: status_ test.go
A [revision details]
M cmd/juju/status.go
M cmd/juju/
Index: [revision details] 20130806125611- y7dvtxkjf6jqgrf x
=== 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: tarmac-
+New revision: <email address hidden>
Index: cmd/juju/status.go status. go' Fprintf( ctx.Stderr, "cannot retrieve instances from the machineStatus `json:"machines"` serviceStatus `json:"services"` environment" ` machineStatus `json:"machines"` serviceStatus `json:"services"` processMachines (), processServices (), Name(), processMachines (), processServices (),
=== modified file 'cmd/juju/
--- cmd/juju/status.go 2013-07-30 01:31:52 +0000
+++ cmd/juju/status.go 2013-08-06 14:17:24 +0000
@@ -74,11 +74,13 @@
fmt.
environment: %v\n", err)
}
result := struct {
- Machines map[string]
- Services map[string]
+ Environment string `json:"
+ Machines map[string]
+ Services map[string]
}{
- Machines: context.
- Services: context.
+ Environment: conn.Environ.
+ Machines: context.
+ Services: context.
}
return c.out.Write(ctx, result)
}
Index: cmd/juju/ status_ test.go status_ test.go' status_ test.go 2013-07-24 16:08:50 +0000 status_ test.go 2013-08-06 14:17:24 +0000
=== modified file 'cmd/juju/
--- cmd/juju/
+++ cmd/juju/
@@ -187,8 +187,9 @@
expect{
"empty state",
M{
- "machines": M{},
- "services": M{},
+ "environment": "dummyenv",
+ "machines": M{},
+ "services": M{},
},
},
@@ -196,6 +197,7 @@
"instance- id": "pending",
"agent- state": "pending",
expect{
"simulate juju bootstrap by adding machine/0 to the state",
M{
+ "environment": "dummyenv",
"machines": M{
"0": M{
@@ -210,6 +212,7 @@
expect{
"simulate the PA starting an instance in response to the state change",
M{
+ "environment": "dummyenv",
"machines": M{
"0": M{
@@ -227,6 +230,7 @@
expect{
"simulate the MA started and set the machine status",
M{
+ "environment": "dummyenv",
"machines": M{
"0": machine0,
},
@@ -245,6 +249,7 @@
expect{
"simulate the MA setting the version",
M{
+ "environment": "dummyenv",
"machines": M{
"0": M{
"dns-name": "dummyenv-0.dns",
@@ -266,6 +271,7 @@
expect{
"machine 0 has specific hardware characteristics...