Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Input subclasses refactoring #388

Open
6 of 31 tasks
gmuloc opened this issue Sep 12, 2023 · 0 comments
Open
6 of 31 tasks

Enhancement: Input subclasses refactoring #388

gmuloc opened this issue Sep 12, 2023 · 0 comments
Assignees

Comments

@gmuloc
Copy link
Collaborator

gmuloc commented Sep 12, 2023

Tests Input subclasses should be moved outside of test classes, in other modules to allow reusability across tests and easier imports by external framework leveraging ANTA (AVD).

Solution:

Models are being moved to anta.input_models.<module>. Each test will keep a class variable as a reference of these models to avoid breaking changes. The references will be removed in ANTA v2.0.

Example:

from anta.input_models.connectivity import Host

class Input(AntaTest.Input):
    """Input model for the VerifyReachability test."""

    hosts: list[Host]
    """List of host to ping."""
    Host: ClassVar[type[Host]] = Host

Checklist (in priority):

High priority (AVD tests or high reusability):

The following 3 BGP tests should use the same model to replace <VerifyBGP...>.Input.BgpAfi:

These BGP tests should use the same BgpPeer model:

The BFD tests should use the same BFDPeer model:

Low priority (low reusability):

  • VerifyLACPInterfacesStatus.Input.LACPInterface
  • VerifyErrdisableRecovery.Input.ErrDisableReason
  • VerifyAPISSLCertificate.Input.APISSLCertificate
  • VerifyIPv4ACL.Input.IPv4ACL & IPv4ACLEntry
  • VerifySpecificPath.Input.RouterPath
  • VerifyHardwareFlowTrackerStatus.Input.FlowTracker & RecordExport & Exporter
  • VerifyISISNeighborCount.Input.InterfaceCount
  • VerifyISISInterfaceMode.Input.InterfaceState
  • VerifyISISSegmentRoutingAdjacencySegments.Input.IsisInstance & Segment
  • VerifyISISSegmentRoutingDataplane.Input.IsisInstance
  • VerifyISISSegmentRoutingTunnels.Input.Entry & Vias
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

No branches or pull requests

3 participants