Skip to content

Commit ec1dd3a

Browse files
authored
JIRA WDT-288 - Don't add attributes to the model that are not set (online discover) (#827)
1 parent 9715afa commit ec1dd3a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2017, 2020, Oracle Corporation and/or its affiliates.
2+
Copyright (c) 2017, 2021, Oracle Corporation and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
"""
55
import os
@@ -112,6 +112,13 @@ def _populate_model_parameters(self, dictionary, location):
112112
else:
113113
_logger.finer('WLSDPLY-06131', wlst_lsa_param, class_name=_class_name, method_name=_method_name)
114114
wlst_value = wlst_lsa_params[wlst_lsa_param]
115+
116+
# if attribute was never set (online only), don't add to the model
117+
if not self._wlst_helper.is_set(wlst_lsa_param):
118+
_logger.finest('WLSDPLY-06157', wlst_lsa_param, str(location), class_name=_class_name,
119+
method_name=_method_name)
120+
continue
121+
115122
self._add_to_dictionary(dictionary, location, wlst_lsa_param, wlst_value, wlst_path)
116123

117124
# These will come after the lsa / get params in the ordered dictionary

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ WLSDPLY-06154=Attribute {0} for model folder at location {1} is not in the lsa m
588588
to retrieve the attribute value
589589
WLSDPLY-06155=Attribute {0} value at location {1} replaced by token {2}
590590
WLSDPLY-06156=MBean not defined in alias definitions at location {0}. Will skip discovery of MBean folder.
591+
WLSDPLY-06157=Attribute {0} is not set at location {1}, omitting from model
591592

592593
# mbean_getter.py, attribute_getter.py specific to discover
593594
WLSDPLY-06200=Unable to get the Security Realm Provider location {0} in version {1} with offline WLST. \

0 commit comments

Comments
 (0)