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
- Make sure you first install pyATS
pip install pyats[full]
- Install Rich-Click
pip install rich-click
- 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:
- Hostname of the device - must exactly match the configured hostname
- Operating System - Either ios, iosxe, iosxr, or nxos
- Username
- Password
- Either a pyATS Learn Function, such as ospf, or any supported pyATS Parsed CLI Show Command, such as "show ip interface brief"
For a list of supported Learn Functions please visit Available Learn Functions
For a list of supported Parsers please visit Available Show Command Parsers
A sample of "Show IP Interface" Parsers for IOS-XE
Using pyYAHTS
In any virtual environment with pyATS installed pyYAHTS can be executed several ways
- Prompted Inputs
(virtualenv)$ python3 pyYAHTS.py
Hostname: dist-sw01
OS (ios, iosxe, iosxr, nxos): nxos
Username: cisco
Password:
Command: ospf
- Directly supplying options
(virtualenv)$ python3 pyYAHTS.py --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf
- 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
Contact
Please reach out on Twitter Twitter or open an issue if you hit any snags or have any questions!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyYAHTS-1.0.1.tar.gz
.
File metadata
- Download URL: pyYAHTS-1.0.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd56f336d2bf8c8092ca8797faf29a8a83245c4e07a2ce31065846a9dc830afd |
|
MD5 | 05e167a94ecdd3acbed2be39967a9313 |
|
BLAKE2b-256 | 438378f7b396694f203a2242896999bd4bbdb1635d6f61325e2958d4e2ab1479 |
File details
Details for the file pyYAHTS-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: pyYAHTS-1.0.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66763e779bc6c1c893310728f5f5c933948ef15dfc30f02f2d808fb36203f05e |
|
MD5 | d6540e826e2d758865b33745162b28d6 |
|
BLAKE2b-256 | 9964c05e77c9d9ffdcb675f5d96b05248b9eaf4f5da91c8eb8d67b860e2aa36d |