Skip to content

Commit 07450eb

Browse files
Process empty provider nodes for merge to model
1 parent 8c382f3 commit 07450eb

File tree

1 file changed

+13
-10
lines changed
  • core/src/main/python/wlsdeploy/tool/create

1 file changed

+13
-10
lines changed

core/src/main/python/wlsdeploy/tool/create/creator.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def _create_security_provider_mbeans(self, type_name, model_nodes, base_location
174174

175175
self.logger.entering(type_name, str(base_location), log_created,
176176
class_name=self.__class_name, method_name=_method_name)
177-
if model_nodes is None or len(model_nodes) == 0 or not self._is_type_valid(base_location, type_name):
177+
if not self._is_type_valid(base_location, type_name):
178178
return
179179

180180
location = LocationContext(base_location).append_location(type_name)
@@ -183,6 +183,9 @@ def _create_security_provider_mbeans(self, type_name, model_nodes, base_location
183183
# For create, delete the existing nodes, and re-add in order found in model in iterative code below
184184
self._delete_existing_providers(location)
185185

186+
if model_nodes is None or len(model_nodes) == 0:
187+
return
188+
186189
token_name = self.alias_helper.get_name_token(location)
187190
create_path = self.alias_helper.get_wlst_create_path(location)
188191
list_path = self.alias_helper.get_wlst_list_path(location)
@@ -382,23 +385,22 @@ def _create_subfolders(self, location, model_nodes):
382385
"""
383386
_method_name = '_create_subfolders'
384387

385-
self.logger.entering(str(location), class_name=self.__class_name, method_name=_method_name)
388+
self.logger.entering(location.get_folder_path(), class_name=self.__class_name, method_name=_method_name)
386389
model_subfolder_names = self.alias_helper.get_model_subfolder_names(location)
387-
388390
for key in model_nodes:
389391
if key in model_subfolder_names:
390-
391392
subfolder_nodes = model_nodes[key]
392-
if len(subfolder_nodes) != 0:
393-
sub_location = LocationContext(location).append_location(key)
393+
sub_location = LocationContext(location).append_location(key)
394+
# both create and update are merge to model so will process a subfolder with an empty node
395+
if self.alias_helper.requires_artificial_type_subfolder_handling(sub_location):
396+
self.logger.finest('WLSDPLY-12116', key, str(sub_location), subfolder_nodes,
397+
class_name=self.__class_name, method_name=_method_name)
398+
self._create_security_provider_mbeans(key, subfolder_nodes, location)
399+
elif len(subfolder_nodes) != 0:
394400
if self.alias_helper.supports_multiple_mbean_instances(sub_location):
395401
self.logger.finest('WLSDPLY-12109', key, str(sub_location), subfolder_nodes,
396402
class_name=self.__class_name, method_name=_method_name)
397403
self._create_named_mbeans(key, subfolder_nodes, location)
398-
elif self.alias_helper.requires_artificial_type_subfolder_handling(sub_location):
399-
self.logger.finest('WLSDPLY-12116', key, str(sub_location), subfolder_nodes,
400-
class_name=self.__class_name, method_name=_method_name)
401-
self._create_security_provider_mbeans(key, subfolder_nodes, location)
402404
elif self.alias_helper.is_artificial_type_folder(sub_location):
403405
ex = exception_helper.create_create_exception('WLSDPLY-12120', str(sub_location),
404406
key, str(location))
@@ -408,6 +410,7 @@ def _create_subfolders(self, location, model_nodes):
408410
self.logger.finest('WLSDPLY-12110', key, str(sub_location), subfolder_nodes,
409411
class_name=self.__class_name, method_name=_method_name)
410412
self._create_mbean(key, subfolder_nodes, location)
413+
411414
self.logger.exiting(class_name=self.__class_name, method_name=_method_name)
412415
return
413416

0 commit comments

Comments
 (0)