Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python Robot Framework Library for EOS devices

Project Description


AristaLibrary aims to simplify testing projects on Arista EOS <> using Robot Framework <> by adding a number of EOS-centric keywords. The Library works by using the PyEAPI module to interact with EOS nodes.


  • Robot Framework <>
  • PyEAPI <> (GitHub <>)
  • Arista EOS <> 4.12 or later
  • Python 2.7


The easiest way to install is to use pip <>:

pip install robotframework-aristalibrary

Upgrade using:

pip install --upgrade robotframework-aristalibrary

To install from source:

git clone
cd robotframework-aristalibrary
# Optionally, checkout the development branch"
git checkout develop"
python install

Keyword Documentation

See the AristaLibrary <> keyword documentation.

Example Robot Test

# -*- coding: robot -*-
# :setf robot
# :set noexpandtab
*** Settings ***
Documentation   This is a sample Robot Framework suite which takes advantage of
... the AristaLibrary for communicating with and controlling Arista switches.
... Run with:
... pybot --pythonpath=AristaLibrary demo/sample-test-refactored.txt

Library AristaLibrary
Library Collections
Suite Setup Connect To Switches
Suite Teardown  Clear All Connections

*** Variables ***
${TRANSPORT}    http
${SW1_HOST} localhost
${SW1_PORT} 2080
${SW2_HOST} localhost
${SW2_PORT} 2081
${USERNAME} apiuser
${PASSWORD} donttell

*** Test Cases ***
Ping Test
    [Documentation] Configure Et1 on both nodes and ping between them
    [tags]  Configure
    Configure IP Int    1   ethernet1
    Configure IP Int    2   ethernet1

    ${output}=  Enable  ping
    ${result}=  Get From Dictionary ${output[0]}    result
    Log ${result}
    ${match}    ${group1}=  Should Match Regexp ${result['messages'][0]}    (\\d+)% packet loss
    Should Be Equal As Integers ${group1}   0   msg="Packets lost percent not zero!!!"

*** Keywords ***
Connect To Switches
    [Documentation] Establish connection to a switch which gets used by test cases.
    Connect To  host=${SW1_HOST}    transport=${TRANSPORT}  username=${USERNAME}
    ... password=${PASSWORD}    port=${SW1_PORT}
    Configure   hostname veos0
    Connect To  host=${SW2_HOST}    transport=${TRANSPORT}  username=${USERNAME}
    ... password=${PASSWORD}    port=${SW2_PORT}
    Configure   hostname veos1

Configure IP Int
    [Arguments] ${switch}   ${interface}    ${ip}
    Change To Switch    ${switch}
    @{cmds}=    Create List
    ... default interface ${interface}
    ... interface ${interface}
    ... no switchport
    ... ip address ${ip}
    ... no shutdown
    Configure   ${cmds}

Release Notes

Release notes are available in the GitHub releases <>.

Support and Contacts

AristaLibrary is a community-supported project, maintained by Arista EOS+. Contact the maintainers at


Contributing is encouraged via pull requests. Please see CONTRIBUTING.rst for more information.


All code within this repository is made available under the BSD3 license and via the LICENSE file.

Release History

This version
History Node


History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(70.7 kB) Copy SHA256 Hash SHA256
Source None Feb 16, 2018

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers