Skip to content

Commit 30fd048

Browse files
committed
JIRA WDT-47 Pass required values to custom folder helper
1 parent a0f2d72 commit 30fd048

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,13 @@ def _create_security_provider_mbeans(self, type_name, model_nodes, base_location
200200
self.logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
201201
raise ex
202202

203+
model_type_subfolder_name = list(model_node.keys())[0]
204+
child_nodes = dictionary_utils.get_dictionary_element(model_node, model_type_subfolder_name)
205+
203206
# custom providers require special processing, they are not described in alias framework
204-
if allow_custom and (model_name not in known_providers):
205-
self.custom_folder_helper.update_security_folder(location, model_name, model_node)
207+
if allow_custom and (model_type_subfolder_name not in known_providers):
208+
self.custom_folder_helper.update_security_folder(base_location, type_name, model_type_subfolder_name,
209+
model_name, child_nodes)
206210
continue
207211

208212
# for a known provider, process using aliases
@@ -213,7 +217,6 @@ def _create_security_provider_mbeans(self, type_name, model_nodes, base_location
213217

214218
wlst_base_provider_type, wlst_name = self.alias_helper.get_wlst_mbean_type_and_name(prov_location)
215219

216-
model_type_subfolder_name = list(model_node.keys())[0]
217220
prov_location.append_location(model_type_subfolder_name)
218221
wlst_type = self.alias_helper.get_wlst_mbean_type(prov_location)
219222

@@ -237,7 +240,6 @@ def _create_security_provider_mbeans(self, type_name, model_nodes, base_location
237240
attribute_path = self.alias_helper.get_wlst_attributes_path(prov_location)
238241
self.wlst_helper.cd(attribute_path)
239242

240-
child_nodes = dictionary_utils.get_dictionary_element(model_node, model_type_subfolder_name)
241243
self.logger.finest('WLSDPLY-12111', self.alias_helper.get_model_folder_path(prov_location),
242244
self.wlst_helper.get_pwd(), class_name=self.__class_name, method_name=_method_name)
243245
self._set_attributes(prov_location, child_nodes)

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,26 @@ def __init__(self, aliases, logger, exception_type):
2020
self.alias_helper = AliasHelper(aliases, self.logger, self.exception_type)
2121
self.wlst_helper = WlstHelper(self.logger, self.exception_type)
2222

23-
def update_security_folder(self, location, model_name, model_nodes):
23+
def update_security_folder(self, location, model_category, model_type, model_name, model_nodes):
2424
"""
2525
Update the specified security model nodes in WLST.
26-
:param location: the location of the folder's parent
27-
:param model_name: the model name of the folder to be updated
28-
:param model_nodes: a child model nodes of the folder to be updated
26+
:param location: the location for the provider
27+
:param model_category: the model category of the provider to be updated
28+
:param model_type: the model type of the provider to be updated
29+
:param model_name: the model name of the provider to be updated
30+
:param model_nodes: a child model nodes of the provider to be updated
2931
:raises: BundleAwareException of the specified type: if an error occurs
3032
"""
3133
_method_name = 'update_security_folder'
3234

33-
self.logger.entering(str(location), model_name, class_name=self.__class_name, method_name=_method_name)
35+
location_path = self.alias_helper.get_model_folder_path(location)
36+
self.logger.entering(location_path, model_type, model_name,
37+
class_name=self.__class_name, method_name=_method_name)
3438

35-
self.logger.info('WLSDPLY-12124', model_name, self.alias_helper.get_model_folder_path(location),
39+
self.logger.info('WLSDPLY-12124', model_category, model_name, model_type, location_path,
3640
class_name=self.__class_name, method_name=_method_name)
41+
42+
# create the MBean using the model name, model_type, category
43+
44+
# wlst.create(model_name, model_type, category)
45+
# wlst.create('RAK-SAML', 'SAMLAuthenticator', 'AuthenticationProvider')

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ WLSDPLY-12122=The attribute {0} in model location {1} has value {2} that referen
949949
archive file but the archive file was not provided
950950
# The WLSDPLY-12123 resource is used for messages returned from aliases.is_version_valid_location()
951951
WLSDPLY-12123={0}
952-
WLSDPLY-12124=Updating custom security folder {0} at location {1}
952+
WLSDPLY-12124=Updating {0} "{1}" ({2}) at location {3}
953953

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

0 commit comments

Comments
 (0)