Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DynamicClusterSize attribute not supported in 12.1.3. Used for testin…
…g for dynamic servers
  • Loading branch information
CarolynRountree committed Nov 19, 2020
commit a5fe450c21c2c4c75bcb432504177f9c00046a8b
1 change: 1 addition & 0 deletions core/src/main/python/wlsdeploy/aliases/model_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
MAIL_SESSION = 'MailSession'
MAIL_SESSION_OVERRIDE = 'MailSessionOverride'
MAIL_SESSION_PROPERTIES = 'Properties'
MAX_DYNAMIC_CLUSTER_SIZE = 'MaximumDynamicServerCount'
MAX_THREADS_CONSTRAINT = 'MaxThreadsConstraint'
MIGRATABLE_TARGET = 'MigratableTarget'
MIN_THREADS_CONSTRAINT = 'MinThreadsConstraint'
Expand Down
11 changes: 3 additions & 8 deletions core/src/main/python/wlsdeploy/tool/deploy/deployer_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

from wlsdeploy.aliases.location_context import LocationContext
from wlsdeploy.aliases.model_constants import CLUSTER
from wlsdeploy.aliases.model_constants import DYNAMIC_CLUSTER_SIZE
from wlsdeploy.aliases.model_constants import DYNAMIC_SERVERS
from wlsdeploy.aliases.model_constants import FILE_URI
from wlsdeploy.aliases.model_constants import JDBC_DRIVER_PARAMS
from wlsdeploy.aliases.model_constants import JDBC_RESOURCE
from wlsdeploy.aliases.model_constants import JDBC_SYSTEM_RESOURCE
from wlsdeploy.aliases.model_constants import MAX_DYNAMIC_CLUSTER_SIZE
from wlsdeploy.aliases.model_constants import SERVER
from wlsdeploy.aliases.model_constants import SERVER_NAME_PREFIX
from wlsdeploy.aliases.model_constants import SERVER_NAME_START_IDX
Expand Down Expand Up @@ -570,11 +570,8 @@ def check_if_dynamic_cluster(server_name, cluster_name, aliases):
_wlst_helper.cd(attr_path)
except DeployException:
return False
dynamic_size = 0
present, __ = aliases.is_valid_model_attribute_name(location, DYNAMIC_CLUSTER_SIZE)
if present == ValidationCodes.VALID:
attr_name = aliases.get_wlst_attribute_name(location, DYNAMIC_CLUSTER_SIZE)
dynamic_size = _wlst_helper.get(attr_name)
attr_name = aliases.get_wlst_attribute_name(location, MAX_DYNAMIC_CLUSTER_SIZE)
dynamic_size = _wlst_helper.get(attr_name)
attr_name = aliases.get_wlst_attribute_name(location, SERVER_NAME_PREFIX)
prefix = _wlst_helper.get(attr_name)
starting = 1
Expand All @@ -588,7 +585,5 @@ def check_if_dynamic_cluster(server_name, cluster_name, aliases):
number = StringUtils.stringToInteger(split_it[1].strip())
if number is not None and starting <= number < (dynamic_size + starting):
return True
if prefix is not None and server_name.startswith(prefix) and dynamic_size == 0:
return True
return False

Original file line number Diff line number Diff line change
Expand Up @@ -767,13 +767,9 @@ def _dynamic_server(self, server, location):
if self._wlst_helper.path_exists(wlst_path):
_logger.fine('WLSDPLY-06613', server, class_name=_class_name, method_name=_method_name)
self._wlst_helper.cd(wlst_path)
dynamic_size = 0
present, __ = self._aliases.is_valid_model_attribute_name(location,
model_constants.DYNAMIC_CLUSTER_SIZE)
if present == ValidationCodes.VALID:
attr_name = self._aliases.get_wlst_attribute_name(cluster_location,
model_constants.DYNAMIC_CLUSTER_SIZE)
dynamic_size = self._wlst_helper.get(attr_name)
attr_name = self._aliases.get_wlst_attribute_name(cluster_location,
model_constants.MAX_DYNAMIC_CLUSTER_SIZE)
dynamic_size = self._wlst_helper.get(attr_name)
attr_name = self._aliases.get_wlst_attribute_name(cluster_location,
model_constants.SERVER_NAME_PREFIX)
prefix = self._wlst_helper.get(attr_name)
Expand All @@ -796,8 +792,6 @@ def check_against_server_list(server_name, dynamic_size, prefix, starting):
number = StringUtils.stringToInteger(split_it[1].strip())
if number is not None and starting <= number < (dynamic_size + starting):
return True
if prefix is not None and server_name.startswith(prefix) and dynamic_size == 0:
return True
return False


Expand Down