@@ -232,23 +232,16 @@ def __online_deploy_apps_and_libs(self, base_location):
232232 # libraries to be undeployed
233233 update_library_list = list ()
234234
235- # app targets to be deleted
236- app_delete_targets = dict ()
237-
238- # library targets to be deleted
239- lib_delete_targets = dict ()
240-
241235 lib_location = LocationContext (base_location ).append_location (LIBRARY )
242236 # Go through the model libraries and find existing libraries that are referenced
243237 # by applications and compute a processing strategy for each library.
244238 self .__build_library_deploy_strategy (lib_location , model_shared_libraries , existing_lib_refs ,
245- stop_app_list , update_library_list , stop_and_undeploy_app_list ,
246- lib_delete_targets )
239+ stop_app_list , update_library_list , stop_and_undeploy_app_list )
247240
248241 # Go through the model applications and compute the processing strategy for each application.
249242 app_location = LocationContext (base_location ).append_location (APPLICATION )
250243 self .__build_app_deploy_strategy (app_location , model_applications , existing_app_refs ,
251- stop_and_undeploy_app_list , app_delete_targets )
244+ stop_and_undeploy_app_list )
252245
253246 # deployed_app_list is list of apps that has been deployed and stareted again
254247 # redeploy_app_list is list of apps that needs to be redeplyed
@@ -268,18 +261,6 @@ def __online_deploy_apps_and_libs(self, base_location):
268261 self .__stop_app (app )
269262 self .__undeploy_app (app )
270263
271- # targets were deleted from an app, so undeploy for those specific targets
272- for app in app_delete_targets :
273- delete_targets = app_delete_targets [app ]
274- if delete_targets :
275- self .__undeploy_app (app , targets = delete_targets )
276-
277- # targets were deleted from a library, so undeploy for those specific targets
278- for lib in lib_delete_targets :
279- delete_targets = lib_delete_targets [lib ]
280- if delete_targets :
281- self .__undeploy_app (lib , library_module = 'true' , targets = delete_targets )
282-
283264 # library is updated, it must be undeployed first
284265 for lib in update_library_list :
285266 self .__undeploy_app (lib , library_module = 'true' )
@@ -521,7 +502,7 @@ def __get_library_references(self, base_location):
521502 return existing_libraries
522503
523504 def __build_library_deploy_strategy (self , location , model_libs , existing_lib_refs , stop_app_list ,
524- update_library_list , stop_and_undeploy_app_list , lib_delete_targets ):
505+ update_library_list , stop_and_undeploy_app_list ):
525506 """
526507 Update maps and lists to control re-deployment processing.
527508 :param location: the location of the libraries
@@ -530,7 +511,6 @@ def __build_library_deploy_strategy(self, location, model_libs, existing_lib_ref
530511 :param stop_app_list: a list to update with dependent apps to be stopped and undeployed
531512 :param update_library_list: a list to update with libraries to be stopped before deploying
532513 :param stop_and_undeploy_app_list: a list to update with libraries to be stopped and undeployed
533- :param lib_delete_targets: a map to update with delete targets for libraries
534514 """
535515 _method_name = '__build_library_deploy_strategy'
536516
@@ -563,9 +543,8 @@ def __build_library_deploy_strategy(self, location, model_libs, existing_lib_ref
563543
564544 existing_lib_ref = dictionary_utils .get_dictionary_element (existing_lib_refs , versioned_name )
565545
566- # collect the delete targets, and remove them from the model and existing targets
567- lib_delete_targets [versioned_name ] = \
568- self .__extract_delete_targets (lib_dict , existing_lib_ref , location , lib )
546+ # remove deleted targets from the model and the existing library targets
547+ self .__remove_delete_targets (lib_dict , existing_lib_ref )
569548
570549 if versioned_name in existing_libs :
571550 # skipping absolute path libraries if they are the same
@@ -628,15 +607,13 @@ def __build_library_deploy_strategy(self, location, model_libs, existing_lib_ref
628607 lib_dict ['SourcePath' ] = existing_src_path
629608 return
630609
631- def __build_app_deploy_strategy (self , location , model_apps , existing_app_refs , stop_and_undeploy_app_list ,
632- app_delete_targets ):
610+ def __build_app_deploy_strategy (self , location , model_apps , existing_app_refs , stop_and_undeploy_app_list ):
633611 """
634612 Update maps and lists to control re-deployment processing.
635613 :param location: the location of the applications
636614 :param model_apps: a copy of applications from the model, attributes may be revised
637615 :param existing_app_refs: map of information about each existing app
638616 :param stop_and_undeploy_app_list: a list to update with apps to be stopped and undeployed
639- :param app_delete_targets: a map to update with delete targets for applications
640617 """
641618 _method_name = '__build_app_deploy_strategy'
642619
@@ -665,9 +642,8 @@ def __build_app_deploy_strategy(self, location, model_apps, existing_app_refs, s
665642
666643 existing_app_ref = dictionary_utils .get_dictionary_element (existing_app_refs , versioned_name )
667644
668- # collect the delete targets, and remove them from the model and existing targets
669- app_delete_targets [versioned_name ] = \
670- self .__extract_delete_targets (app_dict , existing_app_ref , location , app )
645+ # remove deleted targets from the model and the existing app targets
646+ self .__remove_delete_targets (app_dict , existing_app_ref )
671647
672648 if versioned_name in existing_apps :
673649 # Compare the hashes of the domain's existing apps to the model's apps.
@@ -719,17 +695,13 @@ def __build_app_deploy_strategy(self, location, model_apps, existing_app_refs, s
719695 stop_and_undeploy_app_list .append (versioned_name )
720696 return
721697
722- def __extract_delete_targets (self , model_dict , existing_ref , location , name ):
698+ def __remove_delete_targets (self , model_dict , existing_ref ):
723699 """
724- Create a comma-separated list of targets to be deleted for an app or library.
725- Remove those targets from the model and existing target dictionaries.
700+ Remove deleted targets from the model and existing target dictionaries.
726701 :param model_dict: the model dictionary for the app or library, may be modified
727702 :param existing_ref: the existing dictionary for the app or library, may be modified
728- :param location: the location of the app or library, for logging
729- :param name: the name of the app or library, for logging
730- :return: a comma-separated list of targets to be removed, empty string for no targets
731703 """
732- _method_name = '__extract_delete_targets '
704+ _method_name = '__remove_delete_targets '
733705
734706 model_targets = dictionary_utils .get_element (model_dict , TARGET )
735707 model_targets = alias_utils .create_list (model_targets , 'WLSDPLY-08000' )
@@ -738,23 +710,15 @@ def __extract_delete_targets(self, model_dict, existing_ref, location, name):
738710 if not existing_targets :
739711 existing_targets = list ()
740712
741- delete_targets = []
742713 model_targets_iterator = list (model_targets )
743714 for model_target in model_targets_iterator :
744715 if model_helper .is_delete_name (model_target ):
745716 model_targets .remove (model_target )
746717 target_name = model_helper .get_delete_item_name (model_target )
747718 if target_name in existing_targets :
748719 existing_targets .remove (target_name )
749- delete_targets .append (target_name )
750- else :
751- location .add_name_token (self .aliases .get_name_token (location ), name )
752- location_path = self .aliases .get_model_folder_path (location )
753- self .logger .warning ('WLSDPLY-08022' , model_target , TARGET , location_path ,
754- class_name = self ._class_name , method_name = _method_name )
755720
756721 model_dict [TARGET ] = "," .join (model_targets )
757- return "," .join (delete_targets )
758722
759723 def __verify_delete_versioned_app (self , app , existing_apps , type = 'app' ):
760724 """
0 commit comments