Skip to main content

RUSTACK-ESU Cloud API Wrapper

Project description

PyPI Version Build Status Codecov Badge

rustack-esu

rustack-esu является Python библиотекой для работы с публичным облаком СБКлауд.

Установка

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

$ pip install rustack-esu

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

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

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}')

Напечатает:

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

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

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

Напечатает:

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

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

Более подробную информация можно получить в документации.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rustack-esu-0.1.10.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

rustack_esu-0.1.10-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file rustack-esu-0.1.10.tar.gz.

File metadata

  • Download URL: rustack-esu-0.1.10.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for rustack-esu-0.1.10.tar.gz
Algorithm Hash digest
SHA256 ac09932e5562d0e3ac99d582b19b481458a0e1a17e623a826cc4ae7a23e06a85
MD5 e8f5059b1c2cde5ebfdbd0f8002ec5f8
BLAKE2b-256 af378d2c073fb8598aeec90bfb966dae5718f70adf9baf4ea66c1405c460a31d

See more details on using hashes here.

File details

Details for the file rustack_esu-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: rustack_esu-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for rustack_esu-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 cf7f9888465b58a5da978e191fd0f257bab063e567b4f5b0ddd8443f6b93b309
MD5 fd36b0624032add9935fb9f23d8332e7
BLAKE2b-256 1af1dd396076a024c2e1b011051eb5a7094ac802d6afbacac72108b54d06dee4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page