Skip to content

ND4.1: Module cisco.nd.manage.fabrics #474

@mikewiebe

Description

@mikewiebe

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

New module to manage creation and update of existing ND4.1 fabrics

New or Affected modules(s):

  • New cisco.nd.manage.fabric module

ND version

  • V 4.1 EFT Version

Potential ansible task config

    - name: Create Fabric
      cisco.nd.manage.fabric:
        state: merged
        config:
          - name: fabric-ansible
            category: fabric
            securityDomain: all
            management:
              type: vxlanIbgp
              bgpAsn: 65502.65508
              anycastGatewayMac: 2020.0000.00cc
              replicationMode: ingress

References

Definition of Done:

New Module: cisco.nd.manage.fabric

  • State-based Operations: Supports merged, replaced, deleted, overridden, and query states
  • Pydantic Model Integration: Uses FabricModel and FabricManagementModel for robust data validation
  • Comprehensive Documentation: Includes module documentation, examples, and detailed docstrings

Core Functionality

  • Fabric Lifecycle Management: Create, update, delete, and query fabric configurations
  • State Comparison: Intelligent diff calculation using DeepDiff for merged operations
  • Dependency Injection: Testable architecture with optional logger and utility injection
  • Error Handling: Robust validation and error reporting throughout the module

Class Architecture

  • GetHave: Retrieves current fabric state from ND API
  • Common: Shared utilities for parameter validation and payload construction
  • Merged: Implements merge strategy with diff-based updates
  • Replaced: Full configuration replacement operations
  • Deleted: Fabric deletion with safety checks
  • Overridden: Combined delete and replace operations
  • Query: Read-only state retrieval (This one needs more discussion)

Technical Considerations

  • Logging Integration: Comprehensive debug logging for troubleshooting
  • API Path Management: Dynamic endpoint construction for different operations
  • Payload Optimization: Efficient payload generation with minimal API calls
  • Model Validation: Automatic validation of configuration parameters
  • Unit Tests: Module must have complete unit tests with 90% code coverage
  • Integration Tests: Module must have integration tests covering all states
  • Parity: Must Have Parity with Existing 3.2 Module

Manage PR through merger into develop branch

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions