aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
290 stars 209 forks source link

Bug(eos_designs): SVI profile information not accounted inside eos_designs #1567

Closed xaviramon closed 2 years ago

xaviramon commented 2 years ago

Issue Summary

Under #1531 inheritance between SVI profiles is implemented. During testing, it was detected that even when some values are defined in the SVI profile, it will never be applied to the SVI itself. The SVI profile should work in a sense that anything that is defined inside them, they should be used in the SVI itself. Today's implementation prevents this behaviour, as eos_designs only looks at the SVI definitions and ignores the profile definitions.

Which component(s) of AVD impacted

eos_designs

How do you run AVD ?

Ansible CLI (with virtual-env or native python)

Steps to reproduce

Define a svi_profiles under network services:

svi_profiles:
  parent_profile_test:
    mtu: 1000
    enabled: true
  test1:
    name: "TEST1"
    enabled: true
    parent_profile: parent_profile_test

Then, define a SVI under a VRF without a value defined in the profile (name, in this example):

svis:
          51:
            description: "Des_VLAN51"
            profile: test1
            tags: [ every ]

Generation of the configuration will fail, complaining that "name" couldn't be found:

TASK [arista.avd.eos_designs : Generate device configuration in structured format] ************************************************************************************************
Monday 07 March 2022  11:35:15 +0100 (0:00:01.897)       0:00:09.941 ********** 
fatal: [POD1_LEAF01A -> localhost]: FAILED! => {"msg": "'dict object' has no attribute 'name'"}

Under debug-vars, we can see all information is filled in, but inside the profile:

svi_profiles:
  parent_profile_test:
    mtu: 1000
    enabled: true
  test1:
    name: TEST1
    enabled: true
    parent_profile: parent_profile_test
tenants:
  TENANT_A:
    enable_mlag_ibgp_peering_vrfs: true
    mac_vrf_vni_base: 10000
    vrfs:
      TENANT_A_VRF1:
        vrf_id: 1
        svis:
          51:
            description: Des_VLAN51
            profile: test1
            tags:
            - every

Relevant log output

No response

Contributing Guide

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days