-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Open
Copy link
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
PR #355 addressed the EVPN ethernet-segment-num test failures by excluding tests on platforms/versions that don't support it. However, the implementation doesn't follow the provider's established pattern for version compatibility.
The YANG path for EVPN ethernet segments differs between IOS-XE versions:
- 17.12:
Cisco-IOS-XE-l2vpn:evpn/ethernet-segment - 17.15+:
Cisco-IOS-XE-l2vpn:evpn/ethernet-segment-choice/evpn-num-case/ethernet-segment-num/ethernet-segment
Current Implementation
The current interface_port_channel.yaml only supports the 17.15+ path:
- yang_name: Cisco-IOS-XE-l2vpn:evpn/ethernet-segment-choice/evpn-num-case/ethernet-segment-num/ethernet-segment
xpath: Cisco-IOS-XE-l2vpn:evpn/ethernet-segment-num/ethernet-segment
tf_name: evpn_ethernet_segmentsProposed Solution
Follow the provider's established "legacy" pattern used in other resources (e.g., route_map.yaml):
- Keep the current attribute for 17.15+
- Add a new _legacy suffixed attribute for 17.12
- Use test_tags to control which versions use which attribute
Example Implementation
Current attribute for 17.15+
- yang_name: Cisco-IOS-XE-l2vpn:evpn/ethernet-segment-choice/evpn-num-case/ethernet-segment-num/ethernet-segment
xpath: Cisco-IOS-XE-l2vpn:evpn/ethernet-segment-num/ethernet-segment
tf_name: evpn_ethernet_segments
test_tags: [IOSXE1715]
type: List
attributes:
- yang_name: es-value
id: true
example: 1
# New legacy attribute for 17.12
- yang_name: Cisco-IOS-XE-l2vpn:evpn/ethernet-segment
xpath: Cisco-IOS-XE-l2vpn:evpn/ethernet-segment
tf_name: evpn_ethernet_segments_legacy
test_tags: [IOSXE1712]
type: List
attributes:
- yang_name: es-value
id: true
example: 1Tasks
- Add evpn_ethernet_segments_legacy attribute to
gen/definitions/interface_port_channel.yaml - Regenerate the provider code
- Update tests to use appropriate attribute based on version
- Remove the exclude_test: true workaround from PR fix: resolve issues with integration tests for port-channels and port-channel subinterfaces #355
- Test on both 17.12 and 17.15 environments
Acceptance Criteria
- EVPN ethernet segment configuration works on 17.15+ using the standard attribute
- EVPN ethernet segment configuration works on 17.12 using the legacy attribute
- Tests pass on all pipeline environments
- No breaking changes to existing configurations
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request