Giter Club home page Giter Club logo

intro-network-tests's Introduction

intro-network-tests

Demos, examples, content for the talk "Introduction to Writing Network Tests with pyATS"

published

Resources

Demo Network

If you'd like to run the demo tests in this repository, first step is to reserve the network that goes along with the testbed.yaml file.

DevNet Sandbox: Cisco Network Services Orchestrator

This sandbox provides a sample network configured with interfaces, routing, etc that can be used for a variety of tests and labs.

Installing pyATS

It is recommended to review the pyATS Getting Started Guide, but you can get started quickly with this.

pip install pyats[full]

Note: you'll need to be on Linux or macOS and be in a virtualenv of Python 3.5+

Running the Sample Network Test

The folder network_test_project will check that all devices in the testbed are reachable, and that interfaces aren't showing any errors.

The testbed.yaml file is setup to look in the environment variables for the user/password for devices.

testbed:
  name: Multi Platform Network
  credentials:
    default:
      username: '%ENV{PYATS_USERNAME}'
      password: '%ENV{PYATS_PASSWORD}'
    enable:
      password: '%ENV{PYATS_PASSWORD}'
    line:
      password: '%ENV{PYATS_PASSWORD}'
    linux: 
      password: '%ENV{PYATS_PASSWORD}'

As the Sandbox is a sample network, the values for these are included in the pyats_env file in the repository. "source" it to set these variables.

source pyats_env

Now you can run the test with

pyats run job network_test_project/network_test_job.py --testbed testbed.yaml

Note: you'll need to be VPN connected to the DevNet Sandbox to run the test

To checkout the results and logs from the test, use the pyats logs view function to open a browser view.

intro-network-tests's People

Contributors

hpreston avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

intro-network-tests's Issues

question

Hi, great presentation at PyCon, are the interface details needed in the testbed file or they can be learned from the devices themselves?

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.