@@ -270,6 +270,7 @@ def __get_attributes(self, mbean_instance):
270270
271271 attribute_map = PyOrderedDict ()
272272 lsa_map = generator_wlst .lsa_map ()
273+ self .__logger .finer ('lsa_map = {0}' , lsa_map , class_name = self .__class_name , method_name = _method_name )
273274 not_found_mbean_list = list ()
274275 if len (lsa_map ) > 0 :
275276 not_found_mbean_list = lsa_map .keys ()
@@ -278,11 +279,15 @@ def __get_attributes(self, mbean_instance):
278279 method_helper = MBeanMethodHelper (mbean_instance , mbean_path )
279280 methods_map = method_helper .get_attributes ()
280281 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 )
281284
282285 # As the driver it needs to have all attributes
283286 info_helper = MBeanInfoHelper (mbean_instance , mbean_path )
284287 info_map = info_helper .get_all_attributes ()
285288 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 )
286291
287292 for attribute , attribute_helper in info_map .iteritems ():
288293 method_attribute_helper = None
@@ -415,24 +420,27 @@ def __get_attributes_offline_only(self, mbean_instance):
415420 def create_security_type (self , mbean_type ):
416421 folder_dict = PyOrderedDict ()
417422 folder_dict [TYPE ] = 'Provider'
418- types = self ._sc_providers [mbean_type ]
423+ provider_sub_types = self ._sc_providers [mbean_type ]
419424
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' ):
423427 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 )
430437 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 )
433440 generator_wlst .cd_mbean (orig )
434- return True , singular , folder_dict
441+ return True , singular_mbean_type , folder_dict
435442
443+ # FIXME - This is dead code
436444 def _slim_maps_for_report (self , mbean_proxy , mbean_type , lsa_map , methods_map , mbean_info_map ):
437445 # Unlike the slim_maps method, this report discards additional information to determine how
438446 # 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
462470 print (' lsa_map size ' , len (lsa_map ), ' methods_map size ' , len (methods_map ),
463471 ' mbean_info_size ' , len (mbean_info_map ))
464472
473+ # FIXME - This is dead code
465474 def _report_differences (self , mbean_proxy , mbean_type , lsa_map , methods_map , mbean_info_map ):
466475 print ('*************************************************************' )
467476 print ('Reporting on MBean ' , str (mbean_proxy ))
0 commit comments