Previous version was overwriting Demo key with last preload_data.json structure
instead of a merge. Have to iterate over keys
Issue-ID: INT-1038
Change-Id: Ia15428b3aae7cbc681a96d50656d278b5ef07b42
Signed-off-by: Brian Freeman <bf1936@att.com>
import json
import os.path
import json
import os.path
+from itertools import chain
+from collections import defaultdict
+
GLOBAL_PRELOAD_PARAMETERS = {
# heat template parameter values common to all heat template continaing these parameters
GLOBAL_PRELOAD_PARAMETERS = {
# heat template parameter values common to all heat template continaing these parameters
# Create dictionaries for new MAPPING data to join to original MAPPING data
GLOBAL_PRELOAD_PARAMETERS2 = {}
# Create dictionaries for new MAPPING data to join to original MAPPING data
GLOBAL_PRELOAD_PARAMETERS2 = {}
-GLOBAL_PRELOAD_PARAMETERS = dict(GLOBAL_PRELOAD_PARAMETERS.items() + GLOBAL_PRELOAD_PARAMETERS2.items())
+# preload_data.json is for Demo key in GLOBAL_PRELOAD_PARAMETERS
+
+
+GLOBAL_PRELOAD_PARAMETERS3 = {'Demo':{}}
+
+for k, v in chain(GLOBAL_PRELOAD_PARAMETERS['Demo'].items(), GLOBAL_PRELOAD_PARAMETERS2['Demo'].items()):
+ GLOBAL_PRELOAD_PARAMETERS3['Demo'][k] = v
+# print(k, v)
+
+GLOBAL_PRELOAD_PARAMETERS = dict(GLOBAL_PRELOAD_PARAMETERS.items() + GLOBAL_PRELOAD_PARAMETERS3.items())
+
+#print GLOBAL_PRELOAD_PARAMETERS