Skip to content

Commit 04ab48a

Browse files
Cleaned up messages
1 parent 810efdb commit 04ab48a

File tree

3 files changed

+18
-21
lines changed

3 files changed

+18
-21
lines changed

core/src/main/python/wlsdeploy/tool/create/creator.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"""
55

66
from oracle.weblogic.deploy.util import WLSDeployArchive
7+
from oracle.weblogic.deploy.exception import BundleAwareException
78

89
from wlsdeploy.aliases.location_context import LocationContext
9-
from wlsdeploy.aliases.model_constants import SECURITY_CONFIGURATION
1010
from wlsdeploy.aliases.validation_codes import ValidationCodes
1111
from wlsdeploy.exception import exception_helper
1212
from wlsdeploy.exception.expection_types import ExceptionType
@@ -189,8 +189,6 @@ def _create_security_provider_mbeans(self, type_name, model_nodes, base_location
189189
existing_folder_names = self._get_existing_folders(list_path)
190190
known_providers = self.alias_helper.get_model_subfolder_names(location)
191191
allow_custom = str(self.alias_helper.is_custom_folder_allowed(location))
192-
self.logger.finer('create path {0}, list_path {1}, existing folders {2}', create_path, list_path,
193-
str(existing_folder_names))
194192

195193
for model_name in model_nodes:
196194
model_node = model_nodes[model_name]
@@ -491,9 +489,18 @@ def _delete_existing_providers(self, location):
491489
create_path = self.alias_helper.get_wlst_create_path(location)
492490
self.wlst_helper.cd(create_path)
493491
for existing_folder_name in existing_folder_names:
494-
self.wlst_helper.delete(existing_folder_name, wlst_base_provider_type)
495-
self.logger.finer('Removed default provider {0} from provider {1} at location {2}',
496-
existing_folder_name, wlst_base_provider_type, create_path)
492+
try:
493+
self.wlst_helper.delete(existing_folder_name, wlst_base_provider_type)
494+
self.logger.finer('Removed default provider {0} from provider {1} at location {2}',
495+
existing_folder_name, wlst_base_provider_type, create_path)
496+
except BundleAwareException, bae:
497+
ex = exception_helper.create_exception(self._exception_type, 'WLSDPLY-12134', existing_folder_name,
498+
self.wls_helper.get_weblogic_version(),
499+
wlst_base_provider_type, bae.getLocalizedMessage(),
500+
error=bae)
501+
self.logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
502+
raise ex
503+
497504
self.logger.exiting(class_name=self.__class_name, method_name=_method_name)
498505
return
499506

core/src/main/python/wlsdeploy/tool/util/wlst_helper.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
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.
33
The Universal Permissive License (UPL), Version 1.0
44
"""
55
from oracle.weblogic.deploy.util import PyWLSTException
@@ -41,19 +41,6 @@ def assign(self, source_type, source_name, target_type, target_name):
4141
self.__logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
4242
raise ex
4343

44-
45-
def reorder_provider(self, provider_type, provider_map, wlst_path):
46-
"""
47-
Retrieve the list of security providers at the provided path and
48-
:param provider_type: MBean Type of the Security Provider, i.e. AuthenticationProvider
49-
:param provider_map: Map of mbean names and corresponding mbean type
50-
:param wlst_path: Location of the realm where the Mbeans will be reordered.
51-
:return: Map of provider name and corresponding mbean object
52-
"""
53-
_method_name = 'reorder_provider'
54-
55-
56-
5744
def cd(self, wlst_path):
5845
"""
5946
Change WLST directories to the specified path
@@ -172,7 +159,7 @@ def delete(self, wlst_name, wlst_type):
172159
try:
173160
wlst_helper.delete(wlst_name, wlst_type)
174161
except PyWLSTException, pwe:
175-
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19103', wlst_type, wlst_name,
162+
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19135', wlst_type, wlst_name,
176163
pwe.getLocalizedMessage(), error=pwe)
177164
self.__logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
178165
raise ex

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,9 @@ WLSDPLY-12130=The set method for attribute {0} has {1} arguments
959959
WLSDPLY-12131=Unable to invoke method "{0}" with argument {1}: {2}
960960
WLSDPLY-12132=Unrecognized data type {0}
961961
WLSDPLY-12133=Unable to convert "{0}" to value of type {1}
962+
WLSDPLY-12134=Unable to remove "{0}" in target domain release {1}. The remove is required to properly configure \
963+
the Realm Provider Type {2}. Consult the WebLogic Deploy Tool documentation for further information. : {3}
964+
WLSDPLY-12135=Removed Security provider {0} with Provider type {1} at location {2}
962965

963966
# domain_creator.py
964967
WLSDPLY-12200={0} did not find the required {1} section in the model file {2}

0 commit comments

Comments
 (0)