@@ -476,10 +476,8 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
476
476
477
477
if attribute_info and not self .__is_wlst_attribute_read_only (location , attribute_info ):
478
478
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 ])
483
481
484
482
data_type = attribute_info [WLST_TYPE ]
485
483
if data_type == 'password' :
@@ -514,6 +512,11 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
514
512
model_val = alias_utils .convert_to_type (LIST , model_attribute_value ,
515
513
delimiter = MODEL_LIST_DELIMITER )
516
514
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
+
517
520
_read_type , read_delimiter = \
518
521
alias_utils .compute_read_data_type_and_delimiter_from_attribute_info (
519
522
attribute_info , existing_wlst_value )
@@ -539,6 +542,9 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
539
542
wlst_attribute_value = alias_utils .convert_to_type (data_type , merged_value ,
540
543
delimiter = MODEL_LIST_DELIMITER )
541
544
else :
545
+ if uses_path_tokens :
546
+ model_attribute_value = self ._model_context .replace_token_string (model_attribute_value )
547
+
542
548
wlst_attribute_value = alias_utils .convert_to_type (data_type , model_attribute_value ,
543
549
delimiter = MODEL_LIST_DELIMITER )
544
550
0 commit comments