Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rustack-esu

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rustack-esu

Rustack Cloud Platform API Wrapper

  • 0.1.20
  • PyPI
  • Socket score

Maintainers
2

|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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc