Skip to content

Conversation

@ccoueffe
Copy link
Collaborator

@ccoueffe ccoueffe commented Nov 25, 2025

Related Issue(s)

Related Collection Role

  • cisco.nac_dc_vxlan.validate
  • cisco.nac_dc_vxlan.dtc.create
  • cisco.nac_dc_vxlan.dtc.deploy
  • cisco.nac_dc_vxlan.dtc.remove
  • other

Related Data Model Element

  • vxlan.fabric
  • vxlan.global
  • vxlan.topology
  • vxlan.underlay
  • vxlan.overlay
  • vxlan.overlay_extensions
  • vxlan.policy
  • vxlan.multisite
  • defaults.vxlan
  • other

Proposed Changes

Update the data model to include an MD5 hash of the policy filename, enabling state comparison by storing this value in the data model.

Example during the playbook, when change is detected:

TASK [cisco.nac_dc_vxlan.validate : Display Model File Changes] **********************************************************************************************************************************************************************************************************************************************************************************
Tuesday 25 November 2025  19:43:10 +0100 (0:00:00.025)       0:00:05.429 ****** 
Tuesday 25 November 2025  19:43:10 +0100 (0:00:00.025)       0:00:05.428 ****** 
--- before
+++ after
@@ -3733,7 +3733,7 @@
                     },
                     {
                         "filename": "/home/cisco/nac-ndfc/data/copp.cfg",
-                        "md5": "079c0a579ebec963fc2e18b4e8cff505",
+                        "md5": "bc3a0a05d7fe9b4bcf5295b3525606a1",
                         "name": "copp",
                         "template_name": "switch_freeform"
                     }

changed: [nac-ndfc2 -> localhost]

Update rule 501 to test during nac-validate if file exists when use in policy.

Example when doesn't exist:

ERROR - Semantic error, rule 501: Verify policy cross reference between policies, groups, and switches (['Filename /workspace/nac-ndfc/data/ccopp.cfg does not exist in policy: copp '])

Test Notes

Cisco Nexus Dashboard Version

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly
  • Assigned the proper reviewers

@ccoueffe ccoueffe self-assigned this Nov 25, 2025
@ccoueffe ccoueffe marked this pull request as ready for review November 26, 2025 07:47
@ccoueffe ccoueffe requested a review from a team as a code owner November 26, 2025 07:47
@ccoueffe ccoueffe added the 0.6.0 Release 0.6.0 label Nov 26, 2025
@ccoueffe ccoueffe changed the title Update data model in validate Update data model in validate with md5 and test if file exists Nov 28, 2025
Signed-off-by: ccoueffe <[email protected]>
@ccoueffe ccoueffe added the ready for review PR Ready for Review label Nov 28, 2025
Signed-off-by: ccoueffe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.6.0 Release 0.6.0 ready for review PR Ready for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants