{ "info": { "author": "Arista Networks, Inc.", "author_email": "eosplus-dev@arista.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Networking" ], "description": "Arista Cloudvision\\ |reg| Portal RESTful API Client\n===================================================\n|pypi_version_badge|\n|System_test_Status|\n\nTable of Contents\n=================\n#. `Overview`_\n\n - `Requirements`_\n\n#. `Installation`_\n\n - `Development: Run from Source`_\n\n#. `Getting Started`_\n\n - `Example`_\n\n#. `Testing`_\n#. `License`_\n\nOverview\n========\n\nThis module provides a RESTful API client for Cloudvision\\ |reg| Portal (CVP)\nwhich can be used for building applications that work with Arista CVP.\n\nWhen the class is instantiated the logging is configured. Either syslog,\nfile logging, both, or none can be enabled. If neither syslog nor\nfilename is specified then no logging will be performed.\n\nThis class supports creating a connection to a CVP node and then issuing\nsubsequent GET and POST requests to CVP. A GET or POST request will be\nautomatically retried on the same node if the request receives a\nrequests.exceptions.Timeout or ReadTimeout error. A GET or POST request\nwill be automatically retried on the same node if the request receives a\nCvpSessionLogOutError. For this case a login will be performed before\nthe request is retried. For either case, the maximum number of times a\nrequest will be retried on the same node is specified by the class\nattribute NUM\\_RETRY\\_REQUESTS.\n\nIf more than one CVP node is specified when creating a connection, and a\nGET or POST request that receives a requests.exceptions.ConnectionError,\nrequests.exceptions.HTTPError, or a requests.exceptions.TooManyRedirects\nwill be retried on the next CVP node in the list. If a GET or POST\nrequest that receives a requests.exceptions.Timeout or\nCvpSessionLogOutError and the retries on the same node exceed\nNUM\\_RETRY\\_REQUESTS, then the request will be retried on the next node\non the list.\n\nIf any of the errors persists across all nodes then the GET or POST\nrequest will fail and the last error that occurred will be raised.\n\nThe class provides connect, get, and post methods that allow the user to\nmake RESTful API calls to CVP. See the example below using the get\nmethod.\n\nThe class provides a wrapper function around the CVP RESTful API\noperations. Each API method takes the RESTful API parameters as method\nparameters to the operation method. The API class was added to the\nclient class because the API functions are required when using the CVP\nRESTful API and placing them in this library avoids duplicating the\ncalls in every application that uses this class. See the examples below\nusing the API methods.\n\nRequirements\n------------\n\n- Python 2.7 or later\n- Python logging module\n- Python requests module version 1.0.0 or later\n\nInstallation\n============\n\nThe source code for cvprac is provided on Github at\nhttps://github.com/aristanetworks/cvprac. All current development is\ndone in the develop branch. Stable released versions are tagged in the\nmaster branch and uploaded to https://pypi.python.org.\n\nIf your platform has internet access you can use the Python Package\nmanager to install cvprac.\n\n::\n\n admin:~ admin$ sudo pip install cvprac\n\nYou can upgrade cvprac\n\n::\n\n admin:~ admin$ sudo pip install --upgrade cvprac\n\nDevelopment: Run from Source\n----------------------------\n\nWe recommend running cvprac in a virtual environment. For more\ninformation, read this:\nhttp://docs.python-guide.org/en/latest/dev/virtualenvs/\n\nThese instructions will help you install and run cvprac from source.\nThis is useful if you plan on contributing or if you would always like\nto see the latest code in the develop branch. Note that these steps\nrequire the pip and git commands.\n\nStep 1: Clone the cvprac Github repo\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n # Go to a directory where you'd like to keep the source\n admin:~ admin$ cd ~/projects\n admin:~ admin$ git clone https://github.com/aristanetworks/cvprac\n admin:~ admin$ cd cvprac\n\nStep 2: Check out the desired version or branch\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n # Go to a directory where you'd like to keep the source\n admin:~ admin$ cd ~/projects/cvprac\n\n # To see a list of available versions or branches\n admin:~ admin$ git tag\n admin:~ admin$ git branch\n\n # Checkout the desired version of code\n admin:~ admin$ git checkout v0.3.3\n\nStep 3: Install cvprac using Pip with -e switch\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n # Go to a directory where you'd like to keep the source\n admin:~ admin$ cd ~/projects/cvprac\n\n # Install\n admin:~ admin$ sudo pip install -e ~/projects/cvprac\n\nStep 4: Install cvprac development requirements\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n # Go to a directory where you'd like to keep the source\n admin:~ admin$ pip install -r dev-requirements.txt\n\nGetting Started\n===============\n\nOnce the package has been installed you can run the following example to\nverify that everything has been installed properly.\n\nExample\n-------\n\nExample using get method:\n\n::\n\n >>> from cvprac.cvp_client import CvpClient\n >>> clnt = CvpClient()\n >>> clnt.connect(['cvp1', 'cvp2', 'cvp3'], 'cvp_user', 'cvp_word')\n >>> result = clnt.get('/cvpInfo/getCvpInfo.do')\n >>> print result\n {u'version': u'2016.1.0'}\n >>>\n\nSame example as above using the API method:\n\n::\n\n >>> from cvprac.cvp_client import CvpClient\n >>> clnt = CvpClient()\n >>> clnt.connect(['cvp1', 'cvp2', 'cvp3'], 'cvp_user', 'cvp_word')\n >>> result = clnt.api.get_cvp_info()\n >>> print result\n {u'version': u'2016.1.0'}\n >>>\n\nExample using the API method to create a container, wait 5 seconds, then\ndelete the container. Before running this example manually create a\ncontainer named DC-1 on your CVP node.\n\n::\n\n >>> import time\n >>> from cvprac.cvp_client import CvpClient\n >>> clnt = CvpClient()\n >>> clnt.connect(['cvp1'], 'cvp_user', 'cvp_word')\n >>> parent = clnt.api.search_topology('DC-1')\n >>> clnt.api.add_container('TORs', 'DC-1', parent['containerList'][0]['key'])\n >>> child = clnt.api.search_topology('TORs')\n >>> time.sleep(5)\n >>> result = clnt.api.delete_container('TORs', child['containerList'][0]['key'], 'DC-1', parent['containerList'][0]['key'])\n >>>\n\nNotes for API Class Usage\n=========================\n\nContainers\n----------\n\nWith the API the containers are added for all cases. If you add the\ncontainer to the original root container \u2018Tenant\u2019 then you have to do a\nrefresh from the GUI to see the container after it is added or deleted.\nIf the root container has been renamed or the parent container is not\nthe root container then an add or delete will update the GUI without\nrequiring a manual refresh.\n\nTesting\n=======\n\nThe cvprac module provides system tests. To run the system tests, you\nwill need to update the ``cvp_nodes.yaml`` file found in test/fixtures.\n\nRequirements for running the system tests:\n\n- Need one CVP node for test with a test user account. Create the same\n account on the switch used for testing. The user account information\n follows:\n\n::\n\n username: CvpRacTest\n password: AristaInnovates\n\n If switch does not have correct username and/or password then the tests that\n execute tasks will fail with the following error:\n\n AssertionError: Execution for task id 220 failed\n\n and in the test log is the error:\n\n Failure response received from the netElement : ' Unauthorized User '\n\n- Test has dedicated access to the CVP node.\n\n- CVP node contains at least one device in a container.\n\n- Container or device has at least one configlet applied.\n\nTo run the system tests:\n\n- run ``make tests`` from the root of the cvprac source folder.\n\nContributing\n============\n\nContributing pull requests are gladly welcomed for this repository.\nPlease note that all contributions that modify the library behavior\nrequire corresponding test cases otherwise the pull request will be\nrejected.\n\nContact/Questions\n=================\n\nCvprac is developed by Arista EOS+ CS and supported by the Arista EOS+ community. Support for the code is provided on a best effort basis by the Arista EOS+ CS team and the community. You can contact the team that develops these modules by sending an email to eosplus-dev@arista.com.\n\nFor customers that are looking for a premium level of support, please contact your local account team or email eosplus@arista.com for help.\n\nLicense\n=======\n\nCopyright\\ |copy| 2016, Arista Networks, Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n- Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n* Neither the name of Arista Networks nor the names of its contributors\n may be used to endorse or promote products derived from this software\n without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\nIS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\nTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\nPARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARISTA NETWORKS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\nTHE POSSIBILITY OF SUCH DAMAGE.\n\n.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN\n.. |trademark| unicode:: U+2122 .. TRADEMARK SIGN\n.. |reg| unicode:: U+000AE .. REGISTERED SIGN\n.. |pypi_version_badge| image:: https://img.shields.io/pypi/v/cvprac.svg\n :target: https://pypi.python.org/pypi/cvprac\n.. |System_test_Status| image:: https://revproxy.arista.com/eosplus/ci/buildStatus/icon?job=Pipeline_jerearista_test/cvprac-rb/develop&style=plastic\n :target: https://revproxy.arista.com/eosplus/ci/job/Pipeline_jerearista_test/cvprac-rb/develop\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/aristanetworks/cvprac/tarball/1.0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aristanetworks/cvprac", "keywords": "networking CloudVision development rest api", "license": "BSD-3", "maintainer": "", "maintainer_email": "", "name": "cvprac", "package_url": "https://pypi.org/project/cvprac/", "platform": "", "project_url": "https://pypi.org/project/cvprac/", "project_urls": { "Download": "https://github.com/aristanetworks/cvprac/tarball/1.0.1", "Homepage": "https://github.com/aristanetworks/cvprac" }, "release_url": "https://pypi.org/project/cvprac/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Arista Cloudvision(R) Portal Rest API Client written in python", "version": "1.0.1" }, "last_serial": 4706261, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "d60642bdb2f376002d9fb4f090801c82", "sha256": "c8afe06ce4c75a96d07384cc2fc36ff8f9dbd83fdf5c317a32adb6fd1ca0454a" }, "downloads": -1, "filename": "cvprac-0.5.0.tar.gz", "has_sig": false, "md5_digest": "d60642bdb2f376002d9fb4f090801c82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12868, "upload_time": "2016-06-08T13:38:19", "url": "https://files.pythonhosted.org/packages/85/b9/8d10745d65c1b12b1bcb8fc79fd4a25a1abe2b7aeabbe5b67b014deeb95e/cvprac-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "32a43b405bed7d76f35e18d805b88b86", "sha256": "2fde9a16db1e6d644e9cdaa59da919e9cc5ad935d7e06b1c74b5211b1a619001" }, "downloads": -1, "filename": "cvprac-0.6.0.tar.gz", "has_sig": false, "md5_digest": "32a43b405bed7d76f35e18d805b88b86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21449, "upload_time": "2016-12-20T16:24:47", "url": "https://files.pythonhosted.org/packages/81/73/386a68d2b0f74373f29bf605a156f22dc5612d036658903792bf782d40e6/cvprac-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "182cde2c04b3d083353cfca34b78bea4", "sha256": "074f14ebe8fc1508fd64712747b604a3880108ce1c18ba8ee0abfffbe7e775d1" }, "downloads": -1, "filename": "cvprac-0.7.0.tar.gz", "has_sig": false, "md5_digest": "182cde2c04b3d083353cfca34b78bea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26160, "upload_time": "2017-03-30T19:29:05", "url": "https://files.pythonhosted.org/packages/52/13/dba05c0cd58e94aa143343144af89085be9113ef2e490bbf1e674ca7e284/cvprac-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "9afcdd608a7c2b7dbd642881dfa8fd8d", "sha256": "cedf8b3b29c26be9bfae6175fb996a0463cf81e659d79702ef5bddf017588d4e" }, "downloads": -1, "filename": "cvprac-0.8.0.tar.gz", "has_sig": false, "md5_digest": "9afcdd608a7c2b7dbd642881dfa8fd8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30355, "upload_time": "2017-09-12T17:01:07", "url": "https://files.pythonhosted.org/packages/58/40/0c06871426304ce2746b57363869405de8a532f07ef6b592a10b424011f0/cvprac-0.8.0.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "163ee94f0a2b0317f3300fbda325c80a", "sha256": "c1c5a6be8b676b2df1c8726436aa503915e0f15f9eed9714c713d1fe21d1d4a6" }, "downloads": -1, "filename": "cvprac-0.9.0.tar.gz", "has_sig": false, "md5_digest": "163ee94f0a2b0317f3300fbda325c80a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36492, "upload_time": "2018-04-17T20:17:09", "url": "https://files.pythonhosted.org/packages/cf/16/deb0133697d3d34ec41f82fcf22992d055f35daa85d6af7a1ac62db93a09/cvprac-0.9.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "051b881619fbb78af688d89e3a2e98a3", "sha256": "bf69d5d318faab901c17c567d8cce2523b9af360caeba0bba39b29699eec4596" }, "downloads": -1, "filename": "cvprac-1.0.0.tar.gz", "has_sig": false, "md5_digest": "051b881619fbb78af688d89e3a2e98a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3886771, "upload_time": "2018-12-05T19:37:08", "url": "https://files.pythonhosted.org/packages/35/2c/3edc8c999ada6d865ed092d058604cb323554596e646e988e4b10b296861/cvprac-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e031cf4484c401046362dc44b4897a31", "sha256": "6657eb1e427df699962b4a896ccb1fc4eab0e511c0565d1a242708e413f15a52" }, "downloads": -1, "filename": "cvprac-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e031cf4484c401046362dc44b4897a31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3888912, "upload_time": "2019-01-17T04:28:00", "url": "https://files.pythonhosted.org/packages/b4/79/3c11b9b34be612cef0d0460ba7796e94bef8f2588e8b1f4c75ce3e55bd75/cvprac-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e031cf4484c401046362dc44b4897a31", "sha256": "6657eb1e427df699962b4a896ccb1fc4eab0e511c0565d1a242708e413f15a52" }, "downloads": -1, "filename": "cvprac-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e031cf4484c401046362dc44b4897a31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3888912, "upload_time": "2019-01-17T04:28:00", "url": "https://files.pythonhosted.org/packages/b4/79/3c11b9b34be612cef0d0460ba7796e94bef8f2588e8b1f4c75ce3e55bd75/cvprac-1.0.1.tar.gz" } ] }