Skip to content

[dev] Add tracker models#82

Merged
jpkrajewski merged 6 commits into
devfrom
dev-tracker-parcels
Jun 16, 2025
Merged

[dev] Add tracker models#82
jpkrajewski merged 6 commits into
devfrom
dev-tracker-parcels

Conversation

@jpkrajewski

@jpkrajewski jpkrajewski commented Jun 10, 2025

Copy link
Copy Markdown
Collaborator

Pull Request summary:

Add tracker models

  • tracker
  • ipv6 tracker
  • tracker group
  • ipv6 tracker group

Add trackers and tracker groups to service and transport profile builders.
Add integration test for PBs

@jpkrajewski jpkrajewski self-assigned this Jun 10, 2025
@jpkrajewski jpkrajewski force-pushed the dev-tracker-parcels branch from 67ed7e0 to 940f8ad Compare June 10, 2025 13:29
@jpkrajewski jpkrajewski force-pushed the dev-tracker-parcels branch from 940f8ad to 8c5a755 Compare June 12, 2025 00:05
@jpkrajewski jpkrajewski marked this pull request as draft June 13, 2025 08:04
@jpkrajewski jpkrajewski requested review from Copilot and sbasan and removed request for Copilot June 16, 2025 11:50
@jpkrajewski jpkrajewski marked this pull request as ready for review June 16, 2025 11:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_tracker signature only accepts Tracker, not the broader AnyTrackerParcel. Consider updating it to accept AnyTrackerParcel so 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_group only accepts TrackerGroup with IPv4 Trackers. Consider using AnyTrackerParcel and AnyTrackerParcel lists 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 TrackerIPv6 and TrackerGroupIPv6 would 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 TrackerRefs is plural but represents a single reference. Consider renaming to TrackerRef for clarity.
class TrackerRefs(BaseModel):

Comment thread catalystwan/models/configuration/feature_profile/sdwan/trackers/tracker_group.py Outdated
Comment thread catalystwan/models/configuration/feature_profile/sdwan/trackers/tracker_group.py Outdated
Comment thread catalystwan/api/builders/feature_profiles/service.py Outdated
Comment on lines +126 to 128
def add_parcel_vpn_subparcel(self, vpn_tag: UUID, parcel: DependedVpnSubparcels) -> UUID:
"""
Adds an subparcel parcel dependent on a VPN to the builder.

Copilot AI Jun 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
jpkrajewski and others added 3 commits June 16, 2025 14:18
…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>

@sbasan sbasan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jpkrajewski jpkrajewski merged commit eab7b54 into dev Jun 16, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants