[Python-modules-commits] [pyeapi] 02/08: New upstream release.

Vincent Bernat bernat at moszumanska.debian.org
Sun Nov 12 19:15:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

bernat pushed a commit to annotated tag debian/0.8.1-1
in repository pyeapi.

commit 07440555991f86e04dcbd01f96b589de97a19260
Author: Vincent Bernat <bernat at debian.org>
Date:   Sun Nov 12 20:08:27 2017 +0100

    New upstream release.
---
 MANIFEST.in                              |   1 +
 PKG-INFO                                 |   2 +-
 README.md                                |   2 +-
 VERSION                                  |   2 +-
 docs/api_modules/_list_of_modules.rst    |  28 +++
 docs/api_modules/abstract.rst            |  13 ++
 docs/api_modules/acl.rst                 |  13 ++
 docs/api_modules/bgp.rst                 |  13 ++
 docs/api_modules/interfaces.rst          |  13 ++
 docs/api_modules/ipinterfaces.rst        |  13 ++
 docs/api_modules/mlag.rst                |  13 ++
 docs/api_modules/ntp.rst                 |  13 ++
 docs/api_modules/ospf.rst                |  13 ++
 docs/api_modules/routemaps.rst           |  13 ++
 docs/api_modules/spanningtree.rst        |  13 ++
 docs/api_modules/staticroute.rst         |  13 ++
 docs/api_modules/stp.rst                 |  13 ++
 docs/api_modules/switchports.rst         |  13 ++
 docs/api_modules/system.rst              |  13 ++
 docs/api_modules/users.rst               |  13 ++
 docs/api_modules/varp.rst                |  13 ++
 docs/api_modules/vlans.rst               |  13 ++
 docs/api_modules/vrfs.rst                |  13 ++
 docs/api_modules/vrrp.rst                |  13 ++
 docs/client_modules/_list_of_modules.rst |  12 ++
 docs/client_modules/client.rst           |  13 ++
 docs/client_modules/eapilib.rst          |  13 ++
 docs/client_modules/utils.rst            |  13 ++
 docs/examples.rst                        |   8 +
 docs/index.rst                           |   1 +
 docs/release-notes-0.8.0.rst             |  37 ++++
 docs/release-notes-0.8.1.rst             |  21 ++
 docs/release-notes.rst                   |   2 +
 docs/subinterfaces.rst                   |  58 ++++++
 pyeapi.egg-info/PKG-INFO                 |   2 +-
 pyeapi.egg-info/SOURCES.txt              |  32 ++++
 pyeapi/__init__.py                       |   2 +-
 pyeapi/api/acl.py                        | 180 +++++++++++++++--
 pyeapi/api/interfaces.py                 | 178 +++++++++++++++--
 pyeapi/api/ospf.py                       |  34 +++-
 pyeapi/api/varp.py                       |  13 +-
 pyeapi/api/vrfs.py                       | 320 +++++++++++++++++++++++++++++++
 pyeapi/client.py                         |  82 ++++++--
 pyeapi/eapilib.py                        |  66 +++++--
 pyeapi/utils.py                          |  15 +-
 setup.cfg                                |   1 -
 test/fixtures/dut.conf                   |   9 +-
 test/fixtures/running_config.ospf        |   5 +
 test/fixtures/running_config.text        |  11 ++
 test/fixtures/running_config.vrf         | 233 ++++++++++++++++++++++
 test/fixtures/running_config.vxlan       |   1 +
 test/fixtures/vxlan.json                 |   1 +
 test/lib/testlib.py                      |   1 +
 test/system/test_api_acl.py              | 102 +++++++++-
 test/system/test_api_interfaces.py       | 163 +++++++++++++++-
 test/system/test_api_ipinterfaces.py     |   1 +
 test/system/test_api_ospf.py             |  58 ++++--
 test/system/test_api_routemaps.py        |   1 +
 test/system/test_api_staticroute.py      |   1 +
 test/system/test_api_stp.py              |   1 +
 test/system/test_api_switchports.py      |   1 +
 test/system/test_api_users.py            |   1 +
 test/system/test_api_varp.py             |  40 +++-
 test/system/test_api_vrfs.py             | 215 +++++++++++++++++++++
 test/system/test_client.py               |  84 +++++++-
 test/unit/test_api_acl.py                | 180 ++++++++++++++++-
 test/unit/test_api_interfaces.py         | 113 ++++++++++-
 test/unit/test_api_ipinterfaces.py       |   3 +-
 test/unit/test_api_ospf.py               |  22 ++-
 test/unit/test_api_routemaps.py          |   1 +
 test/unit/test_api_switchports.py        |   1 +
 test/unit/test_api_system.py             |   1 +
 test/unit/test_api_varp.py               |   5 +-
 test/unit/test_api_vlans.py              |   3 +-
 test/unit/test_api_vrfs.py               | 167 ++++++++++++++++
 test/unit/test_client.py                 | 109 ++++++++++-
 test/unit/test_eapilib.py                |  88 ++++++++-
 test/unit/test_utils.py                  |   7 +
 78 files changed, 2865 insertions(+), 149 deletions(-)

diff --git a/MANIFEST.in b/MANIFEST.in
index 70e6dc3..d28ebb9 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -17,6 +17,7 @@ recursive-include test *.ospf
 recursive-include test *.routemaps
 recursive-include test *.varp
 recursive-include test *.varp_null
+recursive-include test *.vrf
 recursive-include test *.vrrp
 recursive-include test *.yaml
 recursive-include docs description.rst
diff --git a/PKG-INFO b/PKG-INFO
index cb9b450..e5218bf 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyeapi
-Version: 0.7.0
+Version: 0.8.1
 Summary: Python Client for eAPI
 Home-page: https://github.com/arista-eosplus/pyeapi
 Author: Arista EOS+ CS
diff --git a/README.md b/README.md
index 7d1e831..21d6c46 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # Arista eAPI Python Library
 
-[![Build Status](https://travis-ci.org/arista-eosplus/pyeapi.svg?branch=develop)](https://travis-ci.org/arista-eosplus/pyeapi) [![Coverage Status](https://coveralls.io/repos/arista-eosplus/pyeapi/badge.svg?branch=develop)](https://coveralls.io/r/arista-eosplus/pyeapi?branch=develop) [![Documentation Status](https://readthedocs.org/projects/pyeapi/badge/?version=latest)](http://readthedocs.org/docs/pyeapi/en/latest/?badge=latest)
+[![Build Status](https://travis-ci.org/arista-eosplus/pyeapi.svg?branch=develop)](https://travis-ci.org/arista-eosplus/pyeapi) [![Coverage Status](https://coveralls.io/repos/github/arista-eosplus/pyeapi/badge.svg?branch=develop)](https://coveralls.io/github/arista-eosplus/pyeapi?branch=develop) [![Documentation Status](https://readthedocs.org/projects/pyeapi/badge/?version=latest)](http://readthedocs.org/docs/pyeapi/en/latest/?badge=latest)
 
 The Python library for Arista's eAPI command API implementation provides a
 client API work using eAPI and communicating with EOS nodes.  The Python
diff --git a/VERSION b/VERSION
index faef31a..6f4eebd 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.7.0
+0.8.1
diff --git a/docs/api_modules/_list_of_modules.rst b/docs/api_modules/_list_of_modules.rst
new file mode 100644
index 0000000..5959bb7
--- /dev/null
+++ b/docs/api_modules/_list_of_modules.rst
@@ -0,0 +1,28 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Api
+===
+
+.. toctree::
+   :maxdepth: 2
+
+   abstract
+   acl
+   bgp
+   interfaces
+   ipinterfaces
+   mlag
+   ntp
+   ospf
+   routemaps
+   spanningtree
+   staticroute
+   stp
+   switchports
+   system
+   users
+   varp
+   vlans
+   vrfs
+   vrrp
diff --git a/docs/api_modules/abstract.rst b/docs/api_modules/abstract.rst
new file mode 100644
index 0000000..ed3469e
--- /dev/null
+++ b/docs/api_modules/abstract.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Abstract
+========
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.abstract
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/acl.rst b/docs/api_modules/acl.rst
new file mode 100644
index 0000000..40d2d93
--- /dev/null
+++ b/docs/api_modules/acl.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Acl
+===
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.acl
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/bgp.rst b/docs/api_modules/bgp.rst
new file mode 100644
index 0000000..71daa5f
--- /dev/null
+++ b/docs/api_modules/bgp.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Bgp
+===
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.bgp
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/interfaces.rst b/docs/api_modules/interfaces.rst
new file mode 100644
index 0000000..981572c
--- /dev/null
+++ b/docs/api_modules/interfaces.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Interfaces
+==========
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.interfaces
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/ipinterfaces.rst b/docs/api_modules/ipinterfaces.rst
new file mode 100644
index 0000000..a274a6b
--- /dev/null
+++ b/docs/api_modules/ipinterfaces.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Ipinterfaces
+============
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.ipinterfaces
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/mlag.rst b/docs/api_modules/mlag.rst
new file mode 100644
index 0000000..2346cd1
--- /dev/null
+++ b/docs/api_modules/mlag.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Mlag
+====
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.mlag
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/ntp.rst b/docs/api_modules/ntp.rst
new file mode 100644
index 0000000..6524d5c
--- /dev/null
+++ b/docs/api_modules/ntp.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Ntp
+===
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.ntp
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/ospf.rst b/docs/api_modules/ospf.rst
new file mode 100644
index 0000000..c12fd03
--- /dev/null
+++ b/docs/api_modules/ospf.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Ospf
+====
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.ospf
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/routemaps.rst b/docs/api_modules/routemaps.rst
new file mode 100644
index 0000000..8f145ba
--- /dev/null
+++ b/docs/api_modules/routemaps.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Routemaps
+=========
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.routemaps
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/spanningtree.rst b/docs/api_modules/spanningtree.rst
new file mode 100644
index 0000000..12fe040
--- /dev/null
+++ b/docs/api_modules/spanningtree.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Spanningtree
+============
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.spanningtree
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/staticroute.rst b/docs/api_modules/staticroute.rst
new file mode 100644
index 0000000..034b0af
--- /dev/null
+++ b/docs/api_modules/staticroute.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Staticroute
+===========
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.staticroute
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/stp.rst b/docs/api_modules/stp.rst
new file mode 100644
index 0000000..0fe9e7c
--- /dev/null
+++ b/docs/api_modules/stp.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Stp
+===
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.stp
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/switchports.rst b/docs/api_modules/switchports.rst
new file mode 100644
index 0000000..3890e2c
--- /dev/null
+++ b/docs/api_modules/switchports.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Switchports
+===========
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.switchports
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/system.rst b/docs/api_modules/system.rst
new file mode 100644
index 0000000..15f729b
--- /dev/null
+++ b/docs/api_modules/system.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+System
+======
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.system
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/users.rst b/docs/api_modules/users.rst
new file mode 100644
index 0000000..7cd8c84
--- /dev/null
+++ b/docs/api_modules/users.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Users
+=====
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.users
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/varp.rst b/docs/api_modules/varp.rst
new file mode 100644
index 0000000..445d6ab
--- /dev/null
+++ b/docs/api_modules/varp.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Varp
+====
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.varp
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/vlans.rst b/docs/api_modules/vlans.rst
new file mode 100644
index 0000000..223aff8
--- /dev/null
+++ b/docs/api_modules/vlans.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Vlans
+=====
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.vlans
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/vrfs.rst b/docs/api_modules/vrfs.rst
new file mode 100644
index 0000000..3a48b32
--- /dev/null
+++ b/docs/api_modules/vrfs.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Vrfs
+====
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.vrfs
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/api_modules/vrrp.rst b/docs/api_modules/vrrp.rst
new file mode 100644
index 0000000..001cacb
--- /dev/null
+++ b/docs/api_modules/vrrp.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Vrrp
+====
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.api.vrrp
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/client_modules/_list_of_modules.rst b/docs/client_modules/_list_of_modules.rst
new file mode 100644
index 0000000..49ef273
--- /dev/null
+++ b/docs/client_modules/_list_of_modules.rst
@@ -0,0 +1,12 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Client
+======
+
+.. toctree::
+   :maxdepth: 2
+
+   client
+   eapilib
+   utils
diff --git a/docs/client_modules/client.rst b/docs/client_modules/client.rst
new file mode 100644
index 0000000..bfba8c7
--- /dev/null
+++ b/docs/client_modules/client.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Client
+======
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.client
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/client_modules/eapilib.rst b/docs/client_modules/eapilib.rst
new file mode 100644
index 0000000..78a0872
--- /dev/null
+++ b/docs/client_modules/eapilib.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Eapilib
+=======
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.eapilib
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/client_modules/utils.rst b/docs/client_modules/utils.rst
new file mode 100644
index 0000000..46c5f86
--- /dev/null
+++ b/docs/client_modules/utils.rst
@@ -0,0 +1,13 @@
+.. This file has been autogenerated by generate_modules.py
+
+
+Utils
+=====
+
+.. toctree::
+   :maxdepth: 1
+
+.. automodule:: pyeapi.utils
+   :members:
+   :undoc-members:
+   :show-inheritance:
diff --git a/docs/examples.rst b/docs/examples.rst
new file mode 100644
index 0000000..47ca47b
--- /dev/null
+++ b/docs/examples.rst
@@ -0,0 +1,8 @@
+Configuration Examples Using pyeapi
+===================================
+
+
+.. toctree::
+   :maxdepth: 1
+
+   subinterfaces
diff --git a/docs/index.rst b/docs/index.rst
index f2aeb5c..6ec5c25 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -30,6 +30,7 @@ through Github issues.
    configfile
    modules
    requirements
+   examples
    contribute
    release-notes
    support
diff --git a/docs/release-notes-0.8.0.rst b/docs/release-notes-0.8.0.rst
new file mode 100644
index 0000000..f6698bd
--- /dev/null
+++ b/docs/release-notes-0.8.0.rst
@@ -0,0 +1,37 @@
+######
+v0.8.0
+######
+
+2017-03-14
+
+New Modules
+^^^^^^^^^^^
+
+* Base API for VRF support. (`133 <https://github.com/arista-eosplus/pyeapi/pull/133>`_) [`mharista <https://github.com/mharista>`_]
+    Added new API module for creating VRFs. In addition to creating, configuring and removing VRFs the updates allow for applying a VRF to an interface and creating a VRF specific OSPF instance.
+
+Enhancements
+^^^^^^^^^^^^
+
+* Add base extended ACL support. (`135 <https://github.com/arista-eosplus/pyeapi/pull/135>`_) [`mharista <https://github.com/mharista>`_]
+    Updated ACL api to include extended ACLs in addition to standard. To create an extended ACL provide the type as extended when creating the ACL (default is standard). Currently extended ACL statements can be added with action, protocol, and source/destination address. The API will determine the type of ACL by name after it has been created for future updates.
+* Add support for creating and deleting ethernet subinterfaces (`132 <https://github.com/arista-eosplus/pyeapi/pull/132>`_) [`mharista <https://github.com/mharista>`_]
+    Allow for creation and deletion of ethernet subinterfaces as part of the EthernetInterface class. Subinterfaces are also supported on PortChannel interfaces. An example using the API to create an ethernet subinterface is provided in the docs.
+* Add node attributes from show version command (`131 <https://github.com/arista-eosplus/pyeapi/pull/131>`_) [`mharista <https://github.com/mharista>`_]
+    Added information from show version as attributes to a node. Version, version number and model are added. Version number is simply the numeric portion of the version. For example 4.17.1 if the version is 4.17.1M. All three parameters are populated from the output of show version when any one of the parameters is accessed the first time.
+* Add support for eAPI expandAliases parameter (`127 <https://github.com/arista-eosplus/pyeapi/pull/127>`_) [`mharista <https://github.com/mharista>`_]
+    Allowed users to provide the expandAliases parameter to eAPI calls. This allows users to use aliased commands via the API. For example if an alias is configured as 'sv' for 'show version' then an API call with sv and the expandAliases parameter will return the output of show version.
+* Add support for autoComplete parameter. Issue 119 (`123 <https://github.com/arista-eosplus/pyeapi/pull/123>`_) [`mharista <https://github.com/mharista>`_]
+    Allows users to use short hand commands in eAPI calls. With this parameter included a user can send 'sh ver' via eAPI to get the output of show version.
+* expose portchannel attributes :lacp fallback, lacp fallback timeout (`118 <https://github.com/arista-eosplus/pyeapi/pull/118>`_) [`lruslan <https://github.com/lruslan>`_]
+    Helps for configuring LACP fallback in EOS.
+
+Fixed
+^^^^^
+
+* API path is hardcoded in EapiConnection.send() (`129 <https://github.com/arista-eosplus/pyeapi/issues/129>`_)
+    Updated the previously hardcoded path to /command-api in the EAPI connection to use the transport objects path.
+* Cannot run 'no ip virtual-router mac-address' in eos 4.17.x (`122 <https://github.com/arista-eosplus/pyeapi/issues/122>`_)
+    Fixed command format for negating an ip virtual-router mac-address. Default and disable forms of the command changed and require the mac-address value in EOS 4.17. Update fixes this for newer versions and is backwards compatible.
+* Non-standard HTTP/s port would cause connection to fail (`120 <https://github.com/arista-eosplus/pyeapi/issues/120>`_)
+    Bug fixed in PR (`121 <https://github.com/arista-eosplus/pyeapi/pull/121>`_) where a port passed in via eapi.conf as a unicode value caused the http connection to fail.
diff --git a/docs/release-notes-0.8.1.rst b/docs/release-notes-0.8.1.rst
new file mode 100644
index 0000000..e945613
--- /dev/null
+++ b/docs/release-notes-0.8.1.rst
@@ -0,0 +1,21 @@
+######
+v0.8.1
+######
+
+2017-07-20
+
+New Modules
+^^^^^^^^^^^
+
+Enhancements
+^^^^^^^^^^^^
+
+Fixed
+^^^^^
+
+* hard coded /command-api was probably a safe default (`141 <https://github.com/arista-eosplus/pyeapi/issues/141>`_)
+    This issue/PR (`142 <https://github.com/arista-eosplus/pyeapi/pull/142>`_) reverts a change that introduced a bug breaking pyeapi's unix-socket connection. Regardless of using TCP/IP or unix-socket for communicating with the EAPI process the data being sent to the process is formatted in HTTP requests. The HTTP requests should always POST to the /command-api endpoint. The change being reverted by this prevents the unix-socket path from ever erroneously being used as the HTTP endpoint.
+* Execute does not work well with long running commands (`138 <https://github.com/arista-eosplus/pyeapi/issues/138>`_)
+    Added socket specific error messages in PR (`144 <https://github.com/arista-eosplus/pyeapi/pull/144>`_) to help distinguish errors caused by command timeouts.
+* eAPI does not handle commands sent as unicode strings (`137 <https://github.com/arista-eosplus/pyeapi/issues/137>`_)
+    Bug fixed in PR (`139 <https://github.com/arista-eosplus/pyeapi/pull/139>`_) unicode commands converted to strings when detected.
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index c9a806c..88b7c50 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -6,6 +6,8 @@ Release Notes
     :maxdepth: 2
     :titlesonly:
 
+    release-notes-0.8.1.rst
+    release-notes-0.8.0.rst
     release-notes-0.7.0.rst
     release-notes-0.6.1.rst
     release-notes-0.6.0.rst
diff --git a/docs/subinterfaces.rst b/docs/subinterfaces.rst
new file mode 100644
index 0000000..8537de5
--- /dev/null
+++ b/docs/subinterfaces.rst
@@ -0,0 +1,58 @@
+Configuring Subinterfaces Using Python Client for eAPI
+=======================================================
+
+Subinterfaces can be configured on Ethernet and Port-Channel interfaces. To do this in
+pyeapi simply call create or delete with your subinterface name.
+
+Subinterfaces require that the primary interface be in routed mode.
+
+.. code-block:: python
+
+  import pyeapi
+  node = pyeapi.connect_to('veos01')
+  node.api('ipinterfaces').create('Ethernet1')
+
+At this point the below should be in your running configuration.
+
+.. code-block:: shell
+
+  !
+  interface Ethernet1
+     no switchport
+  !
+
+Next step is to create the subinterface
+
+.. code-block:: python
+
+  node.api('interfaces').create('Ethernet1.1')
+
+.. code-block:: shell
+
+  !
+  interface Ethernet1
+     no switchport
+  !
+  interface Ethernet1.1
+  !
+
+Subinterfaces also require a vlan to be applied to them.
+
+.. code-block:: python
+
+  node.api('interfaces').set_encapsulation('Ethernet1.1', 4)
+
+.. code-block:: shell
+
+  !
+  interface Ethernet1
+     no switchport
+  !
+  interface Ethernet1.1
+     encapsulation dot1q vlan 4
+  !
+
+Using delete in the same format as create will remove the subinterface.
+
+For more detailed information about configuring subinterfaces in EOS, reference the user
+manual for the version of EOS running on your switch.
diff --git a/pyeapi.egg-info/PKG-INFO b/pyeapi.egg-info/PKG-INFO
index cb9b450..e5218bf 100644
--- a/pyeapi.egg-info/PKG-INFO
+++ b/pyeapi.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyeapi
-Version: 0.7.0
+Version: 0.8.1
 Summary: Python Client for eAPI
 Home-page: https://github.com/arista-eosplus/pyeapi
 Author: Arista EOS+ CS
diff --git a/pyeapi.egg-info/SOURCES.txt b/pyeapi.egg-info/SOURCES.txt
index ec12dd7..380ef57 100644
--- a/pyeapi.egg-info/SOURCES.txt
+++ b/pyeapi.egg-info/SOURCES.txt
@@ -13,6 +13,7 @@ docs/conf.py
 docs/configfile.rst
 docs/contribute.rst
 docs/description.rst
+docs/examples.rst
 docs/generate_modules.py
 docs/index.rst
 docs/install.rst
@@ -35,9 +36,36 @@ docs/release-notes-0.5.0.rst
 docs/release-notes-0.6.0.rst
 docs/release-notes-0.6.1.rst
 docs/release-notes-0.7.0.rst
+docs/release-notes-0.8.0.rst
+docs/release-notes-0.8.1.rst
 docs/release-notes.rst
 docs/requirements.rst
+docs/subinterfaces.rst
 docs/support.rst
+docs/api_modules/_list_of_modules.rst
+docs/api_modules/abstract.rst
+docs/api_modules/acl.rst
+docs/api_modules/bgp.rst
+docs/api_modules/interfaces.rst
+docs/api_modules/ipinterfaces.rst
+docs/api_modules/mlag.rst
+docs/api_modules/ntp.rst
+docs/api_modules/ospf.rst
+docs/api_modules/routemaps.rst
+docs/api_modules/spanningtree.rst
+docs/api_modules/staticroute.rst
+docs/api_modules/stp.rst
+docs/api_modules/switchports.rst
+docs/api_modules/system.rst
+docs/api_modules/users.rst
+docs/api_modules/varp.rst
+docs/api_modules/vlans.rst
+docs/api_modules/vrfs.rst
+docs/api_modules/vrrp.rst
+docs/client_modules/_list_of_modules.rst
+docs/client_modules/client.rst
+docs/client_modules/eapilib.rst
+docs/client_modules/utils.rst
 examples/get_config.py
 examples/nodes.conf
 examples/simple.py
@@ -70,6 +98,7 @@ pyeapi/api/system.py
 pyeapi/api/users.py
 pyeapi/api/varp.py
 pyeapi/api/vlans.py
+pyeapi/api/vrfs.py
 pyeapi/api/vrrp.py
 test/fixtures/dut.conf
 test/fixtures/eapi.conf
@@ -85,6 +114,7 @@ test/fixtures/running_config.routemaps
 test/fixtures/running_config.text
 test/fixtures/running_config.varp
 test/fixtures/running_config.varp_null
+test/fixtures/running_config.vrf
 test/fixtures/running_config.vrrp
 test/fixtures/running_config.vxlan
 test/fixtures/show_interfaces.json
@@ -109,6 +139,7 @@ test/system/test_api_system.py
 test/system/test_api_users.py
 test/system/test_api_varp.py
 test/system/test_api_vlans.py
+test/system/test_api_vrfs.py
 test/system/test_api_vrrp.py
 test/system/test_client.py
 test/unit/test_api_acl.py
@@ -126,6 +157,7 @@ test/unit/test_api_system.py
 test/unit/test_api_users.py
 test/unit/test_api_varp.py
 test/unit/test_api_vlans.py
+test/unit/test_api_vrfs.py
 test/unit/test_api_vrrp.py
 test/unit/test_client.py
 test/unit/test_eapilib.py
diff --git a/pyeapi/__init__.py b/pyeapi/__init__.py
index 2d0d25f..dbcff3b 100644
--- a/pyeapi/__init__.py
+++ b/pyeapi/__init__.py
@@ -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.7.0'
+__version__ = '0.8.1'
 __author__ = 'Arista EOS+'
 
 
diff --git a/pyeapi/api/acl.py b/pyeapi/api/acl.py
index 5303cce..498e544 100644
--- a/pyeapi/api/acl.py
+++ b/pyeapi/api/acl.py
@@ -47,6 +47,9 @@ import re
 import netaddr
 
 from pyeapi.api import EntityCollection
+from pyeapi.utils import ProxyCall
+
+VALID_ACLS = frozenset(['standard', 'extended'])
 
 
 def mask_to_prefixlen(mask):
@@ -76,6 +79,75 @@ def prefixlen_to_mask(prefixlen):
     return str(netaddr.IPNetwork(addr).netmask)
 
 
+class Acls(EntityCollection):
+
+    def __init__(self, node, *args, **kwargs):
+        super(Acls, self).__init__(node, *args, **kwargs)
+        self._instances = dict()
+
+    def get(self, name):
+        return self.get_instance(name)[name]
+
+    def getall(self):
+        """Returns all ACLs in a dict object.
+
+        Returns:
+            A Python dictionary object containing all ACL
+            configuration indexed by ACL name::
+
+                {
+                    "<ACL1 name>": {...},
+                    "<ACL2 name>": {...}
+                }
+
+        """
+        acl_re = re.compile(r'^ip access-list (?:(standard) )?(.+)$', re.M)
+        response = {'standard': {}, 'extended': {}}
+        for acl_type, name in acl_re.findall(self.config):
+            acl = self.get(name)
+            if acl_type and acl_type == 'standard':
+                response['standard'][name] = acl
+            else:
+                response['extended'][name] = acl
+        return response
+
+    def __getattr__(self, name):
+        return ProxyCall(self.marshall, name)
+
+    def marshall(self, name, *args, **kwargs):
+        acl_name = args[0]
+        acl_instance = self.get_instance(acl_name)
+        if not hasattr(acl_instance, name):
+            raise AttributeError("'%s' object has no attribute '%s'" %
+                                 (acl_instance, name))
+        method = getattr(acl_instance, name)
+        return method(*args, **kwargs)
+
+    def get_instance(self, name):
+        if name in self._instances:
+            return self._instances[name]
+        acl_re = re.compile(r'^ip access-list (?:(standard) )?(%s)$' % name,
+                            re.M)
+        match = acl_re.search(self.config)
+        if match:
+            acl_type = match.group(1) or 'extended'
+            return self.create_instance(match.group(2), acl_type)
+        return {name: None}
+
+    def create_instance(self, name, acl_type):
+        if acl_type not in VALID_ACLS:
+            acl_type = 'standard'
+        acl_instance = ACL_CLASS_MAP.get(acl_type)
+        self._instances[name] = acl_instance(self.node)
+        return self._instances[name]
+
+    def create(self, name, type='standard'):
+        # Create ACL instance for ACL type Standard or Extended then call
+        # create method for specific ACL class.
+        acl_instance = self.create_instance(name, type)
+        return acl_instance.create(name)
+
+
 class StandardAcls(EntityCollection):
 
     entry_re = re.compile(r'(\d+)'
@@ -91,30 +163,21 @@ class StandardAcls(EntityCollection):
         config = self.get_block('ip access-list standard %s' % name)
         if not config:
             return None
-
         resource = dict(name=name, type='standard')
         resource.update(self._parse_entries(config))
         return resource
 
-    def getall(self):
-        resources = dict()
-        acls = re.compile(r'ip access-list standard ([^\s]+)')
-        for name in acls.findall(self.config):
-            resources[name] = self.get(name)
-        return resources
-
     def _parse_entries(self, config):
         entries = dict()
         for item in re.finditer(r'\d+ [p|d].*$', config, re.M):
             match = self.entry_re.match(item.group(0))
-            if match:
-                (seq, act, anyip, host, ip, mlen, mask, log) = match.groups()
-                entry = dict()
-                entry['action'] = act
-                entry['srcaddr'] = ip or '0.0.0.0'
-                entry['srclen'] = mlen or mask_to_prefixlen(mask)
-                entry['log'] = log is not None
-                entries[seq] = entry
+            (seq, act, anyip, host, ip, mlen, mask, log) = match.groups()
+            entry = dict()
+            entry['action'] = act
+            entry['srcaddr'] = ip or '0.0.0.0'
... 3676 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pyeapi.git



More information about the Python-modules-commits mailing list