Skip to content

Commit e4a9eba

Browse files
committed
JIRA WDT-43 Check server template field when creating placeholders; skip when not valid
1 parent e6529a5 commit e4a9eba

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

core/src/main/python/wlsdeploy/tool/deploy/topology_updater.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,5 @@ def _process_section(self, folder_dict, folder_list, key, location):
109109
else:
110110
self._add_model_elements(key, nodes, location)
111111

112+
if key in folder_list:
112113
folder_list.remove(key)

core/src/main/python/wlsdeploy/tool/util/topology_helper.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,18 @@ def create_placeholder_server_templates(self, topology):
7272
_method_name = 'create_placeholder_server_templates'
7373
original_location = self.wlst_helper.get_pwd()
7474
template_location = LocationContext().append_location(SERVER_TEMPLATE)
75-
existing_names = deployer_utils.get_existing_object_list(template_location, self.alias_helper)
7675

77-
template_nodes = dictionary_utils.get_dictionary_element(topology, SERVER_TEMPLATE)
78-
for template_name in template_nodes:
79-
if template_name not in existing_names:
80-
self.logger.info('WLSDPLY-19400', template_name, class_name=self.__class_name,
81-
method_name=_method_name)
76+
if self.alias_helper.get_wlst_mbean_type(template_location) is not None:
77+
existing_names = deployer_utils.get_existing_object_list(template_location, self.alias_helper)
8278

83-
template_token = self.alias_helper.get_name_token(template_location)
84-
template_location.add_name_token(template_token, template_name)
85-
deployer_utils.create_and_cd(template_location, existing_names, self.alias_helper)
79+
template_nodes = dictionary_utils.get_dictionary_element(topology, SERVER_TEMPLATE)
80+
for template_name in template_nodes:
81+
if template_name not in existing_names:
82+
self.logger.info('WLSDPLY-19400', template_name, class_name=self.__class_name,
83+
method_name=_method_name)
84+
85+
template_token = self.alias_helper.get_name_token(template_location)
86+
template_location.add_name_token(template_token, template_name)
87+
deployer_utils.create_and_cd(template_location, existing_names, self.alias_helper)
8688

8789
self.wlst_helper.cd(original_location)

0 commit comments

Comments
 (0)