|
20 | 20 | from wlsdeploy.aliases.model_constants import MODEL_LIST_DELIMITER
|
21 | 21 | from wlsdeploy.aliases.model_constants import SERVER
|
22 | 22 | from wlsdeploy.aliases.model_constants import SERVER_GROUP_TARGETING_LIMITS
|
| 23 | +from wlsdeploy.aliases.model_constants import SERVER_TEMPLATE |
23 | 24 | from wlsdeploy.exception import exception_helper
|
24 | 25 | from wlsdeploy.tool.util.wlst_helper import WlstHelper
|
25 | 26 | from wlsdeploy.util import string_utils
|
@@ -364,9 +365,16 @@ def _get_clusters_and_members_map(self):
|
364 | 365 | cluster_location.append_location(DYNAMIC_SERVERS)
|
365 | 366 | wlst_subfolder_name = self.aliases.get_wlst_mbean_type(cluster_location)
|
366 | 367 | if self.wlst_helper.subfolder_exists(wlst_subfolder_name):
|
367 |
| - if cluster_name not in cluster_map: |
368 |
| - cluster_map[cluster_name] = list() |
369 |
| - cluster_map[cluster_name].append(DYNAMIC_SERVERS) |
| 368 | + ds_list_path = self.aliases.get_wlst_list_path(cluster_location) |
| 369 | + ds_names = self.wlst_helper.get_existing_object_list(ds_list_path) |
| 370 | + if len(ds_names) > 0: |
| 371 | + cluster_location.add_name_token(self.aliases.get_name_token(cluster_location), ds_names[0]) |
| 372 | + cluster_attributes_path = self.aliases.get_wlst_attributes_path(cluster_location) |
| 373 | + self.wlst_helper.cd(cluster_attributes_path) |
| 374 | + if self.wlst_helper.get(SERVER_TEMPLATE) is not None: |
| 375 | + if cluster_name not in cluster_map: |
| 376 | + cluster_map[cluster_name] = list() |
| 377 | + cluster_map[cluster_name].append(DYNAMIC_SERVERS) |
370 | 378 |
|
371 | 379 | self.logger.exiting(class_name=self.__class_name, method_name=_method_name, result=cluster_map)
|
372 | 380 | return cluster_map
|
@@ -529,7 +537,7 @@ def get_dc_to_server_groups_map(self, dynamic_cluster_names, server_groups, dc_s
|
529 | 537 | _method_name = 'get_dc_to_server_groups_list'
|
530 | 538 |
|
531 | 539 | self.logger.entering(str(dynamic_cluster_names), str(server_groups), str(dc_sg_targeting_limits),
|
532 |
| - class_name=self.__class_name, method_name=_method_name) |
| 540 | + class_name=self.__class_name, method_name=_method_name) |
533 | 541 | result = OrderedDict()
|
534 | 542 | revised_server_groups = self._revised_list_server_groups(server_groups, dc_sg_targeting_limits)
|
535 | 543 | for cluster_name in dynamic_cluster_names:
|
|
0 commit comments