Skip to content

Commit f3ff941

Browse files
committed
Issue #275 - Make discover delimiter changes specific to ClassPath; fixed validation archive check
1 parent 852895f commit f3ff941

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

core/src/main/python/wlsdeploy/aliases/alias_utils.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from wlsdeploy.aliases.alias_constants import JAVA_LANG_BOOLEAN
3636
from wlsdeploy.aliases.alias_constants import LIST
3737
from wlsdeploy.aliases.alias_constants import LONG
38-
from wlsdeploy.aliases.model_constants import MODEL_LIST_DELIMITER
3938
from wlsdeploy.aliases.alias_constants import PATH_SEPARATOR_DELIMITED_STRING
4039
from wlsdeploy.aliases.alias_constants import PREFERRED_MODEL_TYPE
4140
from wlsdeploy.aliases.alias_constants import SECURITY_PROVIDER_FOLDER_PATHS
@@ -866,11 +865,15 @@ def _jconvert_to_type(data_type, value, delimiter):
866865
elif data_type in (COMMA_DELIMITED_STRING, DELIMITED_STRING, SEMI_COLON_DELIMITED_STRING,
867866
SPACE_DELIMITED_STRING, PATH_SEPARATOR_DELIMITED_STRING):
868867
#
869-
# Data type value may be the wlst_type, wlst_read_type, or the preferred_model_type from the alias
870-
# definition. For any of these, the representation in the model should be comma-separated string.
868+
# This code intentionally ignores the delimiter value passed in and computes it from the data type.
869+
# This is required to handle the special case where the value we read from WLST might have a
870+
# different delimiter than the model value. In this use case, the value passed into the method
871+
# is the WLST value delimiter and the data_type is the preferred_model_type, so we compute the
872+
# model delimiter from the data_type directly.
871873
#
872-
if converted:
873-
converted = MODEL_LIST_DELIMITER.join(converted)
874+
delimiter = compute_delimiter_from_data_type(data_type, converted)
875+
if delimiter and converted:
876+
converted = delimiter.join(converted)
874877
except TypeError, te:
875878
ex = exception_helper.create_alias_exception('WLSDPLY-08021', value, data_type, delimiter, str(te))
876879
_logger.throwing(ex, class_name=_class_name, method_name=_method_name)

core/src/main/python/wlsdeploy/tool/validate/validator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ def __validate_path_tokens_attribute(self, attribute_name, attribute_value, mode
886886
if value_data_type == 'string' and model_constants.MODEL_LIST_DELIMITER in attribute_value:
887887
attr_values = attribute_value.split(model_constants.MODEL_LIST_DELIMITER)
888888

889-
if value_data_type == 'string':
889+
elif value_data_type == 'string':
890890
attr_values.append(attribute_value)
891891

892892
for item_path in attr_values:

core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/Server.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@
938938
"Arguments": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Arguments", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "delimited_string[space]" } ],
939939
"BeaHome": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "BeaHome", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "uses_path_tokens": "true"} ],
940940
"BootProperties": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "BootProperties", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "properties", "get_method": "GET", "preferred_model_type": "list", "access": "RO"} ],
941-
"ClassPath": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClassPath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "delimited_string[path_separator]", "uses_path_tokens": "true"} ],
941+
"ClassPath": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClassPath", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "delimited_string[path_separator]", "preferred_model_type": "delimited_string", "uses_path_tokens": "true"} ],
942942
"JavaHome": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "JavaHome", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "uses_path_tokens": "true"} ],
943943
"JavaVendor": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "JavaVendor", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
944944
"MaxRestartCount": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "MaxRestartCount", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "integer" } ],

0 commit comments

Comments
 (0)