{ "info": { "author": "Akira Yoshiyama, Akihiro Motoki", "author_email": "akirayoshiyama@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: OpenStack", "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": "oscurl\n======\n\n**oscurl** is a tool to access OpenStack APIs as raw. You can specify method,\nURL path and body of HTTP requests freely. It's useful to test, check or\nconfirm OpenStack APIs.\n\nFeatures\n--------\n\n* cURL-like access to OpenStack APIs\n* Handle Keystone authentication and insert ``X-Auth-Token`` header;\n You do not need to handle Keystone authentication manually\n* Construct URL based on OpenStack service endpoints (relative mode)\n* Support multiple output formats: raw, YAML, JSON, header only and body only\n* Show request header and body\n* Keystone v3 and v2 support\n* Microversioning header support. 'latest' is used by default.\n* Support multiple ways to specify keystone credentials:\n\n * Legacy way to use ``OS_*`` environment variables\n * os-client-config via ``OS_CLOUD`` environment variable\n\n* JSON input for ``POST`` and ``PUT`` requests\n\nInstallation\n------------\n\noscurl is available at PyPI (the Python Packaging Index).\nTo install oscurl, just run::\n\n $ pip install oscurl\n\nUsage\n-----\n\n1. Set environment variables as same as you use nova command::\n\n $ source credential_file\n\n or if you have os-client-config configuration like /etc/openstack/clouds.yaml::\n\n $ export OS_CLOUD=\n\n2. Run oscurl::\n\n $ oscurl -p /servers\n HTTP/1.1 200 OK\n X-Compute-Request-Id: req-e5d6537e-9db8-48a2-abfb-f3a63f17add5\n Content-Type: application/json\n Content-Length: 15\n Date: Sun, 22 Jun 2014 12:20:46 GMT\n\n {\"servers\": []}\n\n3. ``oscurl --help`` shows the options.\n ``oscurl --full-help`` shows the options from os-client-config too.\n\nEnvironment Variables\n---------------------\n\nThe following environment variables can be used\nto change the default behavior.\n\n* ``OSCURL_SERVICE``: the default service type.\n Service types registered in Keystone service catalog like\n like ``compute``, ``volume``, ``identity``, ``image`` and ``network``\n* ``OSCURL_FORMAT``: the default format used to display API responses\n* ``OSCURL_METHOD``: the default method to be used\n\nExamples\n--------\n\n* Get server list from Nova::\n\n $ oscurl -p /servers\n\n* Get flavor list from Nova::\n\n $ oscurl -p /flavors\n\n* Get image list from Glance::\n\n $ oscurl -s image -p /images\n\n* Get volume list from Cinder::\n\n $ oscurl -s volume -p /volumes\n\n* Get network list from Neutron::\n\n $ oscurl -s network -p /v2.0/networks\n\n* Create a new instance by passing the input as JSON file::\n\n $ oscurl -m POST -p /servers -i create_instance_body.json\n\n or::\n\n $ oscurl -m POST -p /servers -i - < create_instance_body.json\n\n The content of ``create_instance_body.json`` is like below::\n\n {\n \"server\": {\n \"name\": \"server-test-1\",\n \"imageRef\": \"19befdd4-248b-4b8d-b586-8a91a8bf8623\",\n \"flavorRef\": \"1\",\n \"max_count\": 1,\n \"min_count\": 1,\n \"networks\": [\n {\n \"uuid\": \"6a2c033b-3f50-4f43-97fa-2517ccdc28d9\"\n }\n ],\n \"security_groups\": [\n {\n \"name\": \"default\"\n }\n ]\n }\n }\n\n* Show an instance information::\n\n $ oscurl -p /servers/fdec5b9e-9b6a-4eb4-8684-6c75cd275559\n\n* Delete an instance::\n\n $ oscurl -p /servers/fdec5b9e-9b6a-4eb4-8684-6c75cd275559 -m DELETE\n\nOutput mode\n-----------\n\n``--show-mode`` controls what are shown.\n\n* ``ALL`` shows request and response including both headers and body.\n* ``RESP`` shows response headers and body. Request headers and body\n are not shown.\n* ``BODY`` shows response body only. Useful if you pass output\n to another program like ``jq``.\n\nOutput Format\n-------------\n\n``--format`` controls the output format of response body.\n\n* ``RAW``: Show response body as-is (Default)::\n\n $ oscurl -p /servers -r RESP\n HTTP/1.1 200 OK\n Content-Length: 296\n Content-Type: application/json\n Openstack-Api-Version: compute 2.42\n X-Openstack-Nova-Api-Version: 2.42\n Vary: OpenStack-API-Version, X-OpenStack-Nova-API-Version\n X-Compute-Request-Id: req-565bb028-c144-40cc-8fb5-52f1c5ff3b58\n Date: Fri, 24 Mar 2017 09:07:08 GMT\n Connection: keep-alive\n\n {\"servers\": [{\"id\": \"2820fcfc-3cd2-4a40-8c01-3c9544cfbc59\", \"links\": [{\"href\": \"http://172.27.201.206:8774/v2.1/servers/2820fcfc-3cd2-4a40-8c01-3c9544cfbc59\", \"rel\": \"self\"}, {\"href\": \"http://172.27.201.206:8774/servers/2820fcfc-3cd2-4a40-8c01-3c9544cfbc59\", \"rel\": \"bookmark\"}], \"name\": \"vm1\"}]}\n\n* ``JSON``: Human-readable JSON format::\n\n $ oscurl -p /servers --show-mode RESP -f JSON\n HTTP/1.1 200 OK\n Content-Length: 296\n Content-Type: application/json\n Openstack-Api-Version: compute 2.42\n X-Openstack-Nova-Api-Version: 2.42\n Vary: OpenStack-API-Version, X-OpenStack-Nova-API-Version\n X-Compute-Request-Id: req-3293cc26-c336-454a-b361-0a97aaa8c571\n Date: Fri, 24 Mar 2017 09:09:14 GMT\n Connection: keep-alive\n\n {\n \"servers\": [\n {\n \"id\": \"2820fcfc-3cd2-4a40-8c01-3c9544cfbc59\", \n \"links\": [\n {\n \"href\": \"http://172.27.201.206:8774/v2.1/servers/2820fcfc-3cd2-4a40-8c01-3c9544cfbc59\", \n \"rel\": \"self\"\n }, \n {\n \"href\": \"http://172.27.201.206:8774/servers/2820fcfc-3cd2-4a40-8c01-3c9544cfbc59\", \n \"rel\": \"bookmark\"\n }\n ], \n \"name\": \"vm1\"\n }\n ]\n }\n\n* ``YAML``: HTTP response body in YAML::\n\n $ oscurl -p /servers --show-mode RESP -f YAML\n HTTP/1.1 200 OK\n Content-Length: 296\n Content-Type: application/json\n Openstack-Api-Version: compute 2.42\n X-Openstack-Nova-Api-Version: 2.42\n Vary: OpenStack-API-Version, X-OpenStack-Nova-API-Version\n X-Compute-Request-Id: req-69d39243-cd55-4ee8-a6cf-9eb7a7e94fad\n Date: Fri, 24 Mar 2017 09:11:18 GMT\n Connection: keep-alive\n\n servers:\n - id: 2820fcfc-3cd2-4a40-8c01-3c9544cfbc59\n links:\n - {href: 'http://172.27.201.206:8774/v2.1/servers/2820fcfc-3cd2-4a40-8c01-3c9544cfbc59',\n rel: self}\n - {href: 'http://172.27.201.206:8774/servers/2820fcfc-3cd2-4a40-8c01-3c9544cfbc59',\n rel: bookmark}\n name: vm1", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yosshy/oscurl", "keywords": "", "license": "Apache-2", "maintainer": "", "maintainer_email": "", "name": "oscurl", "package_url": "https://pypi.org/project/oscurl/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/oscurl/", "project_urls": { "Homepage": "https://github.com/yosshy/oscurl" }, "release_url": "https://pypi.org/project/oscurl/1.1.1/", "requires_dist": [ "PyYAML", "os-client-config (>=1.13.0)" ], "requires_python": "", "summary": "cURL-like tool to access OpenStack APIs with keystone auth", "version": "1.1.1" }, "last_serial": 2913085, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ac538d96805060966ee2951e88d574ac", "sha256": "183f25265d2a840828b3fac000e073084dd84d33522cadd0bf3667334d5416c1" }, "downloads": -1, "filename": "oscurl-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ac538d96805060966ee2951e88d574ac", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13103, "upload_time": "2017-01-18T18:21:31", "url": "https://files.pythonhosted.org/packages/51/94/ae5170fbaa327a19adc23ff16d222082a812804a72cb731807ac7d5b3843/oscurl-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "daf9f00d9800ad810a39c0d9fb7c62bc", "sha256": "eed4d9b7a143c2dca93d6e4213f861bdef5e79d81860330003117bff18fd452f" }, "downloads": -1, "filename": "oscurl-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "daf9f00d9800ad810a39c0d9fb7c62bc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13203, "upload_time": "2017-01-20T05:24:59", "url": "https://files.pythonhosted.org/packages/71/76/18fae61db45472228be46a90f48f4236fa648d492799c0f7d1549ef24f55/oscurl-0.1.1-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "52bf5fddbda44e2c0fec772d20c61a0e", "sha256": "8a7720bf049fed883dc555bc361a304bb47eacc4f0bd7d21ebe11efe4f459ddf" }, "downloads": -1, "filename": "oscurl-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "52bf5fddbda44e2c0fec772d20c61a0e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12919, "upload_time": "2017-01-20T06:27:22", "url": "https://files.pythonhosted.org/packages/26/8f/980807aee83d2d71c56d0e0a0e8867748fc088ef9dbf8bbe28999409b873/oscurl-0.2.0-py2.py3-none-any.whl" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "fce9d67e3f0fa7f33f308093a3bc77dd", "sha256": "93858a34ffa84e0575f02c4333e2e5cd964f27e85f7ecf9d7360247f28352a34" }, "downloads": -1, "filename": "oscurl-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fce9d67e3f0fa7f33f308093a3bc77dd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12821, "upload_time": "2017-01-20T13:34:42", "url": "https://files.pythonhosted.org/packages/22/bb/535eb534cbfecbd29e02947b5acec71fb3d40a1c9a454d8a19171a2ddeae/oscurl-0.2.3-py2.py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "a796cdb012a692a3e144d161b358afc3", "sha256": "5219cae0a47d029f6b4d46183d454984f3f3ec9aee8a6de871be914242672b32" }, "downloads": -1, "filename": "oscurl-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a796cdb012a692a3e144d161b358afc3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13046, "upload_time": "2017-03-03T08:32:57", "url": "https://files.pythonhosted.org/packages/f0/f6/ae0a976f7bec156694f2a8adcb83038d81bb2f90eb50f292a797a3d4beec/oscurl-0.3.0-py2.py3-none-any.whl" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "46d9de67526a4e267bb7f8ebd6e1bd23", "sha256": "6ac1a7340962a5235eec2e687ca530c80a85c13355de83c793722f0297cd6617" }, "downloads": -1, "filename": "oscurl-0.4.0-py2.7.egg", "has_sig": false, "md5_digest": "46d9de67526a4e267bb7f8ebd6e1bd23", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9672, "upload_time": "2017-03-05T12:33:21", "url": "https://files.pythonhosted.org/packages/50/6c/058e5d9278b0521b721b97d56aaa635cfc631891a6fbc14e88d8edab0ec5/oscurl-0.4.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "652c736f1f22df2d1337345a7d9743ec", "sha256": "d8c661833c90d5287e8cafdacf1b9b0fe2b84bcd812fa89b023afb1c453f1d6f" }, "downloads": -1, "filename": "oscurl-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "652c736f1f22df2d1337345a7d9743ec", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8984, "upload_time": "2017-03-05T12:32:16", "url": "https://files.pythonhosted.org/packages/8d/7c/2701baa7da86f29f8008b2e414ed25d983ff4131e5535049477def8eb8e7/oscurl-0.4.0-py2.py3-none-any.whl" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "760ed6a6f103454b9be350244dcc0a86", "sha256": "13c60cd85c7894463550487eec49c5158717cd1f67ecfc1f6689e2abe5815a97" }, "downloads": -1, "filename": "oscurl-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "760ed6a6f103454b9be350244dcc0a86", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9548, "upload_time": "2017-03-21T04:41:44", "url": "https://files.pythonhosted.org/packages/5c/c4/e1d00cf991f8531c9f7cd16ba964912d746d0b3565f26671161755e59d7f/oscurl-0.5.0-py2.py3-none-any.whl" } ], "1.0.0": [], "1.0.1": [ { "comment_text": "", "digests": { "md5": "01cc458e16a0161a9e1d95f93ab41100", "sha256": "52121dabe55cc85da558df0411a8dd053e9bd919024b719f077d5599e8bacae4" }, "downloads": -1, "filename": "oscurl-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "01cc458e16a0161a9e1d95f93ab41100", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10463, "upload_time": "2017-05-14T17:02:41", "url": "https://files.pythonhosted.org/packages/ea/03/9c9108f6a7e6053278c660fbd146a3f31fb952e6c7bdd644c8592ea8a0b8/oscurl-1.0.1-py2.py3-none-any.whl" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "e7321f52e39c9b688a3f29245e467960", "sha256": "a1df10489c0d164f6ffe8d14b9bfcf166778fadf7c8b2c3f712d47a1a6519c7c" }, "downloads": -1, "filename": "oscurl-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e7321f52e39c9b688a3f29245e467960", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10487, "upload_time": "2017-05-31T10:11:25", "url": "https://files.pythonhosted.org/packages/ac/04/4781502caae7882e56d18f356262c42974f1c9678adaa2449a5150f1ea5f/oscurl-1.1.0-py2.py3-none-any.whl" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "b17e52da7c7f8e6f9c702560ebdd52dd", "sha256": "c362059581d25b2d4e73d89b535fe9df0b30eb51cfd9c01d0ce44b23de53e307" }, "downloads": -1, "filename": "oscurl-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b17e52da7c7f8e6f9c702560ebdd52dd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10499, "upload_time": "2017-05-31T10:17:39", "url": "https://files.pythonhosted.org/packages/4c/54/078984d26aeebe7d7489c5017638eddee7b97f7b755456cb2e5e67a4b547/oscurl-1.1.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b17e52da7c7f8e6f9c702560ebdd52dd", "sha256": "c362059581d25b2d4e73d89b535fe9df0b30eb51cfd9c01d0ce44b23de53e307" }, "downloads": -1, "filename": "oscurl-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b17e52da7c7f8e6f9c702560ebdd52dd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10499, "upload_time": "2017-05-31T10:17:39", "url": "https://files.pythonhosted.org/packages/4c/54/078984d26aeebe7d7489c5017638eddee7b97f7b755456cb2e5e67a4b547/oscurl-1.1.1-py2.py3-none-any.whl" } ] }