summaryrefslogtreecommitdiff
path: root/heatclient/common
diff options
context:
space:
mode:
authorrabi <ramishra@redhat.com>2016-08-25 11:01:24 +0530
committerrabi <ramishra@redhat.com>2016-08-25 11:09:40 +0530
commitda0da4c1afc00dd2732b678b09fc2d826137a44d (patch)
tree19d52e6650da1b969b157b31bad9aa869b200ed1 /heatclient/common
parentfb7802e591bd51527d58a6c9f35e7cb8f6590a03 (diff)
downloadpython-heatclient-da0da4c1afc00dd2732b678b09fc2d826137a44d.tar.gz
Add parameter_merge_startegies section
This adds parameter_merge_strategies section to environment. This also adds the missing section parameter_encrypted_names. We use a server side module and a client side module that have deviated over a period of time. This patch syncs them. We probably should move these to a library and use use them for both server and client in the future. Change-Id: I9b20a7cedd416b6d8b788a30f66e472b85babf4a Blueprint: environment-merging
Diffstat (limited to 'heatclient/common')
-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] = {}