Skip to content

Commit 8b95b44

Browse files
committed
Merge branch 'jira-wdt-923-discover-info' into 'main'
Fix unrecognized attribute messages for discover See merge request weblogic-cloud/weblogic-deploy-tooling!1762
2 parents d6c1e61 + 6996f1e commit 8b95b44

File tree

11 files changed

+81
-51
lines changed

11 files changed

+81
-51
lines changed

core/src/main/python/wlsdeploy/tool/discover/discoverer.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2017, 2024, Oracle and/or its affiliates.
2+
Copyright (c) 2017, 2025, 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 array
@@ -322,11 +322,30 @@ def _get_model_name_and_value(self, location, wlst_name, wlst_value, wlst_path):
322322
model_value = None
323323

324324
except (AliasException, DiscoverException), de:
325-
_logger.info('WLSDPLY-06106', wlst_name, wlst_path, de.getLocalizedMessage(),
326-
class_name=_class_name, method_name=_method_name)
325+
if self._is_subfolder_attribute(location, wlst_name):
326+
_logger.fine('WLSDPLY-06166', wlst_name, wlst_path,
327+
class_name=_class_name, method_name=_method_name)
328+
else:
329+
_logger.info('WLSDPLY-06106', wlst_name, wlst_path, de.getLocalizedMessage(),
330+
class_name=_class_name, method_name=_method_name)
327331

328332
return model_name, model_value
329333

334+
def _is_subfolder_attribute(self, location, wlst_attribute_name):
335+
"""
336+
On rare occasions in online WLST, an attribute will appear using the same name
337+
as a subfolder that has not been added. Detect this scenario to avoid error conditions
338+
when the attribute does not have a corresponding alias.
339+
:param location: the location of the attribute
340+
:param wlst_attribute_name: tha attribute name
341+
:return: True if the attribute name matches a subfolder name
342+
"""
343+
try:
344+
result = self._aliases.get_model_subfolder_name(location, wlst_attribute_name)
345+
return result is not None
346+
except (AliasException, DiscoverException), de:
347+
return False
348+
330349
def _get_model_password_value(self, location, model_name, model_value):
331350
"""
332351
Get the password value to be used for the model for the specified attribute.

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2024, Oracle and/or its affiliates.",
2+
"copyright": "Copyright (c) 2024, 2025, 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": "SNMPAgent",
55
"online_bean": "weblogic.management.configuration.SNMPAgentMBean",
@@ -164,6 +164,7 @@
164164
{"version": "[10,12.2.1.4)", "wlst_mode": "both", "wlst_name": "CommunityPrefix", "wlst_path": "WP001", "default_value": "public", "wlst_type": "string" },
165165
{"version": "[12.2.1.4,)", "wlst_mode": "both", "wlst_name": "CommunityPrefix", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" }
166166
],
167+
"DebugLevel": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugLevel", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer" } ],
167168
"Enabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Enabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
168169
"InformEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "InformEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
169170
"InformRetryInterval": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "InformRetryInterval", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer" } ],
@@ -175,6 +176,7 @@
175176
{"version": "[10,12.2.1.3)", "wlst_mode": "online", "wlst_name": "MaxInformRetryCount", "wlst_path": "WP001", "default_value": 1, "wlst_type": "integer" },
176177
{"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "MaxInformRetryCount", "wlst_path": "WP001", "default_value": 1, "wlst_type": "integer" }
177178
],
179+
"MibDataRefreshInterval": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MibDataRefreshInterval", "wlst_path": "WP001", "default_value": 120, "wlst_type": "integer" } ],
178180
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
179181
"PrivacyProtocol": [
180182
{"version": "[10,12.2.1.4)", "wlst_mode": "both", "wlst_name": "PrivacyProtocol", "wlst_path": "WP001", "default_value": "${__NULL__:noPriv}", "wlst_type": "string" },
@@ -186,6 +188,8 @@
186188
{"version": "[12.2.1.4,)", "wlst_mode": "both", "wlst_name": "SNMPTrapVersion", "wlst_path": "WP001", "default_value": "${0:3}", "wlst_type": "integer" }
187189
],
188190
"SendAutomaticTrapsEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SendAutomaticTrapsEnabled", "wlst_path": "WP001", "default_value": true, "wlst_type": "boolean" } ],
191+
"ServerStatusCheckIntervalFactor":
192+
[ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ServerStatusCheckIntervalFactor", "wlst_path": "WP001", "default_value": 1, "wlst_type": "integer" } ],
189193
"SnmpAccessForUserMBeansEnabled":
190194
[ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "S${nmp:NMP}AccessForUserMBeansEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
191195
"SnmpEngineId": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "S${nmp:NMP}EngineId", "wlst_path": "WP001", "default_value": "${__NULL__:%DOMAIN%}", "wlst_type": "string" } ],

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2017, 2024, Oracle and/or its affiliates.",
2+
"copyright": "Copyright (c) 2017, 2025, 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",
@@ -1534,6 +1534,7 @@
15341534
"MaxPostSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MaxPostSize", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ],
15351535
"MaxPostTimeSecs": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MaxPostTimeSecs", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ],
15361536
"MaxRequestParameterCount": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "MaxRequestParameterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
1537+
"MaxRequestParamterCount": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "MaxRequestParamterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
15371538
"MaxSingleHeaderSize": [
15381539
{"version": "[12.2.1.3.0.221210,12.2.1.4)", "wlst_mode": "online", "wlst_name": "MaxSingleHeaderSize", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ,
15391540
{"version": "[12.2.1.3.0.230402,12.2.1.4)", "wlst_mode": "offline", "wlst_name": "MaxSingleHeaderSize", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ,

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2024, Oracle and/or its affiliates.",
2+
"copyright": "Copyright (c) 2024, 2025, 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": "S${nmp:NMP}AgentDeployment${:s}",
55
"online_bean": "weblogic.management.configuration.SNMPAgentDeploymentMBean",
@@ -164,6 +164,7 @@
164164
{"version": "[10,12.2.1.4)", "wlst_mode": "both", "wlst_name": "CommunityPrefix", "wlst_path": "WP001", "default_value": "public", "wlst_type": "string" },
165165
{"version": "[12.2.1.4,)", "wlst_mode": "both", "wlst_name": "CommunityPrefix", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" }
166166
],
167+
"DebugLevel": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugLevel", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer" } ],
167168
"DeploymentOrder": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DeploymentOrder", "wlst_path": "WP001", "default_value": 1000, "wlst_type": "integer" } ],
168169
"Enabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Enabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
169170
"InformEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "InformEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
@@ -176,6 +177,7 @@
176177
{"version": "[10,12.2.1.3)", "wlst_mode": "online", "wlst_name": "MaxInformRetryCount", "wlst_path": "WP001", "default_value": 1, "wlst_type": "integer" },
177178
{"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "MaxInformRetryCount", "wlst_path": "WP001", "default_value": 1, "wlst_type": "integer" }
178179
],
180+
"MibDataRefreshInterval": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MibDataRefreshInterval", "wlst_path": "WP001", "default_value": 120, "wlst_type": "integer" } ],
179181
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
180182
"PrivacyProtocol": [
181183
{"version": "[10,12.2.1.4)", "wlst_mode": "both", "wlst_name": "PrivacyProtocol", "wlst_path": "WP001", "default_value": "${__NULL__:noPriv}", "wlst_type": "string" },
@@ -187,6 +189,8 @@
187189
{"version": "[12.2.1.4,)", "wlst_mode": "both", "wlst_name": "SNMPTrapVersion", "wlst_path": "WP001", "default_value": "${0:3}", "wlst_type": "integer" }
188190
],
189191
"SendAutomaticTrapsEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SendAutomaticTrapsEnabled", "wlst_path": "WP001", "default_value": true, "wlst_type": "boolean" } ],
192+
"ServerStatusCheckIntervalFactor":
193+
[ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ServerStatusCheckIntervalFactor", "wlst_path": "WP001", "default_value": 1, "wlst_type": "integer" } ],
190194
"SnmpAccessForUserMBeansEnabled":
191195
[ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "S${nmp:NMP}AccessForUserMBeansEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
192196
"SnmpEngineId": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "S${nmp:NMP}EngineId", "wlst_path": "WP001", "default_value": "${__NULL__:%SNMPAGENTDEPLOYMENT%}", "wlst_type": "string", "uses_path_tokens": "${:true}" } ],

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2017, 2023, Oracle Corporation and/or its affiliates.",
2+
"copyright": "Copyright (c) 2017, 2025, Oracle Corporation 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": "VirtualHost${:s}",
55
"online_bean": "weblogic.management.configuration.VirtualHostMBean",
@@ -69,6 +69,7 @@
6969
"MaxPostSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MaxPostSize", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ],
7070
"MaxPostTimeSecs": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MaxPostTimeSecs", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ],
7171
"MaxRequestParameterCount": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "MaxRequestParameterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
72+
"MaxRequestParamterCount": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "MaxRequestParamterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
7273
"MaxSingleHeaderSize": [
7374
{"version": "[12.2.1.3.0.221210,12.2.1.4)", "wlst_mode": "online", "wlst_name": "MaxSingleHeaderSize", "wlst_path": "WP001", "default_value": "-1", "wlst_type": "integer" } ,
7475
{"version": "[12.2.1.3.0.230402,12.2.1.4)", "wlst_mode": "offline", "wlst_name": "MaxSingleHeaderSize", "wlst_path": "WP001", "default_value": "-1", "wlst_type": "integer" } ,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2017, 2023, Oracle Corporation and/or its affiliates.",
2+
"copyright": "Copyright (c) 2017, 2025, Oracle Corporation 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": "VirtualTarget${:s}",
55
"online_bean": "weblogic.management.configuration.VirtualTargetMBean",
@@ -65,7 +65,7 @@
6565
"MaxPostSize": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MaxPostSize", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ],
6666
"MaxPostTimeSecs": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MaxPostTimeSecs", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ],
6767
"MaxRequestParameterCount": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MaxRequestParameterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
68-
"MaxRequestParamterCount": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "MaxRequestParamterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
68+
"MaxRequestParamterCount": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MaxRequestParamterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
6969
"MaxSingleHeaderSize": [
7070
{"version": "[12.2.1.3.0.221210,12.2.1.4)", "wlst_mode": "online", "wlst_name": "MaxSingleHeaderSize", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ,
7171
{"version": "[12.2.1.3.0.230402,12.2.1.4)", "wlst_mode": "offline", "wlst_name": "MaxSingleHeaderSize", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2020, 2024, Oracle and/or its affiliates.",
2+
"copyright": "Copyright (c) 2020, 2025, 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",
@@ -233,6 +233,7 @@
233233
"attributes": {
234234
"DeploymentOrder": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DeploymentOrder", "wlst_path": "WP001", "default_value": 1000, "wlst_type": "integer" } ],
235235
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
236+
"Resources": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "Resources", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
236237
"Target": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "Target", "wlst_path": "WP001", "default_value": null, "wlst_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans" } ,
237238
{"version": "[10,)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP003", "default_value": null, "wlst_type": "jarray", "preferred_model_type": "delimited_string", "get_method": "${LSA:GET}", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ]
238239
},

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"copyright": "Copyright (c) 2019, 2023, Oracle and/or its affiliates.",
2+
"copyright": "Copyright (c) 2019, 2025, 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": "WebAppContainer",
55
"online_bean": "weblogic.management.configuration.WebAppContainerMBean",
@@ -61,7 +61,7 @@
6161
],
6262
"MaxPostSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MaxPostSize", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ],
6363
"MaxPostTimeSecs": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MaxPostTimeSecs", "wlst_path": "WP001", "default_value": -1, "wlst_type": "integer" } ],
64-
"MaxRequestParamterCount": [ {"version": "[12.1.2,12.2.1.4)", "wlst_mode": "both", "wlst_name": "MaxRequestParamterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
64+
"MaxRequestParamterCount": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "MaxRequestParamterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
6565
"MaxRequestParameterCount": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "MaxRequestParameterCount", "wlst_path": "WP001", "default_value": 10000, "wlst_type": "integer", "get_method": "GET" } ],
6666
"MaxSingleHeaderSize": [
6767
{"version": "[12.2.1.3.0.221210,12.2.1.4)", "wlst_mode": "online", "wlst_name": "MaxSingleHeaderSize", "wlst_path": "WP001", "default_value": "-1", "wlst_type": "integer" } ,

0 commit comments

Comments
 (0)