Skip to content

Commit

Permalink
Convert README from md to rst to be compatible with PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
jerearista committed Feb 27, 2015
1 parent 29c0fe4 commit d3e7224
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 75 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
exclude MANIFEST.in
include README.md LICENSE
include README.rst LICENSE
include doc/AristaLibrary.html
73 changes: 0 additions & 73 deletions README.md

This file was deleted.

82 changes: 82 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
The Arista Library for Robot Framework
======================================

Introduction
------------

The enclosed project aims to simplify testing when using Robot Framework by adding a number of
EOS-centric keywords. The Library works by using the PyEAPI module to connect to and read information
from EOS nodes.

Prerequisites
-------------

* `Robot Framework <http://robotframework.org/>`
* `PyEAPI <https://github.com/arista-eosplus/pyeapi>`

Documentation
-------------

See the `AristaLibrary <http://arista-eosplus.github.io/robotframework-aristalibrary/AristaLibrary.html>` keyword documentation.

Example
-------

::

# -*- 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 10.1.1.0/31
Configure IP Int 2 ethernet1 10.1.1.1/31

${output}= Enable ping 10.1.1.0
${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}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#from AristaLibrary import __version__, __author__
execfile(join(CURDIR, 'AristaLibrary', 'version.py'))
with open(join(CURDIR, 'README.md')) as readme:
with open(join(CURDIR, 'README.rst')) as readme:
README = readme.read()
with open(join(CURDIR, 'requirements.txt')) as requirements:
INSTALL_REQUIREMENTS = requirements.read()
Expand Down

0 comments on commit d3e7224

Please sign in to comment.