Skip to content

Commit a1a50d5

Browse files
moving missing alias entries for securit providers to warnings (#1227)
1 parent dc57d76 commit a1a50d5

File tree

1 file changed

+11
-2
lines changed
  • integration-tests/alias-test/verify/src/test/python/aliastest/verify

1 file changed

+11
-2
lines changed

integration-tests/alias-test/verify/src/test/python/aliastest/verify/verifier.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
ERROR_ATTRIBUTE_PATH_TOKEN_REQUIRED = 4022
9797
ERROR_ATTRIBUTE_WRONG_DEFAULT_VALUE = 4023
9898
ERROR_ATTRIBUTE_MUST_BE_NO_NAME = 4024
99+
ERROR_FLATTENED_MBEAN_ATTRIBUTE_ERROR = 4025
99100

100101
MSG_MAP = {
101102
TESTED_MBEAN_FOLDER: 'Verified',
@@ -135,7 +136,8 @@
135136
ERROR_CANNOT_TEST_MBEAN_UNSPECIFIED: 'Unspecified problem',
136137
ERROR_CANNOT_TEST_MBEAN_CD: 'Cannot create MBean',
137138
ERROR_FAILURE_ATTRIBUTE_UNEXPECTED: 'Unexpected condition for attribute',
138-
ERROR_ATTRIBUTE_PASSWORD_NOT_MARKED: 'Attribute not marked as password'
139+
ERROR_ATTRIBUTE_PASSWORD_NOT_MARKED: 'Attribute not marked as password',
140+
ERROR_FLATTENED_MBEAN_ATTRIBUTE_ERROR: 'Attribute exists for flattened folder in aliases'
139141
}
140142
MSG_ID = 'id'
141143
LOCATION = 'location'
@@ -537,6 +539,12 @@ def _does_alias_attribute_exist(self, location, generated_attribute, generated_a
537539
elif self._is_generated_attribute_readonly(location, generated_attribute, generated_attribute_info):
538540
self._add_error(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND_IS_READONLY,
539541
attribute=generated_attribute, message=message)
542+
elif location.get_folder_path().startswith('/SecurityConfiguration/Realm'):
543+
# We are not fully implementing Security Providers and only intend to
544+
# add attributes as customers need them so make these warnings.
545+
#
546+
self._add_warning(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND,
547+
attribute=generated_attribute, message=message)
540548
else:
541549
self._add_error(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND,
542550
attribute=generated_attribute, message=message)
@@ -963,7 +971,8 @@ def _check_attribute_list_for_flattened(self, location, attributes):
963971
if len(attributes) > 0:
964972
self._add_error(location, ERROR_FLATTENED_MBEAN_HAS_ATTRIBUTES)
965973
for attribute in attributes:
966-
self._add_error(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND, attribute=attribute)
974+
message = 'Flattened location %s has attribute %s' % (location.get_folder_path(), attribute)
975+
self._add_error(location, ERROR_FLATTENED_MBEAN_ATTRIBUTE_ERROR, message=message, attribute=attribute)
967976

968977
def _check_single_folder(self, dictionary, location, is_flattened_folder):
969978
"""

0 commit comments

Comments
 (0)