summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Herve <therve@redhat.com>2016-01-05 13:10:50 +0100
committerThomas Herve <therve@redhat.com>2016-01-12 09:17:00 +0100
commit39fb1243af1a3cdaf455f7ce17cba26e1e58b8c5 (patch)
tree828cc897c5f9fd668524fa4582e0f888bdbef7a7
parent62fb2583f2d8f69eb355fa47988be2b8770b4925 (diff)
downloadpython-heatclient-39fb1243af1a3cdaf455f7ce17cba26e1e58b8c5.tar.gz
Allow event specification in the environment
For additional validation we duplicate environment format on the client side, so to be able to create stacks with event sinks, we need to add the key here as well. Change-Id: Ia77fcdd68ee4020d0aa3d3235d38b2e5f268b7dd
-rw-r--r--heatclient/common/environment_format.py7
-rw-r--r--heatclient/tests/unit/test_environment_format.py1
2 files changed, 6 insertions, 2 deletions
diff --git a/heatclient/common/environment_format.py b/heatclient/common/environment_format.py
index c5f3e94..179a205 100644
--- a/heatclient/common/environment_format.py
+++ b/heatclient/common/environment_format.py
@@ -16,8 +16,11 @@ from heatclient.openstack.common._i18n import _
import yaml
-SECTIONS = (PARAMETER_DEFAULTS, PARAMETERS, RESOURCE_REGISTRY) = \
- ('parameter_defaults', 'parameters', 'resource_registry')
+SECTIONS = (
+ PARAMETER_DEFAULTS, PARAMETERS, RESOURCE_REGISTRY, EVENT_SINKS
+) = (
+ 'parameter_defaults', 'parameters', 'resource_registry', 'event_sinks'
+)
def parse(env_str):
diff --git a/heatclient/tests/unit/test_environment_format.py b/heatclient/tests/unit/test_environment_format.py
index faea505..e4145b9 100644
--- a/heatclient/tests/unit/test_environment_format.py
+++ b/heatclient/tests/unit/test_environment_format.py
@@ -30,6 +30,7 @@ class YamlEnvironmentTest(testtools.TestCase):
parameter_defaults: {}
parameters: {}
resource_registry: {}
+event_sinks: {}
'''
tpl1 = environment_format.parse(yaml1)
environment_format.default_for_missing(tpl1)