Skip to content

Fix alias attributes causing "not defined" messages in online discover #1419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/src/main/python/wlsdeploy/aliases/alias_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ACCESS = 'access'
ATTRIBUTES = 'attributes'
CHILD_FOLDERS_TYPE = 'child_folders_type'
COMMENT = 'comment'
CONTAINS = 'contains'
DEFAULT_NAME_VALUE = 'default_name_value'
DEFAULT_VALUE = 'default_value'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
"PanicAction": [ {"version": "[10,12.2.1)", "wlst_mode": "both", "wlst_name": "PanicAction", "wlst_path": "WP001", "default_value": "${__NULL__:no-action}", "derived_default": "${:true}", "wlst_type": "string" } ,
{"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "PanicAction", "wlst_path": "WP001", "default_value": "${__NULL__:system-exit}", "derived_default": "${:true}", "wlst_type": "string" } ],
"ServerFailureTrigger": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "ServerFailureTrigger", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED", "comment": "Appears in attribute list until ServerFailureTrigger folder is created"} ],
"SharedCapacityForWorkManagers": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SharedCapacityForWorkManagers", "wlst_path": "WP001", "default_value": 65536, "derived_default": "${:true}", "wlst_type": "integer" } ]

},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
"PanicAction": [ {"version": "[10,12.2.1)", "wlst_mode": "both", "wlst_name": "PanicAction", "wlst_path": "WP001", "default_value": "${__NULL__:no-action}", "derived_default": "${:true}", "wlst_type": "string" } ,
{"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "PanicAction", "wlst_path": "WP001", "default_value": "${__NULL__:system-exit}", "derived_default": "${:true}", "wlst_type": "string" } ],
"ServerFailureTrigger": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "ServerFailureTrigger", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED", "comment": "Appears in attribute list until ServerFailureTrigger folder is created"} ],
"SharedCapacityForWorkManagers": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SharedCapacityForWorkManagers", "wlst_path": "WP001", "default_value": 65536, "derived_default": "${:true}", "wlst_type": "integer"} ]
},
"wlst_attributes_path": "WP001",
Expand Down Expand Up @@ -1015,6 +1016,7 @@
"PreferredStoreSizeLimit": [ {"version": "[10,)" , "wlst_mode": "both", "wlst_name": "PreferredStoreSizeLimit", "wlst_path": "WP001", "default_value": 100, "wlst_type": "integer"} ],
"StoreSizeCheckPeriod": [ {"version": "[10,)" , "wlst_mode": "both", "wlst_name": "StoreSizeCheckPeriod", "wlst_path": "WP001", "default_value": 1, "wlst_type": "integer"} ],
"SynchronousEventPersistenceEnabled": [ {"version": "[10,)" , "wlst_mode": "both", "wlst_name": "SynchronousEventPersistenceEnabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"WLDFBuiltinSystemResourceDescriptorBean": [ {"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "W${ldf:LDF}BuiltinSystemResourceDescriptorBean", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED", "comment": "Transient attribute for inaccessible WLDFBuiltinSystemResourceDescriptorBean folder" } ],
"WldfBuiltinSystemResourceType": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "W${ldf:LDF}BuiltinSystemResourceType", "wlst_path": "WP001", "default_value": "${__NULL__:None}", "production_default": "${__NULL__:Low}", "wlst_type": "string" } ],
"WldfDiagnosticVolume": [ {"version": "[10,)" , "wlst_mode": "both", "wlst_name": "${Wldf:WLDF}DiagnosticVolume", "wlst_path": "WP001", "default_value": "${__NULL__:Low}", "wlst_type": "string" } ]
},
Expand Down Expand Up @@ -1608,6 +1610,7 @@
"JMSThreadPoolSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "JMSThreadPoolSize", "wlst_path": "WP001", "default_value": 15, "wlst_type": "integer", "get_method": "${LSA:GET}" } ],
"JNDITransportableObjectFactoryList": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "JNDITransportableObjectFactoryList", "wlst_path": "WP001", "default_value": null, "wlst_type": "jarray", "preferred_model_type": "delimited_string", "get_method": "GET" } ],
"JRMPEnabled": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "JRMPEnabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean", "get_method": "LSA"} ],
"JTAMigratableTarget": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "JTAMigratableTarget", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED", "comment": "Appears in attribute list until JTAMigratableTarget folder is established"} ],
"JavaCompiler": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "JavaCompiler", "wlst_path": "WP001", "default_value": "javac", "wlst_type": "string" } ],
"JavaCompilerPostClassPath": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "JavaCompilerPostClassPath", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
"JavaCompilerPreClassPath": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "JavaCompilerPreClassPath", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
"LogMonitoringThrottleThreshold": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "LogMonitoringThrottleThreshold", "wlst_path": "WP001", "default_value": 1500, "wlst_type": "integer"} ],
"LoggerSeverity": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "LoggerSeverity", "wlst_path": "WP001", "default_value": "${__NULL__:Info}", "wlst_type": "string" } ],
"LoggerSeverityProperties": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "LoggerSeverityProperties", "wlst_path": "WP001", "default_value": null, "wlst_type": "properties", "preferred_model_type": "dict", "get_method": "GET"} ],
"MemoryBufferFilter": [ {"version": "[12.1.2)", "wlst_mode": "both", "wlst_name": "MemoryBufferFilter", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "set_method": "MBEAN.set_log_filter_mbean", "set_mbean_type": "weblogic.management.configuration.LogFilterMBean" } ],
"MemoryBufferFilter": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "MemoryBufferFilter", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "set_method": "MBEAN.set_log_filter_mbean", "set_mbean_type": "weblogic.management.configuration.LogFilterMBean" } ],
"MemoryBufferSeverity": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "MemoryBufferSeverity", "wlst_path": "WP001", "default_value": "${__NULL__:Trace}", "wlst_type": "string" } ],
"MemoryBufferSize": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "MemoryBufferSize", "wlst_path": "WP001", "default_value": 10, "production_default": "${__NULL__:500}", "wlst_type": "integer"} ],
"Notes": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
Expand Down Expand Up @@ -450,6 +450,7 @@
"Notes": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
"PanicAction": [ {"version": "[12.1.2,12.2.1)", "wlst_mode": "both", "wlst_name": "PanicAction", "wlst_path": "WP001", "default_value": "${__NULL__:no-action}", "derived_default": "${:true}", "wlst_type": "string" } ,
{"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "PanicAction", "wlst_path": "WP001", "default_value": "${__NULL__:system-exit}", "derived_default": "${:true}", "wlst_type": "string" } ],
"ServerFailureTrigger": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "ServerFailureTrigger", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED", "comment": "Appears in attribute list until ServerFailureTrigger folder is created"} ],
"SharedCapacityForWorkManagers": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "SharedCapacityForWorkManagers", "wlst_path": "WP001", "default_value": 65536, "derived_default": "${:true}", "wlst_type": "integer"} ]
},
"wlst_attributes_path": "WP001",
Expand Down Expand Up @@ -1024,6 +1025,7 @@
"PreferredStoreSizeLimit": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "PreferredStoreSizeLimit", "wlst_path": "WP001", "default_value": 100, "wlst_type": "integer" } ],
"StoreSizeCheckPeriod": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "StoreSizeCheckPeriod", "wlst_path": "WP001", "default_value": 1, "wlst_type": "integer" } ],
"SynchronousEventPersistenceEnabled": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "SynchronousEventPersistenceEnabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ],
"WLDFBuiltinSystemResourceDescriptorBean": [ {"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "W${ldf:LDF}BuiltinSystemResourceDescriptorBean", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED", "comment": "Transient attribute for inaccessible WLDFBuiltinSystemResourceDescriptorBean folder" } ],
"WldfBuiltinSystemResourceType": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "W${ldf:LDF}BuiltinSystemResourceType", "wlst_path": "WP001", "default_value": "${__NULL__:None}", "production_default": "${__NULL__:Low}", "wlst_type": "string" } ],
"WldfDiagnosticVolume": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "W${ldf:LDF}DiagnosticVolume", "wlst_path": "WP001", "default_value": "${__NULL__:Low}", "wlst_type": "string" } ]
},
Expand Down Expand Up @@ -1629,6 +1631,7 @@
"JMSThreadPoolSize": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "JMSThreadPoolSize", "wlst_path": "WP001", "default_value": 15, "wlst_type": "integer", "get_method": "${LSA:GET}" } ],
"JNDITransportableObjectFactoryList": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "JNDITransportableObjectFactoryList", "wlst_path": "WP001", "default_value": null, "wlst_type": "jarray", "preferred_model_type": "delimited_string", "get_method": "GET" } ],
"JRMPEnabled": [ {"version": "[12.1.2,)", "wlst_mode": "offline", "wlst_name": "JRMPEnabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ],
"JTAMigratableTarget": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "JTAMigratableTarget", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED", "comment": "Appears in attribute list until JTAMigratableTarget folder is established"} ],
"JavaCompiler": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "JavaCompiler", "wlst_path": "WP001", "default_value": "javac", "wlst_type": "string" } ],
"JavaCompilerPostClassPath": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "JavaCompilerPostClassPath", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
"JavaCompilerPreClassPath": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "JavaCompilerPreClassPath", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
Expand Down
10 changes: 10 additions & 0 deletions core/src/test/python/alias_json_file_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from wlsdeploy.aliases.alias_constants import ALIAS_DATA_TYPES
from wlsdeploy.aliases.alias_constants import ATTRIBUTES
from wlsdeploy.aliases.alias_constants import CHILD_FOLDERS_TYPE
from wlsdeploy.aliases.alias_constants import COMMENT
from wlsdeploy.aliases.alias_constants import CONTAINS
from wlsdeploy.aliases.alias_constants import DEFAULT_NAME_VALUE
from wlsdeploy.aliases.alias_constants import DEFAULT_VALUE
Expand Down Expand Up @@ -113,6 +114,7 @@ class ListTestCase(unittest.TestCase):

_optional_attribute_keys = [
ACCESS,
COMMENT,
DERIVED_DEFAULT,
GET_MBEAN_TYPE,
GET_METHOD,
Expand Down Expand Up @@ -516,6 +518,14 @@ def _verify_attribute_access_attribute_value(self, folder_name, attribute_name,
self._known_access_attribute_values, True))
return result

def _verify_attribute_comment_attribute_value(self, folder_name, attribute_name, alias_attribute_value):
result = []
if type(alias_attribute_value) is not str:
message = self._get_invalid_attribute_string_type_message(folder_name, attribute_name,
COMMENT, alias_attribute_value)
result.append(message)
return result

def _verify_attribute_get_mbean_type_attribute_value(self, folder_name, attribute_name, alias_attribute_value):
result = []
if type(alias_attribute_value) is not str:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (c) 2020, 2022, Oracle Corporation and/or its affiliates.
Copyright (c) 2020, 2023, Oracle Corporation and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
"""
import random
Expand Down Expand Up @@ -34,15 +34,36 @@
}

ONLINE_ALIAS_ATTRIBUTE_IGNORE_MAP = {
'/Cluster/OverloadProtection': [
'ServerFailureTrigger' # appears in attribute list until folder MBean is created
],
'/Server': [
'JTAMigratableTarget' # appears in attribute list until folder MBean is created
],
'/Server/OverloadProtection': [
'ServerFailureTrigger' # appears in attribute list until folder MBean is created
],
'/Server/ServerDebug': [
'DebugJAXPOutputStream',
'DebugXMLRegistryOutputStream',
'DebugXMLEntityCacheOutputStream'
],
'/Server/ServerDiagnosticConfig': [
'WLDFBuiltinSystemResourceDescriptorBean'
],
'/ServerTemplate': [
'JTAMigratableTarget' # appears in attribute list until folder MBean is created
],
'/ServerTemplate/OverloadProtection': [
'ServerFailureTrigger' # appears in attribute list until folder MBean is created
],
'/ServerTemplate/ServerDebug': [
'DebugJAXPOutputStream',
'DebugXMLRegistryOutputStream',
'DebugXMLEntityCacheOutputStream'
],
'/ServerTemplate/ServerDiagnosticConfig': [
'WLDFBuiltinSystemResourceDescriptorBean'
]
}

Expand Down