summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-11-02 10:33:14 +0000
committerGerrit Code Review <review@openstack.org>2020-11-02 10:33:14 +0000
commit0d7e5bde1eae6c17d9a6697eca9c813c6de2c5a4 (patch)
treee74f58c1fccd786e75b982ddf7c0fc33982597c9
parent1e84054dcc496f87f4c94d31f26882278b815b19 (diff)
parent85d6d65b97bf6a044bde2807370b730c8c3f1431 (diff)
downloadheat-0d7e5bde1eae6c17d9a6697eca9c813c6de2c5a4.tar.gz
Merge "Fix OS::Heat::Delay resource type" into stable/train
-rw-r--r--heat/engine/resources/openstack/heat/delay.py6
-rw-r--r--releasenotes/notes/delay-resource-7d44c512081026c8.yaml4
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.