|
18 | 18 | from wlsdeploy.tool.discover import discoverer |
19 | 19 | from wlsdeploy.tool.discover.discoverer import Discoverer |
20 | 20 | from wlsdeploy.util import path_utils |
| 21 | +from wlsdeploy.util import string_utils |
21 | 22 | from wlsdeploy.util import wlst_helper |
22 | 23 |
|
23 | 24 | _class_name = 'TopologyDiscoverer' |
@@ -585,21 +586,22 @@ def _add_keystore_file_to_archive(self, model_name, model_value, location): |
585 | 586 | """ |
586 | 587 | _method_name = '_add_keystore_file_to_archive' |
587 | 588 | _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) |
592 | 589 | 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 |
603 | 605 | _logger.exiting(class_name=_class_name, method_name=_method_name, result=new_name) |
604 | 606 | return new_name |
605 | 607 |
|
|
0 commit comments