@@ -174,7 +174,7 @@ def _create_security_provider_mbeans(self, type_name, model_nodes, base_location
174
174
175
175
self .logger .entering (type_name , str (base_location ), log_created ,
176
176
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 ):
178
178
return
179
179
180
180
location = LocationContext (base_location ).append_location (type_name )
@@ -183,6 +183,9 @@ def _create_security_provider_mbeans(self, type_name, model_nodes, base_location
183
183
# For create, delete the existing nodes, and re-add in order found in model in iterative code below
184
184
self ._delete_existing_providers (location )
185
185
186
+ if model_nodes is None or len (model_nodes ) == 0 :
187
+ return
188
+
186
189
token_name = self .alias_helper .get_name_token (location )
187
190
create_path = self .alias_helper .get_wlst_create_path (location )
188
191
list_path = self .alias_helper .get_wlst_list_path (location )
@@ -382,23 +385,22 @@ def _create_subfolders(self, location, model_nodes):
382
385
"""
383
386
_method_name = '_create_subfolders'
384
387
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 )
386
389
model_subfolder_names = self .alias_helper .get_model_subfolder_names (location )
387
-
388
390
for key in model_nodes :
389
391
if key in model_subfolder_names :
390
-
391
392
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 :
394
400
if self .alias_helper .supports_multiple_mbean_instances (sub_location ):
395
401
self .logger .finest ('WLSDPLY-12109' , key , str (sub_location ), subfolder_nodes ,
396
402
class_name = self .__class_name , method_name = _method_name )
397
403
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 )
402
404
elif self .alias_helper .is_artificial_type_folder (sub_location ):
403
405
ex = exception_helper .create_create_exception ('WLSDPLY-12120' , str (sub_location ),
404
406
key , str (location ))
@@ -408,6 +410,7 @@ def _create_subfolders(self, location, model_nodes):
408
410
self .logger .finest ('WLSDPLY-12110' , key , str (sub_location ), subfolder_nodes ,
409
411
class_name = self .__class_name , method_name = _method_name )
410
412
self ._create_mbean (key , subfolder_nodes , location )
413
+
411
414
self .logger .exiting (class_name = self .__class_name , method_name = _method_name )
412
415
return
413
416
0 commit comments