Merge lp:~mattyw/juju-core/add-service-owner-to-status into lp:~go-bot/juju-core/trunk

Proposed by Matthew Williams
Status: Work in progress
Proposed branch: lp:~mattyw/juju-core/add-service-owner-to-status
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 471 lines (+106/-65)
5 files modified
cmd/juju/status.go (+2/-0)
cmd/juju/status_test.go (+99/-65)
state/api/client.go (+1/-0)
state/apiserver/client/api_test.go (+3/-0)
state/statecmd/status.go (+1/-0)
To merge this branch: bzr merge lp:~mattyw/juju-core/add-service-owner-to-status
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+207859@code.launchpad.net

Description of the change

Added service owner to the output of juju status

Only really useful to land when the juju id branches land.

The output of the api call to Status() (including the output of the juju
status command) now includes the owner of the service

The output looks like this:
services:
 ubuntu:
  charm: cs:precise/ubuntu-4
  exposed: false
   units:
    ubuntu/0:
    agent-state: pending
    machine: "1"
    owner-tag: user-admin

https://codereview.appspot.com/67870043/

To post a comment you must log in.
Revision history for this message
Matthew Williams (mattyw) wrote :

Reviewers: mp+207859_code.launchpad.net,

Message:
Please take a look.

Description:
Added service owner to the output of juju status

Only really useful to land when the juju id branches land.

The output of the api call to Status() (including the output of the juju
status command) now includes the owner of the service

The output looks like this:
services:
 ubuntu:
  charm: cs:precise/ubuntu-4
  exposed: false
   units:
    ubuntu/0:
    agent-state: pending
    machine: "1"
    owner-tag: user-admin

https://code.launchpad.net/~mattyw/juju-core/add-service-owner-to-status/+merge/207859

(do not edit description out of merge proposal)

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

Affected files (+109, -66 lines):
   A [revision details]
   M cmd/juju/status.go
   M cmd/juju/status_test.go
   M state/api/client.go
   M state/apiserver/client/api_test.go
   M state/statecmd/status.go
   M worker/peergrouper/desired.go

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Looks good, but make sure you're familiar with Martin's recent 1.16
compatibility for status changes:
https://codereview.appspot.com/66590043/

You'll need to use the FullStatus API call.

https://codereview.appspot.com/67870043/

2350. By Matthew Williams

merged with trunk

2351. By Matthew Williams

merged with trunk

Revision history for this message
Matthew Williams (mattyw) wrote :
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

On 2014/02/25 10:15:52, dimitern wrote:
> Looks good, but make sure you're familiar with Martin's recent 1.16
> compatibility for status changes:
https://codereview.appspot.com/66590043/

> You'll need to use the FullStatus API call.

Sorry, so your changes are in statecmd, which gets called internally in
apiserver for both FullStatus and Status.
This means you don't need to care about FullStatus in your CL.
Your changes LGTM assuming you've tested them live as well, just in
case.

https://codereview.appspot.com/67870043/

Revision history for this message
William Reade (fwereade) wrote :

On 2014/02/27 10:40:25, dimitern wrote:
> On 2014/02/25 10:15:52, dimitern wrote:
> > Looks good, but make sure you're familiar with Martin's recent 1.16
> > compatibility for status changes:
https://codereview.appspot.com/66590043/
> >
> > You'll need to use the FullStatus API call.

> Sorry, so your changes are in statecmd, which gets called internally
in
> apiserver for both FullStatus and Status.
> This means you don't need to care about FullStatus in your CL.
> Your changes LGTM assuming you've tested them live as well, just in
case.

I'm fairly strongly -1 on this, because status is bloated enough
already. Can we please start adding flags to status for additional
information?

https://codereview.appspot.com/67870043/

Revision history for this message
William Reade (fwereade) wrote :

On 2014/02/27 13:45:51, fwereade wrote:
> On 2014/02/27 10:40:25, dimitern wrote:
> > On 2014/02/25 10:15:52, dimitern wrote:
> > > Looks good, but make sure you're familiar with Martin's recent
1.16
> > > compatibility for status changes:
https://codereview.appspot.com/66590043/
> > >
> > > You'll need to use the FullStatus API call.
> >
> > Sorry, so your changes are in statecmd, which gets called internally
in
> > apiserver for both FullStatus and Status.
> > This means you don't need to care about FullStatus in your CL.
> > Your changes LGTM assuming you've tested them live as well, just in
case.

> I'm fairly strongly -1 on this, because status is bloated enough
already. Can we
> please start adding flags to status for additional information?

And especially in status, adding the owner to every unit feels wrong. If
units ever get explicit owners we can add it then; for now, the service
feels like a much better place. So not lgtm without discussion, at
least.

https://codereview.appspot.com/67870043/

Revision history for this message
Matthew Williams (mattyw) wrote :

On 2014/02/27 13:47:33, fwereade wrote:
> On 2014/02/27 13:45:51, fwereade wrote:
> > On 2014/02/27 10:40:25, dimitern wrote:
> > > On 2014/02/25 10:15:52, dimitern wrote:
> > > > Looks good, but make sure you're familiar with Martin's recent
1.16
> > > > compatibility for status changes:
https://codereview.appspot.com/66590043/
> > > >
> > > > You'll need to use the FullStatus API call.
> > >
> > > Sorry, so your changes are in statecmd, which gets called
internally in
> > > apiserver for both FullStatus and Status.
> > > This means you don't need to care about FullStatus in your CL.
> > > Your changes LGTM assuming you've tested them live as well, just
in case.
> >
> > I'm fairly strongly -1 on this, because status is bloated enough
already. Can
> we
> > please start adding flags to status for additional information?

> And especially in status, adding the owner to every unit feels wrong.
If units
> ever get explicit owners we can add it then; for now, the service
feels like a
> much better place. So not lgtm without discussion, at least.

Fair enough - I was hoping to have discussion with you and roger about
this - the implementation here includes the owner as part of the service
though - not part of the unit

https://codereview.appspot.com/67870043/

Unmerged revisions

2351. By Matthew Williams

merged with trunk

2350. By Matthew Williams

merged with trunk

2349. By Matthew Williams

added owner tag to status, fixed tests, fixed a wrong import for loggo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'cmd/juju/status.go'
--- cmd/juju/status.go 2014-01-16 05:28:03 +0000
+++ cmd/juju/status.go 2014-02-27 04:55:00 +0000
@@ -160,6 +160,7 @@
160 Relations map[string][]string `json:"relations,omitempty" yaml:"relations,omitempty"`160 Relations map[string][]string `json:"relations,omitempty" yaml:"relations,omitempty"`
161 SubordinateTo []string `json:"subordinate-to,omitempty" yaml:"subordinate-to,omitempty"`161 SubordinateTo []string `json:"subordinate-to,omitempty" yaml:"subordinate-to,omitempty"`
162 Units map[string]unitStatus `json:"units,omitempty" yaml:"units,omitempty"`162 Units map[string]unitStatus `json:"units,omitempty" yaml:"units,omitempty"`
163 OwnerTag string `json:"owner-tag,omitempty" yaml:"owner-tag,omitempty"`
163}164}
164165
165type serviceStatusNoMarshal serviceStatus166type serviceStatusNoMarshal serviceStatus
@@ -259,6 +260,7 @@
259 CanUpgradeTo: service.CanUpgradeTo,260 CanUpgradeTo: service.CanUpgradeTo,
260 SubordinateTo: service.SubordinateTo,261 SubordinateTo: service.SubordinateTo,
261 Units: make(map[string]unitStatus),262 Units: make(map[string]unitStatus),
263 OwnerTag: service.OwnerTag,
262 }264 }
263 for k, m := range service.Units {265 for k, m := range service.Units {
264 out.Units[k] = formatUnit(m)266 out.Units[k] = formatUnit(m)
265267
=== modified file 'cmd/juju/status_test.go'
--- cmd/juju/status_test.go 2014-01-24 14:52:58 +0000
+++ cmd/juju/status_test.go 2014-02-27 04:55:00 +0000
@@ -192,12 +192,14 @@
192 "hardware": "arch=amd64 cpu-cores=1 mem=1024M root-disk=8192M",192 "hardware": "arch=amd64 cpu-cores=1 mem=1024M root-disk=8192M",
193 }193 }
194 unexposedService = M{194 unexposedService = M{
195 "charm": "cs:quantal/dummy-1",195 "charm": "cs:quantal/dummy-1",
196 "exposed": false,196 "exposed": false,
197 "owner-tag": "user-admin",
197 }198 }
198 exposedService = M{199 exposedService = M{
199 "charm": "cs:quantal/dummy-1",200 "charm": "cs:quantal/dummy-1",
200 "exposed": true,201 "exposed": true,
202 "owner-tag": "user-admin",
201 }203 }
202)204)
203205
@@ -461,8 +463,9 @@
461 },463 },
462 "services": M{464 "services": M{
463 "exposed-service": M{465 "exposed-service": M{
464 "charm": "cs:quantal/dummy-1",466 "charm": "cs:quantal/dummy-1",
465 "exposed": true,467 "exposed": true,
468 "owner-tag": "user-admin",
466 "units": M{469 "units": M{
467 "exposed-service/0": M{470 "exposed-service/0": M{
468 "machine": "2",471 "machine": "2",
@@ -476,8 +479,9 @@
476 },479 },
477 },480 },
478 "dummy-service": M{481 "dummy-service": M{
479 "charm": "cs:quantal/dummy-1",482 "charm": "cs:quantal/dummy-1",
480 "exposed": false,483 "exposed": false,
484 "owner-tag": "user-admin",
481 "units": M{485 "units": M{
482 "dummy-service/0": M{486 "dummy-service/0": M{
483 "machine": "1",487 "machine": "1",
@@ -535,8 +539,9 @@
535 },539 },
536 "services": M{540 "services": M{
537 "exposed-service": M{541 "exposed-service": M{
538 "charm": "cs:quantal/dummy-1",542 "charm": "cs:quantal/dummy-1",
539 "exposed": true,543 "exposed": true,
544 "owner-tag": "user-admin",
540 "units": M{545 "units": M{
541 "exposed-service/0": M{546 "exposed-service/0": M{
542 "machine": "2",547 "machine": "2",
@@ -550,8 +555,9 @@
550 },555 },
551 },556 },
552 "dummy-service": M{557 "dummy-service": M{
553 "charm": "cs:quantal/dummy-1",558 "charm": "cs:quantal/dummy-1",
554 "exposed": false,559 "exposed": false,
560 "owner-tag": "user-admin",
555 "units": M{561 "units": M{
556 "dummy-service/0": M{562 "dummy-service/0": M{
557 "machine": "1",563 "machine": "1",
@@ -576,8 +582,9 @@
576 },582 },
577 "services": M{583 "services": M{
578 "dummy-service": M{584 "dummy-service": M{
579 "charm": "cs:quantal/dummy-1",585 "charm": "cs:quantal/dummy-1",
580 "exposed": false,586 "exposed": false,
587 "owner-tag": "user-admin",
581 "units": M{588 "units": M{
582 "dummy-service/0": M{589 "dummy-service/0": M{
583 "machine": "1",590 "machine": "1",
@@ -601,8 +608,9 @@
601 },608 },
602 "services": M{609 "services": M{
603 "exposed-service": M{610 "exposed-service": M{
604 "charm": "cs:quantal/dummy-1",611 "charm": "cs:quantal/dummy-1",
605 "exposed": true,612 "exposed": true,
613 "owner-tag": "user-admin",
606 "units": M{614 "units": M{
607 "exposed-service/0": M{615 "exposed-service/0": M{
608 "machine": "2",616 "machine": "2",
@@ -628,8 +636,9 @@
628 },636 },
629 "services": M{637 "services": M{
630 "dummy-service": M{638 "dummy-service": M{
631 "charm": "cs:quantal/dummy-1",639 "charm": "cs:quantal/dummy-1",
632 "exposed": false,640 "exposed": false,
641 "owner-tag": "user-admin",
633 "units": M{642 "units": M{
634 "dummy-service/0": M{643 "dummy-service/0": M{
635 "machine": "1",644 "machine": "1",
@@ -653,8 +662,9 @@
653 },662 },
654 "services": M{663 "services": M{
655 "exposed-service": M{664 "exposed-service": M{
656 "charm": "cs:quantal/dummy-1",665 "charm": "cs:quantal/dummy-1",
657 "exposed": true,666 "exposed": true,
667 "owner-tag": "user-admin",
658 "units": M{668 "units": M{
659 "exposed-service/0": M{669 "exposed-service/0": M{
660 "machine": "2",670 "machine": "2",
@@ -681,8 +691,9 @@
681 },691 },
682 "services": M{692 "services": M{
683 "dummy-service": M{693 "dummy-service": M{
684 "charm": "cs:quantal/dummy-1",694 "charm": "cs:quantal/dummy-1",
685 "exposed": false,695 "exposed": false,
696 "owner-tag": "user-admin",
686 "units": M{697 "units": M{
687 "dummy-service/0": M{698 "dummy-service/0": M{
688 "machine": "1",699 "machine": "1",
@@ -694,8 +705,9 @@
694 },705 },
695 },706 },
696 "exposed-service": M{707 "exposed-service": M{
697 "charm": "cs:quantal/dummy-1",708 "charm": "cs:quantal/dummy-1",
698 "exposed": true,709 "exposed": true,
710 "owner-tag": "user-admin",
699 "units": M{711 "units": M{
700 "exposed-service/0": M{712 "exposed-service/0": M{
701 "machine": "2",713 "machine": "2",
@@ -731,9 +743,10 @@
731 },743 },
732 "services": M{744 "services": M{
733 "dummy-service": M{745 "dummy-service": M{
734 "charm": "cs:quantal/dummy-1",746 "charm": "cs:quantal/dummy-1",
735 "exposed": false,747 "exposed": false,
736 "life": "dying",748 "owner-tag": "user-admin",
749 "life": "dying",
737 "units": M{750 "units": M{
738 "dummy-service/0": M{751 "dummy-service/0": M{
739 "machine": "0",752 "machine": "0",
@@ -808,8 +821,9 @@
808 },821 },
809 "services": M{822 "services": M{
810 "project": M{823 "project": M{
811 "charm": "cs:quantal/wordpress-3",824 "charm": "cs:quantal/wordpress-3",
812 "exposed": true,825 "exposed": true,
826 "owner-tag": "user-admin",
813 "units": M{827 "units": M{
814 "project/0": M{828 "project/0": M{
815 "machine": "1",829 "machine": "1",
@@ -823,8 +837,9 @@
823 },837 },
824 },838 },
825 "mysql": M{839 "mysql": M{
826 "charm": "cs:quantal/mysql-1",840 "charm": "cs:quantal/mysql-1",
827 "exposed": true,841 "exposed": true,
842 "owner-tag": "user-admin",
828 "units": M{843 "units": M{
829 "mysql/0": M{844 "mysql/0": M{
830 "machine": "2",845 "machine": "2",
@@ -837,8 +852,9 @@
837 },852 },
838 },853 },
839 "varnish": M{854 "varnish": M{
840 "charm": "cs:quantal/varnish-1",855 "charm": "cs:quantal/varnish-1",
841 "exposed": true,856 "exposed": true,
857 "owner-tag": "user-admin",
842 "units": M{858 "units": M{
843 "varnish/0": M{859 "varnish/0": M{
844 "machine": "3",860 "machine": "3",
@@ -851,8 +867,9 @@
851 },867 },
852 },868 },
853 "private": M{869 "private": M{
854 "charm": "cs:quantal/wordpress-3",870 "charm": "cs:quantal/wordpress-3",
855 "exposed": true,871 "exposed": true,
872 "owner-tag": "user-admin",
856 "units": M{873 "units": M{
857 "private/0": M{874 "private/0": M{
858 "machine": "4",875 "machine": "4",
@@ -909,8 +926,9 @@
909 },926 },
910 "services": M{927 "services": M{
911 "riak": M{928 "riak": M{
912 "charm": "cs:quantal/riak-7",929 "charm": "cs:quantal/riak-7",
913 "exposed": true,930 "exposed": true,
931 "owner-tag": "user-admin",
914 "units": M{932 "units": M{
915 "riak/0": M{933 "riak/0": M{
916 "machine": "1",934 "machine": "1",
@@ -991,8 +1009,9 @@
991 },1009 },
992 "services": M{1010 "services": M{
993 "wordpress": M{1011 "wordpress": M{
994 "charm": "cs:quantal/wordpress-3",1012 "charm": "cs:quantal/wordpress-3",
995 "exposed": true,1013 "exposed": true,
1014 "owner-tag": "user-admin",
996 "units": M{1015 "units": M{
997 "wordpress/0": M{1016 "wordpress/0": M{
998 "machine": "1",1017 "machine": "1",
@@ -1011,8 +1030,9 @@
1011 },1030 },
1012 },1031 },
1013 "mysql": M{1032 "mysql": M{
1014 "charm": "cs:quantal/mysql-1",1033 "charm": "cs:quantal/mysql-1",
1015 "exposed": true,1034 "exposed": true,
1035 "owner-tag": "user-admin",
1016 "units": M{1036 "units": M{
1017 "mysql/0": M{1037 "mysql/0": M{
1018 "machine": "2",1038 "machine": "2",
@@ -1032,8 +1052,9 @@
1032 },1052 },
1033 },1053 },
1034 "logging": M{1054 "logging": M{
1035 "charm": "cs:quantal/logging-1",1055 "charm": "cs:quantal/logging-1",
1036 "exposed": true,1056 "exposed": true,
1057 "owner-tag": "user-admin",
1037 "relations": M{1058 "relations": M{
1038 "logging-directory": L{"wordpress"},1059 "logging-directory": L{"wordpress"},
1039 "info": L{"mysql"},1060 "info": L{"mysql"},
@@ -1056,8 +1077,9 @@
1056 },1077 },
1057 "services": M{1078 "services": M{
1058 "wordpress": M{1079 "wordpress": M{
1059 "charm": "cs:quantal/wordpress-3",1080 "charm": "cs:quantal/wordpress-3",
1060 "exposed": true,1081 "exposed": true,
1082 "owner-tag": "user-admin",
1061 "units": M{1083 "units": M{
1062 "wordpress/0": M{1084 "wordpress/0": M{
1063 "machine": "1",1085 "machine": "1",
@@ -1076,8 +1098,9 @@
1076 },1098 },
1077 },1099 },
1078 "mysql": M{1100 "mysql": M{
1079 "charm": "cs:quantal/mysql-1",1101 "charm": "cs:quantal/mysql-1",
1080 "exposed": true,1102 "exposed": true,
1103 "owner-tag": "user-admin",
1081 "units": M{1104 "units": M{
1082 "mysql/0": M{1105 "mysql/0": M{
1083 "machine": "2",1106 "machine": "2",
@@ -1097,8 +1120,9 @@
1097 },1120 },
1098 },1121 },
1099 "logging": M{1122 "logging": M{
1100 "charm": "cs:quantal/logging-1",1123 "charm": "cs:quantal/logging-1",
1101 "exposed": true,1124 "exposed": true,
1125 "owner-tag": "user-admin",
1102 "relations": M{1126 "relations": M{
1103 "logging-directory": L{"wordpress"},1127 "logging-directory": L{"wordpress"},
1104 "info": L{"mysql"},1128 "info": L{"mysql"},
@@ -1120,8 +1144,9 @@
1120 },1144 },
1121 "services": M{1145 "services": M{
1122 "wordpress": M{1146 "wordpress": M{
1123 "charm": "cs:quantal/wordpress-3",1147 "charm": "cs:quantal/wordpress-3",
1124 "exposed": true,1148 "exposed": true,
1149 "owner-tag": "user-admin",
1125 "units": M{1150 "units": M{
1126 "wordpress/0": M{1151 "wordpress/0": M{
1127 "machine": "1",1152 "machine": "1",
@@ -1140,8 +1165,9 @@
1140 },1165 },
1141 },1166 },
1142 "logging": M{1167 "logging": M{
1143 "charm": "cs:quantal/logging-1",1168 "charm": "cs:quantal/logging-1",
1144 "exposed": true,1169 "exposed": true,
1170 "owner-tag": "user-admin",
1145 "relations": M{1171 "relations": M{
1146 "logging-directory": L{"wordpress"},1172 "logging-directory": L{"wordpress"},
1147 "info": L{"mysql"},1173 "info": L{"mysql"},
@@ -1197,8 +1223,9 @@
1197 },1223 },
1198 "services": M{1224 "services": M{
1199 "wordpress": M{1225 "wordpress": M{
1200 "charm": "cs:quantal/wordpress-3",1226 "charm": "cs:quantal/wordpress-3",
1201 "exposed": true,1227 "exposed": true,
1228 "owner-tag": "user-admin",
1202 "units": M{1229 "units": M{
1203 "wordpress/0": M{1230 "wordpress/0": M{
1204 "machine": "1",1231 "machine": "1",
@@ -1217,8 +1244,9 @@
1217 },1244 },
1218 },1245 },
1219 "monitoring": M{1246 "monitoring": M{
1220 "charm": "cs:quantal/monitoring-0",1247 "charm": "cs:quantal/monitoring-0",
1221 "exposed": true,1248 "exposed": true,
1249 "owner-tag": "user-admin",
1222 "relations": M{1250 "relations": M{
1223 "monitoring-port": L{"wordpress"},1251 "monitoring-port": L{"wordpress"},
1224 },1252 },
@@ -1269,8 +1297,9 @@
1269 },1297 },
1270 "services": M{1298 "services": M{
1271 "mysql": M{1299 "mysql": M{
1272 "charm": "cs:quantal/mysql-1",1300 "charm": "cs:quantal/mysql-1",
1273 "exposed": true,1301 "exposed": true,
1302 "owner-tag": "user-admin",
1274 "units": M{1303 "units": M{
1275 "mysql/0": M{1304 "mysql/0": M{
1276 "machine": "1",1305 "machine": "1",
@@ -1299,8 +1328,9 @@
1299 },1328 },
1300 "services": M{1329 "services": M{
1301 "mysql": M{1330 "mysql": M{
1302 "charm": "cs:quantal/mysql-1",1331 "charm": "cs:quantal/mysql-1",
1303 "exposed": true,1332 "exposed": true,
1333 "owner-tag": "user-admin",
1304 "units": M{1334 "units": M{
1305 "mysql/1": M{1335 "mysql/1": M{
1306 "machine": "1/lxc/0",1336 "machine": "1/lxc/0",
@@ -1341,6 +1371,7 @@
1341 "charm": "cs:quantal/mysql-1",1371 "charm": "cs:quantal/mysql-1",
1342 "can-upgrade-to": "cs:quantal/mysql-23",1372 "can-upgrade-to": "cs:quantal/mysql-23",
1343 "exposed": true,1373 "exposed": true,
1374 "owner-tag": "user-admin",
1344 "units": M{1375 "units": M{
1345 "mysql/0": M{1376 "mysql/0": M{
1346 "machine": "1",1377 "machine": "1",
@@ -1380,8 +1411,9 @@
1380 },1411 },
1381 "services": M{1412 "services": M{
1382 "mysql": M{1413 "mysql": M{
1383 "charm": "local:quantal/mysql-1",1414 "charm": "local:quantal/mysql-1",
1384 "exposed": true,1415 "exposed": true,
1416 "owner-tag": "user-admin",
1385 "units": M{1417 "units": M{
1386 "mysql/0": M{1418 "mysql/0": M{
1387 "machine": "1",1419 "machine": "1",
@@ -1426,6 +1458,7 @@
1426 "charm": "cs:quantal/mysql-2",1458 "charm": "cs:quantal/mysql-2",
1427 "can-upgrade-to": "cs:quantal/mysql-23",1459 "can-upgrade-to": "cs:quantal/mysql-23",
1428 "exposed": true,1460 "exposed": true,
1461 "owner-tag": "user-admin",
1429 "units": M{1462 "units": M{
1430 "mysql/0": M{1463 "mysql/0": M{
1431 "machine": "1",1464 "machine": "1",
@@ -1467,8 +1500,9 @@
1467 },1500 },
1468 "services": M{1501 "services": M{
1469 "mysql": M{1502 "mysql": M{
1470 "charm": "local:quantal/mysql-1",1503 "charm": "local:quantal/mysql-1",
1471 "exposed": true,1504 "exposed": true,
1505 "owner-tag": "user-admin",
1472 "units": M{1506 "units": M{
1473 "mysql/0": M{1507 "mysql/0": M{
1474 "machine": "1",1508 "machine": "1",
14751509
=== modified file 'state/api/client.go'
--- state/api/client.go 2014-02-24 17:41:18 +0000
+++ state/api/client.go 2014-02-27 04:55:00 +0000
@@ -50,6 +50,7 @@
50 CanUpgradeTo string50 CanUpgradeTo string
51 SubordinateTo []string51 SubordinateTo []string
52 Units map[string]UnitStatus52 Units map[string]UnitStatus
53 OwnerTag string
53}54}
5455
55// UnitStatus holds status info about a unit.56// UnitStatus holds status info about a unit.
5657
=== modified file 'state/apiserver/client/api_test.go'
--- state/apiserver/client/api_test.go 2014-02-19 06:31:52 +0000
+++ state/apiserver/client/api_test.go 2014-02-27 04:55:00 +0000
@@ -179,12 +179,14 @@
179 "logging-directory": []string{"wordpress"},179 "logging-directory": []string{"wordpress"},
180 },180 },
181 SubordinateTo: []string{"wordpress"},181 SubordinateTo: []string{"wordpress"},
182 OwnerTag: "user-admin",
182 },183 },
183 "mysql": api.ServiceStatus{184 "mysql": api.ServiceStatus{
184 Charm: "local:quantal/mysql-1",185 Charm: "local:quantal/mysql-1",
185 Relations: map[string][]string{},186 Relations: map[string][]string{},
186 SubordinateTo: []string{},187 SubordinateTo: []string{},
187 Units: map[string]api.UnitStatus{},188 Units: map[string]api.UnitStatus{},
189 OwnerTag: "user-admin",
188 },190 },
189 "wordpress": api.ServiceStatus{191 "wordpress": api.ServiceStatus{
190 Charm: "local:quantal/wordpress-3",192 Charm: "local:quantal/wordpress-3",
@@ -212,6 +214,7 @@
212 },214 },
213 },215 },
214 },216 },
217 OwnerTag: "user-admin",
215 },218 },
216 },219 },
217}220}
218221
=== modified file 'state/statecmd/status.go'
--- state/statecmd/status.go 2014-01-23 20:30:35 +0000
+++ state/statecmd/status.go 2014-02-27 04:55:00 +0000
@@ -335,6 +335,7 @@
335 status.Charm = serviceCharmURL.String()335 status.Charm = serviceCharmURL.String()
336 status.Exposed = service.IsExposed()336 status.Exposed = service.IsExposed()
337 status.Life = processLife(service)337 status.Life = processLife(service)
338 status.OwnerTag = service.GetOwnerTag()
338339
339 latestCharm, ok := context.latestCharms[*serviceCharmURL.WithRevision(-1)]340 latestCharm, ok := context.latestCharms[*serviceCharmURL.WithRevision(-1)]
340 if ok && latestCharm != serviceCharmURL.String() {341 if ok && latestCharm != serviceCharmURL.String() {

Subscribers

People subscribed via source and target branches

to status/vote changes: