{ "info": { "author": "Matt Welch", "author_email": "mwelch@tallshorts.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "===============================\npyray\n===============================\n\n.. image:: https://badge.fury.io/py/pyray.png\n :target: http://badge.fury.io/py/pyray\n\n.. image:: https://travis-ci.org/intr1nsic/pyray.png?branch=master\n :target: https://travis-ci.org/intr1nsic/pyray\n\nA python client to interact with the Riverbed Stingray REST API.\n\n* Initial Release\n* Requires Stingray API version 2.0\n\nDocumentation\n-------------\n\nhttp://pyray.readthedocs.org/en/latest/\n\nFeatures\n--------\n\n* Add Nodes Module\n* Add test coverage\n\nUsage\n========\n\nQuick sample of pyray::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n\nConnectivity\n============\n\nThe HTTPClient method has a few optional and helpful parameters that will\nhelp troubleshoot issues or connectivity.\n\nDebug\n-----\n\nThe client has an optional debug flag that will log the request as well as\na curl command you can run against. For security reasons, username and password\nare not displayed in any logging.::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password', debug=True)\n\nTo allow insecure SSL connectivity for invalid certs::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password', insecure=True)\n\nYou can also change the port if that is configured::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password', port='1234')\n\nGeneric Pool Queries\n====================\n\nAll pools\n---------\n\nTo list all the pools configured::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n pools = cl.pools.get()\n for pool in pools:\n print pool\n\nGet a specific pool\n-------------------\n\nTo get a specific pool::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n pool = cl.pools.get(name='pool1')\n\nDelete a specific pool\n----------------------\n\nTo delete a specific pool::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n cl.pools.delete(name='pool1')\n\nGet all nodes draining in the pool\n----------------------------------\n\nTo get draining nodes::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n pool = cl.pools.get(name='pool1')\n draining_nodes = pool.draining_nodes\n for node in draining_nodes:\n print node\n\nGet all configured nodes in a pool\n----------------------------------\n\nTo get all the configured nodes::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n pool = cl.pools.get(name='pool1')\n for node in pool.nodes:\n print node\n\nMaking changes to a pool\n========================\n\nDrain\n-----\n\nLets say you want to drain a group of nodes in a pool::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n pool = cl.pools.get(name='pool1')\n pool.drain_nodes(nodes=['1.2.3.4:80'])\n\nor quickly drain all nodes::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n pool = cl.pools.get(name='pool1')\n pool.drain_nodes(nodes=pool.nodes)\n\nUndrain\n-------\n\nTo undrain nodes in a pool::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n pool = cl.pools.get(name='pool1')\n pool.undrain_nodes(nodes=['1.2.3.4:80'])\n\nor quickly undrain all draining nodes::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n pool = cl.pools.get(name='pool1')\n pool.undrain_nodes(nodes=pool.draining_nodes)\n\nQuery node details in a pool\n============================\n\nTo get node details for all the nodes in a pool accross all traffic managers::\n\n from pyray import client\n cl = client.HTTPClient('https://1.1.1.1', 'admin', 'password')\n pool = cl.pools.get(name='pool1')\n nodes = pool.get_details()\n for node, details in nodes.iteritems():\n print node\n print node['statistics']['current_conn']\n\nFor the full node details::\n\n {u'statistics':\n {u'bytes_from_node': 23776,\n u'bytes_to_node': 3659117,\n u'current_conn': 0,\n u'current_requests': 0,\n u'errors': 4,\n u'failures': 1,\n u'idle_conns': 0,\n u'new_conn': 38,\n u'node_port': 80,\n u'pooled_conn': 0,\n u'response_max': 0,\n u'response_mean': 0,\n u'response_min': 0,\n u'state': u'draining',\n u'total_conn': 38\n }\n }\n\n\n\nHistory\n-------\n\n0.1.0 (2014-01-02)\n++++++++++++++++++\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/intr1nsic/pyray", "keywords": "pyray", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pyray", "package_url": "https://pypi.org/project/pyray/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyray/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/intr1nsic/pyray" }, "release_url": "https://pypi.org/project/pyray/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "A python client to interact with the Riverbed Stingray REST API.", "version": "0.1.0" }, "last_serial": 960226, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "69a80a0dbb910d2bb832fcd17f77a4fa", "sha256": "6abd8ce68cf466f1594daa602c2ae4e9a19ce0b5acec907f78b0355234c73df5" }, "downloads": -1, "filename": "pyray-0.1.0.tar.gz", "has_sig": false, "md5_digest": "69a80a0dbb910d2bb832fcd17f77a4fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8850, "upload_time": "2014-01-04T02:51:29", "url": "https://files.pythonhosted.org/packages/ce/21/7a0167367ec62512ccc98795eef0c807f2ec2866f66e5fdba228e3bcfacb/pyray-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "69a80a0dbb910d2bb832fcd17f77a4fa", "sha256": "6abd8ce68cf466f1594daa602c2ae4e9a19ce0b5acec907f78b0355234c73df5" }, "downloads": -1, "filename": "pyray-0.1.0.tar.gz", "has_sig": false, "md5_digest": "69a80a0dbb910d2bb832fcd17f77a4fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8850, "upload_time": "2014-01-04T02:51:29", "url": "https://files.pythonhosted.org/packages/ce/21/7a0167367ec62512ccc98795eef0c807f2ec2866f66e5fdba228e3bcfacb/pyray-0.1.0.tar.gz" } ] }