Skip to content

Commit 3c790a1

Browse files
changes for comments about passing alias definition
1 parent b817c94 commit 3c790a1

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(self, model_context, base_location, wlst_mode, aliases=None):
5252
self._weblogic_helper = WebLogicHelper(_logger)
5353
self._wls_version = self._weblogic_helper.get_actual_weblogic_version()
5454
self._wlst_helper = WlstHelper(_logger, ExceptionType.DISCOVER)
55-
self._mbean_utils = MBeanUtils(self._model_context, ExceptionType.DISCOVER)
55+
self._mbean_utils = MBeanUtils(self._model_context, self._alias_helper, ExceptionType.DISCOVER)
5656

5757
# methods for use only by the subclasses
5858

@@ -165,7 +165,7 @@ def _is_defined_attribute(self, location, wlst_name):
165165
try:
166166
if self._alias_helper.get_model_attribute_name(location, wlst_name, check_read_only=False):
167167
attribute = True
168-
except DiscoverException, de:
168+
except DiscoverException:
169169
pass
170170
return attribute
171171

core/src/main/python/wlsdeploy/tool/util/mbean_utils.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ class MBeanUtils(object):
2828
to combine the information from the MBean helpers into different combinations are located in this class.
2929
"""
3030

31-
def __init__(self, model_context, exception_type):
31+
def __init__(self, model_context, alias_helper, exception_type):
3232
self.__model_context = model_context
3333
self.__exception_type = exception_type
34-
self.__aliases = Aliases(self.__model_context, wlst_mode=self.__model_context.get_target_wlst_mode())
35-
self.__alias_helper = AliasHelper(self.__aliases, _logger, exception_type)
34+
self.__alias_helper = alias_helper
3635
self.__wlst_helper = WlstHelper(_logger, exception_type)
3736
self.__helper = self.__get_helper()
38-
self.__ignore_list = self.__alias_helper.get_ignore_attribute_names()
39-
_logger.finer('WLSDPLY-01779', self.__ignore_list, class_name=self.__class__.__name__, method_name='__init__')
37+
self.__ignore_list = None
38+
4039

4140
def get_attributes_not_in_lsa_map(self, location, lsa_map=None):
4241
"""
@@ -117,8 +116,16 @@ def __is_clear_text_encrypted(self, attribute_name, attribute_helper):
117116
return attribute_helper.is_encrypted(attribute_name + 'Encrypted')
118117
return False
119118

119+
def __get_ignore_attributes(self):
120+
_method_name = '__get_ignore_attributes'
121+
if self.__ignore_list is None:
122+
self.__ignore_list = self.__alias_helper.get_ignore_attribute_names()
123+
_logger.finer('WLSDPLY-01779', self.__ignore_list,
124+
class_name=self.__class__.__name__, method_name=_method_name)
125+
return self.__ignore_list
126+
120127
def __in_ignore(self, attribute_name):
121-
return attribute_name in self.__ignore_list
128+
return attribute_name in self.__get_ignore_attributes()
122129

123130
def __get_helper(self):
124131
if self.__model_context.get_target_wlst_mode() == WlstModes.OFFLINE:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"MinDynamicClusterSize": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MinDynamicClusterSize", "wlst_path": "WP001", "value": {"default": 1 }, "wlst_type": "integer" } ],
2727
"Notes": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
2828
"ServerNamePrefix": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ServerNamePrefix", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
29-
"ServerTemplate": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ServerTemplate", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "set_method": "MBEAN.set_server_template_mbean", "set_mbean_type": "weblogic.management.configuration.ServerTemplateMBean" } ],
29+
"ServerTemplate": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ServerTemplate", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "${LSA:GET}", "set_method": "MBEAN.set_server_template_mbean", "set_mbean_type": "weblogic.management.configuration.ServerTemplateMBean" } ],
3030
"WaitForAllSessionsDuringShutdown": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "WaitForAllSessionsDuringShutdown", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ]
3131
},
3232
"wlst_attributes_path": "WP001",
@@ -170,8 +170,8 @@
170170
"ClusterType": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClusterType", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "restart_required": "true" } ],
171171
"CoherenceClusterSystemResource": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "CoherenceClusterSystemResource", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "set_method": "${:MBEAN.set_coherence_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.CoherenceClusterSystemResourceMBean}", "restart_required": "true" } ],
172172
"ConcurrentSingletonActivationEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ConcurrentSingletonActivationEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean", "restart_required": "true" } ],
173-
"ConsensusParticipants": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ConsensusParticipants", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "integer" } ],
174-
"DataSourceForAutomaticMigration": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DataSourceForAutomaticMigration", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "set_method": "${:MBEAN.set_data_source_mbean}", "set_mbean_type": "${:weblogic.management.configuration.JDBCSystemResourceMBean}", "restart_required": "true" } ],
173+
"ConsensusParticipants": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ConsensusParticipants", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "integer", "get_method": "GET" } ],
174+
"DataSourceForAutomaticMigration": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DataSourceForAutomaticMigration", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "${LSA:GET}", "set_method": "${:MBEAN.set_data_source_mbean}", "set_mbean_type": "${:weblogic.management.configuration.JDBCSystemResourceMBean}", "restart_required": "true" } ],
175175
"DataSourceForJobScheduler": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DataSourceForJobScheduler", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "set_method": "${:MBEAN.set_data_source_mbean}", "set_mbean_type": "${:weblogic.management.configuration.JDBCSystemResourceMBean}" } ],
176176
"DataSourceForSessionPersistence": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DataSourceForSessionPersistence", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "set_method": "${:MBEAN.set_data_source_mbean}", "set_mbean_type": "${:weblogic.management.configuration.JDBCSystemResourceMBean}", "restart_required": "true" } ],
177177
"DatabaseLeasingBasisConnectionRetryCount": [ {"version": "[12.1.3,12.2.1)", "wlst_mode": "offline", "wlst_name": "DatabaseLeasingBasisConnectionRetryCount", "wlst_path": "WP001", "value": {"default": 1 }, "wlst_type": "integer", "get_method": "GET", "restart_required": "true" } ,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"attributes": {
199199
"AdditionalMigrationAttempts": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "AdditionalMigrationAttempts", "wlst_path": "WP001", "value": {"default": 2 }, "wlst_type": "integer" } ],
200200
"AllCandidateServers": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "AllCandidateServers", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "jarray", "access": "RO", "preferred_model_type": "list", "get_method": "GET", "set_method": "MBEAN.set_server_mbeans", "set_mbean_type": "weblogic.management.configuration.ServerMBean"} ],
201-
"Cluster": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Cluster", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "MBEAN.set_cluster_mbean", "set_mbean_type": "weblogic.management.configuration.ClusterMBean"} ],
201+
"Cluster": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Cluster", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "${LSA:GET}", "set_method": "MBEAN.set_cluster_mbean", "set_mbean_type": "weblogic.management.configuration.ClusterMBean"} ],
202202
"ConstrainedCandidateServer": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "ConstrainedCandidateServer", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "delimited_string", "preferred_model_type": "delimited_string", "get_method": "LSA" } ,
203203
{"version": "[10,)", "wlst_mode": "online", "wlst_name": "ConstrainedCandidateServers", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "jarray", "preferred_model_type": "list", "get_method": "GET", "set_method": "MBEAN.set_server_mbeans", "set_mbean_type": "weblogic.management.configuration.ServerMBean"} ],
204204
"Critical": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Critical", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
@@ -1356,7 +1356,7 @@
13561356
"ClasspathServletDisabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
13571357
"ClasspathServletSecureModeEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClasspathServletSecureModeEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
13581358
"ClientCertProxyEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClientCertProxyEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
1359-
"Cluster": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Cluster", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "${MBEAN.set_server_cluster_mbean:MBEAN.set_cluster_mbean}", "set_mbean_type": "weblogic.management.configuration.ClusterMBean" } ],
1359+
"Cluster": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Cluster", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "${LSA:GET}", "set_method": "${MBEAN.set_server_cluster_mbean:MBEAN.set_cluster_mbean}", "set_mbean_type": "weblogic.management.configuration.ClusterMBean" } ],
13601360
"ClusterWeight": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClusterWeight", "wlst_path": "WP001", "value": {"default": 100 }, "wlst_type": "integer" } ],
13611361
"CoherenceClusterSystemResource": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "CoherenceClusterSystemResource", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "${:MBEAN.set_coherence_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.CoherenceClusterSystemResourceMBean}" } ],
13621362
"CompleteCOMMessageTimeout": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "CompleteCOMMessageTimeout", "wlst_path": "WP001", "value": {"default": -1 }, "wlst_type": "integer" } ],

0 commit comments

Comments
 (0)