1
1
"""
2
- Copyright (c) 2017, 2018 , Oracle and/or its affiliates. All rights reserved.
2
+ Copyright (c) 2017, 2019 , Oracle and/or its affiliates. All rights reserved.
3
3
The Universal Permissive License (UPL), Version 1.0
4
4
"""
5
5
from java .lang import String
43
43
from wlsdeploy .aliases .alias_constants import RESTART_REQUIRED
44
44
from wlsdeploy .aliases .alias_constants import SET_MBEAN_TYPE
45
45
from wlsdeploy .aliases .alias_constants import SET_METHOD
46
+ from wlsdeploy .aliases .alias_constants import STRING
46
47
from wlsdeploy .aliases .alias_constants import USES_PATH_TOKENS
47
48
from wlsdeploy .aliases .alias_constants import VALUE
48
49
from wlsdeploy .aliases .alias_constants import WLST_NAME
@@ -385,17 +386,21 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
385
386
raise ex
386
387
else :
387
388
if data_type in ALIAS_LIST_TYPES or data_type in ALIAS_MAP_TYPES :
389
+ to_type = data_type
390
+
388
391
merge = True
389
392
if MERGE in attribute_info :
390
393
merge = alias_utils .convert_boolean (attribute_info [MERGE ])
391
394
392
- if merge and data_type in ALIAS_MAP_TYPES :
395
+ if alias_utils .is_attribute_server_start_arguments (location , model_attribute_name ):
396
+ # convert to string, even if no existing value to merge
397
+ merged_value = \
398
+ alias_utils .merge_server_start_argument_values (model_attribute_value , existing_wlst_value )
399
+ to_type = STRING
400
+ elif merge and data_type in ALIAS_MAP_TYPES :
393
401
model_val = TypeUtils .convertToType (PROPERTIES , model_attribute_value )
394
402
existing_val = TypeUtils .convertToType (PROPERTIES , existing_wlst_value )
395
403
merged_value = alias_utils .merge_model_and_existing_properties (model_val , existing_val )
396
- elif merge and alias_utils .is_attribute_server_start_arguments (location , model_attribute_name ):
397
- merged_value = \
398
- alias_utils .merge_server_start_argument_values (model_attribute_value , existing_wlst_value )
399
404
elif merge and existing_wlst_value is not None and len (existing_wlst_value ) > 0 :
400
405
model_val = alias_utils .convert_to_type (LIST , model_attribute_value ,
401
406
delimiter = MODEL_LIST_DELIMITER )
@@ -412,10 +417,10 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
412
417
subtype = 'java.lang.String'
413
418
if SET_MBEAN_TYPE in attribute_info :
414
419
subtype = attribute_info [SET_MBEAN_TYPE ]
415
- wlst_attribute_value = alias_utils .convert_to_type (data_type , merged_value , subtype = subtype ,
420
+ wlst_attribute_value = alias_utils .convert_to_type (to_type , merged_value , subtype = subtype ,
416
421
delimiter = MODEL_LIST_DELIMITER )
417
422
else :
418
- wlst_attribute_value = alias_utils .convert_to_type (data_type , merged_value ,
423
+ wlst_attribute_value = alias_utils .convert_to_type (to_type , merged_value ,
419
424
delimiter = MODEL_LIST_DELIMITER )
420
425
else :
421
426
wlst_attribute_value = alias_utils .convert_to_type (data_type , model_attribute_value ,
0 commit comments