summaryrefslogtreecommitdiff
path: root/heatclient/common/environment_format.py
diff options
context:
space:
mode:
Diffstat (limited to 'heatclient/common/environment_format.py')
-rw-r--r--heatclient/common/environment_format.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/heatclient/common/environment_format.py b/heatclient/common/environment_format.py
index 6870b79..8f2c4ea 100644
--- a/heatclient/common/environment_format.py
+++ b/heatclient/common/environment_format.py
@@ -17,9 +17,13 @@ from heatclient.openstack.common._i18n import _
SECTIONS = (
- PARAMETER_DEFAULTS, PARAMETERS, RESOURCE_REGISTRY, EVENT_SINKS
+ PARAMETER_DEFAULTS, PARAMETERS, RESOURCE_REGISTRY,
+ ENCRYPTED_PARAM_NAMES, EVENT_SINKS,
+ PARAMETER_MERGE_STRATEGIES
) = (
- 'parameter_defaults', 'parameters', 'resource_registry', 'event_sinks'
+ 'parameter_defaults', 'parameters', 'resource_registry',
+ 'encrypted_param_names', 'event_sinks',
+ 'parameter_merge_strategies'
)
@@ -55,7 +59,9 @@ def parse(env_str):
def default_for_missing(env):
"""Checks a parsed environment for missing sections."""
-
for param in SECTIONS:
- if param not in env:
- env[param] = {}
+ if param not in env and param != PARAMETER_MERGE_STRATEGIES:
+ if param in (ENCRYPTED_PARAM_NAMES, EVENT_SINKS):
+ env[param] = []
+ else:
+ env[param] = {}