Conversation
allenrobel
reviewed
Apr 22, 2026
Collaborator
allenrobel
left a comment
There was a problem hiding this comment.
Leaving some comments. Will defer to you though, so feel free to ignore and resolve them as appropriate.
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.
Related Issue(s)
Resolves #259
Resolves #263
Proposed Changes
Shared Base Model Extraction
FabricBaseModelinmanage_fabric_base.py— abstract base class for all fabric modelscategory,fabric_name,location,license_tier,alert_suspend,telemetry_collection,telemetry_collection_type,telemetry_streaming_protocol,telemetry_source_interface,telemetry_source_vrf,security_domain,telemetry_settings,external_streaming_settings) into the base classFabricEbgpModel,FabricIbgpModel, andFabricExternalConnectivityModelto inherit fromFabricBaseModel_fabric_typeClassVar,_post_validate_consistency()hook,validate_fabric_consistency(), andget_argument_spec()Module and File Renames
_vxlansuffix for clarity:manage_fabric_ebgp.py→manage_fabric_ebgp_vxlan.pymanage_fabric_ibgp.py→manage_fabric_ibgp_vxlan.pynd_manage_fabric_ebgp.py→nd_manage_fabric_ebgp_vxlan.pynd_manage_fabric_ibgp.py→nd_manage_fabric_ibgp_vxlan.pyfabric_ebgp.yaml,fabric_ibgp.yaml) to reference the new module namesDefault and Type Alignment
FabricBaseModel:license_tier→LicenseTierEnum.ESSENTIALStelemetry_collection→Truetelemetry_collection_type→TelemetryCollectionTypeEnum.IN_BANDtelemetry_source_interface→"loopback0"telemetry_source_vrf→"default"telemetry_collection_typeandtelemetry_streaming_protocolfromstrto their proper enum typesmanage_fabric_external.pywherelicense_tierthroughsecurity_domainwere defined twice with conflicting valuesModule Documentation Fixes
license_tier:premier→essentialstelemetry_collection:false→truetelemetry_collection_type:outOfBand→inBandtelemetry_source_interface:""→loopback0telemetry_source_vrf:""→defaultnxapi(eBGP + iBGP):false→trueevpnfrom eBGP DOCUMENTATION (internal field, not user-configurable)Bug Fixes
• Added missing
enable_dpu_pinningfield to iBGP model and module documentation (already present in eBGP model)Modern Type Annotations
from __future__ import absolute_import, division, print_functionwithfrom __future__ import annotationsacross all fabric model files__metaclass__ = type(Python 2 artifact) from all fabric model filesOptional[X]→X | NoneList[X]→list[X]Dict[K, V]→dict[K, V]ClassVar[Optional[List[str]]]→ClassVar[list[str] | None]typingimports (Dict,List,Optional)Shared Types File
plugins/module_utils/models/types.pywith reusableNdFabricNameannotated typeNdFabricNameusesAnnotatedwithBeforeValidatorfor fabric name validation (letters, digits, underscores, hyphens; 1-64 chars)validate_fabric_namefield validator inFabricBaseModelwith the sharedNdFabricNametypeeBGP Model Cleanup
to_diff_dict()override that excludednxapiHttp— ND now correctly returns the configured value, so the workaround is no longer neededDictandAnyimports from eBGP modelCode Organization
manage_fabric_commonimports in all three fabric model files__all__exports from all non-__init__.pymodel files (per PEP8, wildcard imports are discouraged, making__all__unnecessary overhead)manage_fabric_common.pyTest Notes
FabricBaseModelwith proper_fabric_typevalues (vxlanEbgp,vxlanIbgp,externalConnectivity)Cisco Nexus Dashboard Version
4.2.1
Related ND API Resource Category
Checklist