Skip to content

Commit a5d1844

Browse files
committed
Merge branch 'optional-feature-deployment' into 'main'
adding support for the OptionalFeatureDeployment top-level folder See merge request weblogic-cloud/weblogic-deploy-tooling!1664
2 parents cecb01b + d1adbe1 commit a5d1844

File tree

5 files changed

+62
-2
lines changed

5 files changed

+62
-2
lines changed

core/src/main/python/wlsdeploy/aliases/alias_entries.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ class AliasEntries(object):
143143
'MessagingBridge',
144144
ODL_CONFIGURATION,
145145
OHS,
146+
'OptionalFeatureDeployment',
146147
'Partition',
147148
'PartitionWorkManager',
148149
'PathService',

core/src/main/python/wlsdeploy/aliases/model_constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@
207207
# deprecated field name in 4.0
208208
OPSS_SECRETS = 'OPSSSecrets'
209209
OPSS_WALLET_PASSPHRASE = 'OPSSWalletPassphrase'
210+
OPTIONAL_FEATURE = 'OptionalFeature'
211+
OPTIONAL_FEATURE_DEPLOYMENT = 'OptionalFeatureDeployment'
210212
ORACLE_DATABASE_CONNECTION_TYPE = 'oracle_database_connection_type'
211213
ORACLE_OID_AUTHENTICATOR = 'OracleInternetDirectoryAuthenticator'
212214
ORACLE_OUD_AUTHENTICATOR = 'OracleUnifiedDirectoryAuthenticator'

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

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def discover(self):
5757
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, jolt_pools)
5858
model_top_folder_name, wtc_servers = self.get_wtc_servers()
5959
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, wtc_servers)
60+
model_top_folder_name, optional_feature_deployment = self.get_optional_feature_deployment()
61+
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, optional_feature_deployment)
6062

6163
_logger.exiting(class_name=_class_name, method_name=_method_name)
6264
return self._dictionary
@@ -147,15 +149,15 @@ def get_webapp_container(self):
147149
Discover the WebAppContainer global resource settings
148150
:return: model name for the folder: dictionary containing the discovered WebAppContainer
149151
"""
150-
_method_name = '_get_webapp_container'
152+
_method_name = 'get_webapp_container'
151153
_logger.entering(class_name=_class_name, method_name=_method_name)
152154
model_top_folder_name = model_constants.WEBAPP_CONTAINER
153155
result = OrderedDict()
154156
location = LocationContext(self._base_location)
155157
location.append_location(model_top_folder_name)
156158
webapp_container = self._find_singleton_name_in_folder(location)
157159
if webapp_container is not None:
158-
_logger.info('WLSDPLY-06615', class_name=_class_name, method_name=_method_name)
160+
_logger.info('WLSDPLY-06676', class_name=_class_name, method_name=_method_name)
159161
location.add_name_token(self._aliases.get_name_token(location), webapp_container)
160162
self._populate_model_parameters(result, location)
161163
self._discover_subfolders(result, location)
@@ -287,3 +289,24 @@ def get_wtc_servers(self):
287289

288290
_logger.exiting(class_name=_class_name, method_name=_method_name, result=result)
289291
return model_top_folder_name, result
292+
293+
def get_optional_feature_deployment(self):
294+
"""
295+
Discover the OptionalFeatureDeployment global resource settings
296+
:return: model name for the folder: dictionary containing the discovered OptionalFeatureDeployment
297+
"""
298+
_method_name = 'get_optional_feature_deployment'
299+
_logger.entering(class_name=_class_name, method_name=_method_name)
300+
model_top_folder_name = model_constants.OPTIONAL_FEATURE_DEPLOYMENT
301+
result = OrderedDict()
302+
location = LocationContext(self._base_location)
303+
location.append_location(model_top_folder_name)
304+
optional_feature_deployment = self._find_singleton_name_in_folder(location)
305+
if optional_feature_deployment is not None:
306+
_logger.info('WLSDPLY-06677', class_name=_class_name, method_name=_method_name)
307+
location.add_name_token(self._aliases.get_name_token(location), optional_feature_deployment)
308+
self._populate_model_parameters(result, location)
309+
self._discover_subfolders(result, location)
310+
311+
_logger.exiting(class_name=_class_name, method_name=_method_name, result=model_top_folder_name)
312+
return model_top_folder_name, result
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"copyright": "Copyright (c) 2024, Oracle Corporation and/or its affiliates.",
3+
"license": "Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl",
4+
"wlst_type": "OptionalFeatureDeployment",
5+
"online_bean": "weblogic.management.configuration.OptionalFeatureDeploymentMBean",
6+
"version": "[12.2.1,)",
7+
"default_name_value": "${NO_NAME_0:%DOMAIN%}",
8+
"folders": {
9+
"OptionalFeature": {
10+
"wlst_type": "OptionalFeature${:s}",
11+
"online_bean": "weblogic.management.configuration.OptionalFeatureMBean",
12+
"child_folders_type": "multiple",
13+
"folders": {},
14+
"attributes": {
15+
"Enabled": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Enabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
16+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ]
17+
},
18+
"wlst_attributes_path": "WP001",
19+
"wlst_paths": {
20+
"WP001": "/OptionalFeatureDeployment/%OPTIONALFEATUREDEPLOYMENT%/OptionalFeature${:s}/%OPTIONALFEATURE%"
21+
}
22+
}
23+
},
24+
"attributes": {
25+
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ]
26+
},
27+
"wlst_attributes_path": "WP001",
28+
"wlst_paths": {
29+
"WP001": "/OptionalFeatureDeployment/%OPTIONALFEATUREDEPLOYMENT%"
30+
}
31+
}

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,9 @@ WLSDPLY-06673=Skipping {0} Callout {1}
10921092
WLSDPLY-06674=Unable to locate and add CreateTableDDLFile {0} for {1} {2} to the archive file: {3}. The \
10931093
CreateTableDDLFile attribute for {1} {2} has also been removed from the model.
10941094
WLSDPLY-06675=Failed to add CreateTableDDLFile {0} for {1} {2} to the archive file: {3}
1095+
WLSDPLY-06676=Discovering WebAppContainer
1096+
WLSDPLY-06677=Discovering OptionalFeatureDeployment
1097+
10951098

10961099

10971100
# multi_tenant_discoverer.py, multi_tenant_resources_dsi

0 commit comments

Comments
 (0)