Skip to main content

Arista EOS/CVP downloader script

Project description

tests PyPI - Python Version Code style: black Checked with mypy GitHub release PyPI - Downloads/month

Arista Software Downloader

Script to download Arista softwares to local folder, Cloudvision or EVE-NG.

pip install eos-downloader

CLI commands

A new CLI is available to execute commands. This CLI is going to replace eos-download script which is now marked as deprecated

 ardl
Usage: ardl [OPTIONS] COMMAND [ARGS]...

  Arista Network Download CLI

Options:
  --version     Show the version and exit.
  --token TEXT  Arista Token from your customer account  [env var:
                ARISTA_TOKEN]
  --help        Show this message and exit.

Commands:
  debug    Debug commands to work with ardl
  get      Download Arista from Arista website

Warning To use this CLI you need to get a valid token from your Arista Account page. For technical reason, it is only available for customers with active maintenance contracts and not for personnal accounts

Download EOS Package

Note Supported packages are: EOS, cEOS, vEOS-lab, cEOS64

CLI gives an option to get latest version available. By default it takes latest F release

ardl get eos --image-type cEOS --latest

If you want to get latest M release, you can use --release-type:

ardl get eos --image-type cEOS --release-type M --latest

You can download a specific EOS packages with following commands:

# Example for a cEOS package
$ ardl get eos --version 4.28.3M --image-type cEOS

Available options are :

Usage: ardl get eos [OPTIONS]

  Download EOS image from Arista website

Options:
  --image-type [64|INT|2GB-INT|cEOS|cEOS64|vEOS|vEOS-lab|EOS-2GB|default]
                                  EOS Image type  [required]
  --version TEXT                  EOS version
  -l, --latest                    Get latest version in given branch. If
                                  --branch is not use, get the latest branch
                                  with specific release type
  -rtype, --release-type [F|M]    EOS release type to search
  -b, --branch TEXT               EOS Branch to list releases
  --docker-name TEXT              Docker image name (default: arista/ceos)
                                  [default: arista/ceos]
  --output PATH                   Path to save image  [default: .]
  --log-level, --log [debug|info|warning|error|critical]
                                  Logging level of the command
  --eve-ng                        Run EVE-NG vEOS provisioning (only if CLI
                                  runs on an EVE-NG server)
  --disable-ztp                   Disable ZTP process in vEOS image (only
                                  available with --eve-ng)
  --import-docker                 Import docker image (only available with
                                  --image_type cEOSlab)
  --help                          Show this message and exit.

You can use --latest and --release-type option to get latest EOS version matching a specific release type

# Get latest M release ardl get eos --latest -rtype m
🪐 eos-downloader is starting...
    - Image Type: default
    - Version: None
🔎  Searching file EOS-4.29.3M.swi
    -> Found file at /support/download/EOS-USA/Active Releases/4.29/EOS-4.29.3M/EOS-4.29.3M.swi
...
✅  Downloaded file is correct.
✅  processing done !

List available EOS versions from Arista website

You can easily get list of available version using CLI as shown below:

 ardl info eos-versions
Usage: ardl info eos-versions [OPTIONS]

  List Available EOS version on Arista.com website.

  Comes with some filters to get latest release (F or M) as well as branch
  filtering

    - To get latest M release available (without any branch): ardl info eos-
    versions --latest -rtype m

    - To get latest F release available: ardl info eos-versions --latest
    -rtype F

Options:
  -l, --latest                    Get latest version in given branch. If
                                  --branch is not use, get the latest branch
                                  with specific release type
  -rtype, --release-type [F|M]    EOS release type to search
  -b, --branch TEXT               EOS Branch to list releases
  -v, --verbose                   Human readable output. Default is none to
                                  use output in script)
  --log-level, --log [debug|info|warning|error|critical]
                                  Logging level of the command
  --help                          Show this message and exit.

Example

 ardl info eos-versions -rtype m --branch 4.28
['4.28.6.1M', '4.28.6M', '4.28.5.1M', '4.28.5M', '4.28.4M', '4.28.3M']

Download CVP package

Supported packages are: OVA, KVM, RPM, Upgrade

$ ardl get cvp --format upgrade --version 2022.2.1 --log-level debug --output ~/Downloads

Available options are :

  --format [ova|rpm|kvm|upgrade]  CVP Image type  [required]
  --version TEXT                  CVP version  [required]
  --output PATH                   Path to save image  [default: .]
  --log-level, --log [debug|info|warning|error|critical]
                                  Logging level of the command
  --help                          Show this message and exit.

Requirements

Repository requires Python >=3.6 with following requirements:

cvprac
cryptography
paramiko
requests
requests-toolbelt
scp
tqdm

On EVE-NG, you may have to install/upgrade pyOpenSSL in version 23.0.0:

# Error when running ardl: AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

$ pip install pyopenssl --upgrade

Docker

Please refer to docker documentation

Author

From an original idea of @Mark Rayson in arista-netdevops-community/eos-scripts

License

Code is under Apache2 License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eos_downloader-0.9.0.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

eos_downloader-0.9.0-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file eos_downloader-0.9.0.tar.gz.

File metadata

  • Download URL: eos_downloader-0.9.0.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for eos_downloader-0.9.0.tar.gz
Algorithm Hash digest
SHA256 ab9de1e5d2029dd8f5f990321880442e4265e663f3d78da88343c28cbd9c4d31
MD5 f906f9bd37199959d69dee28446a74ab
BLAKE2b-256 7685cd6a5ae3241fc7c83ac5b44b3145bf848553d2d3576780b91b3cfeeb3635

See more details on using hashes here.

File details

Details for the file eos_downloader-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: eos_downloader-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 35.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for eos_downloader-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c91f75e6f57b86755bd1adebe3bcb435ac069d2d277f1cb514fe1c0aaefa4ed
MD5 de0bc7b1afe02a5caf792fb28cf3c600
BLAKE2b-256 01515b5f109b46a58e04d1e46b27c2ff9c9637fba2a286d424fb2042465ba967

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page