netascode / ansible-dc-vxlan

Ansible Collection for configuring a VXLAN Fabric using Direct to Controller (DTC) or Direct To Device (DTD) workflows.
https://galaxy.ansible.com/ui/repo/published/cisco/nac_dc_vxlan/
MIT License
6 stars 6 forks source link

fix for rule 304 init vars #117

Closed juburnet closed 3 months ago

juburnet commented 3 months ago

vrf_attach_groups and network_attach_groups need to be initialized as lists before use.

Fixes the following error when running validation:

    for vrf_attach_group in vrf_attach_groups:
UnboundLocalError: local variable 'vrf_attach_groups' referenced before assignment
fatal: [fabric_empty]: FAILED! => {
    "msg": "Unexpected failure during module execution: local variable 'vrf_attach_groups' referenced before assignment",

The same error is present for for network_attach_groups

juburnet commented 3 months ago

@mtarking @mikewiebe - please review this fix when you get a chance.

mikewiebe commented 3 months ago

@juburnet Changes look fine to me. Did you run through the test data to make sure there were no side effects from this change?

juburnet commented 3 months ago

@mikewiebe yes the test data was successful and no side effects, no impact. This can be merged