Skip to content

Commit 30cf9ba

Browse files
committed
Merge branch 'alias-updates-2-14' into 'main'
Alias updates See merge request weblogic-cloud/weblogic-deploy-tooling!1627
2 parents 2a63e13 + ec6cae4 commit 30cf9ba

File tree

8 files changed

+119
-35
lines changed

8 files changed

+119
-35
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2017, 2022, Oracle Corporation and/or its affiliates.
2+
Copyright (c) 2017, 2024, 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
@@ -57,6 +57,7 @@
5757
from wlsdeploy.aliases.model_constants import CALLOUT
5858
from wlsdeploy.aliases.model_constants import DOMAIN_INFO
5959
from wlsdeploy.aliases.model_constants import DOMAIN_INFO_ALIAS
60+
from wlsdeploy.aliases.model_constants import HEALTH_SCORE
6061
from wlsdeploy.aliases.model_constants import JOLT_CONNECTION_POOL
6162
from wlsdeploy.aliases.model_constants import JPA
6263
from wlsdeploy.aliases.model_constants import ODL_CONFIGURATION
@@ -104,6 +105,7 @@ class AliasEntries(object):
104105
'CdiContainer',
105106
'Cluster',
106107
'EmbeddedLDAP',
108+
HEALTH_SCORE,
107109
'JMX',
108110
JPA,
109111
'JTA',

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2017, 2023, Oracle Corporation and/or its affiliates.
2+
Copyright (c) 2017, 2024, 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

@@ -130,6 +130,7 @@
130130
GLOBAL_VARIABLE_SUBSTITUTION = 'VariableSubstitution'
131131
HARVESTED_TYPE = 'HarvestedType'
132132
HARVESTER = 'Harvester'
133+
HEALTH_SCORE = "HealthScore"
133134
HEAP_DUMP_ACTION = 'HeapDumpAction'
134135
HEAP_RETAINED = 'HeapRetained'
135136
IMAGE_NOTIFICATION = 'ImageNotification'
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"copyright": "Copyright (c) 2024, Oracle and/or its affiliates.",
3+
"license": "Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl",
4+
"wlst_type": "HealthScore",
5+
"online_bean": "weblogic.management.configuration.HealthScoreMBean",
6+
"default_name_value": "${NO_NAME_0:%DOMAIN%}",
7+
"version": "[14.1.2,)",
8+
"folders": {},
9+
"attributes": {
10+
"CalculateIntervalSecs": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "CalculateIntervalSecs", "wlst_path": "WP001", "default_value": 5, "wlst_type": "integer" } ],
11+
"Enabled": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "Enabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
12+
"Notes": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
13+
"PluginClassName": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "PluginClassName", "wlst_path": "WP001", "default_value": "weblogic.health.DefaultHealthScorePlugin", "wlst_type": "string"} ]
14+
},
15+
"wlst_attributes_path": "WP001",
16+
"wlst_paths": {
17+
"WP001": "/HealthScore/%HEALTHSCORE%"
18+
}
19+
}

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
{
2-
"copyright": "Copyright (c) 2017, 2022, Oracle Corporation and/or its affiliates.",
2+
"copyright": "Copyright (c) 2017, 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": "JTA",
55
"online_bean": "weblogic.management.configuration.JTAMBean",
66
"default_name_value": "${NO_NAME_0:%DOMAIN%}",
7-
"folders": {},
7+
"folders": {
8+
"JtaRemoteDomain": {
9+
"wlst_type": "J${ta:TA}RemoteDomain${:s}",
10+
"online_bean": "weblogic.management.configuration.JTARemoteDomainMBean",
11+
"child_folders_type": "multiple",
12+
"version": "[14.1.2,)",
13+
"folders": {},
14+
"attributes": {
15+
"Notes": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ],
16+
"Url": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "U${rl:RL}", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ]
17+
},
18+
"wlst_attributes_path": "WP001",
19+
"wlst_paths": {
20+
"WP001": "/JTA/%JTA%/J${ta:TA}RemoteDomain${:s}/%JTAREMOTEDOMAIN%"
21+
}
22+
}
23+
},
824
"attributes": {
925
"AbandonTimeoutSeconds": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "AbandonTimeoutSeconds", "wlst_path": "WP001", "default_value": 86400, "wlst_type": "integer" } ],
1026
"BeforeCompletionIterationLimit": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "BeforeCompletionIterationLimit", "wlst_path": "WP001", "default_value": 10, "wlst_type": "integer" } ],

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2017, 2023, Oracle and/or its affiliates.",
2+
"copyright": "Copyright (c) 2017, 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": "SecurityConfiguration",
55
"online_bean": "weblogic.management.configuration.SecurityConfigurationMBean",
@@ -117,7 +117,7 @@
117117
"child_folders_type": "none",
118118
"folders": {},
119119
"attributes" : {
120-
"ActiveContextHandlerEntry": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "ActiveContextHandlerEntry", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
120+
"ActiveContextHandlerEntry": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ActiveContextHandlerEntr${y:ies}", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
121121
"BeginMarker": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "BeginMarker", "wlst_path": "WP001", "default_value": "#### Audit Record Begin", "wlst_type": "string", "get_method": "${LSA:GET}"} ],
122122
"CompatibilityObjectName": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "CompatibilityObjectName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
123123
"Description": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "Description", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
@@ -499,7 +499,10 @@
499499
"ResultsTimeLimit": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ResultsTimeLimit", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer" } ],
500500
"SSLEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SSLEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
501501
"SupportedTypes": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "SupportedTypes", "wlst_path": "WP001", "default_value": null, "wlst_type": "jarray", "access": "IGNORED" } ],
502-
"UserFilterAttribute": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "UserFilterAttribute", "wlst_path": "WP001", "default_value": null, "wlst_type": "${list:jarray}", "wlst_read_type": "delimited_string[semicolon]", "preferred_model_type": "list", "get_method": "LSA" } ],
502+
"UserFilterAttribute": [
503+
{"version": "[10,)", "wlst_mode": "offline", "wlst_name": "UserFilterAttribute", "wlst_path": "WP001", "default_value": null, "wlst_type": "${list:jarray}", "wlst_read_type": "delimited_string[semicolon]", "preferred_model_type": "list", "get_method": "LSA" },
504+
{"version": "[10,)", "wlst_mode": "online", "wlst_name": "UserFilterAttributes", "wlst_path": "WP001", "default_value": ["cn=$subj.cn"], "wlst_type": "${list:jarray}", "wlst_read_type": "delimited_string[semicolon]", "preferred_model_type": "list", "get_method": "GET" }
505+
],
503506
"UsernameAttribute": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "UsernameAttribute", "wlst_path": "WP001", "default_value": "cn", "wlst_type": "string" } ],
504507
"Version": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "Version", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ]
505508
},
@@ -1511,6 +1514,12 @@
15111514
"attributes" : {
15121515
"CompatibilityObjectName": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "CompatibilityObjectName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
15131516
"Description": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "Description", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
1517+
"DeployBasePredicatesEnabled": [
1518+
{"version": "[12.2.1.3.221013,12.2.1.4)", "wlst_mode": "online", "wlst_name": "DeployBasePredicatesEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" },
1519+
{"version": "[12.2.1.4.220929,14.1.1)", "wlst_mode": "online", "wlst_name": "DeployBasePredicatesEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" },
1520+
{"version": "[14.1.1.221010,14.1.2)", "wlst_mode": "online", "wlst_name": "DeployBasePredicatesEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" },
1521+
{"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "DeployBasePredicatesEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" }
1522+
],
15141523
"ProviderClassName": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "ProviderClassName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" },
15151524
{"version": "[12.2.1.4,)", "wlst_mode": "offline", "wlst_name": "ProviderClassName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED", "get_method": "GET" }],
15161525
"RoleDeploymentEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "RoleDeploymentEnabled", "wlst_path": "WP001", "default_value": true, "wlst_type": "boolean" } ],

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2017, 2023, Oracle and/or its affiliates.",
2+
"copyright": "Copyright (c) 2017, 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": "Server${:s}",
55
"online_bean": "weblogic.management.configuration.ServerMBean",
@@ -199,6 +199,23 @@
199199
"WP001": "/Server${:s}/%SERVER%/FederationServices/%FEDERATIONSERVICES%"
200200
}
201201
},
202+
"HealthScore": {
203+
"wlst_type": "HealthScore",
204+
"online_bean": "weblogic.management.configuration.HealthScoreMBean",
205+
"default_name_value": "${NO_NAME_0:%SERVER%}",
206+
"version": "[14.1.2,)",
207+
"folders": {},
208+
"attributes": {
209+
"CalculateIntervalSecs": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "CalculateIntervalSecs", "wlst_path": "WP001", "default_value": 5, "wlst_type": "integer" } ],
210+
"Enabled": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "Enabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
211+
"Notes": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
212+
"PluginClassName": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "PluginClassName", "wlst_path": "WP001", "default_value": "weblogic.health.DefaultHealthScorePlugin", "wlst_type": "string"} ]
213+
},
214+
"wlst_attributes_path": "WP001",
215+
"wlst_paths": {
216+
"WP001": "/Server${:s}/%SERVER%/HealthScore/%HEALTHSCORE%"
217+
}
218+
},
202219
"IIOP": {
203220
"wlst_type": "IIOP",
204221
"online_bean": "weblogic.management.configuration.IIOPMBean",

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2017, 2023, Oracle and/or its affiliates.",
2+
"copyright": "Copyright (c) 2017, 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": "ServerTemplate${:s}",
55
"online_bean": "weblogic.management.configuration.ServerTemplateMBean",
@@ -202,6 +202,23 @@
202202
"WP001": "/ServerTemplate${:s}/%SERVERTEMPLATE%/FederationServices/%FEDERATIONSERVICES%"
203203
}
204204
},
205+
"HealthScore": {
206+
"wlst_type": "HealthScore",
207+
"online_bean": "weblogic.management.configuration.HealthScoreMBean",
208+
"default_name_value": "${NO_NAME_0:%SERVERTEMPLATE%}",
209+
"version": "[14.1.2,)",
210+
"folders": {},
211+
"attributes": {
212+
"CalculateIntervalSecs": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "CalculateIntervalSecs", "wlst_path": "WP001", "default_value": 5, "wlst_type": "integer" } ],
213+
"Enabled": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "Enabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
214+
"Notes": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
215+
"PluginClassName": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "PluginClassName", "wlst_path": "WP001", "default_value": "weblogic.health.DefaultHealthScorePlugin", "wlst_type": "string"} ]
216+
},
217+
"wlst_attributes_path": "WP001",
218+
"wlst_paths": {
219+
"WP001": "/ServerTemplate${:s}/%SERVERTEMPLATE%/HealthScore/%HEALTHSCORE%"
220+
}
221+
},
205222
"IIOP": {
206223
"wlst_type": "IIOP",
207224
"online_bean": "weblogic.management.configuration.IIOPMBean",

integration-tests/alias-test/verify/src/test/python/aliastest/verify/verifier.py

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
Copyright (c) 2020, 2024, 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
"""
5-
import java.io.IOException as IOException
6-
import java.lang.Boolean as Boolean
7-
5+
from aliastest.verify import utils as verify_utils
6+
from aliastest.verify.alias_helper import AliasHelper
7+
from java.io import IOException
8+
from java.lang import Boolean
89
from oracle.weblogic.deploy.aliases import AliasException
9-
10+
from wlsdeploy.aliases import alias_constants
1011
from wlsdeploy.aliases import alias_utils
1112
from wlsdeploy.aliases.location_context import LocationContext
12-
from wlsdeploy.logging.platform_logger import PlatformLogger
13-
import wlsdeploy.aliases.alias_constants as alias_constants
1413
from wlsdeploy.aliases.wlst_modes import WlstModes
15-
16-
from aliastest.verify.alias_helper import AliasHelper
17-
import aliastest.verify.utils as verify_utils
14+
from wlsdeploy.logging.platform_logger import PlatformLogger
1815

1916
ADDITIONAL_RECHECK = "additional"
2017
ATTRIBUTES = 'attributes'
@@ -598,12 +595,15 @@ def _does_alias_attribute_exist(self, location, generated_attribute, generated_a
598595
self._add_error(location, ERROR_ATTRIBUTE_INCORRECT_CASE,
599596
message=message, attribute=generated_attribute)
600597

601-
elif location.get_folder_path().startswith('/SecurityConfiguration/Realm'):
602-
# We are not fully implementing Security Providers and only intend to
603-
# add attributes as customers need them so make these warnings.
604-
#
605-
self._add_warning(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND,
606-
attribute=generated_attribute, message=message)
598+
### we used to exempt these folders
599+
#
600+
# elif location.get_folder_path().startswith('/SecurityConfiguration/Realm'):
601+
# # We are not fully implementing Security Providers and only intend to
602+
# # add attributes as customers need them so make these warnings.
603+
# #
604+
# self._add_warning(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND,
605+
# attribute=generated_attribute, message=message)
606+
607607
elif location.get_folder_path() == '/Security':
608608
# We do not use Security folder attributes in aliases.
609609
# flag these as informational.
@@ -924,17 +924,20 @@ def _is_valid_restart(self, location, generated_attribute, generated_attribute_i
924924
class_name=CLASS_NAME, method_name=_method_name)
925925

926926
valid = True
927-
if model_attribute_name in restart_required_list:
928-
if RESTART not in generated_attribute_info or \
929-
(generated_attribute_info[RESTART] != RESTART_NO_CHECK and
930-
generated_attribute_info[RESTART] != 'true'):
931-
# TODO - temporary change to warning until we decide what to do about the restart attributes of the aliases.
932-
self._add_warning(location, ERROR_ATTRIBUTE_NOT_RESTART, attribute=model_attribute_name)
933-
valid = False
934-
elif RESTART in generated_attribute_info and generated_attribute_info[RESTART] == 'true':
935-
# TODO - temporary change to warning until we decide what to do about the restart attributes of the aliases.
936-
self._add_warning(location, ERROR_ATTRIBUTE_RESTART, attribute=generated_attribute)
937-
valid = False
927+
928+
### WDT appears to not use the alias restart_required flag, so disabling for now
929+
# if model_attribute_name in restart_required_list:
930+
# if RESTART not in generated_attribute_info or \
931+
# (generated_attribute_info[RESTART] != RESTART_NO_CHECK and
932+
# generated_attribute_info[RESTART] != 'true'):
933+
# # TODO - temporary change to warning until we decide what to do about the restart attributes of the aliases.
934+
# self._add_warning(location, ERROR_ATTRIBUTE_NOT_RESTART, attribute=model_attribute_name)
935+
# valid = False
936+
#
937+
# elif RESTART in generated_attribute_info and generated_attribute_info[RESTART] == 'true':
938+
# # TODO - temporary change to warning until we decide what to do about the restart attributes of the aliases.
939+
# self._add_warning(location, ERROR_ATTRIBUTE_RESTART, attribute=generated_attribute)
940+
# valid = False
938941

939942
_logger.exiting(result=verify_utils.bool_to_string(valid), class_name=CLASS_NAME, method_name=_method_name)
940943
return valid

0 commit comments

Comments
 (0)