diff options
author | Zane Bitter <zbitter@redhat.com> | 2020-08-13 11:35:21 -0400 |
---|---|---|
committer | David Hill <davidchill@hotmail.com> | 2020-10-06 20:02:25 +0000 |
commit | 18f2ed6b0ce0e25cf28775e99a2ec046468b0262 (patch) | |
tree | 40101f3f8fdb615ff7822e6b5c5e94122921b163 | |
parent | cdfb5df5597fb258169b4245e81f2bfcd01f192f (diff) | |
download | heat-18f2ed6b0ce0e25cf28775e99a2ec046468b0262.tar.gz |
Fix OS::Heat::Delay resource type
Don't override ResourceStatus.ACTIONS, as it's used internally by the
Resource class.
Change-Id: Icf306e981c19e3d5410905befa7907dcdba33337
Story: 2008013
Task: 40663
(cherry picked from commit c362c57854f7d841a72dd9de2f6ec3a9b9187f82)
-rw-r--r-- | heat/engine/resources/openstack/heat/delay.py | 6 | ||||
-rw-r--r-- | releasenotes/notes/delay-resource-7d44c512081026c8.yaml | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/heat/engine/resources/openstack/heat/delay.py b/heat/engine/resources/openstack/heat/delay.py index 643a2b2c0..5a6623273 100644 --- a/heat/engine/resources/openstack/heat/delay.py +++ b/heat/engine/resources/openstack/heat/delay.py @@ -51,7 +51,7 @@ class Delay(resource.Resource): ) PROPERTIES = ( - MIN_WAIT_SECS, MAX_JITTER, JITTER_MULTIPLIER_SECS, ACTIONS, + MIN_WAIT_SECS, MAX_JITTER, JITTER_MULTIPLIER_SECS, DELAY_ACTIONS, ) = ( 'min_wait', 'max_jitter', 'jitter_multiplier', 'actions', ) @@ -84,7 +84,7 @@ class Delay(resource.Resource): constraints.Range(min=0), ] ), - ACTIONS: properties.Schema( + DELAY_ACTIONS: properties.Schema( properties.Schema.LIST, _('Actions during which the delay will occur.'), update_allowed=True, @@ -119,7 +119,7 @@ class Delay(resource.Resource): def _wait_secs(self, action): """Return a (randomised) wait time for the specified action.""" - if action not in self.properties[self.ACTIONS]: + if action not in self.properties[self.DELAY_ACTIONS]: return 0 min_wait_secs, max_jitter_secs = self._delay_parameters() diff --git a/releasenotes/notes/delay-resource-7d44c512081026c8.yaml b/releasenotes/notes/delay-resource-7d44c512081026c8.yaml new file mode 100644 index 000000000..27460753c --- /dev/null +++ b/releasenotes/notes/delay-resource-7d44c512081026c8.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + The ``OS::Heat::Delay`` resource type is now usable. |