Skip to content
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

Fix(eos_validate_state): ANTA Fix AvdTestBase structured_config objects #3447

Conversation

carl-baillargeon
Copy link
Contributor

@carl-baillargeon carl-baillargeon commented Dec 19, 2023

Change Summary

Re-adding some changes of commit 8f62845 that was lost in commit f821243 of PR #3407

Fixing other issues. See Proposed changes below.

Related Issue(s)

N/A

Component(s) name

arista.avd.eos_validate_state ANTA Mode

Proposed changes

  • Changed get_host_struct_cfg method name to get_host_structured_config for clarity
  • Fixed the commented cprofile()
  • Used Mapping from typing

How to test

Molecule

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)


# Check if struct_cfg is a dict or behaves like a dict (e.g. Ansible 'hostvars' object)
if not isinstance(struct_cfg, (dict, Mapping)):
# Check if struct_cfg is a mapping object (e.g. Ansible 'hostvars' object or regular dict)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Check if struct_cfg is a mapping object (e.g. Ansible 'hostvars' object or regular dict)
# Check if struct_cfg is a Mapping object (e.g. Ansible 'hostvars' object or regular dict)

Copy link
Contributor

@gmuloc gmuloc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gmuloc gmuloc requested review from a team December 19, 2023 09:45
@gmuloc
Copy link
Contributor

gmuloc commented Dec 19, 2023

so this changes does not impact our tests - can we test for it?

coffee needed ☕

@ClausHolbechArista ClausHolbechArista merged commit 0e84455 into aristanetworks:devel Dec 19, 2023
45 checks passed
@carl-baillargeon carl-baillargeon deleted the fix/avdtestbase_struct_cfg branch May 18, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants