Skip to content

Commit aded627

Browse files
find attribute marked ROD (#1251)
1 parent bc23552 commit aded627

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

core/src/main/python/wlsdeploy/aliases/aliases.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,34 @@ def get_wlst_get_required_attribute_names(self, location):
629629
self._raise_exception(ae, _method_name, 'WLSDPLY-19020', location.get_current_model_folder(),
630630
location.get_folder_path(), ae.getLocalizedMessage())
631631

632+
def get_wlst_access_rod_attribute_names(self, location):
633+
"""
634+
Get the list of attribute names that have their ACCESS type set to ROD (readonly but discover)
635+
:param location: the location
636+
:return: list[string]: the list of attribute names
637+
:raises: Tool type exception: if an error occurs due to a bad location or bad alias data
638+
"""
639+
_method_name = 'get_wlst_access_rod_attribute_names'
640+
641+
try:
642+
wlst_attribute_names = []
643+
644+
module_folder = self._alias_entries.get_dictionary_for_location(location)
645+
646+
if ATTRIBUTES not in module_folder:
647+
ex = exception_helper.create_alias_exception('WLSDPLY-08400', location.get_folder_path())
648+
self._logger.throwing(ex, class_name=self._class_name, method_name=_method_name)
649+
raise ex
650+
651+
for key, value in module_folder[ATTRIBUTES].iteritems():
652+
if ACCESS in value and value[ACCESS] == ROD:
653+
wlst_attribute_names.append(value[WLST_NAME])
654+
655+
return wlst_attribute_names
656+
except AliasException, ae:
657+
self._raise_exception(ae, _method_name, 'WLSDPLY-19046', location.get_current_model_folder(),
658+
location.get_folder_path(), ae.getLocalizedMessage())
659+
632660
###########################################################################
633661
# Model folder-related methods #
634662
###########################################################################

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,8 @@ WLSDPLY-19042=Failed to get the preferred model type for attribute {0} at locati
15361536
WLSDPLY-19043=Failed to get the read type for attribute {0} at location {1} : {2}
15371537
WLSDPLY-19044=Failed to get the ordering of subfolders at parent location {0} : {1}
15381538
WLSDPLY-19045=Failed to get the derived default value for attribute {0} at location {1} : {2}
1539+
WLSDPLY-19046=Failed to get the model attribute list that have ACCESS type ROD ({0}) \
1540+
at location ({1}): {2}
15391541

15401542
# wlsdeploy/tool/util/attribute_setter.py
15411543
WLSDPLY-19200=No target found with name {0}

0 commit comments

Comments
 (0)