Skip to content

Commit 83711d2

Browse files
committed
add discover webapp container
1 parent fc14334 commit 83711d2

File tree

4 files changed

+39
-11
lines changed

4 files changed

+39
-11
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class AliasEntries(object):
112112
'UnixMachine': 'UnixMachine',
113113
'VirtualHost': 'VirtualHost',
114114
'VirtualTarget': 'VirtualTarget',
115+
'WebAppContainer': 'WebAppContainer',
115116
'WLDFSystemResource': 'WLDFSystemResource',
116117
'WSReliableDeliveryPolicy': 'WSReliableDeliveryPolicy',
117118
'XMLEntityCache': 'XMLEntityCache',
@@ -161,6 +162,7 @@ class AliasEntries(object):
161162
'SelfTuning',
162163
'ShutdownClass',
163164
'StartupClass',
165+
'WebAppContainer',
164166
'WLDFSystemResource'
165167
]
166168

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250
VIRTUAL_USER_AUTHENTICATOR = 'VirtualUserAuthenticator'
251251
WATCH = 'Watch'
252252
WATCH_NOTIFICATION = 'WatchNotification'
253+
WEBAPP_CONTAINER = 'WebAppContainer'
253254
WEB_SERVER = 'WebServer'
254255
WEB_SERVER_LOG = 'WebServerLog'
255256
WEB_SERVICE = 'WebService'

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def discover(self):
4545
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, startups)
4646
model_top_folder_name, shutdowns = self.get_shutdown_classes()
4747
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, shutdowns)
48+
model_top_folder_name, shutdowns = self.get_webapp_container()
49+
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, shutdowns)
4850

4951
_logger.exiting(class_name=_class_name, method_name=_method_name)
5052
return self._dictionary
@@ -127,3 +129,24 @@ def get_shutdown_classes(self):
127129

128130
_logger.exiting(class_name=_class_name, method_name=_method_name, result=result)
129131
return model_top_folder_name, result
132+
133+
def get_webapp_container(self):
134+
"""
135+
Discover the WebAppContainer global resource settings
136+
:return: model name for the folder: dictionary containing the discovered WebAppContainer
137+
"""
138+
_method_name = '_get_webapp_container'
139+
_logger.entering(class_name=_class_name, method_name=_method_name)
140+
model_top_folder_name = model_constants.WEBAPP_CONTAINER
141+
result = OrderedDict()
142+
location = LocationContext(self._base_location)
143+
location.append_location(model_top_folder_name)
144+
webapp_container = self._find_singleton_name_in_folder(location)
145+
if webapp_container is not None:
146+
_logger.info('WLSDPLY-06615', class_name=_class_name, method_name=_method_name)
147+
location.add_name_token(self._alias_helper.get_name_token(location), webapp_container)
148+
self._populate_model_parameters(result, location)
149+
150+
_logger.exiting(class_name=_class_name, method_name=_method_name, result=model_top_folder_name)
151+
return model_top_folder_name, result
152+

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22
"copyright": "Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.",
33
"license": "The Universal Permissive License (UPL), Version 1.0",
44
"wlst_type": "WebAppContainer",
5-
"child_folders_type": "multiple",
5+
"child_folders_type": "single_unpredictable",
6+
"default_name_value": "${NO_NAME_0:%DOMAIN%}",
67
"folders": {
78
"GzipCompression" : {
89
"wlst_type": "GzipCompression",
910
"version": "[12.2.1.3,)",
1011
"folders": {},
1112
"attributes": {
12-
"DynamicallyCreated": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "DynamicallyCreated", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "boolean" } ],
13-
"GzipCompressionContentType": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "GzipCompressionContentType", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
14-
"GzipCompressionEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "GzipCompressionEnabled", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "boolean" } ],
15-
"GzipCompressionMinContentLength": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "GzipCompressionMinContentLength", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "integer" } ],
16-
"Id": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Id", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "integer" } ],
17-
"Name": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Name", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
18-
"Notes": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
19-
"Type": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Type", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "boolean" } ],
20-
"Tags": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Tags", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ]
13+
"DynamicallyCreated": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "DynamicallyCreated", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "boolean" } ],
14+
"GzipCompressionContentType": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "GzipCompressionContentType", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "string" } ],
15+
"GzipCompressionEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "GzipCompressionEnabled", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "boolean" } ],
16+
"GzipCompressionMinContentLength": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "GzipCompressionMinContentLength", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "integer" } ],
17+
"Id": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Id", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "integer" } ],
18+
"Name": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Name", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "string" } ],
19+
"Notes": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "string" } ],
20+
"Type": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Type", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "boolean" } ],
21+
"Tags": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Tags", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "string" } ]
2122
}
2223

2324
}
@@ -59,6 +60,7 @@
5960
},
6061
"wlst_attributes_path": "WP001",
6162
"wlst_paths": {
62-
"WP001": "/WebAppContainer"
63+
"WP001": "/WebAppContainer/%WEBAPPCONTAINER%",
64+
"WP002": "/WebAppContainer/%WEBAPPCONTAINER%/GzipCompression/%WEBAPPCONTAINER%"
6365
}
6466
}

0 commit comments

Comments
 (0)