Skip to content

Commit 22be4cd

Browse files
Merge branch 'Issue#164-support-custom-security-providers' of github.com:oracle/weblogic-deploy-tooling into Issue#164-support-custom-security-providers
2 parents fb105b1 + 02ce9d8 commit 22be4cd

File tree

5 files changed

+61
-53
lines changed

5 files changed

+61
-53
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from wlsdeploy.exception import exception_helper
1212
from wlsdeploy.exception.expection_types import ExceptionType
1313
from wlsdeploy.logging.platform_logger import PlatformLogger
14+
from wlsdeploy.tool.deploy import deployer_utils
1415
from wlsdeploy.tool.util.alias_helper import AliasHelper
1516
from wlsdeploy.tool.util.attribute_setter import AttributeSetter
1617
from wlsdeploy.tool.util.custom_folder_helper import CustomFolderHelper
@@ -134,6 +135,11 @@ def _create_mbean(self, type_name, model_nodes, base_location, log_created=False
134135

135136
token_name = self.alias_helper.get_name_token(location)
136137
if token_name is not None:
138+
if self.alias_helper.requires_unpredictable_single_name_handling(location):
139+
existing_subfolder_names = deployer_utils.get_existing_object_list(location, self.alias_helper)
140+
if len(existing_subfolder_names) > 0:
141+
mbean_name = existing_subfolder_names[0]
142+
137143
location.add_name_token(token_name, mbean_name)
138144

139145
self._process_flattened_folder(location)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
from wlsdeploy.exception.expection_types import ExceptionType
5151
from wlsdeploy.tool.create.creator import Creator
5252
from wlsdeploy.tool.create.security_provider_creator import SecurityProviderCreator
53+
from wlsdeploy.tool.deploy import deployer_utils
5354
from wlsdeploy.tool.deploy import model_deployer
5455
from wlsdeploy.tool.util.archive_helper import ArchiveHelper
5556
from wlsdeploy.tool.util.library_helper import LibraryHelper
@@ -853,7 +854,7 @@ def _configure_security_configuration(self):
853854
# SecurityConfiguration is special since the subfolder name does not change when you change the domain name.
854855
# It only changes once the domain is written and re-read...
855856
location = LocationContext()
856-
domain_name_token = self.alias_helper.get_name_token(location)
857+
domain_name_token = deployer_utils.get_domain_token(self.alias_helper)
857858
security_config_location = LocationContext().add_name_token(domain_name_token, self._domain_name)
858859
self.security_provider_creator.create_security_configuration(security_config_location)
859860
self.logger.exiting(class_name=self.__class_name, method_name=_method_name)

core/src/main/python/wlsdeploy/tool/deploy/deployer_utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
from wlsdeploy.aliases.model_constants import RESOURCE_GROUP
2222
from wlsdeploy.aliases.model_constants import RESOURCE_GROUP_TEMPLATE
23-
from wlsdeploy.aliases.model_constants import SECURITY_CONFIGURATION
2423

2524
_class_name = "deployer_utils"
2625
_logger = platform_logger.PlatformLogger('wlsdeploy.deploy.utils')
@@ -157,9 +156,7 @@ def get_domain_token(alias_helper):
157156
Returns the domain token required by some root-level WLST elements.
158157
:return: the domain token
159158
"""
160-
# determine the domain token by checking security configuration
161-
security_location = LocationContext().append_location(SECURITY_CONFIGURATION)
162-
return alias_helper.get_name_token(security_location)
159+
return "DOMAIN"
163160

164161

165162
def is_in_resource_group_or_template(location):

0 commit comments

Comments
 (0)