Git Product home page Git Product logo

pyats-webinar's Introduction

pyATS Webinar

This repo contains code, and examples from the Packet Coders pyATS webinar.

Note The webinar video can be viewed here: https://youtu.be/epzxoHr2YZE

The 2 demos that are included within this repo are:

  • Example 1 - Create an interface error report.
  • Example 2 - Perform a maintenance diff check.

The recording of the webinar can be viewed here (TBC).

Environment Setup

To setup your environment to use the examples within this repo perform the following:

  1. Create a virtual environment To isolate the installation of your Python dependancies create a virtual environment.
python3 -m venv .venv
  1. Activate virtual environment Enter your virtual environment
source .venv/bin/activiate
  1. Install dependancies Install the various Python dependancies via PIP:
pip install -r requirements.txt
  1. Add credentials to .env Add your device credentials to .env. Like so:
cp .env-example .env
vim .env
PYATS_UNAME=### <--- update
PYATS_PWORD=### <--- update

Note: If you are running these examples against your own network please ensure you update the testbed.yml accordingly.

Example 1 - Interface Error Report

This example is based upon creating an interface error report for out_discards (via Python) using:

  • Genie Parse
  • Pcall
  • Dq
  • Rich

You can run the script like so:

$ ./examples/002_genie_parse_w_rich.py

Example 2 - Maintenance Diff Check

This example is based upon diff`ing the network pre and post a network change (via the pyATS CLI) using:

  • Genie Learn
  • Genie Diff

To run this demo perform the following:

  1. Take a snapshot of the network (pre change):
$ ./examples/003_genie_diff_pre_1.sh
  1. Make the network change(s).
  2. Take a snapshot of the network (post change):
$ ./examples/004_genie_diff_post_2.sh
  1. Perform a diff between the pre and post change snapshots.
$ ./examples/005_genie_diff_compare_3.sh

pyats-webinar's People

Contributors

rickdonato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.