LinuxCommandLibrary

pyats-shell

Launch pyATS interactive shell for test automation

TLDR

Open pyATS shell with a defined Testbed file

$ pyats shell --testbed-file [path/to/testbed.yaml]
copy

Open pyATS shell with a defined Pickle file
$ pyats shell --pickle-file [path/to/pickle.file]
copy

Open pyATS with IPython disabled
$ pyats shell --no-ipython
copy

SYNOPSIS

pyats-shell [options]

PARAMETERS

--version
    Display the pyATS framework version and exit.

--help
    Show the command's help message and exit.

--tb, --testbed
    Specifies the testbed file to be loaded into the pyATS shell.

DESCRIPTION

The `pyats-shell` command provides an interactive, feature-rich shell environment specifically designed for use with the pyATS framework. It allows users to directly interact with and manage pyATS testbeds, jobs, and results.

This shell simplifies the process of executing test scripts, inspecting device configurations, and debugging automation workflows. It offers tab-completion, command history, and other convenient features to enhance productivity. The `pyats-shell` provides a robust environment for automation engineers and testers to perform interactive troubleshooting and validation of network devices using the powerful capabilities of pyATS and Genie.

CAVEATS

The `pyats-shell` requires a properly configured pyATS environment. It assumes familiarity with pyATS concepts such as testbeds, jobs, and scripts. Without specifying a testbed file (--tb), certain functionality might be limited.

INTERACTIVE MODE

Once the `pyats-shell` is launched, users can execute pyATS commands directly within the shell. These commands allow you to load testbeds, trigger jobs, inspect device configurations, and view test results interactively.

TAB COMPLETION

The shell offers tab completion for commands and file names, making it easier to navigate and execute commands efficiently. This is a very useful feature.

TESTBED INTEGRATION

The `--tb` or `--testbed` option allows users to load a testbed file, which contains information about the network devices to be automated. This is the starting point for most automation tasks.

HISTORY

The `pyats-shell` command was introduced as part of the pyATS framework to provide a more convenient and interactive way to manage and debug automation scripts. It builds on the capabilities of pyATS and Genie, providing a real-time interface for inspecting device states and running test cases. It is used extensively in network automation workflows for quick prototyping and debugging.

SEE ALSO

pyats(1), genie(1)

Copied to clipboard