Arista eapi multiple commands not working

Hi, When I’m trying to use Arista veos eapi to configure vlan on an interface using multiple commands, it is failing (single command is working fine like “show vlan”, “show version”). It is not showing any response and in the background also configuration is not happening on the virtual switch. Please help me if I’m missing anything. I’m using VEOS (virtual switch) for my testing. Following are commands I’ve used and attached the screenshot of eapi. Thanks in advance   enableconfigureinterface Ethernet1switchport access vlan 745show vlan 745

An Introduction to the Golang eAPI

Introduction Since the release of Arista EOS Command API (eAPI) many have grown to appreciate its stability and easy-to-use syntax which allow applications or scripts complete programmatic control over EOS. Development of applications that interface with your Arista device for the purpose of configuration or monitoring is simple and fairly straight forward. With a little knowledge of Python, Perl, Ruby, or your favorite language of choice, and familiarity with the underlying transport mechanism (JSON-RPC), it’s easy to write some custom functionality to help with deployments, provisioning, configurations and many other things.  Arista has continued its ongoing effort to make life...
Continue reading →

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 →

static ARP inspection – configure IP-MAC bindings?

Based on TOI: https://eos.arista.com/eos-4-15-0f/static-arp-inspection/ static ARP inspection is now Available but how can we add and remove IP-MAC paars? on IP Source Guard this is documented: https://eos.arista.com/eos-4-15-2f/ip-source-guard/ but not on Static IP Inspection, did i miss something? Thanks for helping

eAPI error code: -32603

We are getting error code 32603 after running this command: aaa authorization exec default local group tacacs+ Restarting ngnix, disabling/enabling eAPI, removing the aaa command did not make a difference. We will try rebooting the switch at the end of the day to see if this fixes it.   eOS is EOS-4.14.6M. We will be upgrading to EOS-4.14.12M soon but wanted to see if there are known issues with current eOS and eAPI.

eapi library for golang (goeapi)

start working on a goeapi library, any help would be appreciated eapi binding and library for arista EOShttps://github.com/cxfcxf/goeapi0 forks.0 stars.0 open issues.Recent commits: ssh method updated, cxfcxf syntax, cxfcxf update system.go, cxfcxf syntax on readme, cxfcxf readme update, cxfcxf doesn’t really support python’s ParseConfig, so using json instead, syntax maybe different, will completing the library, the good part is, command line tool can be compiled and run on any systems.

Arista’s EOS Innovation Enabling Ecosystem Partner Software Development

Network software automation and intelligence is a passion we share as network engineering software developers at Intelligent Visibility, Inc. Creating innovative software solutions in the rising world of software-defined networking (SDN) can prove challenging. The source data that we require for our software is mostly located within the network device’s operating system. In the past accessing this source data has been a serious time investment mainly due to inconsistent API implementation types across different operating systems for many different hardware platforms.

eAPI and Unix Domain Socket

Introduction Today’s data centers cry out for automation. There are many approaches that Network Operators can leverage, but one method that is very powerful is using Arista’s eAPI command interface. When eAPI is enabled, the switch accepts commands using Arista’s CLI syntax, and responds with machine-readable output and errors serialized in JSON, served over HTTP or HTTPS. It’s very easy to use and exceptionally powerful. Other blogs and articles have discussed the usage of eAPI for scripts. The purpose of this article is to cover a new access method introduced in EOS 4.14.5, which allows local access to the eAPI...
Continue reading →

Securing eAPI

Introduction In this article we will talk about a few tips to secure our eAPI access, for example, HTTPS, changing port, certificate, ACL, on-box, AAA, vrf etc. Turning on/off eAPI First of all, the most secure way is turning off eAPI, which is by default. myswitch#configure myswitch(config)#management api http-commands myswitch(config-mgmt-api-http-cmds)#shutdown To turn eAPI on by “no shutdown”, by default the HTTPS protocol is running and HTTP is turned off for secure purpose, because HTTP send user and password in clear text. HTTP can be used by “protocol http”, however, we recommend using HTTPS. Both HTTP and HTTPS can be used concurrently. myswitch#configure terminal myswitch(config)#management api http-commands...
Continue reading →

EOS Extension – autoipcfg

With the release of the pyeapi library, its even easier to use the EOS eAPI interface to write some custom functionality to help with deployments, provisioning, configurations and many other things. Arista’s EOS+ organization has developed a full turn-key solution for provisioning new nodes on your network, known as ZTP server.  This is a full featured server that provides a bootstrap environment for Arista switches.  Its highly customizable and if you are looking for a lot of bells and whistles this would be the way to go. However the eAPI interface allows for extensions to be written really quickly if...
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 →

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 →

Arista eAPI 101

In this article, you will get some quick ideas to use Arista eAPI to configure the switch via JSON-RPC remotely. Here is one Youtube video on eAPI if you prefer to watch something live: EOS Bits & Bytes – Episode 3 “Command API” The Arista Command eAPI is a simple and complete API that allows you to configure and monitor your Arista switches. Once the API is enabled, the switch accepts HTTP(S)  requests containing a list of industry standard CLI commands, and responds with machine-readable output and errors serialized in JSON (served over HTTP or HTTPS). eAPI was first introduced in...
Continue reading →

Supported Commands for eAPI?

Hi, Is there a link to a document that shows the supported commands for the eAPI using JSON/ text format? I need to decide how to filter out the commands that aren’t supported in the eAPI.   Thank you very much, Mike

Introduction to Managing EOS Devices – Setting up Management

Note: This article is part of the Introduction to Managing EOS Devices series: https://eos.arista.com/introduction-to-managing-eos-devices/      1) Setting Up Management The following management tools are available on Arista EOS for all platforms: VRF-aware management Telnet and SSH Syslog and Console Logging SNMP Versions 1 and 3 NTP DNS Local and remote user control (AAA) TACACS+, RADIUS sFlow XMPP eAPI   Note: in the following configuration examples, the commands in square brackets are optional: [optional]   1.1) VRF Aware Management As of release 4.10.1, EOS supports the ability to constrain management functions to a VRF. This enables the user to separate management based functions...
Continue reading →

Intelligent Bootstrap with Arista EOS and ZTPServer

Many customers inquire about how to get started with automation into their operational networks. These conversations tend to revolve around how to reduce the operational expense and risk associated with managing data center networks. In most cases, the general consensus leads to starting automation around the bootstrap process or, in other words, how to find a better way to introduce consistency and agility into the deployment process.  Arista’s early heritage grew from solving real world operational problems that enhance our customers ability to deliver massively scalable data center networks efficiently. Throughout the development process EOS has provided innovative solutions that...
Continue reading →

Introducing Arista EOS Roles for Ansible

This article introduces the newly released Arista EOS role for Ansible.  The Arista EOS role provides a set of Ansible modules that can used in playbooks for automating the configuration of network resources contained in Arista EOS nodes.  The EOS role replaces the existing arista_* modules that are currently available in the Ansible distribution.  The base code that comprises the EOS role has been re-worked from the beginning, influenced by lessons learned from the first generation modules.   In addition, the EOS role now takes advantage of Ansible Galaxy to provide a streamlined distribution mechanism to make getting started with...
Continue reading →

How do I enable configure commands via HTTP API?

I'm working with a 7050s which has the http interface enabled and I am able to post non-privileged show commands and receive successful json output (e.g. show interfaces).  However, when I attempt to execute a command that requires configuration mode the command fails with the error message: ' 'configure' failed: invalid command.'   Executing 'show privilege' from the client indicates that the privilege level is 1, and so I assumed that by assigning the default privilege of 15 to the user that the configure command would be successful.  After adding a user: username newuser privilege 15 secret 0 ######  role...
Continue reading →

Programmatically update your routing table

Overview This article describes a script which is designed to allow the insertion/removal of a route in/from the routing table. If you want a way to remotely add/delete routes to/from your routing table, then this is the tool for you – using it will make insertion/removal of static routes as easy as running a script on any remote device that supports Python. How to get the code: Download the code Use your Github account and fork it (remember to contribute back) Installation The script (updateRoute) can be run/installed on any device that runs Python 2.7 or later. In order to run updateRoute, first...
Continue reading →