diff --git a/core/src/main/python/wlsdeploy/tool/discover/discoverer.py b/core/src/main/python/wlsdeploy/tool/discover/discoverer.py index e26046081..6d58b1a39 100644 --- a/core/src/main/python/wlsdeploy/tool/discover/discoverer.py +++ b/core/src/main/python/wlsdeploy/tool/discover/discoverer.py @@ -483,6 +483,17 @@ def _get_model_name(self, location, wlst_name): class_name=_class_name, method_name=_method_name) return model_name + def _topfolder_exists(self, model_top_folder_name): + """ + Check to see if the folder represented by the top folder name exists at the current location. + There is not a way to check for wlst_type for top folders. The top folder name and the wlst name + must be the same. + :param model_top_folder_name: to check for at top directory + :return: True if the folder exists at the current location in the domain + """ + result = self._wlst_helper.lsc('/', log_throwing=False) + return model_top_folder_name in result + def _subfolder_exists(self, model_folder_name, location): """ Check to see if the folder represented by the model folder name exists at the current loction diff --git a/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py b/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py index 7e7a22451..259395300 100644 --- a/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py +++ b/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py @@ -353,7 +353,7 @@ def _get_nm_properties(self): model_top_folder_name = model_constants.NM_PROPERTIES result = OrderedDict() location = LocationContext(self._base_location) - if self._subfolder_exists(model_top_folder_name, location): + if self._topfolder_exists(model_top_folder_name): _logger.info('WLSDPLY-06627', class_name=_class_name, method_name=_method_name) location.append_location(model_top_folder_name) self._populate_model_parameters(result, location)