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_designs): Inherited structured_config on multiple SVIs. #3298

Conversation

ClausHolbechArista
Copy link
Contributor

Change Summary

Fix inherited structured_config on multiple SVIs.

Related Issue(s)

When using structured config from svi_profiles the value of structured_config was only applied to the last item.

Component(s) name

arista.avd.eos_designs

Proposed changes

Fix unpacking of structured config to avoid changing the original dict.

How to test

Added a test case to molecule and confirmed the issue. Fixed and confirmed it was solved.

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)

@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 Oct 25, 2023
@pmprado
Copy link
Contributor

pmprado commented Oct 25, 2023

This is the config that was failing before and works after applying this fix:

        svis:
          - id: 100
            name: V100-ToISPs-VRF-INTERNET
            profile: internet_svi_profile
            nodes:
              - node: Leaf-A
                ip_address: 10.0.0.1/24
              - node: Leaf-B
                ip_address: 10.0.0.2/24
            vxlan: false
          - id: 2101
            name: V2101-Properties-VRF-INTERNET
            profile: internet_svi_profile
            ip_address_virtual: 10.1.0.1/24
            vxlan: true
          - id: 2102
            name: V2102-Properties-VRF-INTERNET
            profile: internet_svi_profile
            ip_address_virtual: 10.2.0.1/24
            vxlan: true


svi_profiles:
  - profile: internet_svi_profile
    enabled: true
    tags: [Internet]
    structured_config:
      arp_gratuitous_accept: true

Result:

interface Vlan100
   description V100-ToISPs-VRF-INTERNET
   no shutdown
   vrf INTERNET
   arp gratuitous accept
   ip address 10.0.0.1/24
!
interface Vlan2101
   description V2101-Properties-VRF-INTERNET
   no shutdown
   vrf INTERNET
   arp gratuitous accept
   ip address virtual 10.1.0.1/24
!
interface Vlan2102
   description V2102-Properties-VRF-INTERNET
   no shutdown
   vrf INTERNET
   arp gratuitous accept
   ip address virtual 10.2.0.1/24

Before the fix, arp gratuitous accept was showing only on Vlan2102.

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 gmuloc and a team October 25, 2023 14:45
Copy link
Contributor

@pmprado pmprado left a comment

Choose a reason for hiding this comment

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

Seems sane!

@gmuloc gmuloc merged commit 4f07005 into aristanetworks:devel Oct 25, 2023
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn: Fix(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.

None yet

3 participants