Skip to content

Add Multi-Tenancy Modules#258

Draft
mtarking wants to merge 3 commits intodevelopfrom
issue-257
Draft

Add Multi-Tenancy Modules#258
mtarking wants to merge 3 commits intodevelopfrom
issue-257

Conversation

@mtarking
Copy link
Copy Markdown
Collaborator

@mtarking mtarking commented Apr 14, 2026

Related Issue(s)

Resolves #257

Proposed Changes

Add two new Ansible modules for managing Nexus Dashboard multi-tenancy resources using the new pydantic-based architecture:

nd_infra_tenant — Manage tenants on Cisco Nexus Dashboard

  • CRUD operations for tenants via the ND Infra API (/api/v1/infra/tenants)
  • Fabric association management via the ND Manage API (/api/v1/manage/tenantFabricAssociations)
  • Multi-API orchestrator that coordinates tenant lifecycle (infra) with fabric association reconciliation (manage) transparently through the state machine
  • Supports merged, replaced, overridden, and deleted states

nd_infra_tenant_domain — Manage tenant domains on Cisco Nexus Dashboard

  • CRUD operations for tenant domains via the ND Infra API (/api/v1/infra/tenantDomains)
  • Groups tenants together by referencing tenant names
  • Supports merged, replaced, overridden, and deleted states

New files:

  • plugins/modules/nd_infra_tenant.py
  • plugins/modules/nd_infra_tenant_domain.py
  • plugins/module_utils/models/infra_tenant/infra_tenant.py
  • plugins/module_utils/models/infra_tenant_domain/infra_tenant_domain.py
  • plugins/module_utils/orchestrators/infra_tenant.py
  • plugins/module_utils/orchestrators/infra_tenant_domain.py
  • plugins/module_utils/endpoints/v1/infra/tenants.py
  • plugins/module_utils/endpoints/v1/infra/tenant_domains.py
  • plugins/module_utils/endpoints/v1/manage/tenant_fabric_associations.py
  • tests/unit/module_utils/endpoints/test_endpoints_api_v1_infra_tenants.py
  • tests/unit/module_utils/endpoints/test_endpoints_api_v1_infra_tenant_domains.py
  • tests/unit/module_utils/endpoints/test_endpoints_api_v1_manage_tenant_fabric_associations.py
  • tests/integration/targets/nd_infra_tenant/tasks/main.yml
  • tests/integration/targets/nd_infra_tenant_domain/tasks/main.yml

Test Notes

  • 347 unit tests pass (pytest tests/unit/ -v), including 38 new endpoint tests covering infra tenants (16), infra tenant domains (16), and manage tenant fabric associations (6)
  • Integration tests cover all four states (merged, replaced, overridden, deleted) with check mode, normal mode, and idempotency assertions for both modules
  • nd_infra_tenant integration tests include fabric association scenarios: create with associations, update associations, replace with associations, override with associations, and delete with association cleanup

Cisco Nexus Dashboard Version

4.2.1

Related ND API Resource Category

  • analyze
  • infra
  • 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

@mtarking mtarking self-assigned this Apr 14, 2026
@mtarking mtarking added enhancement New feature or request tests Tests added/updated/modified 2.0.0 Release 2.0.0 labels Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.0.0 Release 2.0.0 enhancement New feature or request tests Tests added/updated/modified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ND 4.2+] Add Multi-Tenancy Support

1 participant