Syneto Client API library
Project description
Syneto API
Syneto Client API library: authentication, storage, virtualization and protection
Installation
$ pip install syneto-api
Basic Usage
from syneto_api import Authentication, Virtualization, Storage, Protection
auth_api = Authentication(url_base="https://syneto-instance-ip-address/api/auth", insecure_ssl=True)
response = auth_api.login(username="admin", password="admin")
jwt = response['jwt']
virt_api = Virtualization(url_base="https://syneto-instance-ip-address/api/virtualization", insecure_ssl=True)
virt_api.set_auth_jwt(jwt)
print(virt_api.get_vms())
storage_api = Storage(url_base="https://syneto-instance-ip-address/api/storage", insecure_ssl=True)
storage_api.set_auth_jwt(jwt)
print(storage_api.get_pools())
Environment Variables
For conveninence, the base urls for the api endpoints are also accepted as environment variables, please see below.
AUTHORIZATION_USER=admin
AUTHORIZATION_PASS=admin
AUTHORIZATION_SERVICE=https://syneto-instance-ip-address/api/auth
VIRTUALIZATION_SERVICE=https://syneto-instance-ip-address/api/virtualization
STORAGE_SERVICE=https://syneto-instance-ip-address/api/storage
PROTECTION_SERVICE=https://syneto-instance-ip-address/api/protection
If you are using self-signed SSL certificates, set the following env. so that the http request library does not perform ssl verification.
ALLOW_INSECURE_SSL=True
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
syneto_api-0.3.8.tar.gz
(13.2 kB
view hashes)
Built Distribution
syneto_api-0.3.8-py3-none-any.whl
(16.4 kB
view hashes)
Close
Hashes for syneto_api-0.3.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8be5ff07756dda1ad76b43289e0e4b29cd842f53518d86848f35aca804d5a144 |
|
MD5 | 5ac73d6bdd654d9d49712471cf88b2bd |
|
BLAKE2b-256 | 6a1e496f794c13ddec4d4c1bb1b6f4ca42d7b8d1c1d0568c3c59f957ec943f26 |