Skip to content

Commit 5c506d9

Browse files
Merge pull request #1032 from oracle/delete-application-issue-975
fixed issue where deleted application was still thought to exist
2 parents 3b70224 + c115224 commit 5c506d9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,9 @@ def __add_shared_libraries(self):
8484
root_path = self.aliases.get_wlst_subfolders_path(self._base_location)
8585
shared_library_location = LocationContext(self._base_location).append_location(LIBRARY)
8686
shared_library_token = self.aliases.get_name_token(shared_library_location)
87-
existing_shared_libraries = deployer_utils.get_existing_object_list(shared_library_location, self.aliases)
8887

8988
for shared_library_name in shared_libraries:
90-
self.logger.info('WLSDPLY-09608', LIBRARY, shared_library_name, self._parent_type, self._parent_name,
91-
class_name=self._class_name, method_name=_method_name)
89+
existing_shared_libraries = deployer_utils.get_existing_object_list(shared_library_location, self.aliases)
9290

9391
if model_helper.is_delete_name(shared_library_name):
9492
if self.__verify_delete_versioned_app(shared_library_name, existing_shared_libraries, type='lib'):
@@ -97,6 +95,9 @@ def __add_shared_libraries(self):
9795
existing_names = deployer_utils.get_existing_object_list(location, self.aliases)
9896
deployer_utils.delete_named_element(location, shared_library_name, existing_names, self.aliases)
9997
continue
98+
else:
99+
self.logger.info('WLSDPLY-09608', LIBRARY, shared_library_name, self._parent_type, self._parent_name,
100+
class_name=self._class_name, method_name=_method_name)
100101

101102
#
102103
# In WLST offline mode, the shared library name must match the fully qualified name, including
@@ -152,11 +153,9 @@ def __add_applications(self):
152153
root_path = self.aliases.get_wlst_subfolders_path(self._base_location)
153154
application_location = LocationContext(self._base_location).append_location(APPLICATION)
154155
application_token = self.aliases.get_name_token(application_location)
155-
existing_applications = deployer_utils.get_existing_object_list(application_location, self.aliases)
156156

157157
for application_name in applications:
158-
self.logger.info('WLSDPLY-09301', APPLICATION, application_name, self._parent_type, self._parent_name,
159-
class_name=self._class_name, method_name=_method_name)
158+
existing_applications = deployer_utils.get_existing_object_list(application_location, self.aliases)
160159

161160
if model_helper.is_delete_name(application_name):
162161
if self.__verify_delete_versioned_app(application_name, existing_applications, type='app'):
@@ -165,6 +164,9 @@ def __add_applications(self):
165164
existing_names = deployer_utils.get_existing_object_list(location, self.aliases)
166165
deployer_utils.delete_named_element(location, application_name, existing_names, self.aliases)
167166
continue
167+
else:
168+
self.logger.info('WLSDPLY-09301', APPLICATION, application_name, self._parent_type, self._parent_name,
169+
class_name=self._class_name, method_name=_method_name)
168170

169171
application = \
170172
copy.deepcopy(dictionary_utils.get_dictionary_element(applications, application_name))

0 commit comments

Comments
 (0)