{ "info": { "author": "Adrian Turjak", "author_email": "adriant@catalyst.net.nz", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: OpenStack", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5" ], "description": "OpenStack Interpreter\n=====================\n\nThis is a simple tool to facilitate better python interpreter use of the\nvarious OpenStack python clients and help promote better literacy for\nall those tools. The hope is that this tool allows developers to more easily\nuse and test the various libraries, and also to offer operators a useful tool\nfor one off operations where writing a script is not needed and where the\nOpenStackClient is not flexible enough without resorting to complex bash.\n\n\nUsing the OpenStack Interpreter\n-------------------------------\n\nFirst install the plugin:\n\n::\n\n pip install openstack-interpreter\n\nThis will now be installed as a plugin on the OpenStackClient or install the\nOpenStackClient as well.\n\nYou will need to either have some environment variables setup, or a\n`clouds.yaml` file so that the client can authenticate and setup your\nsession.\n\nTo run the interpreter:\n\n::\n\n openstack interpreter\n\nThis will drop you into an ipython interpreter. You will be setup with a\nsession based on your auth credentials.\n\nBecause this is using ipython as the interpreter you can make use of the\nautocomplete and help functionality. There is also history search support\nand many other features. For more details look at the ipython docs.\n\nTo get some basic help you can start with:\n\n::\n\n oi?\n\nOr if you want to get and start using the sdk, this is how you can get\naccess to it:\n\n::\n\n conn = oi.sdk.connection\n\nOr if you want the sdk connection in a region other than your configured or\ndefault one:\n\n::\n\n conn = oi.sdk.get_connection(region_name='RegionOne')\n\n\nAdditional inbuilt tools\n------------------------\n\nThis library has a few basic tools for helping you deal with the data you are\nplaying with and present it to you a little nicer. This will improve over time\nas more is added, but for now we have some output functions, basic profiling,\nand a few prompts.\n\ntools examples\n**************\n\nMaybe you want to look at some of the values on an OpenStack resource. Since\nmost of the client libraries give resources a to_dict function (NOTE: this may\nnot always be the case) you can do the following:\n\n::\n\n servers = list(conn.compute.servers())\n\n output.print_dict(servers[0].to_dict())\n\nOr just print the object itself, since it may not have to_dict anyway:\n\n::\n\n output.print_object(servers[0])\n\nAlthough some of the fields may be dicts and this harder to read, so we'd like\nto format them a little:\n\n::\n\n output.print_object(\n servers[0], formatters={\n 'addresses': output.json_formatter,\n 'flavor': output.json_formatter,\n 'image': output.json_formatter,\n 'links': output.json_formatter})\n\nOr maybe you're looking at a list of resources, and you only care about certain\nfields:\n\n::\n\n output.print_list(servers, [\"name\", \"id\", \"status\"])\n\nYou can even format lists, although be careful as listing does not auto wrap\nproperly yet:\n\n::\n\n output.print_list(\n servers, ['name', 'status', 'addresses'],\n formatters={'addresses': output.json_formatter})\n\nOr maybe you are looking at a lot of data and want to highlight something:\n\n::\n\n rows = []\n\n for server in servers:\n if server.status == \"ACTIVE\":\n rows.append([\n server.name, server.id,\n output.style_text(server.status, ['green', 'bold'])\n ])\n elif server.status == \"ERROR\":\n rows.append([\n server.name, server.id,\n output.style_text(server.status, ['red', 'bold'])\n ])\n else:\n rows.append([server.name, server.id, server.status])\n\n output.print_list_rows(rows, [\"name\", \"id\", \"status\"])\n\nOr want to delete a ton of instances, but want ones with certain names (or\nmaybe even tags) to ask for a prompt first:\n\n::\n\n for server in conn.compute.servers():\n if \"prod\" in server.name:\n output.print_object(server)\n if prompt.prompt_yes_no(\n \"Are you sure you want to delete this?\"):\n server.delete()\n else:\n server.delete()\n\nOr maybe you're just curious how long it takes to run something:\n\n::\n\n with timed(\"listing servers\"):\n servers = list(conn.compute.servers())\n\nUseful patterns\n---------------\n\nGet my servers (or any resource) across all regions:\n\n::\n\n servers = {}\n\n for region in conn.identity.regions():\n servers[region.id] = list(oi.sdk.get_connection(\n region_name=region.id).compute.servers())\n\nDevelopment\n-----------\n\nI want to add more help functionality as is possible, hopefully even something\nthat is interactive such as a tutorial.\n\nI may be moving this project to OpenStack's gerrit, but in part I'd prefer not\nto as the interface for gerrit is awful, although I may end up moving this to\ngitlab, adding some tests and a build via gitlab runners.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Adrian-Turjak/openstack-interpreter", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "openstack-interpreter", "package_url": "https://pypi.org/project/openstack-interpreter/", "platform": "", "project_url": "https://pypi.org/project/openstack-interpreter/", "project_urls": { "Homepage": "https://github.com/Adrian-Turjak/openstack-interpreter" }, "release_url": "https://pypi.org/project/openstack-interpreter/0.4.2/", "requires_dist": null, "requires_python": "", "summary": "OpenStack Interpreter", "version": "0.4.2" }, "last_serial": 4430636, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "ca9192cf47dfff82df6c4b5b81588620", "sha256": "1c6c9650f5988cac3897f4dddbfb9c0792fb6d29ac597c87452a5d863e9ed5d9" }, "downloads": -1, "filename": "openstack-interpreter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ca9192cf47dfff82df6c4b5b81588620", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1800, "upload_time": "2017-03-13T23:38:27", "url": "https://files.pythonhosted.org/packages/1f/0d/c1b198e8c0d6b7b6e0a91b9196f57ba9eb90c80eb7c440b07293be193d19/openstack-interpreter-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4aa9555ee802da9c043841363f9d44e9", "sha256": "d18b69b083e9e9b1a9be9eecd99e1a172238d1d7b2e27d2cf1362c54602525a6" }, "downloads": -1, "filename": "openstack-interpreter-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4aa9555ee802da9c043841363f9d44e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3697, "upload_time": "2017-03-13T23:44:18", "url": "https://files.pythonhosted.org/packages/6e/e8/62226ca81f728c66f81cd3fda1f2b8f29129a0528f82cf64a8a6b3aa70ea/openstack-interpreter-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "1b8bf0a1c9d6bc828f4cb41e2181a6b5", "sha256": "f6a6032b36d7b0dd03ca8a12763f81ba008d70c70bab5380e9ef48669fff1d03" }, "downloads": -1, "filename": "openstack-interpreter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "1b8bf0a1c9d6bc828f4cb41e2181a6b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3684, "upload_time": "2017-03-14T00:28:38", "url": "https://files.pythonhosted.org/packages/aa/5a/d3eb0f44c943d5c3fc969953660cfc5077bf507586419e945bea3a5e4b5d/openstack-interpreter-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "fc5b3e9791e1218305620ef19f98ace4", "sha256": "3cc372e3abfcc68f540598d229aed29af055c9c3288fc1b0c2034f7bf60f5869" }, "downloads": -1, "filename": "openstack-interpreter-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fc5b3e9791e1218305620ef19f98ace4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12871, "upload_time": "2017-05-01T04:21:07", "url": "https://files.pythonhosted.org/packages/21/25/701752cff4eced6815fec926bf056984bccb679c842164db0c0be9948b4b/openstack-interpreter-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "add545ca97ccd0208881f1e09cc04e87", "sha256": "8f74fe67f0c1420c3fabb7a69b8afe5391174cd9e2973aca4dbd714b359bc4ec" }, "downloads": -1, "filename": "openstack-interpreter-0.2.1.tar.gz", "has_sig": false, "md5_digest": "add545ca97ccd0208881f1e09cc04e87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12884, "upload_time": "2017-05-01T05:09:14", "url": "https://files.pythonhosted.org/packages/29/44/41456bd59238893688b161be07def90c177184be775eb7267064667978fd/openstack-interpreter-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "3f06ca7a05d3bd5ede760344b456fcb2", "sha256": "d4b98a5a79e07fe2c7d83a1bd8e33d6e1cfabd38aaaa0041f038330439855cff" }, "downloads": -1, "filename": "openstack-interpreter-0.2.2.tar.gz", "has_sig": false, "md5_digest": "3f06ca7a05d3bd5ede760344b456fcb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14716, "upload_time": "2017-05-03T07:25:14", "url": "https://files.pythonhosted.org/packages/32/9c/3325bdaa1e40c8f1b92f1e072737551ae291c07e6135e71e0dc7f3733b13/openstack-interpreter-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "d2ec8b55672c5aa28837fdabcd643e95", "sha256": "089a0fc1016ada452249196a0c54f74171e695e73e5d4d04a59b0ef604c103e6" }, "downloads": -1, "filename": "openstack-interpreter-0.2.3.tar.gz", "has_sig": false, "md5_digest": "d2ec8b55672c5aa28837fdabcd643e95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16679, "upload_time": "2017-07-27T04:54:27", "url": "https://files.pythonhosted.org/packages/0c/2a/7320eb0fc364d2ba63dd618635a15de0a82e0d70a8c2824c7094cce1bd76/openstack-interpreter-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "a1310f01213c4a9829a29515c5805aff", "sha256": "87b32b4248b85ef5076f3ee3e736eb3766708760e51e17fe3eb2d78789bf3138" }, "downloads": -1, "filename": "openstack-interpreter-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a1310f01213c4a9829a29515c5805aff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18080, "upload_time": "2018-02-01T03:47:52", "url": "https://files.pythonhosted.org/packages/7d/91/9074e1ec6b2c5e6468ace052e41f023423250870e22388e7365f6b3afa5d/openstack-interpreter-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "35fe1ef29ce7939402a0c23a457d10f5", "sha256": "43913b4e18e54b76e367ab3de7138b3592bd850b8023120ee946ebb3b73b2aba" }, "downloads": -1, "filename": "openstack-interpreter-0.3.1.tar.gz", "has_sig": false, "md5_digest": "35fe1ef29ce7939402a0c23a457d10f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18185, "upload_time": "2018-02-22T22:02:08", "url": "https://files.pythonhosted.org/packages/73/59/fac2b01de26c670a4f3adcbe0f1b37651cdd718b731315cf4e54647d5825/openstack-interpreter-0.3.1.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "b58d41f78d9080a9250b9a332ebe07fe", "sha256": "6eb7409c5f53c2d515738f19755257a6b6a900076eff846d3c6de467d22a3767" }, "downloads": -1, "filename": "openstack-interpreter-0.3.3.tar.gz", "has_sig": false, "md5_digest": "b58d41f78d9080a9250b9a332ebe07fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18245, "upload_time": "2018-04-23T04:57:22", "url": "https://files.pythonhosted.org/packages/83/ef/862ee361b0a6648be3a3c7f310d91e79dd078d523c8651107b0b470cfa53/openstack-interpreter-0.3.3.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "14f82a1a4a1f951868ff9a7114f0f542", "sha256": "d5537169fac42c5fd063c7f9dafb735cfeacf3d3044854f44d473aa9089177de" }, "downloads": -1, "filename": "openstack-interpreter-0.4.0.tar.gz", "has_sig": false, "md5_digest": "14f82a1a4a1f951868ff9a7114f0f542", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18435, "upload_time": "2018-10-30T08:31:07", "url": "https://files.pythonhosted.org/packages/83/b5/6ea49bba439b72c5c8e64836d1ec8e53a23aca44fc252947d95c85ede673/openstack-interpreter-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "1aac91f8070e70db0c5581f9146c4ad9", "sha256": "5f7f2de84a3e14aed67e3f1420171b22e1eb696953275965df80cb9304760102" }, "downloads": -1, "filename": "openstack-interpreter-0.4.1.tar.gz", "has_sig": false, "md5_digest": "1aac91f8070e70db0c5581f9146c4ad9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18460, "upload_time": "2018-10-30T08:34:28", "url": "https://files.pythonhosted.org/packages/dd/16/c3d8aed85cc37d74bab7ecce0423d3a5a1bd4aa3fa348ea446453575cacc/openstack-interpreter-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "dee61067e501211a59ecbc3970e6d9f9", "sha256": "ec57c625d9b89217f438e8ca0bb696168112cf7303f300a2c4a950aa593f8b65" }, "downloads": -1, "filename": "openstack-interpreter-0.4.2.tar.gz", "has_sig": false, "md5_digest": "dee61067e501211a59ecbc3970e6d9f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18437, "upload_time": "2018-10-30T08:35:57", "url": "https://files.pythonhosted.org/packages/09/45/6ce1209badd15ac6880d122ed273096c6273b75ac8be5ec714a573b3d819/openstack-interpreter-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dee61067e501211a59ecbc3970e6d9f9", "sha256": "ec57c625d9b89217f438e8ca0bb696168112cf7303f300a2c4a950aa593f8b65" }, "downloads": -1, "filename": "openstack-interpreter-0.4.2.tar.gz", "has_sig": false, "md5_digest": "dee61067e501211a59ecbc3970e6d9f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18437, "upload_time": "2018-10-30T08:35:57", "url": "https://files.pythonhosted.org/packages/09/45/6ce1209badd15ac6880d122ed273096c6273b75ac8be5ec714a573b3d819/openstack-interpreter-0.4.2.tar.gz" } ] }