-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
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
, andquery
states - Pydantic Model Integration: Uses
FabricModel
andFabricManagementModel
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 APICommon
: Shared utilities for parameter validation and payload constructionMerged
: Implements merge strategy with diff-based updatesReplaced
: Full configuration replacement operationsDeleted
: Fabric deletion with safety checksOverridden
: Combined delete and replace operationsQuery
: 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