Skip to content

Commit 7b54ede

Browse files
Dynamic Clusters FrontEndHost attribute needs to be populated before FrontEndHTTPPort (#1194)
* Dynamic Clusters FrontEndHost attribute needs to be populated before FrontEndHTTPPort * redesign for request
1 parent 11a0028 commit 7b54ede

File tree

5 files changed

+28
-1
lines changed

5 files changed

+28
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
FOREIGN_JNDI_PROVIDER_OVERRIDE = 'ForeignJndiProviderOverride'
128128
FOREIGN_JNDI_PROVIDER_LINK = 'ForeignJNDILink'
129129
FOREIGN_SERVER = 'ForeignServer'
130+
FRONTEND_HOST = 'FrontendHost'
130131
GROUP = 'Group'
131132
GROUP_PARAMS = 'GroupParams'
132133
GROUP_MEMBER_OF = 'GroupMemberOf'

core/src/main/python/wlsdeploy/tool/create/creator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ def _set_attribute(self, location, model_name, model_value, uses_path_tokens_nam
307307
:raises: CreateException: if an error occurs
308308
"""
309309
_method_name = '_set_attribute'
310-
311310
if (model_name in uses_path_tokens_names) and (model_value is not None):
312311
self._extract_archive_files(location, model_name, model_value)
313312

core/src/main/python/wlsdeploy/tool/create/domain_creator.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
from wlsdeploy.aliases.model_constants import DRIVER_PARAMS_TRUSTSTORE_PROPERTY
4141
from wlsdeploy.aliases.model_constants import DRIVER_PARAMS_USER_PROPERTY
4242
from wlsdeploy.aliases.model_constants import DRIVER_PARAMS_kEYSTORE_PROPERTY
43+
from wlsdeploy.aliases.model_constants import FRONTEND_HOST
4344
from wlsdeploy.aliases.model_constants import JDBC_DRIVER_PARAMS_PROPERTIES
4445
from wlsdeploy.aliases.model_constants import JDBC_SYSTEM_RESOURCE
4546
from wlsdeploy.aliases.model_constants import LISTEN_PORT
@@ -183,6 +184,15 @@ def create(self):
183184

184185
self.logger.exiting(class_name=self.__class_name, method_name=_method_name)
185186

187+
#Override
188+
def _set_attributes(self, location, model_nodes):
189+
model_type, model_name = self.aliases.get_model_type_and_name(location)
190+
if model_type == CLUSTER:
191+
if FRONTEND_HOST in model_nodes:
192+
model_value = model_nodes[FRONTEND_HOST]
193+
Creator._set_attribute(self, location, FRONTEND_HOST, model_value, list())
194+
Creator._set_attributes(self, location, model_nodes)
195+
186196
# Override
187197
def _create_named_mbeans(self, type_name, model_nodes, base_location, log_created=False, delete_now=True):
188198
"""

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from wlsdeploy.aliases.model_constants import CDI_CONTAINER
88
from wlsdeploy.aliases.model_constants import CLUSTER
99
from wlsdeploy.aliases.model_constants import CREATE_ONLY_DOMAIN_ATTRIBUTES
10+
from wlsdeploy.aliases.model_constants import FRONTEND_HOST
1011
from wlsdeploy.aliases.model_constants import MACHINE
1112
from wlsdeploy.aliases.model_constants import MIGRATABLE_TARGET
1213
from wlsdeploy.aliases.model_constants import SECURITY
@@ -47,6 +48,14 @@ def __init__(self, model, model_context, aliases, wlst_mode=WlstModes.OFFLINE):
4748

4849
self.target_helper = TargetHelper(self.model, self.model_context, self.aliases, self._exception_type,
4950
self.logger)
51+
#Override
52+
def set_attributes(self, location, model_nodes, excludes=None):
53+
model_type, model_name = self.aliases.get_model_type_and_name(location)
54+
if model_type == CLUSTER:
55+
if FRONTEND_HOST in model_nodes:
56+
model_value = model_nodes[FRONTEND_HOST]
57+
self.attribute_setter.set_attribute(location, FRONTEND_HOST, model_value, None)
58+
Deployer.set_attributes(self, location, model_nodes, excludes)
5059

5160
# Override
5261
def _add_named_elements(self, type_name, model_nodes, location, delete_now=True):

core/src/main/python/wlsdeploy/tool/util/topology_helper.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ def create_placeholder_servers_in_cluster(self, topology):
8080
self.create_placeholder_named_elements(LocationContext(), SERVER, topology)
8181
self.logger.exiting(class_name=self.__class_name, method_name=_method_name)
8282

83+
def create_placeholder_clusters(self, topology):
84+
"""
85+
Create a placeholder cluster for each name in the topology.
86+
This is necessary because there is a circular dependency between certain attributes.
87+
:param topology: the topology model nodes
88+
"""
89+
self.create_placeholder_named_elements(LocationContext(), CLUSTER, topology)
90+
8391
def create_placeholder_server_templates(self, topology):
8492
"""
8593
Create a placeholder server template for each name in the topology.

0 commit comments

Comments
 (0)