Skip to content

[Architecture] Centralize PyATS common utilities into dedicated external repository #428

@aitestino

Description

@aitestino

Based on a conversation with @oboehmer today.

Summary

Evaluate and plan the creation of a centralized repository (e.g., NAC-TEST-PyATS) to host shared PyATS utilities that are currently duplicated across architecture-specific repositories.

Problem Statement

Currently, each NAC architecture repository (nac-sdwan-terraform, nac-aci, nac-catalyst-center, etc.) maintains its own pyats_common/ directory containing base test classes and utilities. This creates several challenges:

  1. Code Duplication - Similar logic is repeated across multiple repositories
  2. Maintenance Burden - Bug fixes and improvements must be applied to each repo individually
  3. Implementation Drift - Implementations can diverge over time without a single source of truth
  4. CI/CD Complexity - Testing shared patterns requires running tests across multiple repos
  5. Scalability Concerns - As new architectures are added, the duplication problem compounds

Proposed Solution

Create a centralized external repository (working name: NAC-TEST-PyATS) within the Net-as-Code organization that hosts shared PyATS utilities.

Proposed Layer Structure

Layer Location Contents
Core Framework nac-test Orchestrator, reporting, SSHTestBase, NACTestBase, connection broker
PyATS Common NAC-TEST-PyATS (proposed) Shared device resolver patterns, common verification utilities, reusable test helpers
Architecture-Specific nac-sdwan-terraform, nac-aci, etc. Data model parsing specific to that architecture's schema structure

Benefits

  • Single source of truth for shared PyATS code
  • Centralized CI/CD - comprehensive testing in one location
  • Versioned releases - architecture repos can pin to stable versions
  • Easier onboarding - new architectures have a clear starting point and patterns to follow
  • Reduced maintenance - fixes applied once, benefit all architectures

Considerations

  • Dependency management for architecture repos
  • Release coordination for breaking changes
  • Clear guidelines on what belongs in common vs. architecture-specific repos

Priority

Medium - Not blocking current work, but important for long-term maintainability as the number of supported architectures grows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-infraIssues related to the new pyats/robot infra currently under developmentprio: highpyatsPyATS framework related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions