Skip to content

Add VXLAN-ACI Fabric Group Module - #528

Draft
mtarking wants to merge 15 commits into
developfrom
issue-527
Draft

Add VXLAN-ACI Fabric Group Module#528
mtarking wants to merge 15 commits into
developfrom
issue-527

Conversation

@mtarking

Copy link
Copy Markdown
Collaborator

Related Issue(s)

Resolves #527

Note

Stacked on top of #246 (branch issue-245), which introduces the shared
manage_fabric_group base package. Do not merge until #246 merges, then
this branch will be rebased onto develop.

Proposed Changes

Adds a new nd_manage_fabric_group_vxlan_aci module to manage VXLAN-to-ACI
Fabric Groups
(management.type: vxlanAci) on Cisco Nexus Dashboard.

Unlike the routed/AI-routed variants, vxlanAci is not a clone of the base
VXLAN (MSD) fabric group — it exposes a smaller, distinct property set, so it is
implemented as a standalone model rather than a subclass.

  • Model (plugins/module_utils/models/manage_fabric_group/manage_fabric_group_vxlan_aci.py)
    • New FabricGroupVxlanAciModel + VxlanAciFabricGroupManagementModel
      (single identifier fabric_name, category: fabricGroup, discriminator
      management.type: vxlanAci).
    • Read-only securityGroupStatus is excluded from the argument spec and from
      diff comparison (via to_diff_dict override).
  • Enums (plugins/module_utils/models/manage_fabric_group/enums.py)
    • Extended FabricGroupTypeEnum with VXLAN_ACI = "vxlanAci".
    • Added two constrained enums so argspec choices exactly match the API:
      VxlanAciOverlayInterConnectTypeEnum (manual, directPeering — no
      routeServer) and VxlanAciSecurityGroupTagEnum (loose, strict
      no off).
  • Orchestrator (plugins/module_utils/orchestrators/manage_fabric_group_vxlan_aci.py)
    • ManageFabricGroupVxlanAciOrchestrator wires the shared EpManageFabrics*
      endpoints; custom query_all filters on ?category=fabricGroup and
      management.type == "vxlanAci".
  • Module (plugins/modules/nd_manage_fabric_group_vxlan_aci.py)
    • Entrypoint with DOCUMENTATION/EXAMPLES/RETURN matching the reduced field set;
      supports merged, replaced, overridden, deleted and check mode.
  • Tests
    • Unit: tests/unit/module_utils/endpoints/test_endpoints_api_v1_manage_fabric_group_vxlan_aci.py
      (18 tests — endpoint wiring, query_all filtering, argspec/model behavior).
    • Integration: tests/integration/targets/nd_manage_fabric_group_vxlan_aci/
      (merged create/idempotent/update, replaced, deleted, multi-create).
  • Changelog: changelogs/fragments/add_nd_manage_fabric_group_vxlan_aci.yml.

Test Notes

  • Unit tests: 18 passed (32 passed with the base VXLAN suite included).
  • DOCUMENTATION/EXAMPLES/RETURN blocks parse cleanly; integration + changelog
    YAML validated with yaml.safe_load.
  • get_errors clean across all new/changed source and test files.
  • Integration tests are written against the live ND Manage API
    (/api/v1/manage/fabrics) and require a reachable ND host in inventory.

Cisco Nexus Dashboard Version

4.2.1

Related ND API Resource Category

  • analyze
  • infa
  • manage
  • onemanage
  • other

Checklist

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

- Model: autogenerate argspec via _build_options_from_model; use NdFabricName; propagate name to management; drop unsupported gathered state (states now merged/replaced/deleted/overridden)
- Orchestrator: add ConfigActionsMixin; query_all uses _request with category=fabricGroup filter
- Module: rewrite main() on NDStateMachine + config_actions; remove gathered docs/examples/branch; drop category/management.type from docs+examples (single-literals excluded from argspec); fill RETURN
- Unit test: rewrite query_all tests to rest_send + monkeypatched _request (14 pass)
- Integration: remove gathered test; strip category/type from tasks+vars
- Add changelog fragment
Validated: ansible-test sanity 24/24 (core 2.18), units 14 passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ND 4.2+] Add VXLAN-ACI Fabric Group Type Module

1 participant