[dev] Add tracker models#82
Conversation
67ed7e0 to
940f8ad
Compare
940f8ad to
8c5a755
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces support for trackers and tracker groups (including IPv6 variants) within SD-WAN feature profiles. It adds new Pydantic models, extends the profile builders to handle tracker associations, updates endpoint definitions, and provides integration tests.
- Added Tracker, TrackerIPv6, TrackerGroup, and TrackerGroupIPv6 models
- Extended transport and service builders to queue and associate trackers/ groups with VPN interfaces
- Added integration tests and endpoint stubs for tracker associations
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| catalystwan/models/configuration/feature_profile/sdwan/trackers/tracker_group.py | New Pydantic models for tracker groups and IPv6 group variants |
| catalystwan/models/configuration/feature_profile/sdwan/trackers/tracker.py | New Pydantic models for trackers and IPv6 trackers |
| catalystwan/models/configuration/feature_profile/sdwan/trackers/init.py | Introduced AnyTrackerParcel and updated exports |
| catalystwan/models/configuration/feature_profile/parcel.py | Imported AnyTrackerParcel and added new parcel types |
| catalystwan/integration_tests/profile_builder/test_pb_transport.py | Tests for attaching trackers and groups to transport interfaces |
| catalystwan/integration_tests/profile_builder/test_pb_service.py | Tests for attaching trackers and groups to service interfaces |
| catalystwan/integration_tests/feature_profile/sdwan/test_tracker.py | End-to-end tests for Tracker and TrackerGroup models |
| catalystwan/endpoints/configuration/feature_profile/sdwan/transport.py | Added stub for associating trackers with transport VPN interfaces |
| catalystwan/endpoints/configuration/feature_profile/sdwan/service.py | Added stub for associating trackers with service VPN interfaces |
| catalystwan/api/builders/feature_profiles/transport.py | Builder logic to queue and associate trackers/groups |
| catalystwan/api/builders/feature_profiles/service.py | Builder logic to queue and associate trackers/groups |
| .pre-commit-config.yaml | Bumped pycln hook rev to v2.5.0 |
Comments suppressed due to low confidence (4)
catalystwan/api/builders/feature_profiles/transport.py:164
- The
add_trackersignature only acceptsTracker, not the broaderAnyTrackerParcel. Consider updating it to acceptAnyTrackerParcelso IPv6 trackers are supported.
def add_tracker(self, associate_tags: Set[UUID], parcel: Tracker) -> None:
catalystwan/api/builders/feature_profiles/transport.py:177
- Similarly,
add_tracker_grouponly acceptsTrackerGroupwith IPv4Trackers. Consider usingAnyTrackerParcelandAnyTrackerParcellists to include IPv6 variants.
def add_tracker_group(self, associate_tags: Set[UUID], group: TrackerGroup, trackers: List[Tracker]) -> None:
catalystwan/integration_tests/feature_profile/sdwan/test_tracker.py:1
- There are no tests covering IPv6 trackers or tracker groups. Adding integration tests for
TrackerIPv6andTrackerGroupIPv6would ensure end-to-end validation of new models.
# Copyright 2025 Cisco Systems, Inc. and its affiliates
catalystwan/models/configuration/feature_profile/sdwan/trackers/tracker_group.py:11
- [nitpick] The class name
TrackerRefsis plural but represents a single reference. Consider renaming toTrackerReffor clarity.
class TrackerRefs(BaseModel):
| def add_parcel_vpn_subparcel(self, vpn_tag: UUID, parcel: DependedVpnSubparcels) -> UUID: | ||
| """ | ||
| Adds an subparcel parcel dependent on a VPN to the builder. |
There was a problem hiding this comment.
[nitpick] The service builder method is named add_parcel_vpn_subparcel while the transport builder uses add_vpn_subparcel. Consider unifying these names for consistency.
| def add_parcel_vpn_subparcel(self, vpn_tag: UUID, parcel: DependedVpnSubparcels) -> UUID: | |
| """ | |
| Adds an subparcel parcel dependent on a VPN to the builder. | |
| def add_vpn_subparcel(self, vpn_tag: UUID, parcel: DependedVpnSubparcels) -> UUID: | |
| """ | |
| Adds a subparcel parcel dependent on a VPN to the builder. |
…s/tracker_group.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s/tracker_group.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Pull Request summary:
Add tracker models
Add trackers and tracker groups to service and transport profile builders.
Add integration test for PBs