Code Monkey home page Code Monkey logo

automate_patch_arista_switch's Introduction

automate_patch_arista_switch

This python script uses ssh2, a hostlist CSV and an ftp server to patch arista switches automatically

This script has two options:

For a unique IP - only one switch is affected For a group of IPs - all switches are going to be patched

Make sure to comment and uncomment the right option inside the .py file The default is a group of switches

Setting the environment

Running the script

  • Execute to patch only one host

    **$ python autopatch.py --hostname 10.0.1.139 --username khyron --password $(cat /tmp/key) --ftpserver ftpserver.local

  • Execute to patch multiple using hostlist.csv list

    **$ python autopatch.py --username khyron --password $(cat /tmp/key) --hostlist hostlist.csv --ftpserver ftpserver.local

Script help

$ python autopatch.py -h
usage: autopatch.py [-h] [--hostname HOSTNAME] --ftpserver FTPSERVER
                    [--port PORT] --username USERNAME --password PASSWORD
                    [--hostlist HOSTLIST]

Using a hostlist and an ftp server patch ARISTA switches.

optional arguments:
  -h, --help            show this help message and exit
  --hostname HOSTNAME   Single switch to path (ignored if --hostlist is used)
  --ftpserver FTPSERVER
                        FTP server where path file is stored
  --port PORT           port where sshd is running (default 22)
  --username USERNAME   Username to connec to switch
  --password PASSWORD   Password to connect to switch
  --hostlist HOSTLIST   Path to hostlist in CSV format

automate_patch_arista_switch's People

Watchers

 avatar  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.