Add FEC support for physical interfaces (NDFC 12.4.1+) - #856
Conversation
…ed with fec. Adding default values for these interface type. Signed-off-by: ccoueffe <ccoueffe@cisco.com>
dacasti2mx
left a comment
There was a problem hiding this comment.
fec: off
The companion schema in nac-vxlan PR #654 supports off as a valid FEC value
fec: {{ interface['fec'] | default(...) }}Therefore, this valid data-model input:
fec: "off"is rendered in the generated resource file as:
fec: offWhen that file is subsequently loaded with yaml.safe_load(), PyYAML interprets off as the boolean False, rather than the string "off" expected by
dcnm_interface.
I confirmed this conversion in a local serialization/parsing test. The exact downstream module failure will also be captured during the end-to-end validation.
Please ensure FEC is serialized as a quoted string in all four new templates:
- ndfc_interface_access.j2
- ndfc_interface_trunk.j2
- ndfc_interface_routed.j2
- ndfc_interface_dot1q.j2
|
fec: off issue solved, it works. |
dacasti2mx
left a comment
There was a problem hiding this comment.
Currently:
{% if ndfc_version | cisco.nac_dc_vxlan.version_compare('12.4.1', '>=') %}
fec: "{{ interface['fec'] | default(defaults...trunk_interface.fec) }}"
{% endif %}This part of the code tells us that we render fec with its value only if the version is 12.4.1 or higher. That means a lower version — even when FEC is explicitly set — does not render that value, and since module dcnm_interface ( 661 dcnm)) never receives it, its fec requires NDFC >= 12.4.1 check never fires.
dacasti2mx
left a comment
There was a problem hiding this comment.
LGTM from my side.
The FEC functionality was validated across the supported physical interface types, including off serialization, defaults, idempotency, and end-to-end application.
We agreed to keep the current NDFC 12.4.1+ version gate and handle the unsupported-version behavior through clear user documentation.
Medium: Make the companion FEC documentation schema-valid and version-accurateIssue The authoritative model documentation added for this feature uses Evidence
Existing PR overlap No matching existing PR comment found. The earlier Impact Users who copy the documented FEC examples fail model validation before PR #856's templates run, including the documented way to disable FEC. The ND version text can also lead users to expect the feature on the wrong platform release. Suggested fix Change every FEC example to |
|
documentation updated |
Related Issue(s)
Depends on CiscoDevNet/ansible-dcnm#661 — adds
fecparameter todcnm_interfacemodule.Related Collection Role
Related Data Model Element
Proposed Changes
Adds Forward Error Correction (FEC) support for physical ethernet interfaces, gated behind NDFC >= 12.4.1.
Templates updated
FEC attribute added (with version gate
version_compare('12.4.1', '>=')):ndfc_interface_trunk.j2ndfc_interface_access.j2ndfc_interface_routed.j2ndfc_interface_dot1q.j2Defaults added
Default
fec: autoadded for all four interface types indefaults.yml:topology_switch_access_interface.fectopology_switch_trunk_interface.fectopology_switch_dot1q_interface.fectopology_switch_routed_interface.fecData Model Example
Supported FEC values
auto,fc-fec,off,rs-cons16,rs-fec,rs-ieeeTest Notes
Tested with NDFC 12.4.1:
fec: rs-fec→ FEC applied, idempotent on second runfec: fc-fec→ FEC appliedfec: rs-fec→ FEC appliedCisco Nexus Dashboard Version
12.4.1+ (ND 4.1.1+)
Checklist