Skip to content

Commit 04c6219

Browse files
resolving issues with Server/ServerTemplate ServerDebug *OutputStream attributes (#1286)
1 parent 669b1e8 commit 04c6219

File tree

3 files changed

+49
-6
lines changed

3 files changed

+49
-6
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,6 @@
617617
"DebugJAXPIncludeName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeName", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
618618
"DebugJAXPIncludeTime": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
619619
"DebugJAXPUseShortClass": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJAXPUseShortClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
620-
"DebugJAXPOutputStream": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "DebugJAXPOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ],
621620
"DebugJDBCConn": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJDBCConn", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
622621
"DebugJDBCDriverLogging": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJDBCDriverLogging", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
623622
"DebugJDBCInternal": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugJDBCInternal", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
@@ -894,15 +893,13 @@
894893
"DebugXMLEntityCacheIncludeLocation": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
895894
"DebugXMLEntityCacheIncludeName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeName", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
896895
"DebugXMLEntityCacheIncludeTime": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
897-
"DebugXMLEntityCacheOutputStream": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "DebugXMLEntityCacheOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ],
898896
"DebugXMLEntityCacheUseShortClass": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheUseShortClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
899897
"DebugXMLRegistryDebugLevel": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryDebugLevel", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer"} ],
900898
"DebugXMLRegistryDebugName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryDebugName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
901899
"DebugXMLRegistryIncludeClass": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
902900
"DebugXMLRegistryIncludeLocation": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
903901
"DebugXMLRegistryIncludeName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeName", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
904902
"DebugXMLRegistryIncludeTime": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
905-
"DebugXMLRegistryOutputStream": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "DebugXMLRegistryOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
906903
"DebugXMLRegistryUseShortClass": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryUseShortClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
907904
"DefaultStore": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DefaultStore", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
908905
"DiagnosticContextDebugMode": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DiagnosticContextDebugMode", "wlst_path": "WP001", "default_value": "${__NULL__:Off}", "wlst_type": "string" } ],

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,6 @@
627627
"DebugJAXPIncludeLocation": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
628628
"DebugJAXPIncludeName": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeName", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
629629
"DebugJAXPIncludeTime": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJAXPIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
630-
"DebugJAXPOutputStream": [ {"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "DebugJAXPOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
631630
"DebugJAXPUseShortClass": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJAXPUseShortClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
632631
"DebugJDBCConn": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJDBCConn", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
633632
"DebugJDBCDriverLogging": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugJDBCDriverLogging", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
@@ -903,7 +902,6 @@
903902
"DebugXMLEntityCacheIncludeClass": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
904903
"DebugXMLEntityCacheIncludeLocation": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
905904
"DebugXMLEntityCacheIncludeName": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeName", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
906-
"DebugXMLEntityCacheOutputStream": [ {"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "DebugXMLEntityCacheOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
907905
"DebugXMLEntityCacheIncludeTime": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
908906
"DebugXMLEntityCacheUseShortClass": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLEntityCacheUseShortClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
909907
"DebugXMLRegistryDebugLevel": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryDebugLevel", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer"} ],
@@ -912,7 +910,6 @@
912910
"DebugXMLRegistryIncludeLocation": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeLocation", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
913911
"DebugXMLRegistryIncludeName": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeName", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
914912
"DebugXMLRegistryIncludeTime": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryIncludeTime", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
915-
"DebugXMLRegistryOutputStream": [ {"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "DebugXMLRegistryOutputStream", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
916913
"DebugXMLRegistryUseShortClass": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugXMLRegistryUseShortClass", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
917914
"DefaultStore": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DefaultStore", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
918915
"DiagnosticContextDebugMode": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DiagnosticContextDebugMode", "wlst_path": "WP001", "default_value": "${__NULL__:Off}", "wlst_type": "string" } ],

integration-tests/alias-test/generate/src/test/python/aliastest/generate/generator_online.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434
'Libraries'
3535
]
3636

37+
STRIP_FROM_GENERATED_FILE = {
38+
'Servers': {
39+
'ServerDebug': {
40+
'attributes': ['DebugJAXPOutputStream', 'DebugXMLEntityCacheOutputStream', 'DebugXMLRegistryOutputStream']
41+
}
42+
},
43+
'ServerTemplates': {
44+
'ServerDebug': {
45+
'attributes': ['DebugJAXPOutputStream', 'DebugXMLEntityCacheOutputStream', 'DebugXMLRegistryOutputStream']
46+
}
47+
}
48+
}
49+
50+
3751
class OnlineGenerator(GeneratorBase):
3852
"""
3953
Generate MBean and attribute information and store into a dictionary.
@@ -55,10 +69,45 @@ def generate(self):
5569
self.__logger.entering(class_name=self.__class_name, method_name=_method_name)
5670

5771
self.__folder_hierarchy(self._dictionary, '/')
72+
self.__clean_dictionary(self._dictionary, STRIP_FROM_GENERATED_FILE)
5873

5974
self.__logger.exiting(class_name=self.__class_name, method_name=_method_name)
6075
return self._dictionary
6176

77+
def __clean_dictionary(self, dictionary, remove_dict):
78+
_method_name = '__clean_dictionary'
79+
self.__logger.entering(class_name=self.__class_name, method_name=_method_name)
80+
81+
for key, remove_value in remove_dict.iteritems():
82+
self.__logger.finest('key = {0} and remove_value ({1}) = {2}', key, type(remove_value), remove_value,
83+
class_name=self.__class_name, method_name=_method_name)
84+
if key == 'attributes':
85+
for attribute in remove_value:
86+
self.__logger.finest('attribute = {0}', attribute,
87+
class_name=self.__class_name, method_name=_method_name)
88+
if attribute in dictionary['attributes']:
89+
self.__logger.finest('Found attribute {0} in dictionary', attribute,
90+
class_name=self.__class_name, method_name=_method_name)
91+
del dictionary['attributes'][attribute]
92+
else:
93+
self.__logger.finest('Attribute {0} not found in dictionary', attribute,
94+
class_name=self.__class_name, method_name=_method_name)
95+
elif key in dictionary:
96+
self.__logger.finest('key {0} in dictionary', key,
97+
class_name=self.__class_name, method_name=_method_name)
98+
if isinstance(remove_value, dict):
99+
self.__logger.finest('remove_value for key {0} is dictionary so making recursive call', key,
100+
class_name=self.__class_name, method_name=_method_name)
101+
self.__clean_dictionary(dictionary[key], remove_value)
102+
else:
103+
self.__logger.finest('remove_value for key {0} is unexpected type {1}', key, type(remove_value),
104+
class_name=self.__class_name, method_name=_method_name)
105+
else:
106+
self.__logger.finest('key {0} is not in dictionary so skipping', key,
107+
class_name=self.__class_name, method_name=_method_name)
108+
109+
self.__logger.exiting(class_name=self.__class_name, method_name=_method_name)
110+
62111
def __folder_hierarchy(self, mbean_dictionary, mbean_path):
63112
_method_name = '__folder_hierarchy'
64113
self.__logger.entering(mbean_path, class_name=self.__class_name, method_name=_method_name)

0 commit comments

Comments
 (0)