Skip to content

Commit 8199606

Browse files
committed
Merge branch 'alias-test-boolean-fix' into 'main'
Fix alias test problems from null boolean fix See merge request weblogic-cloud/weblogic-deploy-tooling!1531
2 parents 98ed08d + 7914940 commit 8199606

File tree

5 files changed

+24
-26
lines changed

5 files changed

+24
-26
lines changed

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

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2017, 2022, Oracle and/or its affiliates.
2+
Copyright (c) 2017, 2023, Oracle and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
"""
55
import copy
@@ -534,16 +534,10 @@ def convert_boolean(value):
534534
if value is not None:
535535
if type(value) is bool:
536536
result = value
537-
elif type(value) is int:
538-
if value == 1:
539-
result = True
540-
elif value == 0:
541-
result = False
537+
elif isinstance(value, (int, long)):
538+
result = value == 1
542539
elif isinstance(value, basestring):
543-
if value.lower() == 'true':
544-
result = True
545-
elif value.lower() == 'false':
546-
result = False
540+
result = value.lower() in ['true', '1']
547541
elif isinstance(value, PyRealBoolean):
548542
result = value.getValue()
549543
return result

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
{"version": "[14.1.2,)", "wlst_mode": "online", "wlst_name": "ConsoleContextPath", "wlst_path": "WP001", "default_value": "retired-console", "wlst_type": "string", "uses_path_tokens": "true" },
2626
{"version": "[14.1.2,)", "wlst_mode": "offline", "wlst_name": "ConsoleContextPath", "wlst_path": "WP001", "default_value": "console", "wlst_type": "string", "uses_path_tokens": "true" }
2727
],
28-
"ConsoleEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ConsoleEnabled", "wlst_path": "WP001", "default_value": "true", "wlst_type": "boolean" } ],
28+
"ConsoleEnabled": [
29+
{"version": "[10,14.1.2)", "wlst_mode": "both", "wlst_name": "ConsoleEnabled", "wlst_path": "WP001", "default_value": "true", "wlst_type": "boolean" },
30+
{"version": "[14.1.2,)", "wlst_mode": "offline", "wlst_name": "ConsoleEnabled", "wlst_path": "WP001", "default_value": "true", "wlst_type": "boolean" },
31+
{"version": "[14.1.2,)", "wlst_mode": "online", "wlst_name": "ConsoleEnabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" }
32+
],
2933
"ConsoleExtensionDirectory": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ConsoleExtensionDirectory", "wlst_path": "WP001", "default_value": "console-ext", "wlst_type": "string", "uses_path_tokens": "true" } ],
3034
"DbPassiveMode": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "${Db:DB}PassiveMode", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ],
3135
"DbPassiveModeGracePeriodSeconds": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "${Db:DB}PassiveModeGracePeriodSeconds", "wlst_path": "WP001", "default_value": 30, "wlst_type": "integer" } ],

0 commit comments

Comments
 (0)