rustack-esu


Namerustack-esu JSON
Version 0.1.20 PyPI version JSON
download
home_pagehttps://github.com/rustack-cloud-platform/rcp-python
SummaryRustack Cloud Platform API Wrapper
upload_time2024-08-22 00:42:40
maintainerVladimir K Urushev
docs_urlNone
authorVladimir K Urushev
requires_python>=3.4
licenseMIT
keywords cloud api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            |PyPI Version| |Build Status| |Codecov Badge|

===========
rcp-python
===========

Python-библиотека для работы с Rustack Cloud Platform


Установка
=========

Минимальная версия Python для установки пакета: 3.5.

.. code-block:: bash

    $ pip install rustack-esu

Примеры использования
=====================


Создание ВЦОД
-------------

.. code:: python

    from esu import Manager, Project, Vdc

    token = '72321013a102d2d3da2eaa79f0a613d40cf642fb'

    manager = Manager(token=token)
    client = manager.get_all_clients()[0]
    project = Project(name='Новый проект', client=client, token=token)
    project.create()

    hypervisor = next(h for h in project.get_available_hypervisors() \
        if h.type == 'kvm')

    vdc = Vdc(name='Новый ВЦОД', hypervisor=hypervisor, project=project,
              token=token)
    vdc.create()

    print(f'ID нового ВЦОД: {vdc.id}')

Напечатает:

.. code:: bash

    ID нового ВЦОД: 62a2df46-5412-4ca2-9d60-f6fcbe5f4b5f


Создание сервера
----------------

.. code:: python

    from esu import Manager, Project, Vdc

    vdc = Vdc.get_object('62a2df46-5412-4ca2-9d60-f6fcbe5f4b5f', token=token)
    vm = vdc.create_vm('Новый сервер', 'KVM Ubuntu 18', 'xj3$mNW11')

    print(f'ID нового сервера: {vm.id}')
    print(f'URL VNC консоли: {vm.get_vnc_url()}')  # login: ubuntu

Напечатает:

.. code:: bash

    ID нового сервера: 6c53c690-bd65-4fa5-888a-c9f8054a8ddc
    URL VNC консоли: https://...


Документация
============

Более подробную информация можно получить в
`документации <https://rcp-python.readthedocs.io/>`_.


.. |PyPI Version| image:: https://badge.fury.io/py/rustack-esu.svg
   :target: https://badge.fury.io/py/rustack-esu
.. |Build Status| image:: https://github.com/pilat/rustack-esu/actions/workflows/tests.yaml/badge.svg?branch=master
   :target: https://github.com/pilat/rustack-esu/actions/workflows/tests.yaml
.. |Codecov Badge| image:: https://codecov.io/gh/pilat/rustack-esu/branch/master/graph/badge.svg?token=KZ4T5XZ8T3 
   :target: https://codecov.io/gh/pilat/rustack-esu



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rustack-cloud-platform/rcp-python",
    "name": "rustack-esu",
    "maintainer": "Vladimir K Urushev",
    "docs_url": null,
    "requires_python": ">=3.4",
    "maintainer_email": "urushev@yandex.ru",
    "keywords": "cloud, api",
    "author": "Vladimir K Urushev",
    "author_email": "urushev@yandex.ru",
    "download_url": "https://files.pythonhosted.org/packages/43/33/ad1e47375a7c11d181de4ba6ad534073524c4edb344da50a3769a7e9b504/rustack-esu-0.1.20.tar.gz",
    "platform": null,
    "description": "|PyPI Version| |Build Status| |Codecov Badge|\n\n===========\nrcp-python\n===========\n\nPython-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Rustack Cloud Platform\n\n\n\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\n=========\n\n\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Python \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430: 3.5.\n\n.. code-block:: bash\n\n    $ pip install rustack-esu\n\n\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f\n=====================\n\n\n\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0412\u0426\u041e\u0414\n-------------\n\n.. code:: python\n\n    from esu import Manager, Project, Vdc\n\n    token = '72321013a102d2d3da2eaa79f0a613d40cf642fb'\n\n    manager = Manager(token=token)\n    client = manager.get_all_clients()[0]\n    project = Project(name='\u041d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442', client=client, token=token)\n    project.create()\n\n    hypervisor = next(h for h in project.get_available_hypervisors() \\\n        if h.type == 'kvm')\n\n    vdc = Vdc(name='\u041d\u043e\u0432\u044b\u0439 \u0412\u0426\u041e\u0414', hypervisor=hypervisor, project=project,\n              token=token)\n    vdc.create()\n\n    print(f'ID \u043d\u043e\u0432\u043e\u0433\u043e \u0412\u0426\u041e\u0414: {vdc.id}')\n\n\u041d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442:\n\n.. code:: bash\n\n    ID \u043d\u043e\u0432\u043e\u0433\u043e \u0412\u0426\u041e\u0414: 62a2df46-5412-4ca2-9d60-f6fcbe5f4b5f\n\n\n\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\n----------------\n\n.. code:: python\n\n    from esu import Manager, Project, Vdc\n\n    vdc = Vdc.get_object('62a2df46-5412-4ca2-9d60-f6fcbe5f4b5f', token=token)\n    vm = vdc.create_vm('\u041d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440', 'KVM Ubuntu 18', 'xj3$mNW11')\n\n    print(f'ID \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430: {vm.id}')\n    print(f'URL VNC \u043a\u043e\u043d\u0441\u043e\u043b\u0438: {vm.get_vnc_url()}')  # login: ubuntu\n\n\u041d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442:\n\n.. code:: bash\n\n    ID \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430: 6c53c690-bd65-4fa5-888a-c9f8054a8ddc\n    URL VNC \u043a\u043e\u043d\u0441\u043e\u043b\u0438: https://...\n\n\n\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f\n============\n\n\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\n`\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <https://rcp-python.readthedocs.io/>`_.\n\n\n.. |PyPI Version| image:: https://badge.fury.io/py/rustack-esu.svg\n   :target: https://badge.fury.io/py/rustack-esu\n.. |Build Status| image:: https://github.com/pilat/rustack-esu/actions/workflows/tests.yaml/badge.svg?branch=master\n   :target: https://github.com/pilat/rustack-esu/actions/workflows/tests.yaml\n.. |Codecov Badge| image:: https://codecov.io/gh/pilat/rustack-esu/branch/master/graph/badge.svg?token=KZ4T5XZ8T3 \n   :target: https://codecov.io/gh/pilat/rustack-esu\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Rustack Cloud Platform API Wrapper",
    "version": "0.1.20",
    "project_urls": {
        "Download": "https://github.com/rustack-cloud-platform/rcp-python/tarball/0.1.20",
        "Homepage": "https://github.com/rustack-cloud-platform/rcp-python"
    },
    "split_keywords": [
        "cloud",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92ccf497639f40c9e56042301ac21f3169eacc20eda5e0f966e0f3249efb877d",
                "md5": "f0a7b33a639a2a13c3facf219bdc8f50",
                "sha256": "798926bb3617efea64ed59a20409d51ea03eb22ec59998c2fd5d11e70cb9d9d4"
            },
            "downloads": -1,
            "filename": "rustack_esu-0.1.20-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f0a7b33a639a2a13c3facf219bdc8f50",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.4",
            "size": 52420,
            "upload_time": "2024-08-22T00:42:38",
            "upload_time_iso_8601": "2024-08-22T00:42:38.814165Z",
            "url": "https://files.pythonhosted.org/packages/92/cc/f497639f40c9e56042301ac21f3169eacc20eda5e0f966e0f3249efb877d/rustack_esu-0.1.20-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4333ad1e47375a7c11d181de4ba6ad534073524c4edb344da50a3769a7e9b504",
                "md5": "36394995099fb75a224dc49adde99fd4",
                "sha256": "37b9ff6f1304f5114f105a8cb3632bcdfea2aab50e54a3d67a706855e2f4cb14"
            },
            "downloads": -1,
            "filename": "rustack-esu-0.1.20.tar.gz",
            "has_sig": false,
            "md5_digest": "36394995099fb75a224dc49adde99fd4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.4",
            "size": 25859,
            "upload_time": "2024-08-22T00:42:40",
            "upload_time_iso_8601": "2024-08-22T00:42:40.446229Z",
            "url": "https://files.pythonhosted.org/packages/43/33/ad1e47375a7c11d181de4ba6ad534073524c4edb344da50a3769a7e9b504/rustack-esu-0.1.20.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 00:42:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rustack-cloud-platform",
    "github_project": "rcp-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "rustack-esu"
}
        
Elapsed time: 0.35650s