From 95e314775dccc1d436d1673bfecb477b1bc2a472 Mon Sep 17 00:00:00 2001 From: richard_killen Date: Tue, 24 Sep 2024 22:05:52 +0000 Subject: [PATCH] Alias updates for current and future WLS versions --- .../CoherenceClusterSystemResource.json | 5 +++-- .../deploy/aliases/category_modules/Server.json | 10 ++++++++-- .../aliases/category_modules/ServerTemplate.json | 10 ++++++++-- .../test/python/aliastest/generate/generator_base.py | 12 ++++++++---- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/CoherenceClusterSystemResource.json b/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/CoherenceClusterSystemResource.json index f68bf084a..2360f7fd4 100644 --- a/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/CoherenceClusterSystemResource.json +++ b/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/CoherenceClusterSystemResource.json @@ -327,8 +327,9 @@ "ReportGroupFile": [ {"version": "[12.1.3,12.2.1)", "wlst_mode": "both", "wlst_name": "ReportGroupFile", "wlst_path": "WP001", "default_value": "em/coherence/report-group.xml", "wlst_type": "string", "uses_path_tokens": "true" }, {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "ReportGroupFile", "wlst_path": "WP001", "default_value": "em/metadata/reports/coherence/report-group.xml", "wlst_type": "string", "uses_path_tokens": "true" }], "SourcePath": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "SourcePath", "wlst_path": "WP001", "default_value": null, "derived_default": "${:true}", "wlst_type": "string", "uses_path_tokens": "true" } ], - "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" }, - {"version": "[12.1.2,)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP002", "default_value": null, "wlst_type": "jarray", "preferred_model_type": "delimited_string", "get_method": "GET", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ], + "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" }, + {"version": "[12.1.2,12.2.1.1)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP002", "default_value": null, "wlst_type": "jarray", "preferred_model_type": "delimited_string", "get_method": "GET", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean", "derived_default": true}, + {"version": "[12.2.1.1,)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP002", "default_value": null, "wlst_type": "jarray", "preferred_model_type": "delimited_string", "get_method": "GET", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ], "UsingCustomClusterConfigurationFile": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "UsingCustomClusterConfigurationFile", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ] }, "wlst_attributes_path": "WP001", diff --git a/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/Server.json b/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/Server.json index 8e17766f6..34796d83b 100644 --- a/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/Server.json +++ b/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/Server.json @@ -1718,7 +1718,10 @@ {"version": "[10,14.1.2)", "wlst_mode": "both", "wlst_name": "AdministrationPortEnabled", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean", "get_method": "${LSA:GET}", "derived_default": "${:true}" }, {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "AdministrationPortEnabled", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean", "get_method": "${LSA:GET}", "derived_default": true } ], - "AdministrationProtocol": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "AdministrationProtocol", "wlst_path": "WP001", "default_value": "${__NULL__:t3s}", "derived_default": "${:true}", "wlst_type": "string", "restart_required": "true" } ], + "AdministrationProtocol": [ + {"version": "[10,14.1.2)", "wlst_mode": "both", "wlst_name": "AdministrationProtocol", "wlst_path": "WP001", "default_value": "${__NULL__:t3s}", "derived_default": "${:true}", "wlst_type": "string", "restart_required": "true" }, + {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "AdministrationProtocol", "wlst_path": "WP001", "default_value": "t3s", "derived_default": true, "wlst_type": "string", "restart_required": "true" } + ], "AllowShrinkingPriorityRequestQueue": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "AllowShrinkingPriorityRequestQueue", "wlst_path": "WP001", "default_value": "true", "wlst_type": "boolean", "restart_required": "true" } ], "AutoJDBCConnectionClose": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "AutoJDBCConnectionClose", "wlst_path": "WP001", "default_value": "false", "wlst_type": "string" } ], "AutoKillIfFailed": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "AutoKillIfFailed", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ], @@ -1729,7 +1732,10 @@ "BuzzPort": [ {"version": "[12.2.1,14.1.2)", "wlst_mode": "both", "wlst_name": "BuzzPort", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer", "restart_required": "true" } ], "COMEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "COMEnabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ], "CandidateMachine": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "CandidateMachine${:s}", "wlst_path": "WP001", "default_value": "${__NULL__:[]}", "wlst_type": "${delimited_string:jarray}", "get_method": "${LSA:GET}", "preferred_model_type": "delimited_string", "set_method": "MBEAN.set_machine_mbean", "set_mbean_type": "weblogic.management.configuration.MachineMBean" } ], - "ClasspathServletDisabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ], + "ClasspathServletDisabled": [ + {"version": "[10,12.2.1.3)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean", "secure_default": "${:true}" }, + {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } + ], "ClasspathServletSecureModeEnabled": [ {"version": "[12.2.1.3,12.2.1.3.0.221013)", "wlst_mode": "offline", "wlst_name": "ClasspathServletSecureModeEnabled", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean" }, {"version": "[12.2.1.3.0.221013,12.2.1.4)", "wlst_mode": "offline", "wlst_name": "ClasspathServletSecureModeEnabled", "wlst_path": "WP001", "default_value": "true", "wlst_type": "boolean" }, diff --git a/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/ServerTemplate.json b/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/ServerTemplate.json index c0f7d9ff4..249902a65 100644 --- a/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/ServerTemplate.json +++ b/core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/ServerTemplate.json @@ -1738,7 +1738,10 @@ {"version": "[12.1.2,14.1.2)", "wlst_mode": "both", "wlst_name": "AdministrationPortEnabled", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean", "get_method": "${LSA:GET}", "derived_default": "${:true}" }, {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "AdministrationPortEnabled", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean", "get_method": "${LSA:GET}", "derived_default": true } ], - "AdministrationProtocol": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "AdministrationProtocol", "wlst_path": "WP001", "default_value": "${__NULL__:t3s}", "derived_default": "${:true}", "wlst_type": "string", "restart_required": "true" } ], + "AdministrationProtocol": [ + {"version": "[12.1.2,14.1.2)", "wlst_mode": "both", "wlst_name": "AdministrationProtocol", "wlst_path": "WP001", "default_value": "${__NULL__:t3s}", "derived_default": "${:true}", "wlst_type": "string", "restart_required": "true" }, + {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "AdministrationProtocol", "wlst_path": "WP001", "default_value": "t3s", "derived_default": true, "wlst_type": "string", "restart_required": "true" } + ], "AllowShrinkingPriorityRequestQueue": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "AllowShrinkingPriorityRequestQueue", "wlst_path": "WP001", "default_value": "true", "wlst_type": "boolean", "restart_required": "true" } ], "AutoJDBCConnectionClose": [ {"version": "[12.1.2,)", "wlst_mode": "offline", "wlst_name": "AutoJDBCConnectionClose", "wlst_path": "WP001", "default_value": "false", "wlst_type": "string" } ], "AutoKillIfFailed": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "AutoKillIfFailed", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ], @@ -1749,7 +1752,10 @@ "BuzzPort": [ {"version": "[12.2.1,14.1.2)", "wlst_mode": "both", "wlst_name": "BuzzPort", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer", "restart_required": "true" } ], "COMEnabled": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "COMEnabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ], "CandidateMachine": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "CandidateMachine${:s}", "wlst_path": "WP001", "default_value": "${__NULL__:[]}", "wlst_type": "${delimited_string:jarray}", "get_method": "${LSA:GET}", "preferred_model_type": "delimited_string", "set_method": "MBEAN.set_machine_mbean", "set_mbean_type": "weblogic.management.configuration.MachineMBean"} ], - "ClasspathServletDisabled": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } ], + "ClasspathServletDisabled": [ + {"version": "[12.1.2,12.2.1.3)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean", "secure_default": "${:true}" }, + {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "default_value": "false", "wlst_type": "boolean" } + ], "ClasspathServletSecureModeEnabled": [ {"version": "[12.2.1.3,12.2.1.3.0.221013)", "wlst_mode": "offline", "wlst_name": "ClasspathServletSecureModeEnabled", "wlst_path": "WP001", "default_value": "false", "secure_default": "${__NULL__:true}", "wlst_type": "boolean" }, {"version": "[12.2.1.3.0.221013,12.2.1.4)", "wlst_mode": "offline", "wlst_name": "ClasspathServletSecureModeEnabled", "wlst_path": "WP001", "default_value": "true", "wlst_type": "boolean" }, diff --git a/integration-tests/alias-test/generate/src/test/python/aliastest/generate/generator_base.py b/integration-tests/alias-test/generate/src/test/python/aliastest/generate/generator_base.py index 8329d46f6..82079438d 100644 --- a/integration-tests/alias-test/generate/src/test/python/aliastest/generate/generator_base.py +++ b/integration-tests/alias-test/generate/src/test/python/aliastest/generate/generator_base.py @@ -55,6 +55,9 @@ '12.1.2.0.0', '12.1.3.0.0' ] +SECURE_DEFAULT_DISMISS = [ + '12.2.1.0.0' # possible problems with @secureValueDocOnly +] LSA_DEFAULT = 'lsa_default' LSA_TYPE = 'lsa_wlst_type' READ_ONLY = generator_utils.READ_ONLY @@ -107,10 +110,11 @@ def add_computed_defaults(self, dictionary, cmo_helper, attribute_name): dictionary[PRODUCTION_DEFAULT] = self.convert_attribute(attribute_name, production_default_value, value_type=dictionary[GET_TYPE]) - secure_default_value = cmo_helper.secure_default_value() - if secure_default_value is not None: - dictionary[SECURE_DEFAULT] = self.convert_attribute(attribute_name, secure_default_value, - value_type=dictionary[GET_TYPE]) + if self._model_context.get_local_wls_version() not in SECURE_DEFAULT_DISMISS: + secure_default_value = cmo_helper.secure_default_value() + if secure_default_value is not None: + dictionary[SECURE_DEFAULT] = self.convert_attribute(attribute_name, secure_default_value, + value_type=dictionary[GET_TYPE]) self.__logger.exiting(class_name=self.__class_name, method_name=_method_name, result={ DERIVED_DEFAULT: derived_default_value,