|
1 | 1 | """
|
2 |
| -Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
| 2 | +Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | The Universal Permissive License (UPL), Version 1.0
|
4 | 4 | """
|
5 | 5 | from java.io import File
|
@@ -86,9 +86,11 @@ def get_coherence_clusters(self):
|
86 | 86 | result[coherence_cluster] = OrderedDict()
|
87 | 87 | self._populate_model_parameters(result[coherence_cluster], location)
|
88 | 88 | model_subfolder_name, subfolder_result = self.get_coherence_cache_config(location)
|
89 |
| - discoverer.add_to_model_if_not_empty(result[coherence_cluster], model_subfolder_name, subfolder_result) |
| 89 | + discoverer.add_to_model_if_not_empty(result[coherence_cluster], model_subfolder_name, |
| 90 | + subfolder_result) |
90 | 91 | model_subfolder_name, subfolder_result = self.get_coherence_resource(location)
|
91 |
| - discoverer.add_to_model_if_not_empty(result[coherence_cluster], model_subfolder_name, subfolder_result) |
| 92 | + discoverer.add_to_model_if_not_empty(result[coherence_cluster], model_subfolder_name, |
| 93 | + subfolder_result) |
92 | 94 | location.remove_name_token(name_token)
|
93 | 95 |
|
94 | 96 | _logger.exiting(class_name=_class_name, method_name=_method_name, result=result)
|
@@ -159,20 +161,21 @@ def _add_custom_configuration_to_archive(self, model_name, model_value, location
|
159 | 161 | new_name = model_value
|
160 | 162 | if model_value is not None:
|
161 | 163 | archive_file = self._model_context.get_archive_file()
|
| 164 | + file_name_path = self._convert_path(model_value) |
162 | 165 | config_file = None
|
163 | 166 | try:
|
164 |
| - config_file = FileUtils.getCanonicalFile(File(model_value)) |
| 167 | + config_file = FileUtils.getCanonicalFile(File(file_name_path)) |
165 | 168 | except (IOException, SecurityException), se:
|
166 |
| - _logger.warning('WLSDPLY-06314', cluster_name, model_value, se.getLocalizedMessage(), |
| 169 | + _logger.warning('WLSDPLY-06314', cluster_name, file_name_path, se.getLocalizedMessage(), |
167 | 170 | class_name=_class_name, method_name=_method_name)
|
168 | 171 | new_name = None
|
169 | 172 |
|
170 | 173 | if file is not None:
|
171 | 174 | try:
|
172 | 175 | new_name = archive_file.addCoherenceConfigFile(cluster_name, config_file)
|
173 |
| - _logger.finer('WLSDPLY-06315', model_value, class_name=_class_name, method_name=_method_name) |
| 176 | + _logger.finer('WLSDPLY-06315', file_name_path, class_name=_class_name, method_name=_method_name) |
174 | 177 | except (IllegalArgumentException, WLSDeployArchiveIOException), wioe:
|
175 |
| - _logger.warning('WLSDPLY-06316', cluster_name, model_value, wioe.getLocalizedMessage(), |
| 178 | + _logger.warning('WLSDPLY-06316', cluster_name, file_name_path, wioe.getLocalizedMessage(), |
176 | 179 | class_name=_class_name, method_name=_method_name)
|
177 | 180 | new_name = None
|
178 | 181 |
|
@@ -209,12 +212,13 @@ def _add_cache_config(self, model_name, model_value, location):
|
209 | 212 | class_name=_class_name, method_name=_method_name)
|
210 | 213 | new_name = None
|
211 | 214 | else:
|
| 215 | + file_name = self._convert_path(model_value) |
212 | 216 | try:
|
213 |
| - new_name = archive_file.addCoherenceConfigFile(cluster_name, File(model_value)) |
214 |
| - _logger.info('WLSDPLY-06319', cluster_name, model_value, new_name, class_name=_class_name, |
| 217 | + new_name = archive_file.addCoherenceConfigFile(cluster_name, File(file_name)) |
| 218 | + _logger.info('WLSDPLY-06319', cluster_name, file_name, new_name, class_name=_class_name, |
215 | 219 | method_name=_method_name)
|
216 | 220 | except (IllegalArgumentException, WLSDeployArchiveIOException), wioe:
|
217 |
| - _logger.warning('WLSDPLY-06318', cluster_name, model_value, 'file', wioe.getLocalizedMessage()) |
| 221 | + _logger.warning('WLSDPLY-06318', cluster_name, file_name, 'file', wioe.getLocalizedMessage()) |
218 | 222 | new_name = None
|
219 | 223 |
|
220 | 224 | _logger.exiting(class_name=_class_name, method_name=_method_name, result=new_name)
|
|
0 commit comments