Export CVP Functionality to Ansible

In some network environments there is a separation of responsibility for the network infrastructure and the server side equipment. In these environments, different groups responsible for managing different equipment could use different tools for the job. This guide will discuss one of the several options for integrating Arista’s network management tool, CloudVision Portal (CVP), into an Ansible environment. Summary In this example, the environment uses Ansible as the configuration management tool for server provisioning but uses CVP for network management. The environment is set up to allow the server team to provision top of rack switch ports for servers using...
Continue reading →

Leveraging CVP Telemetry and ZTP in an Ansible Environment

This guide will discuss one of several options for integrating Arista’s network management tool, CloudVision Portal (CVP), into an Ansible environment. Summary In data center environments where Ansible is used for configuration management of all devices including networking equipment, the network operations team may want to leverage the telemetry and Zero Touch Provisioning (ZTP) functionality provided by the CloudVision Portal product. In this example, CVP will be used for ZTP, image upgrades, and telemetry while Ansible will be used to manage the switch configuration directly. Documentation for setting up ZTP can be found in the CloudVision configuration guide. Implementation This...
Continue reading →

FastCli – Calling Python Script

Hi, I added a new event-handler called TEST, what it does is when int49 operational status goes to “notconnect”, I want to disable the port. normal bash command is not working. (tested with TAC) Switch : Arista 7150 – 52 port EOS: so I wrote a python script and stored in /mnt/flash/hello1.py (when I separately run the command, it checks the status of the interface (“notconnect”) and disabling them properly. But to call the script in event-handler command? FastCli ???? Can some one please help me.. Thanks Hari  

Valid Python Scripts may fail in OS X ‘El Capitan’

Python scripts can be run on OS X using eAPI to access Arista Switches or vEOS instances. Python Scripts can also be run on OS X to automate the installation of vEOS: (https://github.com/arista-eosplus/packer-veos). After installing or upgrading to OSX ‘El Capitan’ (OS X version 10.11.5) Python Scripts that previously worked fine under earlier versions of OS X or work on other operating systems may fail. This is evident when making a Python Script executable after issuing the chmod +x command.  This is due to operating system changes Apple has introduced in ‘El Capitan’. Although, this problem may affect eAPI and...
Continue reading →

Script to update EOS in sw’s in a bulk

Hi We want to upgrade EOS in sw’s. We want to automate this process. We can use solarwinds to execute a script or a phython script to do it. If someone can provide with template for it so we can test it in a lab sw and use it in production.   Thanks Raj  

Interface MTU with JSON and Python

Hi, I am trying to do something which I thought would be fairly simple using the EOS API, alas it is causing me some issues. I want to run the command “show interfaces” via the JSON API and then extract and print various bits of information. I have started off simple by (trying) to extract the MTU. This is my Python code: import json import jsonrpclib from jsonrpclib import Server switches = [""] username = "admin" password = "admin" # Going through all the switch IP addresses listed above for switch in switches: urlString = "https://{0}:{1}@{2}/command-api".format(username, password, switch) switchReq =...
Continue reading →

Script example – Automating VXLAN deployments with EAPI

  1) Introduction This article describes briefly what is required to deploy overlay networks with VXLAN, but we assume a good understanding of the VXLAN fundamentals. To achieve such VXLAN deployments, multiple options exist, from simple but manual, to fully automated service chaining (orchestration) at the cost of having to also set a Cloud Management Platform or a network virtualization controler This article focuses on an easy option that is a good balance between simplicity of operation (automation), and simplicity of  setting up (script ready to go)   2) Working towards automation: it is an evolution This article is not providing...
Continue reading →

Working with the Python eAPI Client

This article builds on the Introduction to the Python Client for eAPI by taking a look at the pyeapi client a little deeper.  The client module provides a number of functions for making it easier to build connectivity to Arista EOS nodes running eAPI. To get started, lets begin by simply importing the pyeapi client in Python and review the how to build a node object. >>> import pyeapi >>> node = pyeapi.connect_to('veos01') As discussed in the introduction article, the above will search for and load the eapi.conf file.  Once the configuration file has been found and loaded by pyeapi,...
Continue reading →

Fabric Visibility

A leaf and spine fabric is challenging to monitor. The fabric spreads traffic across all the switches and links in order to maximize bandwidth. Unlike traditional hierarchical network designs, where a small number of links can be monitored to provide visibility, a leaf and spine network has no special links or switches where running CLI commands or attaching a probe would provide visibility. Even if it were possible to attach probes, the effective bandwidth of a leaf and spine network can be as high as a Petabit/second, well beyond the capabilities of current generation monitoring tools. The 2 minute video...
Continue reading →

Introducing the Python Client for eAPI (pyeapi)

The Arista EOS command API (eAPI) has been available in versions of EOS since the release of version 4.12.  It has proven to be an invaluable tool for building management plane applications, making it easy to develop solutions that interface with the device configuration and state information.  Building on the capabilities of eAPI, this article introduces the initial release of the Python Client for eAPI (pyeapi). The Python Client for eAPI (pyeapi) is a language specific client to make working eAPI even easier.  It is designed to assist network engineers, operators and devops teams to build eAPI applications faster without...
Continue reading →

Understanding EOS CLI implementation

This document gives an overview of the some of the APIs used for developing CLI Plugins. Although it tries to be as complete as possible, it only focuses on the most common APIs used by the CLI Plugins and it is not an exhaustive description of all the interfaces. The document is relevant for EOS version 4.12.0, although parts of the document might also apply to older releases. “Hello world!” example TestCli.py # Copyright(c)2013 AristaNetworks,Inc. All rights reserved. # Arista Networks, Inc. Confidential and Proprietary. import BasicCli import CliParser from CliModel import Model # Model ­ only required for eAPI...
Continue reading →

Reacting to syslog-triggered events

EOS in tandem with Python scripting can provide the network operator an invaluable tool that is driven by local log entries on the switch. The script presented here continuously monitors /var/log/messages for new entries as it contains verbose, unfiltered entries. The script then searches each log entry using the built-in Python regular expression module. When a matching entry is found (this script is looking for major errors) it saves the output of ‘show tech-support’ to internal flash. For every match, the script checks for the existence of a ‘show tech-support’ file to ensure it doesn’t create a duplicate entry for...
Continue reading →

EOS extensions on GitHub

A collection of scripts and examples on how to extend EOS using Python can be found in the following repository on GitHub: arista-eosext13 repositories, 0 followers.

How to generate syslog messages using Python

Arista EOS extensions can be easily configured to generate syslog messages. This documents provides an overview of the APIs which can be used in order to achieve that and shows a few examples. The examples presented in the following sections were tested against EOS-4.12.0. Basic example #!/usr/bin/env python # Copyright (c) 2013 Arista Networks, Inc. All rights reserved. # Arista Networks, Inc. Confidential and Proprietary. import syslog syslog.openlog( 'myTestLog', 0, syslog.LOG_LOCAL4 ) syslog.syslog( '%%TEST-6-LOG: Log msg: %s' % 'test msg' ) Result Apr 17 07:15:40 <hostname> myTestLog: %TEST-6-LOG: Log msg: test msg See the official Python documentation for more details.

Which is the mount point in Sysdb for static routes?

I am trying to use SysDb with python to create a route. e.g. I want to have route for subnet with next hop on But I am not able to find a correct mount point to be able to do this. It will be great if someone can help me get this correct.