|
146 | 146 | MESSAGE = 'message' |
147 | 147 | ATTRIBUTE = 'attribute' |
148 | 148 |
|
149 | | -ALIAS_FOLDER_IGNORE_MAP = { |
150 | | - '/': [ |
151 | | - 'ODLConfiguration', |
152 | | - 'OHS', |
153 | | - 'RCUDbInfo', |
154 | | - 'Security', |
155 | | - 'UnixMachine', |
156 | | - 'WLSRoles', |
157 | | - 'WLSUserPasswordCredentialMappings' |
158 | | - ], |
159 | | - '/ResourceGroupTemplate': [ |
160 | | - 'OHS', |
161 | | - 'SystemComponent', |
162 | | - 'SystemComponents' |
163 | | - ] |
164 | | -} |
165 | | - |
166 | 149 | _logger = PlatformLogger('test.aliases.verify') |
167 | 150 | _logger.set_level(Level.FINER) |
168 | 151 | CLASS_NAME = 'Verifier' |
@@ -316,7 +299,7 @@ def _check_generated_against_alias_folders(self, location, generated_dictionary, |
316 | 299 | class_name=CLASS_NAME, method_name=_method_name) |
317 | 300 | if keys is not None: |
318 | 301 | for alias_name in keys: |
319 | | - if _is_in_ignore_list(location, alias_name): |
| 302 | + if verify_utils.is_alias_folder_in_ignore_list(self._model_context, location, alias_name): |
320 | 303 | continue |
321 | 304 |
|
322 | 305 | found, mbean_info_name = verify_utils.find_name_in_mbean_with_model_name(alias_name, lower_case_map) |
@@ -798,15 +781,16 @@ def _is_valid_default_value(self, location, generated_attribute, generated_attri |
798 | 781 | # is not marked as a derived_default. |
799 | 782 | # |
800 | 783 | if match and model_value is not None and not is_derived_default: |
801 | | - attr_type = type(generated_default) |
802 | | - if CMO_TYPE in generated_attribute_info and \ |
803 | | - (generated_attribute_info[CMO_TYPE] == alias_constants.BOOLEAN or |
804 | | - generated_attribute_info[CMO_TYPE] == alias_constants.JAVA_LANG_BOOLEAN) and \ |
805 | | - generated_default is not None and (attr_type in [str, unicode, int]): |
806 | | - generated_default = Boolean(generated_default) |
807 | | - message = 'Attribute=%s : Alias=%s' % (str(generated_default), str(model_default_value)) |
808 | | - self._add_error(location, ERROR_ATTRIBUTE_WRONG_DEFAULT_VALUE, |
809 | | - message=message, attribute=generated_attribute) |
| 784 | + if not verify_utils.is_attribute_value_test_anomaly(self._model_context, location, model_name, model_value): |
| 785 | + attr_type = type(generated_default) |
| 786 | + if CMO_TYPE in generated_attribute_info and \ |
| 787 | + (generated_attribute_info[CMO_TYPE] == alias_constants.BOOLEAN or |
| 788 | + generated_attribute_info[CMO_TYPE] == alias_constants.JAVA_LANG_BOOLEAN) and \ |
| 789 | + generated_default is not None and (attr_type in [str, unicode, int]): |
| 790 | + generated_default = Boolean(generated_default) |
| 791 | + message = 'Attribute=%s : Alias=%s' % (str(generated_default), str(model_default_value)) |
| 792 | + self._add_error(location, ERROR_ATTRIBUTE_WRONG_DEFAULT_VALUE, |
| 793 | + message=message, attribute=generated_attribute) |
810 | 794 |
|
811 | 795 | _logger.exiting(result=verify_utils.bool_to_string(match), class_name=CLASS_NAME, method_name=_method_name) |
812 | 796 | return match, model_name, model_value |
@@ -1498,13 +1482,6 @@ def _get_dict_key_from_value(alias_name_map, lower_case_value): |
1498 | 1482 | return result |
1499 | 1483 |
|
1500 | 1484 |
|
1501 | | -def _is_in_ignore_list(location, alias_name): |
1502 | | - path = location.get_folder_path() |
1503 | | - if path in ALIAS_FOLDER_IGNORE_MAP and alias_name in ALIAS_FOLDER_IGNORE_MAP[path]: |
1504 | | - return True |
1505 | | - return False |
1506 | | - |
1507 | | - |
1508 | 1485 | class VerifierResult(object): |
1509 | 1486 | CLASS_NAME = 'VerifierResult' |
1510 | 1487 |
|
|
0 commit comments