Merge lp://staging/~bcsaller/pyjuju/delta-annotations into lp://staging/~hazmat/pyjuju/rapi-rollup
Proposed by
Benjamin Saller
Status: | Merged |
---|---|
Merged at revision: | 631 |
Proposed branch: | lp://staging/~bcsaller/pyjuju/delta-annotations |
Merge into: | lp://staging/~hazmat/pyjuju/rapi-rollup |
Diff against target: |
49 lines (+12/-5) 2 files modified
improv.py (+4/-4) juju/rapi/delta.py (+8/-1) |
To merge this branch: | bzr merge lp://staging/~bcsaller/pyjuju/delta-annotations |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kapil Thangavelu | Pending | ||
Review via email:
|
Description of the change
Delta stream environment level annotations
There may be a better way to generate the delta for this, but this
works fine for the size of the annotation space on the env.
To post a comment you must log in.
Reviewers: mp+150451_ code.launchpad. net,
Message:
Please take a look.
Description:
Delta stream environment level annotations
There may be a better way to generate the delta for this, but this
works fine for the size of the annotation space on the env.
https:/ /code.launchpad .net/~bcsaller/ juju/delta- annotations/ +merge/ 150451
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/7382061/
Affected files:
A [revision details]
M juju/rapi/delta.py
Index: [revision details]
=== 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: <email address hidden>
+New revision: <email address hidden>
Index: juju/rapi/delta.py delta.py'
copy.deepcopy( self.previous) , changes.append)
=== modified file 'juju/rapi/
--- juju/rapi/delta.py 2013-01-18 17:00:39 +0000
+++ juju/rapi/delta.py 2013-02-25 22:21:40 +0000
@@ -126,7 +126,7 @@
"""Return current state as list of changes."""
changes = []
delta(
- {'machines': {}, 'services': {}, 'topology': None},
+ {'machines': {}, 'services': {}, 'topology':
None, 'annotations': {}},
return changes
@@ -272,3 +272,10 @@
svc['id' ] = sid
stream( ('service' , 'change', svc)) 'annotations' , {}) cur_env. items() ) != prev_env. items() )): ('annotations' , 'change', cur['annotation s']))
if svc != prev_svc:
+
+ # Add env annotations to the stream if need be.
+ cur_env = cur['annotations']
+ prev_env = prev.get(
+ if (sorted(
+ sorted(
+ stream(