Skip to content

Issue#532 add support for tuxedo mbeans #541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion core/src/main/python/wlsdeploy/aliases/alias_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
from wlsdeploy.aliases.model_constants import DOMAIN_INFO
from wlsdeploy.aliases.model_constants import DOMAIN_INFO_ALIAS
from wlsdeploy.aliases.model_constants import KUBERNETES_ALIAS
from wlsdeploy.aliases.model_constants import JOLT_CONNECTION_POOL
from wlsdeploy.aliases.model_constants import ODL_CONFIGURATION
from wlsdeploy.aliases.model_constants import KUBERNETES
from wlsdeploy.aliases.model_constants import RCU_DB_INFO
Expand All @@ -58,6 +59,7 @@
from wlsdeploy.aliases.model_constants import SERVER_POD
from wlsdeploy.aliases.model_constants import TOPOLOGY
from wlsdeploy.aliases.model_constants import WLS_ROLES
from wlsdeploy.aliases.model_constants import WTC_SERVER
from wlsdeploy.aliases.validation_codes import ValidationCodes
from wlsdeploy.aliases.wlst_modes import WlstModes
from wlsdeploy.exception import exception_helper
Expand Down Expand Up @@ -116,6 +118,7 @@ class AliasEntries(object):
'JMSBridgeDestination',
'JMSServer',
'JMSSystemResource',
JOLT_CONNECTION_POOL,
'MailSession',
'MessagingBridge',
ODL_CONFIGURATION,
Expand All @@ -131,7 +134,8 @@ class AliasEntries(object):
'SingletonService',
'StartupClass',
'WebAppContainer',
'WLDFSystemResource'
'WLDFSystemResource',
WTC_SERVER
]

__app_deployments_top_level_folders = [
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/wlsdeploy/aliases/model_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
JTA = 'JTA'
JTA_PARTITION = 'JtaPartition'
JTA_MIGRATABLE_TARGET = 'JTAMigratableTarget'
JOLT_CONNECTION_POOL = 'JoltConnectionPool'
KEY = 'Key'
KUBERNETES = 'kubernetes'
KUBERNETES_ALIAS = 'Kubernetes'
Expand Down Expand Up @@ -288,6 +289,7 @@
WLDF_SYSTEM_RESOURCE = "WLDFSystemResource"
WLS_ROLES = "WLSRoles"
WS_RELIABLE_DELIVERY_POLICY = 'WSReliableDeliveryPolicy'
WTC_SERVER = 'WTCServer'
XACML_AUTHORIZER = 'XACMLAuthorizer'
XACML_ROLE_MAPPER = 'XACMLRoleMapper'
XML_ENTITY_CACHE = 'XMLEntityCache'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
from wlsdeploy.aliases.model_constants import JDBC_STORE
from wlsdeploy.aliases.model_constants import JMS_BRIDGE_DESTINATION
from wlsdeploy.aliases.model_constants import JMS_SERVER
from wlsdeploy.aliases.model_constants import JOLT_CONNECTION_POOL
from wlsdeploy.aliases.model_constants import MAIL_SESSION
from wlsdeploy.aliases.model_constants import MESSAGING_BRIDGE
from wlsdeploy.aliases.model_constants import PATH_SERVICE
from wlsdeploy.aliases.model_constants import SAF_AGENT
from wlsdeploy.aliases.model_constants import SELF_TUNING
from wlsdeploy.aliases.model_constants import WORK_MANAGER
from wlsdeploy.aliases.model_constants import WEBAPP_CONTAINER
from wlsdeploy.aliases.model_constants import WTC_SERVER
from wlsdeploy.aliases.model_constants import SINGLETON_SERVICE
from wlsdeploy.aliases.model_constants import MIME_MAPPING_FILE
from wlsdeploy.aliases.wlst_modes import WlstModes
Expand Down Expand Up @@ -119,6 +121,16 @@ def add_jms_servers(self, parent_dict, location):
self._add_named_elements(JMS_SERVER, servers, location)
return

def add_jolt_connection_pools(self, parent_dict, location):
"""
Add each named Jolt connection pool from the specified nodes in WLST and set its attributes.
:param parent_dict: the Jolt connection pool nodes from the model
:param location: the location where elements should be added
"""
servers = dictionary_utils.get_dictionary_element(parent_dict, JOLT_CONNECTION_POOL)
self._add_named_elements(JOLT_CONNECTION_POOL, servers, location)
return

def add_mail_sessions(self, parent_dict, location):
"""
Deploy the mail session elements in the dictionary at the specified location.
Expand Down Expand Up @@ -186,6 +198,15 @@ def add_webapp_container(self, parent_dict, location):

return

def add_wtc_servers(self, parent_dict, location):
"""
Deploy the WTC server elements in the dictionary at the specified location.
:param parent_dict: the dictionary possibly containing WTC server elements
:param location: the location to deploy the elements
"""
wtc_servers = dictionary_utils.get_dictionary_element(parent_dict, WTC_SERVER)
self._add_named_elements(WTC_SERVER, wtc_servers, location)

def add_singleton_service(self, parent_dict, location):
"""
Deploy the singleton service in the dictionary at the specified location.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def _add_resources(self, location):
common_deployer.add_jms_servers(self._resources, location)
common_deployer.add_saf_agents(self._resources, location)
common_deployer.add_path_services(self._resources, location)
common_deployer.add_jolt_connection_pools(self._resources, location)
common_deployer.add_wtc_servers(self._resources, location)

jms_deployer = JmsResourcesDeployer(self.model, self.model_context, self.aliases, wlst_mode=self.wlst_mode)
jms_deployer.add_jms_system_resources(self._resources, location)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def discover(self):
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, web_app_container)
model_top_folder_name, singleton_services = self.get_singleton_service()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, singleton_services)
model_top_folder_name, jolt_pools = self.get_jolt_connection_pool()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, jolt_pools)
model_top_folder_name, wtc_servers = self.get_wtc_servers()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, wtc_servers)

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

_logger.exiting(class_name=_class_name, method_name=_method_name, result=model_top_folder_name)
return model_top_folder_name, result

def get_jolt_connection_pool(self):
"""
Discover the global resource Jolt Connection Pool
:return: model name for the folder: dictionary containing the discovered JoltConnectionPool
"""
_method_name = 'get_jolt_connection_pool'
_logger.entering(class_name=_class_name, method_name=_method_name)
model_top_folder_name = model_constants.JOLT_CONNECTION_POOL
result = OrderedDict()
location = LocationContext(self._base_location)
location.append_location(model_top_folder_name)
jolt_pools = self._find_names_in_folder(location)
if jolt_pools is not None:
_logger.info('WLSDPLY-06449', len(jolt_pools), class_name=_class_name, method_name=_method_name)
name_token = self._alias_helper.get_name_token(location)
for jolt_pool in jolt_pools:
_logger.info('WLSDPLY-06450', jolt_pool, class_name=_class_name, method_name=_method_name)
result[jolt_pool] = OrderedDict()
location.add_name_token(name_token, jolt_pool)
self._populate_model_parameters(result[jolt_pool], location)
location.remove_name_token(name_token)

_logger.exiting(class_name=_class_name, method_name=_method_name, result=model_top_folder_name)
return model_top_folder_name, result

def get_wtc_servers(self):
"""
Discover the WTC servers from the domain.
:return: model folder name: dictionary containing the discovered WTCServers
"""
_method_name = 'get_wtc_servers'
_logger.entering(class_name=_class_name, method_name=_method_name)
model_top_folder_name = model_constants.WTC_SERVER
result = OrderedDict()
location = LocationContext(self._base_location)
location.append_location(model_top_folder_name)
wtc_servers = self._find_names_in_folder(location)
if wtc_servers is not None:
_logger.info('WLSDPLY-06451', len(wtc_servers), class_name=_class_name, method_name=_method_name)
name_token = self._alias_helper.get_name_token(location)
for wtc_server in wtc_servers:
_logger.info('WLSDPLY-06452', wtc_server, class_name=_class_name, method_name=_method_name)
result[wtc_server] = OrderedDict()
location.add_name_token(name_token, wtc_server)
self._populate_model_parameters(result[wtc_server], location)
self._discover_subfolders(result[wtc_server], location)
location.remove_name_token(name_token)

_logger.exiting(class_name=_class_name, method_name=_method_name, result=result)
return model_top_folder_name, result
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"copyright": "Copyright (c) 2020, Oracle Corporation and/or its affiliates.",
"license": "Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl",
"wlst_type": "JoltConnectionPool${:s}",
"child_folders_type": "multiple",
"short_name": "Jolt",
"folders": {},
"attributes": {
"ApplicationPasswordEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ApplicationPasswordEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password" , "get_method": "GET"} ],
"DeploymentOrder": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DeploymentOrder", "wlst_path": "WP001", "value": {"default": 1000 }, "wlst_type": "integer" } ],
"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" } ],
"KeyPassPhraseEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "KeyPassPhraseEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password", "get_method": "GET" } ],
"KeyStoreName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "KeyStoreName", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
"KeyStorePassPhraseEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "KeyStorePassPhraseEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password", "get_method": "GET" } ],
"MaximumPoolSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MaximumPoolSize", "wlst_path": "WP001", "value": {"default": 1 }, "wlst_type": "integer" } ],
"MinimumPoolSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MinimumPoolSize", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "integer" } ],
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
"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" } ],
"RecvTimeout": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "RecvTimeout", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "integer" } ],
"SecurityContextEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "SecurityContextEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
"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"} ],
"TrustStoreName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "TrustStoreName", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
"TrustStorePassPhraseEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "TrustStorePassPhraseEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password", "get_method": "GET" } ],
"UserName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "UserName", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
"UserPasswordEncrypted": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "UserPasswordEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password", "get_method": "GET" } ],
"UserRole": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "UserRole", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ]

},
"wlst_attributes_path": "WP001",
"wlst_paths": {
"WP001": "/JoltConnectionPool${:s}/%JOLT%",
"WP003": "/JoltConnectionPool${:s}/%JOLT%/Targets"
}
}
Loading