From eff3576b9042c3af819ff524b8cd213be5698649 Mon Sep 17 00:00:00 2001 From: jshum2479 Date: Mon, 19 Apr 2021 15:43:39 -0500 Subject: [PATCH 1/3] Fix to resolve env in key before merging --- core/src/main/python/compare_model.py | 4 +-- core/src/main/python/prepare_model.py | 5 ++-- core/src/main/python/validate.py | 2 +- .../main/python/wlsdeploy/util/cla_helper.py | 27 +++++++++---------- .../main/python/wlsdeploy/util/variables.py | 24 +++++++++++++---- .../python/wlsdeploy/util/cla_helper_test.py | 25 +++++++++++------ 6 files changed, 55 insertions(+), 32 deletions(-) diff --git a/core/src/main/python/compare_model.py b/core/src/main/python/compare_model.py index 896ea743a..0d0227752 100644 --- a/core/src/main/python/compare_model.py +++ b/core/src/main/python/compare_model.py @@ -121,7 +121,7 @@ def compare(self): variable_map = validator.load_variables(self.model_context.get_variable_file()) model_file_name = self.current_dict_file - model_dictionary = cla_helper.merge_model_files(model_file_name, variable_map) + model_dictionary = cla_helper.merge_model_files(model_file_name, self.model_context, variable_map) variables.substitute(model_dictionary, variable_map, self.model_context) @@ -141,7 +141,7 @@ def compare(self): current_dict = model_dictionary model_file_name = self.past_dict_file - model_dictionary = cla_helper.merge_model_files(model_file_name, variable_map) + model_dictionary = cla_helper.merge_model_files(model_file_name, self.model_context, variable_map) variables.substitute(model_dictionary, variable_map, self.model_context) arg_map[CommandLineArgUtil.MODEL_FILE_SWITCH] = model_file_name diff --git a/core/src/main/python/prepare_model.py b/core/src/main/python/prepare_model.py index 669dce196..336651f72 100644 --- a/core/src/main/python/prepare_model.py +++ b/core/src/main/python/prepare_model.py @@ -254,7 +254,7 @@ def walk(self): validator = Validator(self.model_context, aliases, wlst_mode=WlstModes.OFFLINE) # Just merge and validate but without substitution - model_dictionary = cla_helper.merge_model_files(model_file_name, None) + model_dictionary = cla_helper.merge_model_files(model_file_name, self.model_context, None) variable_file = self.model_context.get_variable_file() if not os.path.exists(variable_file): @@ -288,7 +288,8 @@ def walk(self): pty._write_dictionary_to_yaml_file(self.current_dict, writer) writer.close() - cla_helper.merge_model_dictionaries(merged_model_dictionary, self.current_dict, None) + cla_helper.merge_model_dictionaries(merged_model_dictionary, self.current_dict, None + , self.model_context) # filter variables or secrets that are no longer in the merged, filtered model filter_helper.apply_filters(merged_model_dictionary, "discover", self.model_context) diff --git a/core/src/main/python/validate.py b/core/src/main/python/validate.py index 24500c245..92e2035c8 100644 --- a/core/src/main/python/validate.py +++ b/core/src/main/python/validate.py @@ -109,7 +109,7 @@ def __perform_model_file_validation(model_file_name, model_context): try: model_validator = Validator(model_context, logger=__logger) variable_map = model_validator.load_variables(model_context.get_variable_file()) - model_dictionary = cla_helper.merge_model_files(model_file_name, variable_map) + model_dictionary = cla_helper.merge_model_files(model_file_name, model_context, variable_map) if cla_helper.check_persist_model(): persist_model_dict = copy.deepcopy(model_dictionary) diff --git a/core/src/main/python/wlsdeploy/util/cla_helper.py b/core/src/main/python/wlsdeploy/util/cla_helper.py index 44f6fcf94..435bd3d9f 100644 --- a/core/src/main/python/wlsdeploy/util/cla_helper.py +++ b/core/src/main/python/wlsdeploy/util/cla_helper.py @@ -228,7 +228,7 @@ def load_model(program_name, model_context, aliases, filter_type, wlst_mode): model_file_value = model_context.get_model_file() try: - model_dictionary = merge_model_files(model_file_value, variable_map) + model_dictionary = merge_model_files(model_file_value, model_context, variable_map) except TranslateException, te: __logger.severe('WLSDPLY-09014', program_name, model_file_value, te.getLocalizedMessage(), error=te, class_name=_class_name, method_name=_method_name) @@ -299,12 +299,13 @@ def clean_up_temp_files(): __tmp_model_dir = None -def merge_model_files(model_file_value, variable_map=None): +def merge_model_files(model_file_value, model_context, variable_map=None): """ Merge the model files specified by the model file value. It may be a single file, or a comma-separated list of files. :param variable_map: variables to be used for name resolution, or None :param model_file_value: the value specified as a command argument + ;param model_context: model context :return: the merge model dictionary """ merged_model = OrderedDict() @@ -312,12 +313,12 @@ def merge_model_files(model_file_value, variable_map=None): for model_file in model_files: model = FileToPython(model_file, True).parse() - merge_model_dictionaries(merged_model, model, variable_map) + merge_model_dictionaries(merged_model, model, variable_map, model_context) return merged_model -def merge_model_dictionaries(dictionary, new_dictionary, variable_map): +def merge_model_dictionaries(dictionary, new_dictionary, variable_map, model_context): """ Merge the values from the new dictionary to the existing one. Use variables to resolve keys. @@ -327,7 +328,7 @@ def merge_model_dictionaries(dictionary, new_dictionary, variable_map): """ for new_key in new_dictionary: new_value = new_dictionary[new_key] - dictionary_key, replace_key = _find_dictionary_merge_key(dictionary, new_key, variable_map) + dictionary_key, replace_key = _find_dictionary_merge_key(dictionary, new_key, variable_map, model_context) # the key is not in the original dictionary, just add it if dictionary_key is None: @@ -343,12 +344,12 @@ def merge_model_dictionaries(dictionary, new_dictionary, variable_map): else: value = dictionary[dictionary_key] if isinstance(value, dict) and isinstance(new_value, dict): - merge_model_dictionaries(value, new_value, variable_map) + merge_model_dictionaries(value, new_value, variable_map, model_context) else: dictionary[new_key] = new_value -def _find_dictionary_merge_key(dictionary, new_key, variable_map): +def _find_dictionary_merge_key(dictionary, new_key, variable_map, model_context): """ Find the key corresponding to new_key in the specified dictionary. Determine if the new_key should completely replace the value in the dictionary. @@ -363,11 +364,11 @@ def _find_dictionary_merge_key(dictionary, new_key, variable_map): return new_key, False new_is_delete = model_helper.is_delete_name(new_key) - match_new_key = _get_merge_match_key(new_key, variable_map) + match_new_key = _get_merge_match_key(new_key, variable_map, model_context) for dictionary_key in dictionary.keys(): dictionary_is_delete = model_helper.is_delete_name(dictionary_key) - match_dictionary_key = _get_merge_match_key(dictionary_key, variable_map) + match_dictionary_key = _get_merge_match_key(dictionary_key, variable_map, model_context) if match_dictionary_key == match_new_key: replace_key = new_is_delete != dictionary_is_delete return dictionary_key, replace_key @@ -375,7 +376,7 @@ def _find_dictionary_merge_key(dictionary, new_key, variable_map): return None, False -def _get_merge_match_key(key, variable_map): +def _get_merge_match_key(key, variable_map, model_context): """ Get the key name to use for matching in model merge. This includes resolving any variables, and removing delete notation if present. @@ -383,10 +384,8 @@ def _get_merge_match_key(key, variable_map): :param variable_map: variable map to use for substitutions :return: the key to use for matching """ - if variable_map is not None: - match_key = variables.substitute_key(key, variable_map) - else: - match_key = key + + match_key = variables.substitute_key(key, variable_map, model_context) if model_helper.is_delete_name(match_key): match_key = model_helper.get_delete_item_name(match_key) diff --git a/core/src/main/python/wlsdeploy/util/variables.py b/core/src/main/python/wlsdeploy/util/variables.py index 9c81de0f1..820505202 100644 --- a/core/src/main/python/wlsdeploy/util/variables.py +++ b/core/src/main/python/wlsdeploy/util/variables.py @@ -438,7 +438,7 @@ def _report_token_issue(message_key, method_name, model_context, *args): raise ex -def substitute_key(text, variables): +def substitute_key(text, variables, model_context): """ Substitute any @@PROP values in the text and return. If the corresponding variable is not found, leave the @@PROP value in place. @@ -446,11 +446,25 @@ def substitute_key(text, variables): :param variables: the variable map :return: the substituted text value """ - matches = _property_pattern.findall(text) + method_name = "substitute_key" + + if variables is not None: + matches = _property_pattern.findall(text) + for token, key in matches: + if key in variables: + value = variables[key] + text = text.replace(token, value) + + matches = _environment_pattern.findall(text) for token, key in matches: - if key in variables: - value = variables[key] - text = text.replace(token, value) + # log, or throw an exception if key is not found. + if not os.environ.has_key(key): + _report_token_issue('WLSDPLY-01737', method_name, model_context, key) + continue + + value = os.environ.get(key) + text = text.replace(token, value) + return text diff --git a/core/src/test/python/wlsdeploy/util/cla_helper_test.py b/core/src/test/python/wlsdeploy/util/cla_helper_test.py index cb07a8403..e6ee870e1 100644 --- a/core/src/test/python/wlsdeploy/util/cla_helper_test.py +++ b/core/src/test/python/wlsdeploy/util/cla_helper_test.py @@ -60,7 +60,9 @@ def testMergeModels(self): } variables = {} - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) + model_context = ModelContext('validate', []) + + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) # print("Merged model: " + str(dictionary)) servers = dictionary['Servers'] @@ -80,8 +82,9 @@ def testMergeMatchingProperties(self): new_dictionary = _build_model_two('@@PROP:server1@@') variables = {} + model_context = ModelContext('validate', []) # no variables are needed to resolve this - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) # print("Merged model: " + str(dictionary)) servers = dictionary['Servers'] @@ -95,7 +98,8 @@ def testMergeDifferentProperties(self): new_dictionary = _build_model_two('@@PROP:server1b@@') variables = _build_variable_map() - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) + model_context = ModelContext('validate', []) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) # print("Merged model: " + str(dictionary)) self._check_merged_server(dictionary, '@@PROP:server1a@@') @@ -106,7 +110,8 @@ def testMergePropertyToName(self): new_dictionary = _build_model_two('@@PROP:server1b@@') variables = _build_variable_map() - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) + model_context = ModelContext('validate', []) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) # print("Merged model: " + str(dictionary)) self._check_merged_server(dictionary, 'm1') @@ -117,7 +122,8 @@ def testMergeNameToProperty(self): new_dictionary = _build_model_two('m1') variables = _build_variable_map() - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) + model_context = ModelContext('validate', []) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) # print("Merged model: " + str(dictionary)) self._check_merged_server(dictionary, '@@PROP:server1a@@') @@ -128,7 +134,8 @@ def testMergeDeletedNameToName(self): new_dictionary = _build_delete_model('m1') variables = {} - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) + model_context = ModelContext('validate', []) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) # print("Merged model: " + str(dictionary)) servers = dictionary['Servers'] @@ -140,7 +147,8 @@ def testMergeDeletedNameToDeleteName(self): new_dictionary = _build_delete_model('m1') variables = {} - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) + model_context = ModelContext('validate', []) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) # print("Merged model: " + str(dictionary)) server = self._check_single_server(dictionary, '!m1') @@ -152,7 +160,8 @@ def testMergeNameToDeletedName(self): new_dictionary = _build_model_two('m1') variables = {} - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) + model_context = ModelContext('validate', []) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) # print("Merged model: " + str(dictionary)) server = self._check_single_server(dictionary, 'm1') From f8755398206653dffa15aae6d8be0327dbad1337 Mon Sep 17 00:00:00 2001 From: jshum2479 Date: Tue, 20 Apr 2021 10:35:33 -0500 Subject: [PATCH 2/3] remove error conditions when unresolved env during merge --- core/src/main/python/compare_model.py | 4 ++-- core/src/main/python/prepare_model.py | 5 ++-- core/src/main/python/validate.py | 2 +- .../main/python/wlsdeploy/util/cla_helper.py | 22 ++++++++--------- .../main/python/wlsdeploy/util/variables.py | 3 +-- .../python/wlsdeploy/util/cla_helper_test.py | 24 +++++++------------ 6 files changed, 25 insertions(+), 35 deletions(-) diff --git a/core/src/main/python/compare_model.py b/core/src/main/python/compare_model.py index 0d0227752..896ea743a 100644 --- a/core/src/main/python/compare_model.py +++ b/core/src/main/python/compare_model.py @@ -121,7 +121,7 @@ def compare(self): variable_map = validator.load_variables(self.model_context.get_variable_file()) model_file_name = self.current_dict_file - model_dictionary = cla_helper.merge_model_files(model_file_name, self.model_context, variable_map) + model_dictionary = cla_helper.merge_model_files(model_file_name, variable_map) variables.substitute(model_dictionary, variable_map, self.model_context) @@ -141,7 +141,7 @@ def compare(self): current_dict = model_dictionary model_file_name = self.past_dict_file - model_dictionary = cla_helper.merge_model_files(model_file_name, self.model_context, variable_map) + model_dictionary = cla_helper.merge_model_files(model_file_name, variable_map) variables.substitute(model_dictionary, variable_map, self.model_context) arg_map[CommandLineArgUtil.MODEL_FILE_SWITCH] = model_file_name diff --git a/core/src/main/python/prepare_model.py b/core/src/main/python/prepare_model.py index 336651f72..669dce196 100644 --- a/core/src/main/python/prepare_model.py +++ b/core/src/main/python/prepare_model.py @@ -254,7 +254,7 @@ def walk(self): validator = Validator(self.model_context, aliases, wlst_mode=WlstModes.OFFLINE) # Just merge and validate but without substitution - model_dictionary = cla_helper.merge_model_files(model_file_name, self.model_context, None) + model_dictionary = cla_helper.merge_model_files(model_file_name, None) variable_file = self.model_context.get_variable_file() if not os.path.exists(variable_file): @@ -288,8 +288,7 @@ def walk(self): pty._write_dictionary_to_yaml_file(self.current_dict, writer) writer.close() - cla_helper.merge_model_dictionaries(merged_model_dictionary, self.current_dict, None - , self.model_context) + cla_helper.merge_model_dictionaries(merged_model_dictionary, self.current_dict, None) # filter variables or secrets that are no longer in the merged, filtered model filter_helper.apply_filters(merged_model_dictionary, "discover", self.model_context) diff --git a/core/src/main/python/validate.py b/core/src/main/python/validate.py index 92e2035c8..24500c245 100644 --- a/core/src/main/python/validate.py +++ b/core/src/main/python/validate.py @@ -109,7 +109,7 @@ def __perform_model_file_validation(model_file_name, model_context): try: model_validator = Validator(model_context, logger=__logger) variable_map = model_validator.load_variables(model_context.get_variable_file()) - model_dictionary = cla_helper.merge_model_files(model_file_name, model_context, variable_map) + model_dictionary = cla_helper.merge_model_files(model_file_name, variable_map) if cla_helper.check_persist_model(): persist_model_dict = copy.deepcopy(model_dictionary) diff --git a/core/src/main/python/wlsdeploy/util/cla_helper.py b/core/src/main/python/wlsdeploy/util/cla_helper.py index 435bd3d9f..7ab1a1dc2 100644 --- a/core/src/main/python/wlsdeploy/util/cla_helper.py +++ b/core/src/main/python/wlsdeploy/util/cla_helper.py @@ -228,7 +228,7 @@ def load_model(program_name, model_context, aliases, filter_type, wlst_mode): model_file_value = model_context.get_model_file() try: - model_dictionary = merge_model_files(model_file_value, model_context, variable_map) + model_dictionary = merge_model_files(model_file_value, variable_map) except TranslateException, te: __logger.severe('WLSDPLY-09014', program_name, model_file_value, te.getLocalizedMessage(), error=te, class_name=_class_name, method_name=_method_name) @@ -299,7 +299,7 @@ def clean_up_temp_files(): __tmp_model_dir = None -def merge_model_files(model_file_value, model_context, variable_map=None): +def merge_model_files(model_file_value, variable_map=None): """ Merge the model files specified by the model file value. It may be a single file, or a comma-separated list of files. @@ -313,12 +313,12 @@ def merge_model_files(model_file_value, model_context, variable_map=None): for model_file in model_files: model = FileToPython(model_file, True).parse() - merge_model_dictionaries(merged_model, model, variable_map, model_context) + merge_model_dictionaries(merged_model, model, variable_map) return merged_model -def merge_model_dictionaries(dictionary, new_dictionary, variable_map, model_context): +def merge_model_dictionaries(dictionary, new_dictionary, variable_map): """ Merge the values from the new dictionary to the existing one. Use variables to resolve keys. @@ -328,7 +328,7 @@ def merge_model_dictionaries(dictionary, new_dictionary, variable_map, model_con """ for new_key in new_dictionary: new_value = new_dictionary[new_key] - dictionary_key, replace_key = _find_dictionary_merge_key(dictionary, new_key, variable_map, model_context) + dictionary_key, replace_key = _find_dictionary_merge_key(dictionary, new_key, variable_map) # the key is not in the original dictionary, just add it if dictionary_key is None: @@ -344,12 +344,12 @@ def merge_model_dictionaries(dictionary, new_dictionary, variable_map, model_con else: value = dictionary[dictionary_key] if isinstance(value, dict) and isinstance(new_value, dict): - merge_model_dictionaries(value, new_value, variable_map, model_context) + merge_model_dictionaries(value, new_value, variable_map) else: dictionary[new_key] = new_value -def _find_dictionary_merge_key(dictionary, new_key, variable_map, model_context): +def _find_dictionary_merge_key(dictionary, new_key, variable_map): """ Find the key corresponding to new_key in the specified dictionary. Determine if the new_key should completely replace the value in the dictionary. @@ -364,11 +364,11 @@ def _find_dictionary_merge_key(dictionary, new_key, variable_map, model_context) return new_key, False new_is_delete = model_helper.is_delete_name(new_key) - match_new_key = _get_merge_match_key(new_key, variable_map, model_context) + match_new_key = _get_merge_match_key(new_key, variable_map) for dictionary_key in dictionary.keys(): dictionary_is_delete = model_helper.is_delete_name(dictionary_key) - match_dictionary_key = _get_merge_match_key(dictionary_key, variable_map, model_context) + match_dictionary_key = _get_merge_match_key(dictionary_key, variable_map) if match_dictionary_key == match_new_key: replace_key = new_is_delete != dictionary_is_delete return dictionary_key, replace_key @@ -376,7 +376,7 @@ def _find_dictionary_merge_key(dictionary, new_key, variable_map, model_context) return None, False -def _get_merge_match_key(key, variable_map, model_context): +def _get_merge_match_key(key, variable_map): """ Get the key name to use for matching in model merge. This includes resolving any variables, and removing delete notation if present. @@ -385,7 +385,7 @@ def _get_merge_match_key(key, variable_map, model_context): :return: the key to use for matching """ - match_key = variables.substitute_key(key, variable_map, model_context) + match_key = variables.substitute_key(key, variable_map) if model_helper.is_delete_name(match_key): match_key = model_helper.get_delete_item_name(match_key) diff --git a/core/src/main/python/wlsdeploy/util/variables.py b/core/src/main/python/wlsdeploy/util/variables.py index 820505202..6d759bfbd 100644 --- a/core/src/main/python/wlsdeploy/util/variables.py +++ b/core/src/main/python/wlsdeploy/util/variables.py @@ -438,7 +438,7 @@ def _report_token_issue(message_key, method_name, model_context, *args): raise ex -def substitute_key(text, variables, model_context): +def substitute_key(text, variables): """ Substitute any @@PROP values in the text and return. If the corresponding variable is not found, leave the @@PROP value in place. @@ -459,7 +459,6 @@ def substitute_key(text, variables, model_context): for token, key in matches: # log, or throw an exception if key is not found. if not os.environ.has_key(key): - _report_token_issue('WLSDPLY-01737', method_name, model_context, key) continue value = os.environ.get(key) diff --git a/core/src/test/python/wlsdeploy/util/cla_helper_test.py b/core/src/test/python/wlsdeploy/util/cla_helper_test.py index e6ee870e1..d50054e04 100644 --- a/core/src/test/python/wlsdeploy/util/cla_helper_test.py +++ b/core/src/test/python/wlsdeploy/util/cla_helper_test.py @@ -60,9 +60,8 @@ def testMergeModels(self): } variables = {} - model_context = ModelContext('validate', []) - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) # print("Merged model: " + str(dictionary)) servers = dictionary['Servers'] @@ -82,9 +81,8 @@ def testMergeMatchingProperties(self): new_dictionary = _build_model_two('@@PROP:server1@@') variables = {} - model_context = ModelContext('validate', []) # no variables are needed to resolve this - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) # print("Merged model: " + str(dictionary)) servers = dictionary['Servers'] @@ -98,8 +96,7 @@ def testMergeDifferentProperties(self): new_dictionary = _build_model_two('@@PROP:server1b@@') variables = _build_variable_map() - model_context = ModelContext('validate', []) - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) # print("Merged model: " + str(dictionary)) self._check_merged_server(dictionary, '@@PROP:server1a@@') @@ -110,8 +107,7 @@ def testMergePropertyToName(self): new_dictionary = _build_model_two('@@PROP:server1b@@') variables = _build_variable_map() - model_context = ModelContext('validate', []) - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) # print("Merged model: " + str(dictionary)) self._check_merged_server(dictionary, 'm1') @@ -122,8 +118,7 @@ def testMergeNameToProperty(self): new_dictionary = _build_model_two('m1') variables = _build_variable_map() - model_context = ModelContext('validate', []) - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) # print("Merged model: " + str(dictionary)) self._check_merged_server(dictionary, '@@PROP:server1a@@') @@ -134,8 +129,7 @@ def testMergeDeletedNameToName(self): new_dictionary = _build_delete_model('m1') variables = {} - model_context = ModelContext('validate', []) - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) # print("Merged model: " + str(dictionary)) servers = dictionary['Servers'] @@ -147,8 +141,7 @@ def testMergeDeletedNameToDeleteName(self): new_dictionary = _build_delete_model('m1') variables = {} - model_context = ModelContext('validate', []) - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) # print("Merged model: " + str(dictionary)) server = self._check_single_server(dictionary, '!m1') @@ -160,8 +153,7 @@ def testMergeNameToDeletedName(self): new_dictionary = _build_model_two('m1') variables = {} - model_context = ModelContext('validate', []) - cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables, model_context) + cla_helper.merge_model_dictionaries(dictionary, new_dictionary, variables) # print("Merged model: " + str(dictionary)) server = self._check_single_server(dictionary, 'm1') From 0e515bef9c257827c96f4f684584bd05f1ffbd60 Mon Sep 17 00:00:00 2001 From: jshum2479 Date: Tue, 20 Apr 2021 14:52:24 -0500 Subject: [PATCH 3/3] remove obsolete param --- core/src/main/python/wlsdeploy/util/cla_helper.py | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/main/python/wlsdeploy/util/cla_helper.py b/core/src/main/python/wlsdeploy/util/cla_helper.py index 7ab1a1dc2..b4e3c3120 100644 --- a/core/src/main/python/wlsdeploy/util/cla_helper.py +++ b/core/src/main/python/wlsdeploy/util/cla_helper.py @@ -305,7 +305,6 @@ def merge_model_files(model_file_value, variable_map=None): It may be a single file, or a comma-separated list of files. :param variable_map: variables to be used for name resolution, or None :param model_file_value: the value specified as a command argument - ;param model_context: model context :return: the merge model dictionary """ merged_model = OrderedDict()