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

Issue 7483043: Implement service/unit/machine annotations

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by frankban
Modified:
11 years, 2 months ago
Reviewers:
mp+151792, dimitern, rog
Visibility:
Public.

Description

Implement service/unit/machine annotations Annotations were added to services, units, and machines in MongoDB. Annotations are stored as key/value pairs and accessed through either Annotations or, for a single annotation, Annotation. Non-existent annotations are returned as the zero-value for strings (""), and annotations can be removed one at a time. Annotations will be used by the GUI (for storing x/y coordinates for services), Landscape (for reboots/security upgrades), and by providers. This is a precursor branch for adding annotations to the environment, and exposing annotation methods via the API. https://code.launchpad.net/~frankban/juju-core/annotations/+merge/151792 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 18

Patch Set 2 : Implement service/unit/machine annotations #

Total comments: 4

Patch Set 3 : Implement service/unit/machine annotations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -10 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A state/annotator.go View 1 1 chunk +56 lines, -0 lines 0 comments Download
A state/annotator_test.go View 1 2 1 chunk +92 lines, -0 lines 0 comments Download
M state/machine.go View 1 3 chunks +18 lines, -1 line 0 comments Download
M state/machine_test.go View 1 chunk +6 lines, -0 lines 0 comments Download
M state/service.go View 1 4 chunks +19 lines, -2 lines 0 comments Download
M state/service_test.go View 1 chunk +6 lines, -0 lines 0 comments Download
M state/unit.go View 1 3 chunks +16 lines, -2 lines 0 comments Download
M state/unit_test.go View 1 chunk +6 lines, -0 lines 0 comments Download
M state/watcher.go View 5 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 7
frankban
Please take a look.
11 years, 2 months ago (2013-03-05 15:41:59 UTC) #1
dimitern
I think this needs a bit more polishing. Possibly reduce code duplication in service/machine/unit. Tests ...
11 years, 2 months ago (2013-03-05 16:10:26 UTC) #2
frankban
Please take a look. https://codereview.appspot.com/7483043/diff/1/state/annotator.go File state/annotator.go (right): https://codereview.appspot.com/7483043/diff/1/state/annotator.go#newcode18 state/annotator.go:18: func (a annotator) SetAnnotation(key, value ...
11 years, 2 months ago (2013-03-05 19:06:58 UTC) #3
dimitern
Much nicer, thank you! LGTM
11 years, 2 months ago (2013-03-05 19:09:55 UTC) #4
rog
LGTM (two tiny trivials below that might be worth changing - we keep variables local ...
11 years, 2 months ago (2013-03-05 19:11:13 UTC) #5
frankban
Hi Dimiter and Roger, thanks for the reviews! https://codereview.appspot.com/7483043/diff/1/state/annotator.go File state/annotator.go (right): https://codereview.appspot.com/7483043/diff/1/state/annotator.go#newcode44 state/annotator.go:44: func ...
11 years, 2 months ago (2013-03-05 19:33:36 UTC) #6
frankban
11 years, 2 months ago (2013-03-05 19:39:32 UTC) #7
*** Submitted:

Implement service/unit/machine annotations

Annotations were added to services, units, and machines in MongoDB.  
Annotations are stored as key/value pairs and accessed through either 
Annotations or, for a single annotation, Annotation.  
Non-existent annotations are returned as the zero-value for strings (""), 
and annotations can be removed one at a time.  
Annotations will be used by the GUI (for storing x/y coordinates for services),
Landscape (for reboots/security upgrades), and by providers.  
This is a precursor branch for adding annotations to the environment, 
and exposing annotation methods via the API.

R=dimitern, rog
CC=
https://codereview.appspot.com/7483043
Sign in to reply to this message.

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