[DAY#3 PyATS Series] Installing pyATS & Genie (core, NX-OS, IOS-XR plugins) (Ping Tests) using pyATS (Vendor-Agnostic) – Cisco, Arista, Palo Alto, Fortigate [Python for Network Engineer]

[DAY#3 PyATS Series] Installing pyATS & Genie (core, NX-OS, IOS-XR plugins) (Ping Tests) using pyATS (Vendor-Agnostic) – Cisco, Arista, Palo Alto, Fortigate [Python for Network Engineer]

Introduction: Key Concepts You Must Grasp

Welcome back to Day #3 of our 101 Days of pyATS (Vendor-Agnostic) series. In this lesson, we dive deep into installing pyATS and its Genie plugins to prepare your environment for ping test automation across Cisco, Arista, Palo Alto, and Fortigate devices. If you’re a Python for Network Engineer enthusiast or planning to transition from manual CLI to API-driven automation, today’s post lays the technical foundation.

We’ll cover:

  • Setting up the pyATS core
  • Adding Genie libraries (core + NX-OS, IOS-XR)
  • Preparing your Python environment (virtualenvs, pip installs)
  • Running connectivity tests (ping) across vendors
  • Validating everything using testbed YAML and CLI outputs

Let’s empower your automation game using a structured and vendor-agnostic approach!


Topology Overview

Here’s the simple lab topology:

  • All devices are reachable from the pyATS Linux host via management IPs
  • Each device has at least one loopback for ping testing
  • Devices are simulated in EVE-NG

Why Vendor-Agnostic Testing Matters

Vendor lock-in is a thing of the past. In modern enterprise and data center networks, you’ll often find a mix of Cisco, Arista, Fortinet, and Palo Alto gear. Automation tools must adapt to this reality.

pyATS + Genie, when paired with Python scripting, provides:

  • Unified parsing and validation
  • Multi-vendor CLI interaction
  • Standard test frameworks (ping, trace, config diff)

Our mission in this series is to make you a vendor-agnostic network validation engineer using only open Python tools.


Topology & Communications

Each device shares the following parameters:

DeviceOSMgmt IPCLI Protocol
Cisco IOS-XE17.3.x192.168.100.10SSH
Arista EOS4.27.x192.168.100.11SSH
Palo AltoPAN-OS 10192.168.100.12SSH
FortigateFortiOS 7192.168.100.13SSH

We’ll use this testbed to initiate our ping tests using pyATS.


Workflow Script: Install pyATS & Genie

# Step 1: Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Step 2: Upgrade pip and install pyATS core
pip install --upgrade pip
pip install pyats genie

# Step 3: Install plugins for NX-OS and IOS-XR
pip install genie.libs.sdk
pip install genie.libs.parser

# Optional: Verify installation
pyats version check

Explanation by Line

  • python3 -m venv venv: Isolates your Python space for pyATS work
  • source venv/bin/activate: Activates your virtual environment
  • pip install pyats genie: Installs the base framework
  • pip install genie.libs.sdk: Adds core test harness plugins
  • pip install genie.libs.parser: Enables parsing support for Cisco NX-OS, IOS-XR
  • pyats version check: Verifies successful install & available plugins

You’re now ready to interact with any vendor!


testbed.yml Example

devices:
  cisco:
    os: iosxe
    type: router
    connections:
      cli:
        protocol: ssh
        ip: 192.168.100.10

  arista:
    os: eos
    type: switch
    connections:
      cli:
        protocol: ssh
        ip: 192.168.100.11

  paloalto:
    os: panos
    type: firewall
    connections:
      cli:
        protocol: ssh
        ip: 192.168.100.12

  fortigate:
    os: fortios
    type: firewall
    connections:
      cli:
        protocol: ssh
        ip: 192.168.100.13

Multi-Vendor CLI Screenshots

Cisco IOS-XE – Show pyATS Installed Version

$ pip show pyats
Name: pyats
Version: 23.3
Summary: Cisco's pyATS - Python Automated Test System
Home-page: https://developer.cisco.com/pyats/

Cisco IOS-XR – Validate Installed Genie Plugin

$ pip show genie.libs.parser
Name: genie.libs.parser
Version: 23.3
Summary: Genie Parser Library

Arista EOS – Verify Python Environment for pyATS

$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install pyats genie

Successfully installed:
- pyats 23.3
- genie 23.3

Palo Alto – Custom Parser Plugin Simulation

$ pip list | grep genie
genie 23.3
genie.libs.parser 23.3
genie.libs.conf 23.3

FortiGate – Virtual Environment Verification

$ python3 -m venv forti-env
$ source forti-env/bin/activate
(forti-env) $ pip install pyats genie

Requirement already satisfied: pyats in ./forti-env/lib/python3.8/site-packages

Validate pyATS Environment (All Vendors)

$ pyats version check
You are currently running pyATS version: 23.3
 - Python Version: 3.8.10
 - Platform: Linux x86_64

Install Specific Plugins (e.g., NX-OS)

$ pip install genie.libs.nxos
Successfully installed:
- genie.libs.nxos 23.3

Sample testbed.yaml CLI Creation (Cisco example)

$ pyats create testbed interactive
Device name: csr1000v
OS: iosxe
IP: 10.10.10.1
Username: admin
Password: cisco
Testbed file saved to: testbed.yaml

Validate Connection from pyATS to Device

$ pyats run job job_ping_test.py --testbed-file testbed.yaml

%|PASS| Connected to device csr1000v
%|PASS| Executed 'ping 8.8.8.8'

Post-install Plugin Verification Summary

$ pip freeze | grep genie
genie==23.3
genie.libs.conf==23.3
genie.libs.parser==23.3
genie.libs.sdk==23.3
genie.libs.nxos==23.3

These CLI outputs are simulated and representative of what you’d see when working with multi-vendor devices using pyATS in a structured lab or production test scenario.


FAQs

Q1. Can I use pyATS without Genie?
A: Yes, but Genie enhances parsing, abstraction, and test harness capabilities. For multi-vendor support, it’s highly recommended.

Q2. Do Genie plugins support Palo Alto or FortiGate?
A: Not directly. For PAN-OS and FortiOS, you’ll need to build custom parsers or use pyATS APIs for CLI interaction.

Q3. What OS is best for installing pyATS?
A: Any Linux distro with Python 3.6+ works well. Ubuntu, Debian, and CentOS are tested.

Q4. Should I install pyATS globally or in virtualenvs?
A: Always use virtual environments for isolation, cleaner dependencies, and reproducibility.

Q5. Does pyATS work with Windows?
A: Not officially supported. Use WSL2 or a Linux VM for best compatibility.

Q6. How do I keep pyATS updated?
A: Use pip install --upgrade pyats genie regularly inside your virtualenv.

Q7. Can pyATS run on EVE-NG directly?
A: Prefer running it from a separate Linux VM or Docker container that has SSH reachability to EVE-NG nodes.

Q8. Are there licensing issues with pyATS?
A: No. pyATS and Genie are open source and free to use.


YouTube Link

Watch the Complete Python for Network Engineer: Installing pyATS & Genie (core, NX-OS, IOS-XR plugins) (Ping Tests) using pyATS (Vendor-Agnostic) – Cisco, Arista, Palo Alto, Fortigate Lab Demo & Explanation on our channel:

Master Python Network Automation, Ansible, REST API & Cisco DevNet
Master Python Network Automation, Ansible, REST API & Cisco DevNet
Master Python Network Automation, Ansible, REST API & Cisco DevNet
Why Robot Framework for Network Automation?

Join Our Training: Master Python for Network Engineer with Sagar Dhawan

Want to go beyond basic pings and CLI parsing? Join our 3-Month Instructor-Led Training Program and become a Certified Automation Engineer.

  • Real-world labs across Cisco, Arista, Palo Alto, Fortigate
  • Build custom parsers, test libraries, CI/CD pipelines
  • Learn RESTCONF, NETCONF, Nornir, Ansible & more
  • Weekly projects, mentorship, and lifetime access

Course Outline & Registration

Enroll Now & Future‑Proof Your Career
Emailinfo@networkjourney.com
WhatsApp / Call: +91 97395 21088

Make the leap from CLI to APIs with our Python for Network Engineer program. This course is built by engineers, for engineers.