@@ -148,6 +148,32 @@ def _update_placeholder(self, type_name, name, location):
148
148
self .wlst_helper .set ('Name' , name )
149
149
self .wlst_helper .cd (original_location )
150
150
151
+ def clear_jdbc_placeholder_targeting (self , resources ):
152
+ """
153
+ Remove any targets for the JDBC resources in the specified dictionary.
154
+ Targets may have been inadvertently assigned when clusters were added after JDBC placeholders.
155
+ :param resources: dictionary containing the resources section of the model
156
+ """
157
+ _method_name = 'clear_jdbc_placeholder_targeting'
158
+ resource_location = LocationContext ().append_location (JDBC_SYSTEM_RESOURCE )
159
+ token = self .alias_helper .get_name_token (resource_location )
160
+
161
+ if self .alias_helper .get_wlst_mbean_type (resource_location ) is not None :
162
+ name_nodes = dictionary_utils .get_dictionary_element (resources , JDBC_SYSTEM_RESOURCE )
163
+ for name in name_nodes .keys ():
164
+ if model_helper .is_delete_name (name ):
165
+ # don't clear placeholder for delete names
166
+ continue
167
+
168
+ self .logger .info ('WLSDPLY-19404' , JDBC_SYSTEM_RESOURCE , name , class_name = self .__class_name ,
169
+ method_name = _method_name )
170
+
171
+ resource_location .add_name_token (token , name )
172
+ wlst_path = self .alias_helper .get_wlst_attributes_path (resource_location )
173
+ if self .wlst_helper .path_exists (wlst_path ):
174
+ mbean = self .wlst_helper .get_mbean_for_wlst_path (wlst_path )
175
+ mbean .setTargets (None )
176
+
151
177
def qualify_nm_properties (self , type_name , model_nodes , base_location , model_context , attribute_setter ):
152
178
"""
153
179
For the NM properties MBean, update the keystore file path to be fully qualified with the domain directory.
0 commit comments