Skip to content

cleaning up online discovery errors #1394

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 1 commit into from
Feb 16, 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
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
"DebugJAXPIncludeLocation": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugJAXPIncludeName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeName", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugJAXPIncludeTime": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugJAXPOutputStream": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "DebugJAXPOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
"DebugJAXPUseShortClass": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJAXPUseShortClass", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugJDBCConn": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJDBCConn", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugJDBCDriverLogging": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJDBCDriverLogging", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
Expand Down Expand Up @@ -933,13 +934,15 @@
"DebugXMLEntityCacheIncludeLocation": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLEntityCacheIncludeName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeName", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugXMLEntityCacheIncludeTime": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLEntityCacheOutputStream": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "DebugXMLEntityCacheOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
"DebugXMLEntityCacheUseShortClass": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheUseShortClass", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugXMLRegistryDebugLevel": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryDebugLevel", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer"} ],
"DebugXMLRegistryDebugName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryDebugName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
"DebugXMLRegistryIncludeClass": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLRegistryIncludeLocation": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLRegistryIncludeName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeName", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugXMLRegistryIncludeTime": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLRegistryOutputStream": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "DebugXMLRegistryOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
"DebugXMLRegistryUseShortClass": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryUseShortClass", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DefaultStore": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DefaultStore", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DiagnosticContextDebugMode": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DiagnosticContextDebugMode", "wlst_path": "WP001", "default_value": "${__NULL__:Off}", "wlst_type": "string" } ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +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,12.1.3)", "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" } ,
{"version": "[12.1.3,)", "wlst_mode": "offline", "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 @@ -667,6 +666,7 @@
"DebugJAXPIncludeLocation": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugJAXPIncludeName": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeName", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugJAXPIncludeTime": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugJAXPOutputStream": [ {"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "DebugJAXPOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
"DebugJAXPUseShortClass": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJAXPUseShortClass", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugJDBCConn": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJDBCConn", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugJDBCDriverLogging": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJDBCDriverLogging", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
Expand Down Expand Up @@ -943,13 +943,15 @@
"DebugXMLEntityCacheIncludeLocation": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLEntityCacheIncludeName": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeName", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugXMLEntityCacheIncludeTime": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLEntityCacheOutputStream": [ {"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "DebugXMLEntityCacheOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
"DebugXMLEntityCacheUseShortClass": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheUseShortClass", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugXMLRegistryDebugLevel": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryDebugLevel", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer"} ],
"DebugXMLRegistryDebugName": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryDebugName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
"DebugXMLRegistryIncludeClass": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLRegistryIncludeLocation": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLRegistryIncludeName": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeName", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DebugXMLRegistryIncludeTime": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DebugXMLRegistryOutputStream": [ {"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "DebugXMLRegistryOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
"DebugXMLRegistryUseShortClass": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryUseShortClass", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean"} ],
"DefaultStore": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DefaultStore", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
"DiagnosticContextDebugMode": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DiagnosticContextDebugMode", "wlst_path": "WP001", "default_value": "${__NULL__:Off}", "wlst_type": "string" } ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from aliastest.verify.verify_context import VerifyModelContext

__logger = PlatformLogger('test.aliases')
CLASS_NAME = 'generate/utils'
CLASS_NAME = 'verify/utils'

OFFLINE_ALIAS_FOLDER_IGNORE_MAP = {
'/': ['ODLConfiguration', 'OHS', 'RCUDbInfo', 'Security', 'UnixMachine', 'WLSRoles',
Expand All @@ -33,6 +33,19 @@
'/ResourceGroupTemplate': ['SystemComponents']
}

ONLINE_ALIAS_ATTRIBUTE_IGNORE_MAP = {
'/Server/ServerDebug': [
'DebugJAXPOutputStream',
'DebugXMLRegistryOutputStream',
'DebugXMLEntityCacheOutputStream'
],
'/ServerTemplate/ServerDebug': [
'DebugJAXPOutputStream',
'DebugXMLRegistryOutputStream',
'DebugXMLEntityCacheOutputStream'
]
}

OFFLINE_TEST_ANOMALIES_MAP = {
'/Application': {
'ModuleType': 'war',
Expand Down Expand Up @@ -282,6 +295,18 @@ def is_alias_folder_in_ignore_list(model_context, location, alias_name):
return False


def is_alias_attribute_in_ignore_list(model_context, location, alias_name):
_method_name = 'is_alias_attribute_in_ignore_list'
if model_context.get_target_wlst_mode() == WlstModes.ONLINE:
ignore_map = ONLINE_ALIAS_ATTRIBUTE_IGNORE_MAP
path = location.get_folder_path()

if path in ignore_map and alias_name in ignore_map[path]:
__logger.finer('{0}:{1} found in ignore list', path, alias_name,
class_name=CLASS_NAME, method_name=_method_name)
return True
return False

def is_attribute_value_test_anomaly(model_context, location, attribute_name, attribute_value):
if model_context.get_target_wlst_mode() == WlstModes.OFFLINE:
anomaly_map = OFFLINE_TEST_ANOMALIES_MAP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,13 @@ def _verify_attributes_at_location(self, generated_attributes, location):

for unprocessed in unprocessed_alias_list:
if unprocessed in self._alias_helper.get_ignore_attribute_names():
_logger.finest('Attribute {0} in alias attribute ignore list', unprocessed,
class_name=CLASS_NAME, method_name=_method_name)
self._add_info(location, INFO_ATTRIBUTE_IN_IGNORE_LIST, attribute=unprocessed)
elif verify_utils.is_alias_attribute_in_ignore_list(self._model_context, location, unprocessed):
_logger.fine('Attribute {0} at location {1} being ignored because it was in the ignore list',
unprocessed, location.get_folder_path(), class_name=CLASS_NAME,
method_name=_method_name)
else:
message = ''
if verify_utils.is_clear_text_password(unprocessed):
Expand Down