@@ -476,10 +476,8 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
476476
477477 if attribute_info and not self .__is_wlst_attribute_read_only (location , attribute_info ):
478478 wlst_attribute_name = attribute_info [WLST_NAME ]
479-
480- if self ._model_context and USES_PATH_TOKENS in attribute_info and \
481- string_utils .to_boolean (attribute_info [USES_PATH_TOKENS ]):
482- model_attribute_value = self ._model_context .replace_token_string (model_attribute_value )
479+ uses_path_tokens = USES_PATH_TOKENS in attribute_info and \
480+ string_utils .to_boolean (attribute_info [USES_PATH_TOKENS ])
483481
484482 data_type = attribute_info [WLST_TYPE ]
485483 if data_type == 'password' :
@@ -514,6 +512,11 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
514512 model_val = alias_utils .convert_to_type (LIST , model_attribute_value ,
515513 delimiter = MODEL_LIST_DELIMITER )
516514
515+ if uses_path_tokens :
516+ for index , item in enumerate (model_val ):
517+ item_value = self ._model_context .replace_token_string (str (item ))
518+ model_val [index ] = item_value
519+
517520 _read_type , read_delimiter = \
518521 alias_utils .compute_read_data_type_and_delimiter_from_attribute_info (
519522 attribute_info , existing_wlst_value )
@@ -539,6 +542,9 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
539542 wlst_attribute_value = alias_utils .convert_to_type (data_type , merged_value ,
540543 delimiter = MODEL_LIST_DELIMITER )
541544 else :
545+ if uses_path_tokens :
546+ model_attribute_value = self ._model_context .replace_token_string (model_attribute_value )
547+
542548 wlst_attribute_value = alias_utils .convert_to_type (data_type , model_attribute_value ,
543549 delimiter = MODEL_LIST_DELIMITER )
544550
0 commit comments