@@ -557,28 +557,18 @@ def __create_clusters_and_servers(self, location):
557
557
_method_name = '__create_clusters_and_servers'
558
558
559
559
self .logger .entering (str (location ), class_name = self .__class_name , method_name = _method_name )
560
+
560
561
#
561
562
# In order for source domain provisioning to work with dynamic clusters, we have to provision
562
563
# the ServerTemplates. There is a cyclical dependency between Server Template and Clusters so we
563
564
# need for the ServerTemplates to exist before create clusters. Once the clusters are provisioned,
564
565
# then we can fully populate the ServerTemplates.
565
566
#
566
- server_template_nodes = dictionary_utils .get_dictionary_element (self ._topology , SERVER_TEMPLATE )
567
- if len (server_template_nodes ) > 0 and self ._is_type_valid (location , SERVER_TEMPLATE ):
568
- st_location = LocationContext (location ).append_location (SERVER_TEMPLATE )
569
- st_mbean_type = self .alias_helper .get_wlst_mbean_type (st_location )
570
- st_create_path = self .alias_helper .get_wlst_create_path (st_location )
571
- self .wlst_helper .cd (st_create_path )
572
-
573
- st_token_name = self .alias_helper .get_name_token (st_location )
574
- for server_template_name in server_template_nodes :
575
- st_name = self .wlst_helper .get_quoted_name_for_wlst (server_template_name )
576
- if st_token_name is not None :
577
- st_location .add_name_token (st_token_name , st_name )
578
-
579
- st_mbean_name = self .alias_helper .get_wlst_mbean_name (st_location )
580
- self .logger .info ('WLSDPLY-12220' , SERVER_TEMPLATE , st_mbean_name )
581
- self .wlst_helper .create (st_mbean_name , st_mbean_type )
567
+ self .topology_helper .create_placeholder_server_templates (self ._topology )
568
+
569
+ # create placeholders for JDBC resources that may be referenced in cluster definition.
570
+ resources_dict = self .model .get_model_resources ()
571
+ self .topology_helper .create_placeholder_jdbc_resources (resources_dict )
582
572
583
573
cluster_nodes = dictionary_utils .get_dictionary_element (self ._topology , CLUSTER )
584
574
if len (cluster_nodes ) > 0 :
@@ -587,6 +577,7 @@ def __create_clusters_and_servers(self, location):
587
577
#
588
578
# Now, fully populate the ServerTemplates, if any.
589
579
#
580
+ server_template_nodes = dictionary_utils .get_dictionary_element (self ._topology , SERVER_TEMPLATE )
590
581
if len (server_template_nodes ) > 0 :
591
582
self ._create_named_mbeans (SERVER_TEMPLATE , server_template_nodes , location , log_created = True )
592
583
0 commit comments