Skip to content

Compare model - use top-level attribute location to determine names #778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions core/src/main/python/compare_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,23 @@ def _parse_change_path(self, path):
path_tokens = path.split(PATH_TOKEN)
folder_names = self.aliases.get_model_section_top_level_folder_names(path_tokens[0])

attribute_names = []
attributes_location = self.aliases.get_model_section_attribute_location(path_tokens[0])
if attributes_location:
attribute_names = self.aliases.get_model_attribute_names(attributes_location)

if path_tokens[0] == KUBERNETES:
return None, None

for path_token in path_tokens[1:]:
attribute_names = self.aliases.get_model_attribute_names(location)

if name_token_next:
token_name = self.aliases.get_name_token(location)
location.add_name_token(token_name, path_token)
name_token_next = False
elif path_token in folder_names:
location.append_location(path_token)
folder_names = self.aliases.get_model_subfolder_names(location)
attribute_names = self.aliases.get_model_attribute_names(location)
regular_type = not self.aliases.is_artificial_type_folder(location)
security_type = regular_type and self.aliases.is_security_provider_type(location)
multiple_type = regular_type and self.aliases.supports_multiple_mbean_instances(location)
Expand Down