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

Refactor(eos_designs): Using common method for raising duplicate detection error in python_modules #3033

Merged

Conversation

Shivani-chourasiya
Copy link
Contributor

@Shivani-chourasiya Shivani-chourasiya commented Jul 10, 2023

Change Summary

Using common_method for raising duplicate detection error in python_modules

Related Issue(s)

Fixes #2749

Component(s) name

arista.avd.eos_designs

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)

@Shivani-chourasiya Shivani-chourasiya requested review from a team as code owners July 10, 2023 12:24
@github-actions github-actions bot added state: CI Updated CI scenario have been updated in the PR role: eos_designs issue related to eos_designs role labels Jul 10, 2023
@Shivani-chourasiya Shivani-chourasiya marked this pull request as draft July 10, 2023 12:25
@Shivani-chourasiya Shivani-chourasiya marked this pull request as ready for review July 11, 2023 12:22
@Shivani-chourasiya Shivani-chourasiya changed the title Refactor(eos_designs): Using common_method for raising duplicate detection error in python_modules Refactor(eos_designs): Using common method for raising duplicate detection error in python_modules Jul 12, 2023
list_of_dicts=ethernet_interfaces,
primary_key="name",
new_dict=ethernet_interface,
context="Ethernet Interfaces defined under underlay",
Copy link
Contributor

Choose a reason for hiding this comment

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

There is not really a concept of "under underlay" for a user of AVD so we need to reword this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

f"Duplicate port-channel name {candidate_port_channel_config['name']} with conflicting configurations found while generating port-channels for"
" connected-endpoints or network-ports"
)
append_if_not_duplicate(
Copy link
Contributor

Choose a reason for hiding this comment

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

do you still need the wrapper function _add_port_channel_if_not_duplicate ? it looks like we could remove it and just call append_if_not_duplicate in the main code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

list_of_dicts=neighbors,
primary_key="ip_address",
new_dict=neighbor,
context="Ip address defined under BGP neighbor for underlay",
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
context="Ip address defined under BGP neighbor for underlay",
context="IP address defined under BGP neighbor for underlay",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@Shivani-chourasiya Shivani-chourasiya marked this pull request as draft July 18, 2023 07:35
@Shivani-chourasiya Shivani-chourasiya force-pushed the shared_utils_duplicate branch 2 times, most recently from 2b5bf51 to 86aa6f6 Compare July 18, 2023 10:52
@Shivani-chourasiya Shivani-chourasiya marked this pull request as ready for review July 18, 2023 10:52
@Shivani-chourasiya Shivani-chourasiya force-pushed the shared_utils_duplicate branch 2 times, most recently from f9723b4 to fff8bc3 Compare July 18, 2023 10:55
@gmuloc gmuloc requested review from a team July 18, 2023 12:26
@carlbuchmann carlbuchmann merged commit a8be61d into aristanetworks:devel Jul 24, 2023
32 checks passed
@Shivani-chourasiya Shivani-chourasiya removed their assignment Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn: Refactor(eos_designs) role: eos_designs issue related to eos_designs role state: CI Updated CI scenario have been updated in the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor(eos_designs): Write a generic method in shared_utils for duplicate detection
5 participants