@@ -270,6 +270,7 @@ def __get_attributes(self, mbean_instance):
270
270
271
271
attribute_map = PyOrderedDict ()
272
272
lsa_map = generator_wlst .lsa_map ()
273
+ self .__logger .finer ('lsa_map = {0}' , lsa_map , class_name = self .__class_name , method_name = _method_name )
273
274
not_found_mbean_list = list ()
274
275
if len (lsa_map ) > 0 :
275
276
not_found_mbean_list = lsa_map .keys ()
@@ -278,11 +279,15 @@ def __get_attributes(self, mbean_instance):
278
279
method_helper = MBeanMethodHelper (mbean_instance , mbean_path )
279
280
methods_map = method_helper .get_attributes ()
280
281
methods_attributes = methods_map .keys ()
282
+ self .__logger .finer ('MBeanMethodHelper found attributes: {0}' , methods_attributes ,
283
+ class_name = self .__class_name , method_name = _method_name )
281
284
282
285
# As the driver it needs to have all attributes
283
286
info_helper = MBeanInfoHelper (mbean_instance , mbean_path )
284
287
info_map = info_helper .get_all_attributes ()
285
288
mbean_type = info_helper .get_mbean_type ()
289
+ self .__logger .finer ('MBeanInfoHelper for MBean type {0} found attributes: {1}' , mbean_type , info_map ,
290
+ class_name = self .__class_name , method_name = _method_name )
286
291
287
292
for attribute , attribute_helper in info_map .iteritems ():
288
293
method_attribute_helper = None
@@ -415,24 +420,27 @@ def __get_attributes_offline_only(self, mbean_instance):
415
420
def create_security_type (self , mbean_type ):
416
421
folder_dict = PyOrderedDict ()
417
422
folder_dict [TYPE ] = 'Provider'
418
- types = self ._sc_providers [mbean_type ]
423
+ provider_sub_types = self ._sc_providers [mbean_type ]
419
424
420
- singular = mbean_type
421
- if singular .endswith ('s' ):
422
- # FIXME - This doesn't seem very rigorous, e.g., directories => directory
425
+ singular_mbean_type = mbean_type
426
+ if singular_mbean_type .endswith ('s' ):
423
427
lenm = len (mbean_type )- 1
424
- singular = mbean_type [0 :lenm ]
425
- for item in types :
426
- idx = item .rfind ('.' )
427
- short = item [idx + 1 :]
428
- package = short
429
- mbean_instance = generator_wlst .create_security_provider (singular , short , package )
428
+ singular_mbean_type = mbean_type [0 :lenm ]
429
+ for provider_sub_type in provider_sub_types :
430
+ # Remove the package name from the subclass.
431
+ idx = provider_sub_type .rfind ('.' )
432
+ shortened_provider_sub_type = provider_sub_type [idx + 1 :]
433
+
434
+ mbean_name = shortened_provider_sub_type
435
+ mbean_instance = \
436
+ generator_wlst .create_security_provider (mbean_name , shortened_provider_sub_type , singular_mbean_type )
430
437
orig = generator_wlst .current_path ()
431
- folder_dict [short ] = PyOrderedDict ()
432
- folder_dict [short ][ATTRIBUTES ] = self .__get_attributes (mbean_instance )
438
+ folder_dict [shortened_provider_sub_type ] = PyOrderedDict ()
439
+ folder_dict [shortened_provider_sub_type ][ATTRIBUTES ] = self .__get_attributes (mbean_instance )
433
440
generator_wlst .cd_mbean (orig )
434
- return True , singular , folder_dict
441
+ return True , singular_mbean_type , folder_dict
435
442
443
+ # FIXME - This is dead code
436
444
def _slim_maps_for_report (self , mbean_proxy , mbean_type , lsa_map , methods_map , mbean_info_map ):
437
445
# Unlike the slim_maps method, this report discards additional information to determine how
438
446
# different is the usable information in LSA, versus cmo.getClass().getMethods versus
@@ -462,6 +470,7 @@ def _slim_maps_for_report(self, mbean_proxy, mbean_type, lsa_map, methods_map, m
462
470
print (' lsa_map size ' , len (lsa_map ), ' methods_map size ' , len (methods_map ),
463
471
' mbean_info_size ' , len (mbean_info_map ))
464
472
473
+ # FIXME - This is dead code
465
474
def _report_differences (self , mbean_proxy , mbean_type , lsa_map , methods_map , mbean_info_map ):
466
475
print ('*************************************************************' )
467
476
print ('Reporting on MBean ' , str (mbean_proxy ))
0 commit comments