diff options
author | Steven Hardy <shardy@redhat.com> | 2014-06-19 14:41:09 +0100 |
---|---|---|
committer | Steven Hardy <shardy@redhat.com> | 2014-07-03 14:27:11 +0100 |
commit | a60f2722f8e084c4d68d2e439c6cc7c1d049b696 (patch) | |
tree | 2dcb0f1b2123c9168ea25c603796ad6df32d21a2 /heat/tests/test_metadata_refresh.py | |
parent | 706f7289fa859fa4561b3fbb163f60b63efbd746 (diff) | |
download | heat-a60f2722f8e084c4d68d2e439c6cc7c1d049b696.tar.gz |
Convert WaitConditionHandle to use handle_signal
The metadata_update interface does pretty much the exact same thing
as handle_signal, with the disadvantage that it's not exposed via
the native ReST API, so convert WaitConditionHandle to use
handle_signal.
This has the following advantages:
- Provides a step towards native waitcondition resources
- Enables signalling existing waitcondition resources via
heat resource-signal (e.g the native API)
- Moves towards a standardized model where handle_signal is the
only supported plugin interface for asynchronous signalling of
resources.
To avoid breaking any CD folks who may not update heat-engine and
heat-api-cfn at the same time, the existing resource interface is
maintained with a deprecation warning (how long to maintain this
is TBC).
Change-Id: I453a24f78095dfa5b3a5311651b5f1ac40aa8b3f
blueprint: native-waitcondition
Diffstat (limited to 'heat/tests/test_metadata_refresh.py')
-rw-r--r-- | heat/tests/test_metadata_refresh.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/heat/tests/test_metadata_refresh.py b/heat/tests/test_metadata_refresh.py index d7bcde5c3..edf1c62b5 100644 --- a/heat/tests/test_metadata_refresh.py +++ b/heat/tests/test_metadata_refresh.py @@ -243,11 +243,10 @@ class WaitCondMetadataUpdateTest(HeatTestCase): ''' 1 create stack 2 assert empty instance metadata - 3 service.metadata_update() + 3 service.resource_signal() 4 assert valid waitcond metadata 5 assert valid instance metadata ''' - self.stack = self.create_stack() watch = self.stack['WC'] @@ -258,7 +257,7 @@ class WaitCondMetadataUpdateTest(HeatTestCase): self.assertIsNone(inst.metadata_get()['test']) def update_metadata(id, data, reason): - self.man.metadata_update(utils.dummy_context(), + self.man.resource_signal(utils.dummy_context(), dict(self.stack.identifier()), 'WH', {'Data': data, 'Reason': reason, |