Skip to content

Commit dde9397

Browse files
Discover in online needs to do more interrogation of attributes
1 parent bcd85b7 commit dde9397

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from wlsdeploy.tool.discover import discoverer
1919
from wlsdeploy.tool.discover.discoverer import Discoverer
2020
from wlsdeploy.util import path_utils
21+
from wlsdeploy.util import string_utils
2122
from wlsdeploy.util import wlst_helper
2223

2324
_class_name = 'TopologyDiscoverer'
@@ -585,21 +586,22 @@ def _add_keystore_file_to_archive(self, model_name, model_value, location):
585586
"""
586587
_method_name = '_add_keystore_file_to_archive'
587588
_logger.entering(model_name, str(location), class_name=_class_name, method_name=_method_name)
588-
server_name = self._get_server_name_from_location(location)
589-
_logger.finer('WLSDPLY-06223', model_value, server_name, class_name=_class_name, method_name=_method_name)
590-
archive_file = self._model_context.get_archive_file()
591-
file_path = self._convert_path(model_value)
592589
new_name = None
593-
try:
594-
archive_file.addServerKeyStoreFile(server_name, File(file_path))
595-
except IllegalArgumentException, iae:
596-
_logger.warning('WLSDPLY-06624', server_name, file_path, iae.getLocalizedMessage(),
597-
class_name=_class_name, method_name=_method_name)
598-
except WLSDeployArchiveIOException, wioe:
599-
de = exception_helper.create_discover_exception('WLSDPLY-06625', server_name, file_path,
600-
wioe.getLocalizedMessage())
601-
_logger.throwing(class_name=_class_name, method_name=_method_name, error=de)
602-
raise de
590+
if not string_utils.is_empty(model_value):
591+
server_name = self._get_server_name_from_location(location)
592+
archive_file = self._model_context.get_archive_file()
593+
file_path = self._convert_path(model_value)
594+
_logger.finer('WLSDPLY-06623', file_path, server_name, class_name=_class_name, method_name=_method_name)
595+
try:
596+
new_name = archive_file.addServerKeyStoreFile(server_name, File(file_path))
597+
except IllegalArgumentException, iae:
598+
_logger.warning('WLSDPLY-06624', server_name, file_path, iae.getLocalizedMessage(),
599+
class_name=_class_name, method_name=_method_name)
600+
except WLSDeployArchiveIOException, wioe:
601+
de = exception_helper.create_discover_exception('WLSDPLY-06625', server_name, file_path,
602+
wioe.getLocalizedMessage())
603+
_logger.throwing(class_name=_class_name, method_name=_method_name, error=de)
604+
raise de
603605
_logger.exiting(class_name=_class_name, method_name=_method_name, result=new_name)
604606
return new_name
605607

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,8 @@ WLSDPLY-06130=Unexpected exception attempting to discover MBean entries at {0} w
459459
WLSDPLY-06131=Attribute {0} retrieved from lsa() map
460460
WLSDPLY-06140=Unable to cd to the expected path {0} constructed from location context {1}; the current folder \
461461
and its sub-folders cannot be discovered : {2}
462+
WLSDPLY-06141=Add online attribute {0} and value to the current attribute lsa() list
463+
WLSDPLY-06142=The online attribute {0} is in the lsa() list but is a folder not an attribute
462464

463465
# resources_discoverer.py
464466
WLSDPLY-06300=Discovering domain model resources

0 commit comments

Comments
 (0)