Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0 #264

Merged
merged 157 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
6abd06c
Try importing ujson and rapidjson before json
xavierhardy Aug 7, 2018
63d087c
Implement configure_session() to send "configure session", diff() for…
codeout Oct 25, 2019
75e31b3
Merge pull request #183 from arista-eosplus/master
andriirr Jan 27, 2020
2d14de2
Bump version
andriirr Jan 27, 2020
1ef71bb
Merge pull request #1 from arista-eosplus/develop
andriirr Feb 18, 2020
052b500
Merge pull request #175 from codeout/support-session
mharista Feb 21, 2020
d9cf216
Fix issue #186, fix typo in client.py
andriirr Mar 23, 2020
b17dd21
Amend tests for #186
andriirr Mar 23, 2020
db91e02
Amend remove vlan to vni mapping CLI
andriirr Mar 23, 2020
860833e
Merge pull request #188 from andriirr/develop
andriirr Mar 26, 2020
1276a6d
Add config session documentation
mharista Jun 1, 2020
de73c7c
Add config session documentation
mharista Jun 1, 2020
e18ca68
Remove config session doc from wrong dir
mharista Jun 1, 2020
fd1b0c2
adding streaming option for commands
bravindranath-bsn Sep 25, 2020
b46c95a
Correct typo "mutlicast"
will-h Oct 2, 2020
23fd003
Merge pull request #192 from will-h/patch-1
andriirr Oct 2, 2020
b2992f8
Adding Power support(ppc64le)with continuous integration/testing to t…
asellappen Nov 6, 2020
ca9ab66
Inorrect import from 'collections' will stop working in Python 3.9
qaxi Nov 12, 2020
7df0975
Merge pull request #196 from qaxi/patch-1
andriirr Nov 13, 2020
cfa5d00
Merge pull request #191 from bravindranath/develop
andriirr Nov 13, 2020
37d3db4
Merge pull request #194 from asellappen/develop
andriirr Nov 13, 2020
f4b08eb
Fix python2 dependancy on collections
andriirr Nov 13, 2020
eceb4e7
Bump Python version to 3.9 for CI
andriirr Nov 13, 2020
439cf44
Fix #189 #190 #195
andriirr Nov 13, 2020
9d90ad8
Bump version to rc
andriirr Nov 13, 2020
9f899f6
fixed issue #198
May 30, 2021
16de7da
#197 - updated vlans.getall() to handle vlan grouppings
May 31, 2021
09cb700
updated vlans.get() to return range/list of vlan ids (instead of inpu…
Jun 1, 2021
9e98b61
Merge pull request #199 from ldn-softdev/fix-198
ldn-softdev Jun 1, 2021
ff90f3b
Merge pull request #200 from ldn-softdev/fix-197
ldn-softdev Jun 1, 2021
7e753d5
Merge pull request #202 from ldn-softdev/fix_vlans.get
ldn-softdev Jun 1, 2021
dc35ab0
fixed import warning in abstract module
Jun 17, 2021
ea90146
Merge pull request #204 from arista-eosplus/fix_import_warning
ldn-softdev Jun 17, 2021
f02f7e1
Merge pull request #207 from arista-eosplus/master
dlyssenko Aug 3, 2021
39046d1
updated documentation to avoid using localhost for off-box connections
Aug 3, 2021
b0ffe0d
Merge pull request #209 from ldn-softdev/fix-pyeapi-doc
ldn-softdev Aug 3, 2021
894568a
Refactor deprecated unittest aliases for Python 3.11 compatibility.
tirkarthi Nov 5, 2021
75e7bcb
Merge pull request #212 from tirkarthi/fix-assert
mharista Nov 5, 2021
9fc4882
Update configfile.rst
ldn-softdev Nov 22, 2021
28387ea
fix for the issue #213
Jan 24, 2022
a481bfa
Merge pull request #214 from dlyssenko/fix_issue_#213
dlyssenko Jan 24, 2022
7aecc8c
Ignore subinterfaces on switchports.getall()
DavidVentura Jan 25, 2022
640feef
Stop on whitespace
DavidVentura Jan 25, 2022
31d2a82
extended config for unit testing issue #213
Jan 25, 2022
0de8e0b
Merge pull request #217 from dlyssenko/add_UT_for_#213
dlyssenko Jan 25, 2022
c674c14
Add a test
DavidVentura Jan 26, 2022
995b380
Merge pull request #216 from DavidVentura/bugfix-switchport-detection
dlyssenko Jan 26, 2022
8d71e52
Add new value from #213
DavidVentura Jan 26, 2022
88735bb
merge tests
DavidVentura Jan 26, 2022
85fc4cb
Merge pull request #218 from DavidVentura/bugfix-integration
dlyssenko Jan 26, 2022
bfc96c7
address perf issues on section splitting
DavidVentura Feb 3, 2022
156e627
fix bad test
DavidVentura Feb 3, 2022
d703240
Add option to not include defaults with node.running_config
Erik-Lamers1 Feb 18, 2022
480ea49
updated client descritpion to reflect issue #222
Apr 22, 2022
2cdb306
mitor fix in the description for reST markdown
Apr 25, 2022
dce3f5e
Merge pull request #225 from dlyssenko/update_doc_for_issue222
dlyssenko Apr 25, 2022
95dc32e
another minor update for client.connect description
Apr 25, 2022
16565d6
Merge pull request #226 from dlyssenko/fix-pyeapi-doc
dlyssenko Apr 25, 2022
dffe311
Merge pull request #166 from xavierhardy/json
dlyssenko Apr 25, 2022
46215f5
Add support for passwords that cannot be used to login
floatingstatic Jun 22, 2022
be6317f
added sphinx_rtd_theme to dev-requrements.txt
sulrich Jun 23, 2022
df87c12
docs: fixing #231
Jul 5, 2022
5ba1f39
Merge pull request #232 from alarig/develop
dlyssenko Jul 5, 2022
70ec20d
Merge pull request #228 from sulrich/sulrich-pip-sphinx
dlyssenko Jul 5, 2022
a1622e7
fixing collection.Iterables in test_utils.py for py3.10
Jul 16, 2022
d734601
fixing collection.Iterables in test_utils.py for py3.10 - minor impro…
Jul 17, 2022
7402808
Merge pull request #235 from dlyssenko/fix_collection_iterables
mharista Jul 18, 2022
7183570
fix for issue #234 - allow passing ssl context to pyeapi
Jul 18, 2022
fc11223
Merge pull request #236 from dlyssenko/fix_issue_#234
mharista Jul 18, 2022
8252b7f
minor markdown fix in client module description
Sep 16, 2022
b240c52
Merge pull request #237 from dlyssenko/fix-pyeapi-doc
dlyssenko Sep 16, 2022
0ab6efe
fix passwd exposure in traceback issue
Sep 16, 2022
e5ad2d8
Merge pull request #238 from dlyssenko/fix_passwd_exposure_issue
dlyssenko Sep 16, 2022
5a65745
Merge pull request #227 from floatingstatic/nologin-password
dlyssenko Sep 18, 2022
ac98b81
fixed issue where sphinx failed to generate API modules doc, plus mad…
Sep 20, 2022
ffe955d
Merge pull request #239 from dlyssenko/fix_for_sphinx_issue
dlyssenko Sep 20, 2022
ea6fef1
readying pyeapi for github actions + minor style fixes
Sep 26, 2022
970054e
Merge pull request #240 from dlyssenko/ready_pyeapi_for_github_actions
dlyssenko Sep 26, 2022
37aaf95
Migrate from Travis CI to GitHub workflows
stefanor Mar 24, 2022
c8814dc
extended python-version list for CI with 2.7 and 3.10
Sep 26, 2022
4e8bee9
Merge pull request #241 from dlyssenko/python-version_list_for_CI
dlyssenko Sep 26, 2022
0628d60
removed password from showing in debugs
Sep 28, 2022
1536019
added pep8 E128 to ignore list - to adopt to Arista coding style
Sep 28, 2022
35ac5aa
fixed my update to accomodate to unit tests and possibly invalid jsons
Sep 28, 2022
5babcdb
minor typo fixes in comments
Sep 28, 2022
72f252f
one more minor typo fix in comments
Sep 28, 2022
dde9e5a
Merge pull request #242 from dlyssenko/remove_passwd_from_debugs
dlyssenko Sep 28, 2022
e850e93
Update ci.yml
dlyssenko Oct 7, 2022
e2c4371
Merge pull request #221 from Erik-Lamers1/develop
dlyssenko Oct 7, 2022
e3391b1
Update test_client.py
dlyssenko Oct 7, 2022
1ce58da
Update eapilib.py
dlyssenko Oct 7, 2022
2411fca
Update ci.yml
dlyssenko Oct 7, 2022
52e9804
fix for issue #210 - getall() fails in ipinterfaces module
Oct 7, 2022
6700be1
Merge pull request #243 from dlyssenko/fix_getall_in_ipinterfaces
dlyssenko Oct 7, 2022
20e23a3
fix for issue #193 - flood list for vxlan in interfaces returns wrong…
Oct 7, 2022
8150f38
Merge pull request #244 from dlyssenko/fix_#193_flood_list_in_interfa…
dlyssenko Oct 11, 2022
dec714e
Merge pull request #220 from DavidVentura/perf-issues
dlyssenko Oct 18, 2022
de4f877
enhanced `section` to match subsections and removed py2.7 from CI
Oct 18, 2022
642ad05
minor syntax change to keep flake8 happy
Oct 18, 2022
1fc461a
added a doc string and dressed up the function, no functional change
Oct 18, 2022
4d67237
few more space adjustments to please flake8
Oct 18, 2022
2365031
Merge pull request #245 from dlyssenko/enhance_split_sections
dlyssenko Oct 18, 2022
886a66f
Store and pass credentials as header tuple
bewing Jun 9, 2021
60c87e7
Support session-based authorization
bewing Jun 9, 2021
230ba44
Merge pull request #203 from bewing/session
dlyssenko Nov 8, 2022
65cde18
provisioning for providing CLI variants to handle deprecated cli tran…
Nov 9, 2022
62dbc6c
moved cli varinats functionality to clint.py module so that users cou…
Nov 9, 2022
aec00d9
fixed issue raising the exception properly for the last failed command
Nov 9, 2022
da01239
fixed again raising the exception properly for the last failed command
Nov 9, 2022
64cc86b
updated documentation
Nov 10, 2022
1bc1fc8
space adjustment in the docstring
Nov 10, 2022
833d8f1
Merge pull request #247 from dlyssenko/enh_cli_variants
dlyssenko Nov 10, 2022
3e9bde8
provided comments on enforce_verification param deprecation
Dec 16, 2022
eb244c3
removed python 3.5 and 3.6 from the workflows - unsupported
Dec 16, 2022
b332307
Merge pull request #248 from dlyssenko/provide_comment_for_peram_depr…
dlyssenko Dec 16, 2022
ca0023c
fix issue #161 - add parsing of secondary ip from interfaces
Feb 13, 2023
d34349a
making flake8 happy
Feb 13, 2023
7a2d236
Merge pull request #251 from dlyssenko/fix_ench_161_add_parsing_secon…
dlyssenko Feb 19, 2023
f5fcb4c
Include error message in CommandError for commands that cause interna…
Mar 14, 2023
f561624
_parse_bgp_as regex to match as and asdot
bh-rr Apr 25, 2023
ad1344b
Checking if asn is asdot or not, and return string if asdot and int i…
bh-rr Apr 26, 2023
660ee97
typo
bh-rr Apr 26, 2023
619b902
testing dumb shit
bh-rr Apr 26, 2023
812da9c
dumby dumb dumb
bh-rr Apr 26, 2023
b31ac6e
dafuq am i doing
bh-rr Apr 26, 2023
a0a97a3
maybe just maybe
bh-rr Apr 26, 2023
806408e
i hate this shit i just wanna do neworking again :(
bh-rr Apr 26, 2023
e8f5306
lemme be a network engineer again please i wanna die
bh-rr Apr 26, 2023
30ced8b
play stupid games win stupid prices
bh-rr Apr 28, 2023
93bc8e8
var typo
bh-rr Apr 28, 2023
5c4cb63
testing
bh-rr Apr 28, 2023
285116c
Merge pull request #252 from dkaplan1/error_code_1001_fix
dlyssenko Apr 28, 2023
6fe6190
testing suggested changes
bh-rr May 1, 2023
5146cf3
intendation error
bh-rr May 4, 2023
6bfa9ff
Merge pull request #256 from bh-rr/develop
dlyssenko May 4, 2023
a26aabe
Update ipinterfaces.py
gregbo May 18, 2023
5f13a47
Update ipinterfaces.py
gregbo May 20, 2023
fd843d4
Merge pull request #257 from gregbo/patch-1
dlyssenko May 20, 2023
b29dc8b
fixing doc build issues, errors, and providing docstring interpolatio…
May 21, 2023
8e3fff4
fixing indents
May 21, 2023
f77cd53
moved decorator's descriptin into the doc string
May 21, 2023
7161583
Merge pull request #258 from dlyssenko/provide_docstring_decorator
mharista May 22, 2023
b7ebd14
removed deprecated spanningtree module
May 22, 2023
301c50d
Merge pull request #259 from dlyssenko/remove_deprecated_spanningtree…
mharista May 22, 2023
b60ba05
removed all outdated python version checks
May 22, 2023
4b1de15
Merge pull request #260 from dlyssenko/remove_outdated_version_checks
dlyssenko May 22, 2023
acc74e9
minor improvement for docstr decorator
May 25, 2023
7282e16
Merge pull request #261 from dlyssenko/update_docstring_decorator
dlyssenko May 25, 2023
bf9976f
Removed reference to python2 (#262)
chieto-arista May 26, 2023
e2cc790
removed couple deprecations
Jun 2, 2023
7af714b
removed one more deprecation
Jun 2, 2023
3c68e8e
Merge pull request #263 from dlyssenko/remove_deprecations
chieto-arista Jun 5, 2023
d6a3169
Created release-notes-1.0.0.rst
dlyssenko Jun 6, 2023
8a62c85
Updated release-notes.rst
dlyssenko Jun 6, 2023
2831b7d
Update VERSION
dlyssenko Jun 6, 2023
83238ef
Update __init__.py
dlyssenko Jun 6, 2023
7bca46b
Update release-notes-1.0.0.rst
dlyssenko Jun 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: CI
on: [ pull_request, workflow_dispatch ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
fail-fast: false
name: Test on Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install wheel
run: pip install wheel
- name: Install dev requirements
run: pip install -r dev-requirements.txt
- name: Upgrade flake8
run: pip install --upgrade flake8
- name: Clean
run: make clean
- name: pep8
run: make pep8
- name: flake8
run: make flake8
- name: check
run: make check
- name: unittest
run: make unittest
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ VERSION := $(shell cat VERSION)
all: clean check pep8 flake8 tests

pep8:
pycodestyle -r --ignore=E402,E731,E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225,E261,E241 pyeapi/ test/
pycodestyle -r --ignore=E402,E731,E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E202,E225,E261,E241,E128 pyeapi/ test/

pyflakes:
pyflakes pyeapi/ test/

flake8:
flake8 --ignore=E302,E303,E402,E731,W391 --exit-zero pyeapi/
flake8 --ignore=E302,E303,E402,E731,W391,N802 --max-line-length=100 test/
flake8 --ignore=E128,E201,E202,E302,E303,E402,E731,W391 --exit-zero pyeapi/
flake8 --ignore=E128,E201,E202,E302,E303,E402,E731,W391,N802 --max-line-length=100 test/

check:
check-manifest
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.3
1.0.0
6 changes: 4 additions & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ coverage
sphinx
sphinxcontrib-napoleon
flake8
flake8-print
flake8-debugger
#commenting below 2 lines until switchover to python3 is complete
#flake8-print
#flake8-debugger
sphinx_rtd_theme
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PAPER =
BUILDDIR = _build
APIDIR = api_modules
CLIENTDIR = client_modules
CWD := $(shell pwd)
CWD := '$(shell pwd)'

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, '../pyeapi')
sys.path.insert(0, os.path.abspath('..') )

# -- General configuration ------------------------------------------------

Expand All @@ -35,7 +35,7 @@
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.doctest',
'sphinxcontrib.napoleon'
'sphinx.ext.napoleon'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
15 changes: 15 additions & 0 deletions docs/configfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@ As the table above indicates, a pyeapi configuration file is required in
[connection:localhost]
transport: http_local

Pay attention: once ``eapi.conf`` exists, the respective protocol method must be
configured on the box. E.g., for the above ``eapi.conf`` sample, the following
configuration must also exist:

.. code-block:: console

switch(config)#management http-server
switch(config-mgmt-http-server)#protocol http localhost


Using HTTP or HTTPS
===================

Expand Down Expand Up @@ -172,6 +182,11 @@ As the table above indicates, a pyeapi configuration file is required in
username: admin
password: admin

.. Note:: avoid using ``localhost`` name in the connection description (i.e.: ``[connection:localhost]``).
The name ``localhost`` is reserved solely for ``on-box`` connection method and it won't work when
connecting ``off-box``


Using HTTPS with Certificates
=============================

Expand Down
52 changes: 52 additions & 0 deletions docs/configsessions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Using Config Sessions via Python Client for eAPI
=======================================================

Config Sessions can be used via Pyeapi. Config sessions allow a block of config
to be added as one operation instead of as individual lines. Configurations applied
in this manner allow the user to abort all the config being applied if an error occurs.

Using Config Sessions:

.. code-block:: python

import pyeapi
node = pyeapi.connect_to('veos01')
vlans = node.api('vlans')

node.configure_session()

node.diff() # Sends "configure session 9c27d0e8-afef-4afd-95ae-3e3200bb7a3e" and "show session-config diff"

"""
=>
--- system:/running-config
+++ session:/9c27d0e8-afef-4afd-95ae-3e3200bb7a3e-session-config
@@ -32,7 +32,7 @@
!
clock timezone Asia/Tokyo
!
-vlan 1000,3001-3006
+vlan 100,1000,3001-3006
!
interface Port-Channel1
switchport trunk allowed vlan 3001-3003
"""

node.abort() # Sends "configure session 9c27d0e8-afef-4afd-95ae-3e3200bb7a3e" and "abort"
# or
node.commit() # Sends "configure session 9c27d0e8-afef-4afd-95ae-3e3200bb7a3e" and "commit"

Config Session with invalid config line:

.. code-block:: python

node = pyeapi.connect_to('veos01')
interfaces = node.api('interfaces')
node.configure_session()

if not (interfaces.configure(['interface Eth6', 'no switchport', 'ip address 172.16.0.1/30']) and \
interfaces.configure(['interface Eth7', 'no switchport', 'ip address 172.16.0.1/30'])):
node.abort() # This aborts everything!!

For more detailed information about using Configure Sessions in EOS, reference the user
manual for the version of EOS running on your switch.
4 changes: 2 additions & 2 deletions docs/generate_modules.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3

from os import listdir, path, makedirs
from os.path import isfile, join, exists
Expand All @@ -22,7 +22,7 @@ def get_module_names(p):
mods = list()
mods = [f.split('.')[0] for f in listdir(p)
if isfile(join(p, f)) and not f.endswith('.pyc') and not f.startswith('__')]
print len(mods)
print( len(mods) )
return mods

def process_modules(modules):
Expand Down
23 changes: 23 additions & 0 deletions docs/release-notes-0.8.4.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Release 0.8.4
-------------

2020-11-13

New Modules
^^^^^^^^^^^


Enhancements
^^^^^^^^^^^^

* Add streaming capability for eapi interface

* Add Power ppc64le support with CI

Fixed
^^^^^

Known Caveats
^^^^^^^^^^^^^


64 changes: 64 additions & 0 deletions docs/release-notes-1.0.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Release 1.0.0
-------------

2023-06-06

- This is a Python3 (3.7 onwards) release only (Python2 is no longer supported)
- Arista EOS 4.22 or later required

New Modules
^^^^^^^^^^^

Enhancements
^^^^^^^^^^^^

Fixed
^^^^^

* Let ``config`` method to raise ``ConnectionError`` exception (`198 <https://github.com/arista-eosplus/pyeapi/issues/198>`_)
The fix ensures that the behavior is consistent with other methods.
* Fixed parsing of VLAN groupings by ``vlans.getall()`` (`200 <https://github.com/arista-eosplus/pyeapi/pull/200>`_)
The fix allows handling a case when multiple VLANs in the configs may be grouped under a common (group) name.
* Enhanced ``vlans.get()`` to return an actual list of VLANs (`202 <https://github.com/arista-eosplus/pyeapi/pull/202>`_)
The method used to return the argument itself (e.g., an RE: ``200-.*``), now the actual list of matched VLANs is returned
* Fixed a corner crash in ``portsVlans.getall()`` (`213 <https://github.com/arista-eosplus/pyeapi/issues/213>`_)
The crash may occur when the switchport is configured with a VLAN profile
* Improved ``switchports.getall()`` behavior (`216 <https://github.com/arista-eosplus/pyeapi/pull/216>`_)
The method will not consider subinterfaces anymore
* Improved JSON parsing speed (`166 <https://github.com/arista-eosplus/pyeapi/pull/166>`_)
User may improve the speed by using ``ujson`` or ``rapidjson`` modules. The standard ``json`` is used as a fallback.
* Allow user to specify an SSL context (`234 <https://github.com/arista-eosplus/pyeapi/issues/234>`_)
Provided the argument option ``context`` to specify an SSL context in ``connection()`` method.
* Fixed user password vulnerability in tracebacks (`238 <https://github.com/arista-eosplus/pyeapi/pull/238>`_)
A user password is exposed in a traceback, which could occur due to invalid credentials.
* Added support for login password exclusively for ssh-key authentication (`227 <https://github.com/arista-eosplus/pyeapi/pull/227>`_)
Catching up with EOS CLI which already supports such login password.
* Fixed user password vulnerability in debugs (`242 <https://github.com/arista-eosplus/pyeapi/pull/242>`_)
A user password was exposed in user enabled debugs. With this commit the user password is masked out now.
* Added option not to include config defaults (`221 <https://github.com/arista-eosplus/pyeapi/pull/221>`_)
Reading running-config or startup-config with default values is not always a desirable behavior. This commit adds an option to control such behavior.
* Fixed a corner crash in ``ipinterfaces`` module (`210 <https://github.com/arista-eosplus/pyeapi/issues/210>`_)
Fixed a crash when MTU value is not present in the interface configuration (this is rather a corner case condition).
* Fixed a bug where vxlan floodlist might return a bogus data (`193 <https://github.com/arista-eosplus/pyeapi/issues/193>`_)
Fixed the issue with ``interfaces`` module, where ``get()`` method returned vxlan data structure with ``flood_list`` parsed incorrectly.
* Improved performance of config parsing (`220 <https://github.com/arista-eosplus/pyeapi/pull/220>`_)
Drastically improved perfromance of config parsing by cacheing section splitting results. This fix also tightens the prior relaxed section match behavior by allowing matching only section line (as vs entire section's content)
* Enhanced PR (`220 <https://github.com/arista-eosplus/pyeapi/pull/220>`_) allowing to match sub-sections (`245 <https://github.com/arista-eosplus/pyeapi/pull/245>`_)
After PR #220, matching subsections was impossible (only entire section could have been matched). This enhancement brings back such functionality.
* Added support for a session based authentication (`203 <https://github.com/arista-eosplus/pyeapi/pull/203>`_)
Added a couple new transport options (``http_session`` and ``https_session``) to ``connect()`` method to support a session based authentication.
* Added support infrastructure to handle deprecated EOS CLI (`247 <https://github.com/arista-eosplus/pyeapi/pull/247>`_)
The added ``CliVariants`` class helps managing transitions from deprecated EOS CLI (by allowing specifying both, new and deprecated CLI variants).
* Added support for parsing secondary ip addresses (`251 <https://github.com/arista-eosplus/pyeapi/pull/251>`_)
The added fix extends the return result for ``get()`` method of ``ipinterfaces`` module with the parsed secondary ip addresses (if present).
* A minor fix to include internal exception handling (`252 <https://github.com/arista-eosplus/pyeapi/pull/252>`_)
With this fix the ``pyeapi.eapilib.CommandError`` exception will elaborate on the causes of internal errors.
* Enhance parsing of BGP router section with ``asdot`` notation (`256 <https://github.com/arista-eosplus/pyeapi/pull/256>`_)
Allow matching and parsing ``router bgp`` sections if spelled with ``asdot`` notation.
* removed and updated deprecations (`204 <https://github.com/arista-eosplus/pyeapi/pull/204>`_, `212 <https://github.com/arista-eosplus/pyeapi/pull/212>`_, `235 <https://github.com/arista-eosplus/pyeapi/pull/235>`_, `260 <https://github.com/arista-eosplus/pyeapi/pull/260>`_, `262 <https://github.com/arista-eosplus/pyeapi/pull/262>`_, `263 <https://github.com/arista-eosplus/pyeapi/pull/263>`_)
* documentation fixes and updates (`209 <https://github.com/arista-eosplus/pyeapi/pull/209>`_, `225 <https://github.com/arista-eosplus/pyeapi/pull/225>`_, `239 <https://github.com/arista-eosplus/pyeapi/pull/239>`_, `257 <https://github.com/arista-eosplus/pyeapi/pull/257>`_, `259 <https://github.com/arista-eosplus/pyeapi/pull/259>`_)

Known Caveats
^^^^^^^^^^^^^


3 changes: 3 additions & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Release Notes
:maxdepth: 2
:titlesonly:

release-notes-1.0.0.rst
release-notes-0.8.4.rst
release-notes-0.8.3.rst
release-notes-0.8.2.rst
release-notes-0.8.1.rst
release-notes-0.8.0.rst
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Requirements
############

* Arista EOS 4.12 or later
* Arista EOS 4.22 or later
* Arista eAPI enabled for at least one transport (see Official EOS Config Guide
at arista.com for details)
* Python 2.7 or 3.4+ (Python 3 support is work in progress)
* Python 3.7+
* Pyeapi requires the netaddr Python module

.. Note:: netaddr gets installed automatically if you use pip to install pyeapi
2 changes: 1 addition & 1 deletion pyeapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
__version__ = '0.8.3'
__version__ = '1.0.0'
__author__ = 'Arista EOS+'


Expand Down
6 changes: 3 additions & 3 deletions pyeapi/api/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
ultimately derive from BaseEntity which provides some common functions to
make building API modules easier.
"""
from collections import Callable, Mapping

from pyeapi.eapilib import CommandError, ConnectionError
from collections.abc import Callable, Mapping
from pyeapi.eapilib import CommandError
from pyeapi.utils import make_iterable


Expand Down Expand Up @@ -123,7 +123,7 @@ def configure(self, commands):
try:
self.node.config(commands)
return True
except (CommandError, ConnectionError):
except (CommandError):
return False

def command_builder(self, string, value=None, default=None, disable=None):
Expand Down
11 changes: 5 additions & 6 deletions pyeapi/api/bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def get(self):
return response

def _parse_bgp_as(self, config):
match = re.search(r'^router bgp (\d+)', config)
return dict(bgp_as=int(match.group(1)))
as_num = re.search(r'(?<=^router bgp ).*', config).group(0)
return { 'bgp_as': int(as_num) if as_num.isnumeric() else as_num }

def _parse_router_id(self, config):
match = re.search(r'router-id ([^\s]+)', config)
Expand Down Expand Up @@ -214,10 +214,9 @@ def _parse_peer_group(self, config, name):
return dict(peer_group=value)

def _parse_remote_as(self, config, name):
regexp = r'neighbor {} remote-as (\d+)'.format(name)
match = re.search(regexp, config)
value = match.group(1) if match else None
return dict(remote_as=value)
remote_as_re = rf'(?<=neighbor {name} remote-as ).*'
match = re.search(remote_as_re, config)
return { 'remote_as': match.group(0) if match else None}

def _parse_send_community(self, config, name):
exp = 'no neighbor {} send-community'.format(name)
Expand Down
Loading