• Tag : automation


Arista VLAN with Pexpect

Hello, I’m trying to create multiple VLANs for Arista EOS switches with for loop but not sure how to as (config-vlan-number) changing on every vlan configuration. Any advice? Using pexpect for this: “` for n in range(2, 11): print(“Creating VLAN ” + str(n)) ch.sendline(‘conf t’) ch.expect(‘\(config\)#’) config_commands = f’vlan {n}’ config_name = f’name PexpectVLAN{n}’ ch.sendline(config_commands) ch.expect(‘\(config-vlan-{n}\)#’)    #how to read every vlan in the loop ch.sendline(config_name) ch.expect(‘\(config-vlan-{n}\)#’) ch.sendline(‘end’) “` Thank you  

How to download EOS from a script

I am trying to set-up automated upgrade of switches, so that as soon as there is a new version available of EOS on a given train, it gets picked up by a script, uploaded to CVP, and deployed onto the devices. To download EOS, today I log on the website with my browser and navigate to https://www.arista.com/en/support/software-download and select my firmware, but this is a manual step that I want to avoid. I just want to wake up in the morning with my switches running the latest EOS version without any action on my side. Is it possible to download...
Continue reading →

What is the roadmap for extending NETCONF support?

On vEOS when using NETCONF, there is just the capability to work with the running configuration datastore.   I am finding it hard to get a good overview of what specific NETCONF operations are supported on Arista. There are bits and pieces here and there, but other then trying out in code to see what is possible, there is no good overview or documentation. Am I missing something?   What I want to know is where I can find out: what is currently supported (targeting running-config, cadidate config, doing a commit, etc.) what it is currently supported on if...
Continue reading →

CVP Configlet Builder – change generated name

Is there a way to control the name of configlets generated by configlet builders? Example: Name of Configlet Builder: “configlet-builder-xyz” When configlets are generated by this they are automatically named : “configlet-builder-xyz_IP-ADDRESS-OF-SWITCH_1“ I would like to be able to dictate the name of the generated configlets, ideally with variables contained in the configlet builder itself. I do see that it seems possible to rename them after they are generated, however I would like to avoid that manual step if possible.

Synchronising CloudVision Portal Configlets with Ansible

Introduction As customers deploy Arista devices across multiple locations it becomes important to consider where and how these are managed. In most circumstances more than one instance of CloudVision Portal (CVP) will be required as this allows for multiple fault domains and redundancy within the management plane. This article will explore the use of the Arista CloudVision Ansible modules to synchronise a designated set of CVP Configlets across multiple CVP instances. This ability to synchronise Configlets provides an efficient way of ensuring organisational policies and security requirements can be quickly deployed across an entire Arista estate in a consistent automated...
Continue reading →

ansible authentication problem

Hi I am using ansible playbook to fetch the details of arista switch, but i am getting below error. How can i resolve this ? fatal: []: FAILED! => {“msg”: “paramiko: The authenticity of host ‘’ can’t be established.\nThe ssh-rsa key fingerprint is a0b2c0af442e297ea6ae910d738b0959.”}

Persistent File Systems in vEOS

I’ve been playing around with Ansible and using authorized_keys for some of it. I’ve noticed that in vEOS the user directories don’t survive upon reboot. Is there a place I can put authorized_keys files that will survive a reboot to allow password-less logins?

SNMP oid to find LAG members?

Is any way exist to decide a problem? I find that standart IEEE8023-LAG-MIB::dot3adAggPortSelectedAggID is not supported. Vendor specific mib doens’t have such information also. I mean that https://www.arista.com/en/support/product-documentation/arista-snmp-mibs

Deploy a Transit VPC with vEOS using IGW (Public IP)

Deploy a Transit VPC with vEOS using IGW (Public IP) fanyang@arista.com   This document focuses on the steps to build a Transit VPC solution using Internet Gateway (IGW) vs. VPC peering. There are certain advantages to use IGW as transport. This eliminate the limits on how many VPC peering can be created and gives customer a larger scale deployment. It also enables spoke VPCs to communicate with each other directly with one hop, which can potentially save data cost. Besides, even it’s public ip to public ip communication, if both IPs belong to AWS, AWS will route the traffic through...
Continue reading →

How to Automate MAC Address Lookups

Introduction MAC addresses are often overlooked, compared to higher layers of the OSI model, but they are a necessity in the transfer of data across the network. MAC addresses are unique in nature, with the vendor OUI portion of the MAC, and the client portion of the MAC. There are many reasons why locating a device is necessary, a few of them are: A device is causing adverse affects to the network and the port needs to be shutdown A port needs to be re-configured for a new device, but it is not known where the device is connected to...
Continue reading →

Network CI/CD Part 2 – Automated Testing with Robot Framework library for Arista devices

Previously on Network CI/CD Part 1… We’ve established that lack of simulated test environments and automated test tools are among the inhibitors in a transition from a traditional network operation model to a DevOps workflow, where all changes are verified and tested prior to being deployed in production. We’ve seen how to solve the first problem with Arista’s cEOS-Lab docker container and a simple container orchestration tool. We’ve shown how the new containerised EOS allows us to dramatically increase the number of nodes we can deploy on a single host and decrease the total build and boot time compared to VM orchestration methods, e.g. the ones based on...
Continue reading →

vEOS-Lab on Hyper-V

Introduction There are multiple ways to setup a vEOS-Lab environment if you have a linux system or on hypervisors such as VMware ESXi, vCenter, VM Workstation, VM Fusion, Virtualbox, etc using the vmdk provided in the Software downloads page. But if you have a Windows machine or a Windows server, the vmdk will not be useful. So here are the steps on how you can convert the vmdk to a  vhdx and create a vEOS VM on Hyper-V. Pre-requisites 1. Hyper-V Manager and Hyper-V 2. vEOS-Lab vmdk 3. Aboot ISO  Instructions Steps 1. Download the vEOS vmdk for the EOS version...
Continue reading →

EAPI script to push extensions across list of EOS devices using Python

Introduction This article demonstrates Arista’s EOS automation capabilities leveraging eAPI. This document walks you through a script to Secure Copy (SCP) an extension on Arista switches along with installing the extension on the list of switches defined in the script. Pre-Requisites This script is supported on Linux/Unix/Mac Operation Systems. The Arista eAPI must be enabled on the switches and can be configured as follows: Arista> enable Arista# configure terminal Arista(config)# management api http-commands Arista(config-mgmt-api-http-cmds)# [no] shutdown Arista(config-mgmt-api-http-cmds)# [no] protocol https [port ] Arista(config-mgmt-api-http-cmds)# [no] protocol http [port ] Jsonrpclib python module, could be installed as follows: [admin@Arista ~]$ pip install jsonrpclib Deployment methods There...
Continue reading →

Is there a way to check return codes for cli commands?

Hi,  In unix, there’s an environment variable called `?`. It stores the return code of the last cli command. If the value of `?` is anything other than zero, it means there was an error of some sort in the previous command.  For example: if I were to run: unix> ls my_dir1    my_dir2    my_file1    my_file2 unix> echo $? 0 `echo $?` returns zero because the previous command `ls` was successful. But if I had run a command which failed in some way, `?` would be set to a non-zero value. For example: unix> bogus_command -bash: bogus_command: command not...
Continue reading →

CloudVision Portal RESTful API Client

Arista Cloudvision® Portal (CVP) provides a central point of management for Arista network switches through shared snippets of configuration (configlets) enabling Network Engineers to provision the network more consistently and efficiently. While CVP highlights a graphical user interface for configuration and management of devices, it also includes a full-featured RESTful API that provides all of the same functionality available via the GUI which can be used to automate workflows and integrate with other tools. CVPRAC is a wrapper client for CVP’s RESTful APIs which greatly simplifies usage of the API and more elegantly handles the connections to the CVP nodes....
Continue reading →

CVP APIs: A Non-Programmer’s Guide

1. What are CVP APIs? Most CloudVision Portal (CVP) users are familiar with the web user interface (UI) that facilitates network provisioning, inventory management, tasks management, change control and so on.  CVP application programming interfaces (APIs) offer an alternative means of realizing the same functionality.  The key difference is that, with the CVP APIs, the functionality is realized over a programmatic interface (i.e typically by a piece of software communicating with another piece of software) rather than by a user navigating over a web page and clicking and/or typing.  Figure 1 shows a simplified example of these two methods of...
Continue reading →

Demo: CloudVision skill for Amazon Alexa

Great APIs accelerate development of new applications and integration with existing tools and services. Check out the sample CloudVision skill for Amazon Alexa that the EOS+ Consulting Services team put together one afternoon! Please share and use the comments to tell us about other integrations that you would find interesting and useful!

Alias – Simple yet powerful

Alias – Simple yet powerful   About: Alias mySimpleAlias <a maybe complicated command you would never remember>     Alias commands can be composed of multiple lines and embed variables. Below is an example of alias used as configuration template for automating configuration with just few arguments. Sunch template can satisfy complex configurations and be highly reusable. This high-level scripting or command bundling is simple to implement yet powerful.     The below example is a multi-line alias with variables (%<x>)   alias set-baremetal !! Syntax : set-baremetal <INTF> <Po ID> <DESCR> <VLAN> !! Example: set-baremetal e1,2 po1 “To Server...
Continue reading →

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 →


Get every new post on this blog delivered to your Inbox.

Join other followers: