Skip to main content

An implementation of Cisco pyATS

Project description

pyYAHTS

An interpretation of pyATS

pyYAHTS is a dyanmic, on-demand, YAML-free / testbed.yaml free, implementation of pyATS.

It works with any IOS / IOS-XE / IOS-XR / NXOS device!

The results are Rich JSON printed to the screen

Requirements

pyYAHTS is an extension of pyATS, which is required, and only runs on Linux operating systems

Installation

  1. Make sure you first install pyATS

pip install pyats[full]

  1. Install Rich-Click

pip install rich-click

  1. That's it! You are ready to use pyYATS

Getting Started

pyYAHTS works on any Cisco OS IOS / IOS-XE / IOS-XR / NXOS

pyYAHTS requires the follow options be speficied at runtime:

  1. Hostname of the device - must exactly match the configured hostname
  2. Operating System - Either ios, iosxe, iosxr, or nxos
  3. Username
  4. Password
  5. Either a pyATS Learn Function, such as ospf, or any supported pyATS Parsed CLI Show Command, such as "show ip interface brief"

Help

For a list of supported Learn Functions please visit Available Learn Functions

Available Learn Functions

For a list of supported Parsers please visit Available Show Command Parsers

Available Show Parsers

A sample of "Show IP Interface" Parsers for IOS-XE IOS-XE Show IP Interface Sample

Using pyYAHTS

In any virtual environment with pyATS installed pyYAHTS can be executed several ways

  1. Prompted Inputs
(virtualenv)$ python3 pyYAHTS.py
Hostname: dist-sw01
OS (ios, iosxe, iosxr, nxos): nxos
Username: cisco
Password:
Command: ospf
  1. Directly supplying options
(virtualenv)$ python3 pyYAHTS.py --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf
  1. Mixing supplied options and prompted responses
(virtualenv)$ python3 pyYAHTS.py --hostname dist-sw01 --os nxos --username cisco --password cisco
Command: ospf

Creating JSON files

Of course you can also redirect the printed output to a JSON file!

python3 pyYAHTS.py --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf > dist_sw01_learned_ospf.json

Help

pyYAHTS includes a handy Rich Click Help! Simple type:

$ python3 pyYAHTS.py --help

More Help

Contact

Please reach out on Twitter Twitter or open an issue if you hit any snags or have any questions!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyYAHTS-1.0.2.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

pyYAHTS-1.0.2-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file pyYAHTS-1.0.2.tar.gz.

File metadata

  • Download URL: pyYAHTS-1.0.2.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.3 Linux/5.4.72-microsoft-standard-WSL2

File hashes

Hashes for pyYAHTS-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8003e4e3503b8d9fd57fa9c74d585d25ae0755471584d58b137981a4d9ff3242
MD5 9af54f7323fabc8230d321dcff3d0298
BLAKE2b-256 1c61775a7a98aa9645b7d6ee6f4a13e793a745042c89562d538936f110cea972

See more details on using hashes here.

File details

Details for the file pyYAHTS-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyYAHTS-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.3 Linux/5.4.72-microsoft-standard-WSL2

File hashes

Hashes for pyYAHTS-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 427ff91e5085be851acf17df02f866e98be37d0eded0dd3236a6599bbfe10deb
MD5 25eb3e9a1fa1a05e9df12374d11580dd
BLAKE2b-256 5081b8ad00eeefd25d0e12f2ebe1097b871d8729265ab53967f6d7fe470653ce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page