summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-09 11:28:43 +0000
committerGerrit Code Review <review@openstack.org>2017-06-09 11:28:43 +0000
commitfb27e73b32462b97347cdebc366d32dc71c6f835 (patch)
tree940fff05223490762a3baa23551e34bdc66c1f2e
parentc49755c72bf81999c6a6f9f13bf86874c705a204 (diff)
parent078105651b8ae60d4fffa2c2727446a9195acd71 (diff)
Merge "Handle re-created resources in StackUpdateManager" into stable/newton
-rw-r--r--tripleo_common/_stack_update.py6
-rw-r--r--tripleo_common/tests/test_stack_update.py9
2 files changed, 6 insertions, 9 deletions
diff --git a/tripleo_common/_stack_update.py b/tripleo_common/_stack_update.py
index c458438..752ce17 100644
--- a/tripleo_common/_stack_update.py
+++ b/tripleo_common/_stack_update.py
@@ -160,9 +160,11 @@ class StackUpdateManager(object):
160 state = 'on_breakpoint' 160 state = 'on_breakpoint'
161 elif ev.resource_status_reason == hook_clear_reason: 161 elif ev.resource_status_reason == hook_clear_reason:
162 state = 'in_progress' 162 state = 'in_progress'
163 elif ev.resource_status == 'UPDATE_IN_PROGRESS': 163 elif ev.resource_status in ('CREATE_IN_PROGRESS',
164 'UPDATE_IN_PROGRESS'):
164 state = 'in_progress' 165 state = 'in_progress'
165 elif ev.resource_status == 'UPDATE_COMPLETE': 166 elif ev.resource_status in ('CREATE_COMPLETE',
167 'UPDATE_COMPLETE'):
166 state = 'completed' 168 state = 'completed'
167 resources[state][res.physical_resource_id] = res 169 resources[state][res.physical_resource_id] = res
168 170
diff --git a/tripleo_common/tests/test_stack_update.py b/tripleo_common/tests/test_stack_update.py
index 232e67b..cd1ee94 100644
--- a/tripleo_common/tests/test_stack_update.py
+++ b/tripleo_common/tests/test_stack_update.py
@@ -53,14 +53,9 @@ class StackUpdateManagerTest(base.TestCase):
53 mock.MagicMock( 53 mock.MagicMock(
54 event_time='2015-03-25T09:15:04Z', 54 event_time='2015-03-25T09:15:04Z',
55 resource_name='Controller-0', 55 resource_name='Controller-0',
56 resource_status='CREATE_IN_PROGRESS', 56 resource_status='UPDATE_IN_PROGRESS',
57 resource_status_reason='UPDATE paused until Hook ' 57 resource_status_reason='UPDATE paused until Hook '
58 'pre-update is cleared'), 58 'pre-update is cleared')
59 mock.MagicMock(
60 event_time='2015-03-25T09:15:02Z',
61 resource_name='Controller-1',
62 resource_status='CREATE_COMPLETE',
63 resource_status_reason=''),
64 ] 59 ]
65 else: 60 else:
66 return [ 61 return [