6767 ADMIN_SERVER : 'admin_server_list'
6868}
6969# global variables for functions in VariableInjector
70- _find_special_names_pattern = re .compile ('[\[).+ \]]' )
70+ _find_special_names_pattern = re .compile ('[\[\]]' )
7171_fake_name_marker = 'fakename'
7272_fake_name_replacement = re .compile ('.' + _fake_name_marker )
7373_white_space_replacement = re .compile ('\s' )
74+ _split_around_special_names = re .compile ('([\w]+\[[\w\.,]+\])|\.' )
7475
7576_wlsdeploy_location = os .environ .get ('WLSDEPLOY_HOME' )
7677_class_name = 'variable_injector'
@@ -506,12 +507,9 @@ def _find_special_name(self, mbean):
506507 mbean_name = mbean
507508 mbean_name_list = []
508509 name_list = _find_special_names_pattern .split (mbean )
509- print 'mbean before split ' , mbean
510- print 'after pattern split ' , name_list
511510 if name_list and len (name_list ) > 1 :
512511 mbean_name = name_list [0 ]
513512 mbean_name_list = name_list [1 ].split (',' )
514- print 'after second split ' , mbean_name_list
515513 if mbean_name_list :
516514 new_list = []
517515 for entry in mbean_name_list :
@@ -528,7 +526,6 @@ def _find_special_name(self, mbean):
528526 else :
529527 new_list .append (entry )
530528 mbean_name_list = new_list
531- print 'mbean ' , mbean_name , ' mbean_name_list ' , mbean_name_list
532529 return mbean_name , mbean_name_list
533530
534531 def _check_insert_attribute_model (self , location , model_section , attribute , injector_values ):
@@ -562,7 +559,6 @@ def _load_variable_file(variable_file_location, **kwargs):
562559 append = False
563560 variable_dictionary = dict ()
564561 if VARIABLE_FILE_APPEND_ARG in kwargs and kwargs [VARIABLE_FILE_APPEND_ARG ] in VARIABLE_FILE_APPEND_VALS :
565- _logger .fine ('append argument found {0}' , kwargs [VARIABLE_FILE_APPEND_ARG ])
566562 if kwargs [VARIABLE_FILE_APPEND_ARG ] == VARIABLE_FILE_APPEND :
567563 _logger .fine ('WLSDPLY-19536' , variable_file_location , class_name = _class_name , method_name = _method_name )
568564 append = True
@@ -733,18 +729,29 @@ def _format_as_property(prop_name):
733729 return '@@PROP:%s@@' % prop_name
734730
735731
736-
737732def _split_injector (injector_path ):
738733 """
739734 Split the injector path into an mbean list and an attribute name from the injector path string
740735 :param injector_path:
741736 :return: attribute name:mbean list of mbean folder nodes
742737 """
738+ _method_name = '_split_injector'
743739 attr = None
744- ml = injector_path .split ('.' )
740+ ml = _split_around_special_names .split (injector_path )
741+ mbean_list = []
745742 if len (ml ) > 0 :
746743 attr = ml .pop ()
747- return ml , attr
744+ for mbean_item in ml :
745+ if mbean_item :
746+ start = 0
747+ end = len (mbean_item )
748+ if mbean_item .startswith ('\.' ):
749+ start += 1
750+ if mbean_item .endswith ('\.' ):
751+ end -= 1
752+ mbean_list .append (mbean_item [start :end ])
753+ _logger .finer ('WLSDPLY-19543' , mbean_list , attr , class_name = _class_name , method_name = _method_name )
754+ return mbean_list , attr
748755
749756
750757def __temporary_fix (injector_dictionary ):
0 commit comments