Skip to content

Commit 2266258

Browse files
authored
JIRA WDT-505 - Use top-level attribute location to determine names (#778)
1 parent 68959ae commit 2266258

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/src/main/python/compare_model.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -266,19 +266,23 @@ def _parse_change_path(self, path):
266266
path_tokens = path.split(PATH_TOKEN)
267267
folder_names = self.aliases.get_model_section_top_level_folder_names(path_tokens[0])
268268

269+
attribute_names = []
270+
attributes_location = self.aliases.get_model_section_attribute_location(path_tokens[0])
271+
if attributes_location:
272+
attribute_names = self.aliases.get_model_attribute_names(attributes_location)
273+
269274
if path_tokens[0] == KUBERNETES:
270275
return None, None
271276

272277
for path_token in path_tokens[1:]:
273-
attribute_names = self.aliases.get_model_attribute_names(location)
274-
275278
if name_token_next:
276279
token_name = self.aliases.get_name_token(location)
277280
location.add_name_token(token_name, path_token)
278281
name_token_next = False
279282
elif path_token in folder_names:
280283
location.append_location(path_token)
281284
folder_names = self.aliases.get_model_subfolder_names(location)
285+
attribute_names = self.aliases.get_model_attribute_names(location)
282286
regular_type = not self.aliases.is_artificial_type_folder(location)
283287
security_type = regular_type and self.aliases.is_security_provider_type(location)
284288
multiple_type = regular_type and self.aliases.supports_multiple_mbean_instances(location)

0 commit comments

Comments
 (0)