GithubHelp home page GithubHelp logo

tcli's Introduction

TCLI - TextFSM Device CLI

This is not an officially supported Google product

Overview

TCLI - client interface for issuing commands to any number of devices.

Supports batch and interactive modes and multiple display formats.

Handy for performing troubleshooting and generating reports etc from arbitrarily large numbers of live devices.

Cautions and Caveats

Empowers users to run commands across potentially large sets of devices with very few restrictions - please use wisely and cautiously.

Does not support commands that are multi-part, or have non-descreet responses e.g. the ping command. Note: You can still use commands like ping count 5 127.0.0.1 or monitor traffic brief count 2 that do not require a ctrl-c to terminate.

Documentation

Setup

TCLI requires some setup but can be run straight out of the box using some fictictous devices and a limited set of commands that produce canned output:

Devices

  • device_a
  • device_b
  • device_c

Commands

  • show version
  • show vlan

To try TCLI, execute the main.py script in the parent directory.

python3 main.py

To use it for your environment it will need an additional library to call your device accessor system and also needs to retrieve a device list from what system you are using to inventory those devices.

The 'canned' example has been included as the default inventory_csv.py to illustrate how to do this. Please refer to the comments at the start of that file for instructions on customizing for your environment.

It is hoped that contributors will submit libraries for some of the more popular opensources device accessor methods - notch, rancid and inventory systems - DNS, SQL.

Once setup for your environment, then the Power Users guide will get you up and running fast!

TCLI Power Users Guide

The structured format for device output is enable via TextFSM. Follow the instructions below for how to create new templates to display output in CSV or other structured formats.

TextTableFSM

There are opensource template repositories such as ntc-templates that provide structured output for many common commands.

Before contributing

If you are not a Google employee, our lawyers insist that you sign a Contributor Licence Agreement (CLA).

If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an individual CLA. Individual CLAs can be signed electronically. If you work for a company that wants to allow you to contribute your work, then you'll need to sign a corporate CLA. The Google CLA is based on Apache's. Note that unlike some projects (notably GNU projects), we do not require a transfer of copyright. You still own the patch.

Sadly, even the smallest patch needs a CLA.

tcli's People

Contributors

harro avatar astiliano avatar matthosch 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.