Skip to content

Commit 32bc525

Browse files
CarolynRountreeddsharpe
authored andcommitted
Add the domain name and domainInfo admin credentials automatically in discover (#470)
1 parent ad291ad commit 32bc525

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

core/src/main/python/wlsdeploy/tool/discover/domain_info_discoverer.py

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from oracle.weblogic.deploy.util import WLSDeployArchiveIOException
1111
from oracle.weblogic.deploy.util import FileUtils
1212

13+
from wlsdeploy.aliases import alias_constants
1314
from wlsdeploy.aliases import model_constants
1415
from wlsdeploy.aliases.wlst_modes import WlstModes
1516
from wlsdeploy.exception import exception_helper
@@ -40,13 +41,18 @@ def discover(self):
4041
"""
4142
_method_name = 'discover'
4243
_logger.entering(class_name=_class_name, method_name=_method_name)
44+
self.add_admin_credentials()
4345
model_top_folder_name, result = self.get_domain_libs()
4446
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, result)
4547
model_top_folder_name, result = self.get_user_env_scripts()
4648
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, result)
4749
_logger.exiting(class_name=_class_name, method_name=_method_name)
4850
return self._dictionary
4951

52+
def add_admin_credentials(self):
53+
self._dictionary[model_constants.ADMIN_USERNAME] = alias_constants.PASSWORD_TOKEN
54+
self._dictionary[model_constants.ADMIN_PASSWORD] = alias_constants.PASSWORD_TOKEN
55+
5056
def get_domain_libs(self):
5157
"""
5258
Add the java archive files stored in the domain lib into the archive file. Add the information for each

core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py

+6
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,13 @@ def discover_domain_parameters(self):
256256
"""
257257
_method_name = 'discover_domain_parameters'
258258
_logger.entering(class_name=_class_name, method_name=_method_name)
259+
domain_home = '/'
259260
location = LocationContext(self._base_location)
261+
# This is temporary until a do not ignore is created for DomainName
262+
success, wlst_value = self._get_attribute_value_with_get(model_constants.DOMAIN_NAME, domain_home)
263+
if success and wlst_value:
264+
self._dictionary[model_constants.DOMAIN_NAME] = wlst_value
265+
260266
self._populate_model_parameters(self._dictionary, location)
261267

262268
model_folder_name, folder_result = self._get_admin_console()

0 commit comments

Comments
 (0)