Skip to content

Commit 6dcd249

Browse files
committed
Merge branch 'coherence-cache-config-1412' into 'main'
Adding Support for Coherence Cache Config online discovery when RuntimeCacheConfigurationUri attribute is available See merge request weblogic-cloud/weblogic-deploy-tooling!1538
2 parents a13c1a8 + 6ab5228 commit 6dcd249

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ def get_coherence_cache_config(self, coherence_cluster_name, location):
114114
cache_configs = self._find_names_in_folder(location)
115115
if cache_configs is not None:
116116
name_token = self._aliases.get_name_token(location)
117+
attr_names = self._aliases.get_model_attribute_names(location)
117118
for cache_config in cache_configs:
118119
location.add_name_token(name_token, cache_config)
119-
if self._wlst_mode == WlstModes.ONLINE:
120+
121+
if self._wlst_mode == WlstModes.ONLINE and COHERENCE_RUNTIME_CACHE_CONFIG_URI not in attr_names:
120122
_logger.warning('WLSDPLY-06323', cache_config, coherence_cluster_name,
121123
class_name=_class_name, method_name=_method_name)
122124
continue
@@ -125,14 +127,14 @@ def get_coherence_cache_config(self, coherence_cluster_name, location):
125127
class_name=_class_name, method_name=_method_name)
126128
result[cache_config] = OrderedDict()
127129
self._populate_model_parameters(result[cache_config], location)
128-
self._workaround_offline_cache_config_issue(coherence_cluster_name, cache_config, result[cache_config])
130+
self._workaround_cache_config_issue(coherence_cluster_name, cache_config, result[cache_config])
129131
self._discover_subfolders(result[cache_config], location)
130132
location.remove_name_token(name_token)
131133
location.pop_location()
132134
_logger.exiting(class_name=_class_name, method_name=_method_name, result=result)
133135
return model_top_folder_name, result
134136

135-
def _workaround_offline_cache_config_issue(self, cluster_name, cache_config_name, cache_config_dict):
137+
def _workaround_cache_config_issue(self, cluster_name, cache_config_name, cache_config_dict):
136138
"""
137139
Coherence Cache Config objects contain two attributes related to the cache config file:
138140
CacheConfigurationFile and RuntimeCacheConfigurationUri. The RuntimeCacheConfigurationUri
@@ -144,7 +146,7 @@ def _workaround_offline_cache_config_issue(self, cluster_name, cache_config_name
144146
:param cache_config_dict: the cache_config dictionary object containing the discovered value
145147
:param cache_config_name: the name of this cache_config object.
146148
"""
147-
_method_name = '_workaround_offline_cache_config_issue'
149+
_method_name = '_workaround_cache_config_issue'
148150
_logger.entering(cluster_name, cache_config_name, cache_config_dict,
149151
class_name=_class_name, method_name=_method_name)
150152

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
"JNDIName": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "JNDIName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ],
2020
"ModuleType": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ModuleType", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ],
2121
"Notes": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ],
22-
"RuntimeCacheConfigurationUri": [ {"version": "[12.1.2,)", "wlst_mode": "offline", "wlst_name": "RuntimeCacheConfigurationUri", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "uses_path_tokens": "true" } ],
22+
"RuntimeCacheConfigurationUri": [
23+
{"version": "[12.1.2,14.1.2)", "wlst_mode": "offline", "wlst_name": "RuntimeCacheConfigurationUri", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "uses_path_tokens": "true" },
24+
{"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "RuntimeCacheConfigurationUri", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "uses_path_tokens": "true", "access": "${:RO}" }
25+
],
2326
"Target": [ {"version": "[12.1.2,)", "wlst_mode": "offline", "wlst_name": "Target", "wlst_path": "WP001", "default_value": null, "wlst_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans" },
2427
{"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP002", "default_value": null, "wlst_type": "jarray", "get_method": "GET", "preferred_model_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ]
2528
},

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
@@ -639,8 +639,9 @@
639639
"DebugFileDistributionServlet": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugFileDistributionServlet", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
640640
"DebugFileOwnerFixer": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "DebugFileOwnerFixer", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean", "get_method": "${LSA:GET}"} ],
641641
"DebugHarvesterTypeInfoCache": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "DebugHarvesterTypeInfoCache", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean", "get_method": "${LSA:GET}"} ],
642+
"DebugHealthScore": [ {"version": "[14.1.2,)", "wlst_mode": "online", "wlst_name": "DebugHealthScore", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
642643
"DebugHttp": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugHttp", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
643-
"DebugHttpConcise": [ {"version": "[12.2.1.1,)", "wlst_mode": "both", "wlst_name": "DebugHttpConcise", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
644+
"DebugHttpConcise": [ {"version": "[12.2.1.1,)", "wlst_mode": "both", "wlst_name": "DebugHttpConcise", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
644645
"DebugHttpLogging": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugHttpLogging", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
645646
"DebugHttpSessions": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugHttpSessions", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
646647
"DebugIIOP": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DebugIIOP", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,9 @@
650650
"DebugFileDistributionServlet": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugFileDistributionServlet", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
651651
"DebugFileOwnerFixer": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "DebugFileOwnerFixer", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean", "get_method": "${LSA:GET}"} ],
652652
"DebugHarvesterTypeInfoCache": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "DebugHarvesterTypeInfoCache", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean", "get_method": "${LSA:GET}"} ],
653+
"DebugHealthScore": [ {"version": "[14.1.2,)", "wlst_mode": "online", "wlst_name": "DebugHealthScore", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
653654
"DebugHttp": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugHttp", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
654-
"DebugHttpConcise": [ {"version": "[12.2.1.1,)", "wlst_mode": "both", "wlst_name": "DebugHttpConcise", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
655+
"DebugHttpConcise": [ {"version": "[12.2.1.1,)", "wlst_mode": "both", "wlst_name": "DebugHttpConcise", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
655656
"DebugHttpLogging": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugHttpLogging", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
656657
"DebugHttpSessions": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugHttpSessions", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],
657658
"DebugIIOP": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "DebugIIOP", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean"} ],

0 commit comments

Comments
 (0)