Skip to content

Commit 4b9b027

Browse files
committed
Merge branch 'alias-updates-09092024' into 'main'
Alias updates for future WLS release See merge request weblogic-cloud/weblogic-deploy-tooling!1736
2 parents b874049 + 0deb665 commit 4b9b027

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2020, 2023, Oracle and/or its affiliates.",
2+
"copyright": "Copyright (c) 2020, 2024, Oracle and/or its affiliates.",
33
"license": "Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl",
44
"wlst_type": "WTCServer${:s}",
55
"online_bean": "weblogic.management.configuration.WTCServerMBean",
@@ -75,7 +75,10 @@
7575
"PrivateKeyPassPhraseEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "PrivateKeyPassPhraseEncrypted", "wlst_path": "WP001", "default_value": null, "wlst_type": "password", "get_method": "GET", "secret_suffix": "privatekey" } ],
7676
"RetryInterval": [ {"version": "[10,12.2.1)", "wlst_mode": "both", "wlst_name": "RetryInterval", "wlst_path": "WP001", "default_value": 60, "wlst_type": "${integer:long}", "get_method": "${LSA:GET}" } ,
7777
{"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "RetryInterval", "wlst_path": "WP001", "default_value": 60, "wlst_type": "long", "get_method": "GET" } ],
78-
"Security": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Security", "wlst_path": "WP001", "default_value": "${__NULL__:NONE}", "wlst_type": "string" } ],
78+
"Security": [
79+
{"version": "[10,14.1.2)", "wlst_mode": "both", "wlst_name": "Security", "wlst_path": "WP001", "default_value": "${__NULL__:NONE}", "wlst_type": "string" },
80+
{"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "Security", "wlst_path": "WP001", "default_value": "NONE", "wlst_type": "string" }
81+
],
7982
"SslProtocolVersion": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "S${sl:SL}ProtocolVersion", "wlst_path": "WP001", "default_value": "${__NULL__:TLSv1.2}", "wlst_type": "string" } ],
8083
"TrustKeyStoreFileName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "TrustKeyStoreFileName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
8184
"TrustKeyStorePassPhraseEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "TrustKeyStorePassPhraseEncrypted", "wlst_path": "WP001", "default_value": null, "wlst_type": "password", "get_method": "GET", "secret_suffix": "trustkeystore" } ],

core/src/test/python/alias_json_file_test.py

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ class AliasFileSyntaxTestCase(unittest.TestCase):
149149
'online'
150150
]
151151

152+
_known_boolean_attribute_values = [
153+
'true',
154+
'false'
155+
]
156+
152157
_folder_attributes_invalid_in_folder_params = [
153158
ATTRIBUTES,
154159
FOLDERS
@@ -614,7 +619,7 @@ def _verify_attribute_default_value_attribute_value(self, folder_name, attribute
614619
return []
615620

616621
def _verify_attribute_derived_default_attribute_value(self, folder_name, attribute_name, alias_attribute_value):
617-
return []
622+
return self._verify_boolean_value(folder_name, attribute_name, DERIVED_DEFAULT, alias_attribute_value)
618623

619624
def _verify_attribute_production_default_attribute_value(self, folder_name, attribute_name, alias_attribute_value):
620625
# nothing to verify - production_default can be any type or null
@@ -693,21 +698,20 @@ def _verify_attribute_wlst_type_attribute_value(self, folder_name, attribute_nam
693698

694699
def _verify_boolean_value(self, folder_name, attribute_name, alias_attribute_name, alias_attribute_value):
695700
result = []
696-
constrained_string_values = ['true', 'false']
697701
if isinstance(alias_attribute_value, basestring):
698-
if alias_attribute_value.lower() not in constrained_string_values:
699-
result.append(self._get_invalid_attribute_boolean_string_value_message(folder_name, attribute_name,
700-
alias_attribute_name,
701-
alias_attribute_value))
702-
else:
703-
pass
702+
result.extend(
703+
self._verify_constrained_values(
704+
folder_name, attribute_name, alias_attribute_name, alias_attribute_value,
705+
self._known_boolean_attribute_values
706+
)
707+
)
704708
elif type(alias_attribute_value) is bool:
705709
pass
706710
elif isinstance(alias_attribute_value, PyRealBoolean):
707711
pass
708712
else:
709-
result.append(self._get_invalid_attribute_boolean_type_message(folder_name, attribute_name,
710-
alias_attribute_name, alias_attribute_value))
713+
result.append(self._get_invalid_attribute_boolean_type_message(
714+
folder_name, attribute_name, alias_attribute_name, alias_attribute_value))
711715
return result
712716

713717
def _verify_constrained_values(self, folder_name, attribute_name, alias_attribute_name,
@@ -817,14 +821,6 @@ def _get_invalid_attribute_boolean_type_message(self, folder_name, attribute_nam
817821

818822
return text % (folder_name, attribute_name, alias_attribute_name, str(type(alias_attribute_value)))
819823

820-
def _get_invalid_attribute_boolean_string_value_message(self, folder_name, attribute_name,
821-
alias_attribute_name, alias_attribute_value):
822-
text = 'Folder at path %s has a defined attribute %s with alias attribute %s that is expected to ' \
823-
'be a boolean but its string value %s is not a valid boolean value'
824-
825-
return text % (folder_name, attribute_name, alias_attribute_name, alias_attribute_value)
826-
827-
828824
def _get_invalid_wlst_mode_message(self, folder_name, alias_attribute_name):
829825
text = 'Folder at path %s has invalid wlst mode type of %s'
830826
result = text %(folder_name, alias_attribute_name)

0 commit comments

Comments
 (0)