{ "info": { "author": "Thomas Maurice", "author_email": "thomas@maurice.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Puppet as a service API wrapper\n\n[![Build Status](https://travis-ci.org/thomas-maurice/puppet-as-a-service-wrapper.svg?branch=v0.0.1)](https://travis-ci.org/thomas-maurice/puppet-as-a-service-wrapper)\n[![PyPi](https://img.shields.io/pypi/dm/ppaas.svg)](https://pypi.python.org/pypi/ppaas)\n[![PyPI](https://img.shields.io/pypi/v/ppaas.svg)](https://pypi.python.org/pypi/ppaas)\n\nThis is a simple python wrapper to the [Puppet aaS](https://www.runabove.com/puppet-as-a-service.xml)\nAPI exposed by [OVH](https://ovh.com).\n\nIt should allow you to interact with the API in a more efficient and scriptable way\nthan using the manager.\n\n##\u00a0Install\nYou can install this module via pip : `pip install ppaas`\n\n##\u00a0Use example\n### Basic example\n```\n>>> import ppaas\n>>> masters = ppaas.Master.get_masters()\n>>> masters\n[]\n>>> main = masters[0]\n>>> main.get_certificates()\n[]\n>>> main.get_certificates()[0].to_dict()\n{u'revoked_at': None, u'signed_at': None, u'created_at': u'2016-02-19T18:52:37', u'hostname': u'064a859fff81', u'status': {u'message': u'SIGNATURE PENDING', u'code': 0}, u'fingerprint': u'C4:1C:BD:FD:9D:8C:30:45:84:AE:FA:3F:89:EC:6F:59:BE:8C:CA:C7:55:33:9C:44:BF:29:7F:73:0B:27:1C:DE', u'serial_number': None}\n>>> main.refresh()\nTrue\n```\n\n### Playing with certificates\n```\n>>> master\n\n#\u00a0Get certificates by status\n>>> master.get_certificates(status=\"SIGNATURE PENDING\")\n[, ]\n>>> certs = master.get_certificates(status=\"SIGNATURE PENDING\")\n>>> cert1 = certs[0]\n# Sign one !\n>>> cert1.sign()\n>>> cert1.status\n{u'message': u'SIGNED', u'code': 1}\n>>> cert1.revoke()\n>>> cert1.status\n{u'message': u'REVOKED', u'code': 2}\n# Retrieve a certificate\n>>> master.certificate('machine-2.maurice.fr')\n\n>>> master.certificate('machine-2.maurice.fr').status\n{u'message': u'REVOKED', u'code': 2}\n```\n\n### Playing with deploy keys\n```\n>>> ppaas.DeployKey.get_deploy_keys()\n[]\n>>> ppaas.DeployKey.create_deploy_key('thomas')\n\n>>> _.public\nu'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCRh1w2SJ99aqqbnGI1h0H/VBsGEhIX9cr6ASPRYCNs5pvoSljQh8u7lpb+IbcBi33YaMspyvg2kcbHIS7gP8oNe81jS3CweGTsTfgT0B8rzeGWj0lJqzVDAhiibuL3nHJ2bIdzm75bAIfmsaqX00ONnxstn18tLi0rwDt2WTKzjiz2nqNRhl/qlhcuIldlB2ZpBWOvXdpPpDbMk3Ze+4uvvdXGbTVZskyV/Tnj+GHw/t02KV9uKHJdv/FVwJwUcFnmh2DzNEtXOR2hF/5gZKXxPrrhX/s3JitJDtgdwY8ZQgElL2PWx4lepsUWbMJHBSdoWs/dvXEJfG2x2wyjnxNOHBUU3Q0t+N9He0q3IsmtPRDVh2vTqbabJQT31SchH7/0NZfxUCPImoHFIOwhQOLaDBX+9sIRAdpYvz/4U6Ep3qbb+NUIe3+zKnN2tOQ/Yvj8fRPgQcboswzN+MElVgAD2CMH6ZdJ3E3R9h9fSv/TGw4e9gCTQCS0eT3S33bIy0Bl5wmI0mByZgJrkUAYIQabS9t3eLyngHAwGhNsjA2J10W3k310Wk0moTodZgtW2V+aIpHS8814dzxg0wW1BjJXUwH4YWsVDIKTZmvCj8NQ2evZ0+b8FK2vqQv7u4+hiOP3tkQTqeq1mevpShivazjJTE3UkJr4w05YWdKcTJGN3w=='\n>>> ppaas.DeployKey('thomas').delete()\n```\n\n## Credentials\nThis module will look for a credential files in the following places :\n* ./ppaas.conf\n* ~/.ppaas.conf\n* /etc/ppaas.conf\n\nThis file should look like:\n```\n[auth]\nuser=my_user_name\npass=my_password\n\n[api]\nendpoint=https://puppet.runabove.io\n```\n\n##\u00a0Contributing\nFeel free to contribute by submitting PRs ! The documentation for the API can be found\n[here](https://puppet.runabove.io/doc/index.html)\n\n## Contributors\n * [Thomas Maurice](https://github.com/thomas-maurice)\n * [Balthazar Rouberol](https://github.com/brouberol)\n * [Romain Beuque](https://github.com/Rbeuque74)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thomas-maurice/puppet-as-a-service-wrapper", "keywords": "", "license": "WTFPL", "maintainer": "", "maintainer_email": "", "name": "ppaas", "package_url": "https://pypi.org/project/ppaas/", "platform": "any", "project_url": "https://pypi.org/project/ppaas/", "project_urls": { "Homepage": "https://github.com/thomas-maurice/puppet-as-a-service-wrapper" }, "release_url": "https://pypi.org/project/ppaas/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Interface for OVH's Puppet as a service lab", "version": "0.0.4" }, "last_serial": 2396764, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ca944fa5ba352fa25e5d1083da86fd7a", "sha256": "2f34e5ebc2ba4ad325be15ab47aeebf002d4d9b96a47ad88d7677e82529fed55" }, "downloads": -1, "filename": "ppaas-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ca944fa5ba352fa25e5d1083da86fd7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8678, "upload_time": "2016-02-21T13:19:19", "url": "https://files.pythonhosted.org/packages/39/da/10cbba2f33992d13d575abe5863c4773dba8df535ec9f2735b7a31a413c7/ppaas-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "39bd1f68b03278b4fcdb45335a0b511c", "sha256": "feb158ad0d2942663d0efb2360b58400ce3d430a4b25f2410e1fc8fac318c000" }, "downloads": -1, "filename": "ppaas-0.0.2.tar.gz", "has_sig": false, "md5_digest": "39bd1f68b03278b4fcdb45335a0b511c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9022, "upload_time": "2016-02-21T14:11:18", "url": "https://files.pythonhosted.org/packages/54/54/bce80f178c623218c4423f02f4fa70cbe0bafa79364d8fc4de3a8481b45d/ppaas-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "0bfb3c3858496402083406228888944e", "sha256": "4ecae3685d8cf1b946e2a8ef2f91386568490a45c849c6a925f471444f4b73ff" }, "downloads": -1, "filename": "ppaas-0.0.3.tar.gz", "has_sig": false, "md5_digest": "0bfb3c3858496402083406228888944e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9339, "upload_time": "2016-04-29T08:46:22", "url": "https://files.pythonhosted.org/packages/b7/df/c349c7b7268c79dd8eb9545a63f4fd6bac3e7f724e074a75703b38a2b145/ppaas-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "144fe94113eb75377c67480a2547ab3c", "sha256": "2568cf8fdab1dac873262b127a0457f06ed0ad2e883cf9f175d74db209a644a4" }, "downloads": -1, "filename": "ppaas-0.0.4.tar.gz", "has_sig": false, "md5_digest": "144fe94113eb75377c67480a2547ab3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9178, "upload_time": "2016-10-13T08:21:35", "url": "https://files.pythonhosted.org/packages/93/a9/48c5f8057bfe09c707922355408ff8750c507c818101292eaea157f5d5a3/ppaas-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "144fe94113eb75377c67480a2547ab3c", "sha256": "2568cf8fdab1dac873262b127a0457f06ed0ad2e883cf9f175d74db209a644a4" }, "downloads": -1, "filename": "ppaas-0.0.4.tar.gz", "has_sig": false, "md5_digest": "144fe94113eb75377c67480a2547ab3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9178, "upload_time": "2016-10-13T08:21:35", "url": "https://files.pythonhosted.org/packages/93/a9/48c5f8057bfe09c707922355408ff8750c507c818101292eaea157f5d5a3/ppaas-0.0.4.tar.gz" } ] }