Skip to content

Commit b677424

Browse files
Merge pull request #325 from oracle/issue-298-admin-console-alias
Issue #298 - Add admin console alias for discover, create, update
2 parents 83a65fd + ad18ec0 commit b677424

File tree

6 files changed

+47
-1
lines changed

6 files changed

+47
-1
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
@@ -72,6 +72,7 @@ class AliasEntries(object):
7272
__domain_category = 'Domain'
7373

7474
__model_categories_map = {
75+
'AdminConsole': 'AdminConsole',
7576
'Application': 'AppDeployment',
7677
'Cluster': 'Cluster',
7778
'CoherenceClusterSystemResource': 'CoherenceClusterSystemResource',
@@ -121,6 +122,7 @@ class AliasEntries(object):
121122
}
122123

123124
__topology_top_level_folders = [
125+
'AdminConsole',
124126
'Cluster',
125127
'JMX',
126128
'JTA',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
ACTIVE_DIRECTORY_AUTHENTICATOR = 'ActiveDirectoryAuthenticator'
1313
ADJUDICATOR = 'Adjudicator'
14+
ADMIN_CONSOLE = 'AdminConsole'
1415
ADMIN_PASSWORD = 'AdminPassword'
1516
ADMIN_SERVER_NAME = 'AdminServerName'
1617
ADMIN_USERNAME = 'AdminUserName'

core/src/main/python/wlsdeploy/tool/deploy/topology_updater.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
The Universal Permissive License (UPL), Version 1.0
44
"""
55
from wlsdeploy.aliases.location_context import LocationContext
6+
from wlsdeploy.aliases.model_constants import ADMIN_CONSOLE
67
from wlsdeploy.aliases.model_constants import CLUSTER
78
from wlsdeploy.aliases.model_constants import DOMAIN_NAME
89
from wlsdeploy.aliases.model_constants import MACHINE
@@ -87,6 +88,7 @@ def update(self):
8788
# set the domain attributes
8889
self._set_domain_attributes()
8990

91+
self._process_section(self._topology, folder_list, ADMIN_CONSOLE, location)
9092
self._process_section(self._topology, folder_list, MACHINE, location)
9193
self._process_section(self._topology, folder_list, UNIX_MACHINE, location)
9294

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ def discover_domain_parameters(self):
256256
location = LocationContext(self._base_location)
257257
self._populate_model_parameters(self._dictionary, location)
258258

259+
model_folder_name, folder_result = self._get_admin_console()
260+
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
259261
model_folder_name, folder_result = self._get_jta()
260262
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
261263
model_folder_name, folder_result = self._get_jmx()
@@ -304,6 +306,25 @@ def discover_security_configuration(self):
304306

305307
# Private methods
306308

309+
def _get_admin_console(self):
310+
"""
311+
Discover the domain level admin console configuration attributes.
312+
:return: model name for JTA:dictionary containing the discovered JTA attributes
313+
"""
314+
_method_name = '_get_admin_console'
315+
_logger.entering(class_name=_class_name, method_name=_method_name)
316+
model_top_folder_name = model_constants.ADMIN_CONSOLE
317+
result = OrderedDict()
318+
location = LocationContext(self._base_location)
319+
location.append_location(model_top_folder_name)
320+
name = self._find_singleton_name_in_folder(location)
321+
if name is not None:
322+
_logger.info('WLSDPLY-06613', class_name=_class_name, method_name=_method_name)
323+
location.add_name_token(self._alias_helper.get_name_token(location), name)
324+
self._populate_model_parameters(result, location)
325+
_logger.exiting(class_name=_class_name, method_name=_method_name)
326+
return model_top_folder_name, result
327+
307328
def _get_jta(self):
308329
"""
309330
Discover the domain level JTA configuration attributes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"copyright": "Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.",
3+
"license": "The Universal Permissive License (UPL), Version 1.0",
4+
"wlst_type": "AdminConsole",
5+
"child_folders_type": "single_unpredictable",
6+
"default_name_value": "${NO_NAME_0:%DOMAIN%}",
7+
"folders": {},
8+
"attributes": {
9+
"CookieName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "CookieName", "wlst_path": "WP001", "value": {"default": "ADMINCONSOLESESSION" }, "wlst_type": "string" } ],
10+
"MinThreads": [ {"version": "[12.2.1.1,)", "wlst_mode": "both", "wlst_name": "MinThreads", "wlst_path": "WP001", "value": {"default": 101 }, "wlst_type": "integer" } ],
11+
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
12+
"ProtectedCookieEnabled": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "ProtectedCookieEnabled", "wlst_path": "WP001", "value": {"default": true }, "wlst_type": "boolean" } ],
13+
"SsoLogoutUrl": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "${Sso:SSO}Logout${Url:URL}", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
14+
"SessionTimeout": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SessionTimeout", "wlst_path": "WP001", "value": {"default": 3600 }, "wlst_type": "integer" } ]
15+
},
16+
"wlst_attributes_path": "WP001",
17+
"wlst_paths": {
18+
"WP001": "/AdminConsole/%ADMINCONSOLE%"
19+
}
20+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ WLSDPLY-06609=Discovering {0} Unix machines
607607
WLSDPLY-06610=Adding Unix Machine {0}
608608
WLSDPLY-06611=Discovering {0} machines
609609
WLSDPLY-06612=Adding Machine {0}
610-
610+
WLSDPLY-06613=Adding Domain AdminConsole
611611
WLSDPLY-06614=Adding Domain JTA
612612
WLSDPLY-06615=Adding Domain JMX
613613
WLSDPLY-06616=Adding Domain RestfulManagementServices

0 commit comments

Comments
 (0)