LinuxCommandLibrary

pyats

Cisco network test automation framework

TLDR

Run test script

$ pyats run job [job.py]
copy
Parse device output
$ pyats parse "[show version]" --testbed [testbed.yaml]
copy
Learn device feature
$ pyats learn [interface] --testbed [testbed.yaml]
copy
Compare states
$ pyats diff [snapshot1] [snapshot2]
copy
Shell with testbed
$ pyats shell --testbed [testbed.yaml]
copy
Validate testbed
$ pyats validate testbed [testbed.yaml]
copy
Create testbed
$ pyats create testbed interactive
copy

SYNOPSIS

pyats command [options] [args]

DESCRIPTION

pyats (Python Automated Test System) is Cisco's open-source network test automation framework for validating network device configurations and behavior. It uses YAML testbed files to define network topology, device connections, and credentials, providing a structured approach to automated network testing.
The framework includes a powerful parsing engine (Genie) that converts unstructured CLI output from show commands into structured Python dictionaries across hundreds of device types. The learn feature captures comprehensive device state for features like interfaces, routing tables, and VLANs, while diff compares snapshots taken at different times to identify configuration drift or changes after maintenance windows.

PARAMETERS

run

Execute test jobs.
parse
Parse command output.
learn
Learn device state.
diff
Compare snapshots.
shell
Interactive shell.
validate
Validate configuration.
create
Create configurations.
--testbed FILE
Testbed YAML file.
--device NAME
Specific device.

CAVEATS

Cisco-focused but supports others. Learning curve for test scripting. Testbed setup required.

HISTORY

pyATS (Python Automated Test System) was developed by Cisco for internal network testing. Released as open source to enable network test automation.

SEE ALSO

ansible(1), netmiko(1), napalm(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community