Skip to content

Commit d2eee97

Browse files
Issue#532 add support for tuxedo mbeans (#541)
* Add mbean classes * Add create support
1 parent 9d793a7 commit d2eee97

File tree

8 files changed

+355
-1
lines changed

8 files changed

+355
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
from wlsdeploy.aliases.model_constants import DOMAIN_INFO
5151
from wlsdeploy.aliases.model_constants import DOMAIN_INFO_ALIAS
5252
from wlsdeploy.aliases.model_constants import KUBERNETES_ALIAS
53+
from wlsdeploy.aliases.model_constants import JOLT_CONNECTION_POOL
5354
from wlsdeploy.aliases.model_constants import ODL_CONFIGURATION
5455
from wlsdeploy.aliases.model_constants import KUBERNETES
5556
from wlsdeploy.aliases.model_constants import RCU_DB_INFO
@@ -58,6 +59,7 @@
5859
from wlsdeploy.aliases.model_constants import SERVER_POD
5960
from wlsdeploy.aliases.model_constants import TOPOLOGY
6061
from wlsdeploy.aliases.model_constants import WLS_ROLES
62+
from wlsdeploy.aliases.model_constants import WTC_SERVER
6163
from wlsdeploy.aliases.validation_codes import ValidationCodes
6264
from wlsdeploy.aliases.wlst_modes import WlstModes
6365
from wlsdeploy.exception import exception_helper
@@ -116,6 +118,7 @@ class AliasEntries(object):
116118
'JMSBridgeDestination',
117119
'JMSServer',
118120
'JMSSystemResource',
121+
JOLT_CONNECTION_POOL,
119122
'MailSession',
120123
'MessagingBridge',
121124
ODL_CONFIGURATION,
@@ -131,7 +134,8 @@ class AliasEntries(object):
131134
'SingletonService',
132135
'StartupClass',
133136
'WebAppContainer',
134-
'WLDFSystemResource'
137+
'WLDFSystemResource',
138+
WTC_SERVER
135139
]
136140

137141
__app_deployments_top_level_folders = [

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
JTA = 'JTA'
150150
JTA_PARTITION = 'JtaPartition'
151151
JTA_MIGRATABLE_TARGET = 'JTAMigratableTarget'
152+
JOLT_CONNECTION_POOL = 'JoltConnectionPool'
152153
KEY = 'Key'
153154
KUBERNETES = 'kubernetes'
154155
KUBERNETES_ALIAS = 'Kubernetes'
@@ -288,6 +289,7 @@
288289
WLDF_SYSTEM_RESOURCE = "WLDFSystemResource"
289290
WLS_ROLES = "WLSRoles"
290291
WS_RELIABLE_DELIVERY_POLICY = 'WSReliableDeliveryPolicy'
292+
WTC_SERVER = 'WTCServer'
291293
XACML_AUTHORIZER = 'XACMLAuthorizer'
292294
XACML_ROLE_MAPPER = 'XACMLRoleMapper'
293295
XML_ENTITY_CACHE = 'XMLEntityCache'

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
from wlsdeploy.aliases.model_constants import JDBC_STORE
1010
from wlsdeploy.aliases.model_constants import JMS_BRIDGE_DESTINATION
1111
from wlsdeploy.aliases.model_constants import JMS_SERVER
12+
from wlsdeploy.aliases.model_constants import JOLT_CONNECTION_POOL
1213
from wlsdeploy.aliases.model_constants import MAIL_SESSION
1314
from wlsdeploy.aliases.model_constants import MESSAGING_BRIDGE
1415
from wlsdeploy.aliases.model_constants import PATH_SERVICE
1516
from wlsdeploy.aliases.model_constants import SAF_AGENT
1617
from wlsdeploy.aliases.model_constants import SELF_TUNING
1718
from wlsdeploy.aliases.model_constants import WORK_MANAGER
1819
from wlsdeploy.aliases.model_constants import WEBAPP_CONTAINER
20+
from wlsdeploy.aliases.model_constants import WTC_SERVER
1921
from wlsdeploy.aliases.model_constants import SINGLETON_SERVICE
2022
from wlsdeploy.aliases.model_constants import MIME_MAPPING_FILE
2123
from wlsdeploy.aliases.wlst_modes import WlstModes
@@ -119,6 +121,16 @@ def add_jms_servers(self, parent_dict, location):
119121
self._add_named_elements(JMS_SERVER, servers, location)
120122
return
121123

124+
def add_jolt_connection_pools(self, parent_dict, location):
125+
"""
126+
Add each named Jolt connection pool from the specified nodes in WLST and set its attributes.
127+
:param parent_dict: the Jolt connection pool nodes from the model
128+
:param location: the location where elements should be added
129+
"""
130+
servers = dictionary_utils.get_dictionary_element(parent_dict, JOLT_CONNECTION_POOL)
131+
self._add_named_elements(JOLT_CONNECTION_POOL, servers, location)
132+
return
133+
122134
def add_mail_sessions(self, parent_dict, location):
123135
"""
124136
Deploy the mail session elements in the dictionary at the specified location.
@@ -186,6 +198,15 @@ def add_webapp_container(self, parent_dict, location):
186198

187199
return
188200

201+
def add_wtc_servers(self, parent_dict, location):
202+
"""
203+
Deploy the WTC server elements in the dictionary at the specified location.
204+
:param parent_dict: the dictionary possibly containing WTC server elements
205+
:param location: the location to deploy the elements
206+
"""
207+
wtc_servers = dictionary_utils.get_dictionary_element(parent_dict, WTC_SERVER)
208+
self._add_named_elements(WTC_SERVER, wtc_servers, location)
209+
189210
def add_singleton_service(self, parent_dict, location):
190211
"""
191212
Deploy the singleton service in the dictionary at the specified location.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def _add_resources(self, location):
7171
common_deployer.add_jms_servers(self._resources, location)
7272
common_deployer.add_saf_agents(self._resources, location)
7373
common_deployer.add_path_services(self._resources, location)
74+
common_deployer.add_jolt_connection_pools(self._resources, location)
75+
common_deployer.add_wtc_servers(self._resources, location)
7476

7577
jms_deployer = JmsResourcesDeployer(self.model, self.model_context, self.aliases, wlst_mode=self.wlst_mode)
7678
jms_deployer.add_jms_system_resources(self._resources, location)

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

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def discover(self):
5252
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, web_app_container)
5353
model_top_folder_name, singleton_services = self.get_singleton_service()
5454
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, singleton_services)
55+
model_top_folder_name, jolt_pools = self.get_jolt_connection_pool()
56+
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, jolt_pools)
57+
model_top_folder_name, wtc_servers = self.get_wtc_servers()
58+
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, wtc_servers)
5559

5660
_logger.exiting(class_name=_class_name, method_name=_method_name)
5761
return self._dictionary
@@ -203,3 +207,54 @@ def get_singleton_service(self):
203207

204208
_logger.exiting(class_name=_class_name, method_name=_method_name, result=model_top_folder_name)
205209
return model_top_folder_name, result
210+
211+
def get_jolt_connection_pool(self):
212+
"""
213+
Discover the global resource Jolt Connection Pool
214+
:return: model name for the folder: dictionary containing the discovered JoltConnectionPool
215+
"""
216+
_method_name = 'get_jolt_connection_pool'
217+
_logger.entering(class_name=_class_name, method_name=_method_name)
218+
model_top_folder_name = model_constants.JOLT_CONNECTION_POOL
219+
result = OrderedDict()
220+
location = LocationContext(self._base_location)
221+
location.append_location(model_top_folder_name)
222+
jolt_pools = self._find_names_in_folder(location)
223+
if jolt_pools is not None:
224+
_logger.info('WLSDPLY-06449', len(jolt_pools), class_name=_class_name, method_name=_method_name)
225+
name_token = self._alias_helper.get_name_token(location)
226+
for jolt_pool in jolt_pools:
227+
_logger.info('WLSDPLY-06450', jolt_pool, class_name=_class_name, method_name=_method_name)
228+
result[jolt_pool] = OrderedDict()
229+
location.add_name_token(name_token, jolt_pool)
230+
self._populate_model_parameters(result[jolt_pool], location)
231+
location.remove_name_token(name_token)
232+
233+
_logger.exiting(class_name=_class_name, method_name=_method_name, result=model_top_folder_name)
234+
return model_top_folder_name, result
235+
236+
def get_wtc_servers(self):
237+
"""
238+
Discover the WTC servers from the domain.
239+
:return: model folder name: dictionary containing the discovered WTCServers
240+
"""
241+
_method_name = 'get_wtc_servers'
242+
_logger.entering(class_name=_class_name, method_name=_method_name)
243+
model_top_folder_name = model_constants.WTC_SERVER
244+
result = OrderedDict()
245+
location = LocationContext(self._base_location)
246+
location.append_location(model_top_folder_name)
247+
wtc_servers = self._find_names_in_folder(location)
248+
if wtc_servers is not None:
249+
_logger.info('WLSDPLY-06451', len(wtc_servers), class_name=_class_name, method_name=_method_name)
250+
name_token = self._alias_helper.get_name_token(location)
251+
for wtc_server in wtc_servers:
252+
_logger.info('WLSDPLY-06452', wtc_server, class_name=_class_name, method_name=_method_name)
253+
result[wtc_server] = OrderedDict()
254+
location.add_name_token(name_token, wtc_server)
255+
self._populate_model_parameters(result[wtc_server], location)
256+
self._discover_subfolders(result[wtc_server], location)
257+
location.remove_name_token(name_token)
258+
259+
_logger.exiting(class_name=_class_name, method_name=_method_name, result=result)
260+
return model_top_folder_name, result
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"copyright": "Copyright (c) 2020, 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": "JoltConnectionPool${:s}",
5+
"child_folders_type": "multiple",
6+
"short_name": "Jolt",
7+
"folders": {},
8+
"attributes": {
9+
"ApplicationPasswordEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ApplicationPasswordEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password" , "get_method": "GET"} ],
10+
"DeploymentOrder": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DeploymentOrder", "wlst_path": "WP001", "value": {"default": 1000 }, "wlst_type": "integer" } ],
11+
"FailoverAddress": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "FailoverAddress${:es}", "wlst_path": "WP001", "value": {"default": "[] " }, "wlst_type": "${delimited_string:jarray}", "get_method": "${LSA:GET}", "preferred_model_type": "delimited_string" } ],
12+
"KeyPassPhraseEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "KeyPassPhraseEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password", "get_method": "GET" } ],
13+
"KeyStoreName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "KeyStoreName", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
14+
"KeyStorePassPhraseEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "KeyStorePassPhraseEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password", "get_method": "GET" } ],
15+
"MaximumPoolSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MaximumPoolSize", "wlst_path": "WP001", "value": {"default": 1 }, "wlst_type": "integer" } ],
16+
"MinimumPoolSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MinimumPoolSize", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "integer" } ],
17+
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
18+
"PrimaryAddress": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "PrimaryAddress${:es}", "wlst_path": "WP001", "value": {"default": "[] " }, "wlst_type": "${delimited_string:jarray}", "get_method": "${LSA:GET}", "preferred_model_type": "delimited_string" } ],
19+
"RecvTimeout": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "RecvTimeout", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "integer" } ],
20+
"SecurityContextEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SecurityContextEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
21+
"Target": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Target${:s}", "wlst_path": "WP003", "value": {"default": "None" }, "wlst_type": "${delimited_string:jarray}", "preferred_model_type": "delimited_string", "get_method": "${LSA:GET}", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ],
22+
"TrustStoreName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "TrustStoreName", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
23+
"TrustStorePassPhraseEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "TrustStorePassPhraseEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password", "get_method": "GET" } ],
24+
"UserName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "UserName", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
25+
"UserPasswordEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "UserPasswordEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password", "get_method": "GET" } ],
26+
"UserRole": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "UserRole", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ]
27+
28+
},
29+
"wlst_attributes_path": "WP001",
30+
"wlst_paths": {
31+
"WP001": "/JoltConnectionPool${:s}/%JOLT%",
32+
"WP003": "/JoltConnectionPool${:s}/%JOLT%/Targets"
33+
}
34+
}

0 commit comments

Comments
 (0)