Skip to content

Add missing mbeans and attributes for remote console #1150

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 5 commits into from
Jun 29, 2022
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
3 changes: 3 additions & 0 deletions core/src/main/python/wlsdeploy/aliases/model_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@
MAIL_SESSION = 'MailSession'
MAIL_SESSION_OVERRIDE = 'MailSessionOverride'
MAIL_SESSION_PROPERTIES = 'Properties'
MANAGED_EXECUTOR_SERVICE_TEMPLATE = 'ManagedExecutorServiceTemplate'
MANAGED_SCHEDULED_EXECUTOR_SERVICE = 'ManagedScheduledExecutorService'
MANAGED_THREAD_FACTORY_TEMPLATE = 'ManagedThreadFactoryTemplate'
MAX_DYNAMIC_SERVER_COUNT = 'MaximumDynamicServerCount'
MAX_THREADS_CONSTRAINT = 'MaxThreadsConstraint'
MIGRATABLE_TARGET = 'MigratableTarget'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ def discover(self):
model_folder_name, folder_result = self._get_xml_registries()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self.get_managed_executor_template()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self.get_managed_thread_factory_template()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self.get_managed_scheduled_executor_service()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self._get_ws_securities()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

Expand Down Expand Up @@ -318,6 +327,7 @@ def discover_domain_parameters(self):
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_folder_name, folder_result = self._get_nm_properties()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self.discover_domain_mbean(model_constants.RESTFUL_MANAGEMENT_SERVICES)
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

Expand Down Expand Up @@ -428,6 +438,8 @@ def _get_nm_properties(self):
_logger.exiting(class_name=_class_name, method_name=_method_name)
return model_top_folder_name, result



def _get_log_filters(self):
"""
Discover the log filters that are used in the different types of Logs in the domain.
Expand Down Expand Up @@ -553,6 +565,81 @@ def _get_xml_registries(self):
_logger.exiting(class_name=_class_name, method_name=_method_name, result=model_top_folder_name)
return model_top_folder_name, result

def get_managed_executor_template(self):
"""
Discover the domain managed executor template
:return: model name for the folder: dictionary containing the discovered managed executor template
"""
_method_name = 'get_managed_executor_template'
_logger.entering(class_name=_class_name, method_name=_method_name)
model_top_folder_name = model_constants.MANAGED_EXECUTOR_SERVICE_TEMPLATE
result = OrderedDict()
location = LocationContext(self._base_location)
location.append_location(model_top_folder_name)
templates = self._find_names_in_folder(location)
if templates is not None:
_logger.info('WLSDPLY-06651', len(templates), class_name=_class_name, method_name=_method_name)
name_token = self._aliases.get_name_token(location)
for template in templates:
_logger.info('WLSDPLY-06652', template, class_name=_class_name, method_name=_method_name)
location.add_name_token(name_token, template)
result[template] = OrderedDict()
self._populate_model_parameters(result[template], 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_managed_scheduled_executor_service(self):
"""
Discover the domain managed scheduled executor service
:return: model name for the folder: dictionary containing the discovered managed scheduled executor
"""
_method_name = 'get_managed_scheduled_executor_service'
_logger.entering(class_name=_class_name, method_name=_method_name)
model_top_folder_name = model_constants.MANAGED_SCHEDULED_EXECUTOR_SERVICE
result = OrderedDict()
location = LocationContext(self._base_location)
location.append_location(model_top_folder_name)
services = self._find_names_in_folder(location)
if services is not None:
_logger.info('WLSDPLY-06653', len(services), class_name=_class_name, method_name=_method_name)
name_token = self._aliases.get_name_token(location)
for service in services:
_logger.info('WLSDPLY-06654', service, class_name=_class_name, method_name=_method_name)
location.add_name_token(name_token, service)
result[service] = OrderedDict()
self._populate_model_parameters(result[service], 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_managed_thread_factory_template(self):
"""
Discover the domain managed thread factory template
:return: model name for the folder: dictionary containing the discovered managed thread factory templates """
_method_name = 'get_managed_thread_factory_template'
_logger.entering(class_name=_class_name, method_name=_method_name)
model_top_folder_name = model_constants.MANAGED_SCHEDULED_EXECUTOR_SERVICE
result = OrderedDict()
location = LocationContext(self._base_location)
location.append_location(model_top_folder_name)
factories = self._find_names_in_folder(location)
if factories is not None:
_logger.info('WLSDPLY-06655', len(factories), class_name=_class_name, method_name=_method_name)
name_token = self._aliases.get_name_token(location)
for factory in factories:
_logger.info('WLSDPLY-06656', factory, class_name=_class_name, method_name=_method_name)
location.add_name_token(name_token, factory)
result[factory] = OrderedDict()
self._populate_model_parameters(result[factory], 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_ws_securities(self):
"""
Discover the Webservice Security configuration for the domain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,19 @@
"wlst_paths": {
"WP001": "/JMSSystemResource${:s}/%JMSSYSTEMRESOURCE%/${Jms:JMS}Resource/%JMSRESOURCE%/Template${:s}/%TEMPLATE%/Thresholds/%THRESHOLDS%"
}
},
"TopicSubscriptionParams": {
"wlst_type": "TopicSubscriptionParams",
"default_name_value": "${NO_NAME_0:%TEMPLATE%}",
"version": "[12.2.1.3,)",
"folders": {},
"attributes": {
"MessagesLimitOverride": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "MessagesLimitOverride", "wlst_path": "WP001", "default_value": -1, "wlst_type": "long" } ]
},
"wlst_attributes_path": "WP001",
"wlst_paths": {
"WP001": "/JMSSystemResource${:s}/%JMSSYSTEMRESOURCE%/${Jms:JMS}Resource/%JMSRESOURCE%/Template${:s}/%TEMPLATE%/TopicSubscriptionParams/%TOPICSUBSCRIPTIONPARAMS%"
}
}
},
"attributes": {
Expand Down Expand Up @@ -744,6 +757,19 @@
"wlst_paths": {
"WP001": "/JMSSystemResource${:s}/%JMSSYSTEMRESOURCE%/${Jms:JMS}Resource/%JMSRESOURCE%/Topic${:s}/%TOPIC%/Thresholds/%THRESHOLDS%"
}
},
"TopicSubscriptionParams": {
"wlst_type": "TopicSubscriptionParams",
"default_name_value": "${NO_NAME_0:%TOPIC%}",
"version": "[12.2.1.3,)",
"folders": {},
"attributes": {
"MessagesLimitOverride": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "MessagesLimitOverride", "wlst_path": "WP001", "default_value": -1, "wlst_type": "long" } ]
},
"wlst_attributes_path": "WP001",
"wlst_paths": {
"WP001": "/JMSSystemResource${:s}/%JMSSYSTEMRESOURCE%/${Jms:JMS}Resource/%JMSRESOURCE%/Topic${:s}/%TOPIC%/TopicSubscriptionParams/%TOPICSUBSCRIPTIONPARAMS%"
}
}
},
"attributes": {
Expand Down Expand Up @@ -838,6 +864,19 @@
"wlst_paths": {
"WP001": "/JMSSystemResource${:s}/%JMSSYSTEMRESOURCE%/${Jms:JMS}Resource/%JMSRESOURCE%/UniformDistributedQueue${:s}/%UNIFORMDISTRIBUTEDQUEUE%/Thresholds/%THRESHOLDS%"
}
},
"TopicSubscriptionParams": {
"wlst_type": "TopicSubscriptionParams",
"default_name_value": "${NO_NAME_0:%UNIFORMDISTRIBUTEDQUEUE%}",
"version": "[12.2.1.3,)",
"folders": {},
"attributes": {
"MessagesLimitOverride": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "MessagesLimitOverride", "wlst_path": "WP001", "default_value": -1, "wlst_type": "long" } ]
},
"wlst_attributes_path": "WP001",
"wlst_paths": {
"WP001": "/JMSSystemResource${:s}/%JMSSYSTEMRESOURCE%/${Jms:JMS}Resource/%JMSRESOURCE%/UniformDistributedQueue${:s}/%UNIFORMDISTRIBUTEDQUEUE%/TopicSubscriptionParams/%TOPICSUBSCRIPTIONPARAMS%"
}
}
},
"attributes": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"copyright": "Copyright (c) 2022, 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": "ManagedExecutorServiceTemplate${:s}",
"child_folders_type": "multiple",
"version": "[12.2.1,)",
"short_name": "ManagedESTemplate",
"folders": {},
"attributes": {
"DispatchPolicy": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "DispatchPolicy", "wlst_path": "WP001", "default_value": "", "wlst_type": "string"} ],
"LongRunningPriority": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "LongRunningPriority", "wlst_path": "WP001", "default_value": 5, "wlst_type": "integer"} ],
"MaxConcurrentLongRunningRequests": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MaxConcurrentLongRunningRequests", "wlst_path": "WP001", "default_value": 10, "wlst_type": "integer"} ],
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ],
"Target": [ {"version": "[12.2.1,)", "wlst_mode": "offline", "wlst_name": "Target", "wlst_path": "WP001", "default_value": null, "wlst_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans" },
{"version": "[12.2.1,)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP002", "default_value": null, "wlst_type": "jarray", "get_method": "GET", "preferred_model_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ]
},
"wlst_attributes_path": "WP001",
"wlst_paths": {
"WP001": "/ManagedExecutorServiceTemplate${:s}/%MANAGEDEXECUTORSERVICETEMPLATE%",
"WP002": "/ManagedExecutorServiceTemplate${:s}/%MANAGEDEXECUTORSERVICETEMPLATE%/Targets"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"copyright": "Copyright (c) 2022, 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": "ManagedScheduledExecutorServiceTemplate${:s}",
"child_folders_type": "multiple",
"version": "[12.2.1,)",
"short_name": "ManagedSchedESTemplate",
"folders": {},
"attributes": {
"DispatchPolicy": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "DispatchPolicy", "wlst_path": "WP001", "default_value": "", "wlst_type": "string"} ],
"LongRunningPriority": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "LongRunningPriority", "wlst_path": "WP001", "default_value": 5, "wlst_type": "integer"} ],
"MaxConcurrentLongRunningRequests": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MaxConcurrentLongRunningRequests", "wlst_path": "WP001", "default_value": 10, "wlst_type": "integer"} ],
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ],
"Target": [ {"version": "[12.2.1,)", "wlst_mode": "offline", "wlst_name": "Target", "wlst_path": "WP001", "default_value": null, "wlst_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans" },
{"version": "[12.2.1,)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP002", "default_value": null, "wlst_type": "jarray", "get_method": "GET", "preferred_model_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ]
},
"wlst_attributes_path": "WP001",
"wlst_paths": {
"WP001": "/ManagedScheduledExecutorServiceTemplate${:s}/%MANAGEDSCHEDULEDEXECUTORSERVICETEMPLATE%",
"WP002": "/ManagedScheduledExecutorServiceTemplate${:s}/%MANAGEDSCHEDULEDEXECUTORSERVICETEMPLATE%/Targets"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"copyright": "Copyright (c) 2022, 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": "ManagedThreadFactoryTemplate${:s}",
"child_folders_type": "multiple",
"version": "[12.2.1,)",
"short_name": "ManagedThreadFactTemplate",
"folders": {},
"attributes": {
"MaxConcurrentNewThreads": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "MaxConcurrentNewThreads", "wlst_path": "WP001", "default_value": 10, "wlst_type": "integer"} ],
"Notes": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "default_value": null, "wlst_type": "string"} ],
"Priority": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Priority", "wlst_path": "WP001", "default_value": 5, "wlst_type": "integer"} ],
"Target": [ {"version": "[12.2.1,)", "wlst_mode": "offline", "wlst_name": "Target", "wlst_path": "WP001", "default_value": null, "wlst_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans" },
{"version": "[12.2.1,)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP002", "default_value": null, "wlst_type": "jarray", "get_method": "GET", "preferred_model_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ]
},
"wlst_attributes_path": "WP001",
"wlst_paths": {
"WP001": "/ManagedThreadFactoryTemplate${:s}/%MANAGEDTHREADFACTORYTEMPLATE%",
"WP002": "/ManagedThreadFactoryTemplate${:s}/%MANAGEDTHREADFACTORYTEMPLATE%/Targets"
}
}
Loading