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

Add rule to ensure vxlan.global.name is defined #212

Open
mikewiebe opened this issue Oct 30, 2024 · 1 comment · May be fixed by #249
Open

Add rule to ensure vxlan.global.name is defined #212

mikewiebe opened this issue Oct 30, 2024 · 1 comment · May be fixed by #249
Assignees
Labels
bug Something isn't working

Comments

@mikewiebe
Copy link
Collaborator

Ansible Version

ansible [core 2.16.5]
  config file = /Users/mwiebe/Projects/Ansible/nac-vxlan/ansible.cfg
  configured module search path = ['/Users/mwiebe/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/mwiebe/.pyenv/versions/3.10.10/envs/ansible_3_10_10/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/mwiebe/Projects/Ansible/nac-vxlan/collections/ansible_collections
  executable location = /Users/mwiebe/.pyenv/versions/ansible_3_10_10/bin/ansible
  python version = 3.10.10 (main, Mar 28 2023, 08:48:46) [Clang 14.0.0 (clang-1400.0.29.202)] (/Users/mwiebe/.pyenv/versions/3.10.10/envs/ansible_3_10_10/bin/python3.10)
  jinja version = 3.1.3
  libyaml = True

Ansible Collection Versions

Collection                               Version
---------------------------------------- -------
ansible.netcommon                        5.3.0  
ansible.posix                            1.5.4  
ansible.utils                            2.11.0 
cisco.dcnm                               3.5.1  
cisco.nac_dc_vxlan                       0.2.0  
cisco.nxos                               5.3.0  
community.general                        8.5.0

Cisco NDFC Version

12.1.3b

Cisco NX-OS Version

10.4(1)

Which role is this issue related to?

cisco.nac_dc_vxlan.validate

Which section of the data model is this issue related to?

vxlan.global

Expected Behavior

If the user provides data under vxlan.global but fails to specify the name or does not provide any data for vxlan.global the playbook should fail indicating the name is mandatory.

Actual Behavior

If the user does provide data under `vxlan.global` but does not specify the `name` parameter the schema will detect it and fail since it's mandatory in the schema.

If no data is provided under `vxlan.global` the schema check is ignored and the first plugin that tries to access `vxlan.global` fails with the error below.


TASK [cisco.nac_dc_vxlan.validate : Read Run Map From Previous Run] ***********************************************************************************************
Wednesday 30 October 2024  16:48:14 -0400 (0:00:00.013)       0:00:02.179 ***** 
Wednesday 30 October 2024  16:48:14 -0400 (0:00:00.013)       0:00:02.179 ***** 
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'global'
fatal: [nac-ndfc1 -> localhost]: FAILED! => {"msg": "Unexpected failure during module execution: 'global'", "stdout": ""}

Ansible Playbook

Run validate role without vxlan.global data

Steps to Reproduce

Run validate role without vxlan.global data

Relevant Debug Output

TASK [cisco.nac_dc_vxlan.validate : Read Run Map From Previous Run] ***********************************************************************************************
Wednesday 30 October 2024  16:48:14 -0400 (0:00:00.013)       0:00:02.179 ***** 
Wednesday 30 October 2024  16:48:14 -0400 (0:00:00.013)       0:00:02.179 ***** 
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'global'
fatal: [nac-ndfc1 -> localhost]: FAILED! => {"msg": "Unexpected failure during module execution: 'global'", "stdout": ""}
@mikewiebe mikewiebe added the bug Something isn't working label Oct 30, 2024
@juburnet juburnet changed the title Add rule to ensure vxlan.globa.name is defined Add rule to ensure vxlan.global.name is defined Oct 31, 2024
@juburnet
Copy link
Collaborator

Some users will run without schema and not have validation.

@mtarking mtarking linked a pull request Dec 11, 2024 that will close this issue
16 tasks
@mtarking mtarking linked a pull request Dec 11, 2024 that will close this issue
16 tasks
@mtarking mtarking self-assigned this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants