nd_interface_ethernet_access module#222
Draft
allenrobel wants to merge 4 commits intond_interface_loopbackfrom
Draft
nd_interface_ethernet_access module#222allenrobel wants to merge 4 commits intond_interface_loopbackfrom
allenrobel wants to merge 4 commits intond_interface_loopbackfrom
Conversation
#209) * Fabric modules for ibgp,ebgp,external fabrics * Update ibgp model enums * Update pydantic model and module docstrings for ibgp * Update pydantic model for ebgp * Update ebgp module doc headers * Update enums and pydantic model descriptions for external fabrics * Update ebgp module doc strings * Fix ansible sanity tests failures * Black formatting * Move common models into common location for import * Fix black formatting issue * Add unit tests for fabric endpoints * Fix ansible sanity test failures * Test cleanup * Add ibgp testing params * Fix for merged state and tests * Add more properties in ibgp merged test * Add more properties in ibgp replaced test * Refactor merged fix * Change name property to fabric_name * Add nd_info into integration tests * remove underscore between un & numbered * Address review comments * Fix list behavior bug and update module docs * Make ansible sanity happy * Make netflow_exporter udp_port optional * Organize ibgp module doc header --------- Co-authored-by: Matt Tarkington <mtarking@cisco.com>
…ace_loopback # Conflicts: # plugins/module_utils/endpoints/v1/manage/manage_fabrics.py
Add Ansible module for managing ethernet accessHost interfaces on Nexus Dashboard, with fan-out playbook shape, port-channel membership enforcement, and bulk normalize-based delete for physical interfaces. New files: - Module: nd_interface_ethernet_access with expand_config() fan-out - Model: EthernetAccessInterfaceModel with 19 accessHost policy fields - Model: InterfaceDefaultConfig for int_trunk_host normalize payload - Orchestrator: EthernetBaseOrchestrator (shared ethernet CRUD logic) - Orchestrator: EthernetAccessInterfaceOrchestrator (thin subclass) - Endpoints: EpManageInterfacesDelete, EpManageInterfacesNormalize - Integration tests: merged, replaced, overridden, deleted states Physical ethernet interfaces cannot be deleted via interfaceActions/remove (silently does nothing) or DELETE (returns 500). The delete mechanism uses interfaceActions/normalize with the int_trunk_host template defaults, which resets interfaces to policyType: trunkHost, removing them from the accessHost query filter and enabling idempotent state: overridden. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ntries The DELETE endpoint does not work for physical ethernet interfaces (returns HTTP 500). Updated docstring to reflect this and point to EpManageInterfacesNormalize. Added missing EpManageInterfacesDelete and EpManageInterfacesNormalize to the module-level endpoint list. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
73c9b22 to
378c157
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nd_interface_ethernet_accessAnsible module for managing ethernet accessHost interfaces on Nexus Dashboardinterface_nameslist with sharedconfig_data, expanded into flat items before the state machineEthernetBaseOrchestratorbase class for all future ethernet interface modules (trunk, routed, breakout, freeform)description,admin_state,extra_config)interfaceActions/normalizewith theint_trunk_hosttemplate defaultsInterfaceDefaultConfigmodel providing the fullint_trunk_hostnormalize payloadEpManageInterfacesDeleteandEpManageInterfacesNormalizeendpoint classesDelete mechanism for physical ethernet interfaces
Physical ethernet interfaces cannot be deleted via the ND API:
interfaceActions/removesilently does nothing (returns success, config unchanged)DELETE /interfaces/{name}returns HTTP 500: "Interface cannot be deleted!!!"interfaceActions/normalizewithpolicyType: accessHostalso silently does nothingThe working mechanism:
interfaceActions/normalizewith the fullint_trunk_hostconfig template defaults (mode: "trunk",policyType: "trunkHost"). This resets the interface to fabric defaults and changes itspolicyTypetotrunkHost, which naturally removes it from the accessHostquery_all()filter, enabling idempotentstate: overridden.Merge order
Unit tests
Unit tests are deferred until after Gaspard's bulk API handler is committed, which will change the orchestrator test patterns.
Test plan
state: merged(create, fan-out, idempotency, update, deploy:false)state: replaced(full replace, fan-out, idempotency)state: overridden(reduce, idempotency, swap, fan-out, non-accessHost filtering)state: deleted(single, fan-out, idempotency, non-existent)🤖 Generated with Claude Code