RUSTACK-ESU Cloud API Wrapper
Project description
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()
vdc = Vdc(name='Новый ВЦОД', hypervisor_type='kvm', 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
Release history Release notifications | RSS feed
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.4.tar.gz
(12.8 kB
view details)
Built Distribution
File details
Details for the file rustack-esu-0.1.4.tar.gz
.
File metadata
- Download URL: rustack-esu-0.1.4.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 850f42521eca27429a7a9781178987d39d9a1fe0ab803e075e0ad2d658bb35be |
|
MD5 | cff6c9997ce5578c119d1ba7c4ce7630 |
|
BLAKE2b-256 | 0cf705f33d5fb7aa8122cb21701851ba28ddbfcbdbacc81fdb22b8ec58ffb1bf |
File details
Details for the file rustack_esu-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: rustack_esu-0.1.4-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f65a8966ff68df4fbbdd4ea9c4a205a4f8721a2957b7d590af4e473f6bffae5 |
|
MD5 | 5a47213bca5b3df0c72875babc570e4e |
|
BLAKE2b-256 | 2d1877068dee034680200d3e4a822c2b2ccc48cb0005cf7a5f3e06c183f2edad |