Merge lp:~fwereade/pyjuju/sync-env-when-required into lp:~fwereade/pyjuju/shadow-trunk-1204
Proposed by
William Reade
Status: | Merged |
---|---|
Approved by: | William Reade |
Approved revision: | 521 |
Merged at revision: | 515 |
Proposed branch: | lp:~fwereade/pyjuju/sync-env-when-required |
Merge into: | lp:~fwereade/pyjuju/shadow-trunk-1204 |
Prerequisite: | lp:~fwereade/pyjuju/warn-ignored-constraints |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~fwereade/pyjuju/sync-env-when-required |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Reade | Pending | ||
Review via email: mp+99941@code.launchpad.net |
Description of the change
All actions which require remote environment state now sync it
add-unit had lost it somewhere in the pipeline due to expectation of syncing
being retired; terminate-machine never had it; deploy and
[gs]et-constraints' tests slightly improved.
To post a comment you must log in.
Reviewers: mp+99941_ code.launchpad. net,
Message:
Please take a look.
Description:
All actions which require remote environment state now sync it
add-unit had lost it somewhere in the pipeline due to expectation of
syncing
being retired; terminate-machine never had it; deploy and
[gs]et-constraints' tests slightly improved.
https:/ /code.launchpad .net/~fwereade/ juju/sync- env-when- required/ +merge/ 99941
Requires: /code.launchpad .net/~fwereade/ juju/warn- ignored- constraints/ +merge/ 99861
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/5957044/
Affected files: add_unit. py constraints_ get.py constraints_ set.py deploy. py terminate_ machine. py tests/test_ add_unit. py tests/test_ constraints_ get.py tests/test_ constraints_ set.py tests/test_ terminate_ machine. py utils.py
A [revision details]
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
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/control/ add_unit. py add_unit. py' add_unit. py 2012-03-26 13:26:58 +0000 add_unit. py 2012-03-29 13:40:45 +0000 internet. defer import inlineCallbacks
=== modified file 'juju/control/
--- juju/control/
+++ juju/control/
@@ -3,7 +3,7 @@
from twisted.
from juju.control import legacy t_state placement import place_unit
-from juju.control.utils import get_environment
+from juju.control.utils import get_environment, sync_environmen
from juju.state.
from juju.state.service import ServiceStateManager
@@ -47,8 +47,8 @@ check_environme nt(
client, provider. get_legacy_ config_ keys()) t_state( client, config, environment.name)
try:
yield legacy.
+ yield sync_environmen
- # TODO: handle legacy environment syncing?
service_ manager = ServiceStateMan ager(client)
service_ state = yield manager. get_service_ state(service_ name)
service_
for i in range(num_units):
Index: juju/control/ constraints_ get.py constraints_ get.py' constraints_ get.py 2012-03-29 02:00:04 +0000 constraints_ get.py 2012-03-29 13:40:45 +0000
=== modified file 'juju/control/
--- juju/control/
+++ juju/control/
@@ -4,7 +4,7 @@
from twisted. internet. defer import inlineCallbacks
-from juju.control.utils import get_environment t_state environment import EnvironmentStat eManager eManager( client) config_ state(env_ config, environment.name) t_state( client, env_config, environment.name)
+from juju.control.utils import get_environment, sync_environmen
from juju.state.
from juju.state.machine import MachineStateManager
from juju.state.service import ServiceStateManager
@@ -47,8 +47,7 @@
client = yield provider.connect()
result = {}
try:
- esm = EnvironmentStat
- yield esm.set_
+ yield sync_environmen
if entity_names:
msm = MachineStateMan...